Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: decrypt versions on IVersionedStorage #307

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

DeepDiver1975
Copy link
Member

No description provided.

@ownclouders
Copy link
Contributor

💥 Acceptance tests pipeline webUIcoreMKey-28-5-master-chrome-mysql8.0-php7.4 failed. The build has been cancelled.

https://drone.owncloud.com/owncloud/encryption/2126/89/1

@DeepDiver1975
Copy link
Member Author

18.04: Pulling from owncloud/ubuntu
Digest: sha256:185a2c4fb8081057f9bdbcd01e89c06c26603764f2c3382b45511c7fee64a855
Status: Image is up to date for owncloud/ubuntu:18.04
+ tail -f /var/www/owncloud/server/data/owncloud.log
{"reqId":"JRChZno2kjHtuYfxLszC","level":3,"time":"2021-10-18T19:07:12+00:00","remoteAddr":"","user":"--","app":"mysql.setup","method":"--","url":"--","message":"Specific user creation failed: An exception occurred while executing 'SELECT user FROM mysql.user WHERE user=?' with params [\"oc_admin\"]:\n\nSQLSTATE[42000]: Syntax error or access violation: 1142 SELECT command denied to user 'owncloud'@'192.168.9.6' for table 'user'"}
{"reqId":"0luvZtq3VPmAJMexizJK","level":2,"time":"2021-10-18T19:10:07+00:00","remoteAddr":"192.168.9.10","user":"admin","app":"no app in context","method":"POST","url":"\/ocs\/v1.php\/apps\/testing\/api\/v1\/increasefileid","message":"Inserting dummy entry with fileid bigger than max int of 32 bits for testing"}
{"reqId":"FZtJvW6H23sNO1eO0HZh","level":2,"time":"2021-10-18T19:21:00+00:00","remoteAddr":"192.168.9.10","user":"admin","app":"no app in context","method":"POST","url":"\/ocs\/v1.php\/apps\/testing\/api\/v1\/increasefileid","message":"Inserting dummy entry with fileid bigger than max int of 32 bits for testing"}
{"reqId":"sfPXCUsbSVCGExQKIhEQ","level":2,"time":"2021-10-18T19:31:01+00:00","remoteAddr":"192.168.9.2","user":"--","app":"core","method":"POST","url":"\/login","message":"Login failed: 'Alice' (Remote IP: '192.168.9.2')"}
{"reqId":"o3jIksE2xcvnG3nKqkLG","level":3,"time":"2021-10-18T19:37:45+00:00","remoteAddr":"192.168.9.2","user":"admin","app":"index","method":"POST","url":"\/settings\/users\/changepassword","message":"Exception: {\"Exception\":\"TypeError\",\"Message\":\"Argument 4 passed to OCA\\\\Encryption\\\\KeyManager::__construct() must be an instance of OCA\\\\Encryption\\\\Session, instance of OC\\\\User\\\\Session given, called in \\\/var\\\/www\\\/owncloud\\\/server\\\/settings\\\/ChangePassword\\\/Controller.php on line 123\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/server\\\/settings\\\/ChangePassword\\\/Controller.php(123): OCA\\\\Encryption\\\\KeyManager->__construct()\\n#1 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/Route\\\/Router.php(344): OC\\\\Settings\\\\ChangePassword\\\\Controller::changeUserPassword()\\n#2 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/base.php(927): OC\\\\Route\\\\Router->match()\\n#3 \\\/var\\\/www\\\/owncloud\\\/server\\\/index.php(54): OC::handleRequest()\\n#4 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/server\\\/apps\\\/encryption\\\/lib\\\/KeyManager.php\",\"Line\":103}"}
{"reqId":"ZovQSpuVPz85C33E4RbM","level":2,"time":"2021-10-18T19:37:46+00:00","remoteAddr":"192.168.9.10","user":"--","app":"core","method":"GET","url":"\/remote.php\/webdav\/randomfile.txt","message":"Login failed: 'Alice' (Remote IP: '192.168.9.10')"}
{"reqId":"bY4FrX42t0eceBz3Z3RR","level":2,"time":"2021-10-18T19:53:40+00:00","remoteAddr":"192.168.9.10","user":"admin","app":"no app in context","method":"POST","url":"\/ocs\/v1.php\/apps\/testing\/api\/v1\/increasefileid","message":"Inserting dummy entry with fileid bigger than max int of 32 bits for testing"}
{"reqId":"KiEbeEKKQ1ESYpikfuGz","level":3,"time":"2021-10-18T19:54:08+00:00","remoteAddr":"192.168.9.2","user":"admin","app":"index","method":"POST","url":"\/settings\/users\/changepassword","message":"Exception: {\"Exception\":\"TypeError\",\"Message\":\"Argument 4 passed to OCA\\\\Encryption\\\\KeyManager::__construct() must be an instance of OCA\\\\Encryption\\\\Session, instance of OC\\\\User\\\\Session given, called in \\\/var\\\/www\\\/owncloud\\\/server\\\/settings\\\/ChangePassword\\\/Controller.php on line 123\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/server\\\/settings\\\/ChangePassword\\\/Controller.php(123): OCA\\\\Encryption\\\\KeyManager->__construct()\\n#1 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/Route\\\/Router.php(344): OC\\\\Settings\\\\ChangePassword\\\\Controller::changeUserPassword()\\n#2 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/base.php(927): OC\\\\Route\\\\Router->match()\\n#3 \\\/var\\\/www\\\/owncloud\\\/server\\\/index.php(54): OC::handleRequest()\\n#4 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/server\\\/apps\\\/encryption\\\/lib\\\/KeyManager.php\",\"Line\":103}"}
{"reqId":"zaS2gMF5cBfXJQDteLqh","level":2,"time":"2021-10-18T19:54:09+00:00","remoteAddr":"192.168.9.10","user":"--","app":"core","method":"GET","url":"\/remote.php\/webdav\/randomfile.txt","message":"Login failed: 'Alice' (Remote IP: '192.168.9.10')"}

@DeepDiver1975
Copy link
Member Author

@phil-davis I need to execute drone on this pr with a specific core branch owncloud/core#39348

Mind helping be out on how to address this? THX

@phil-davis
Copy link
Contributor

https://drone.owncloud.com/owncloud/encryption/2130/3/2

That's sad. Using owncloudci/core image to install from a core branch no longer works:

The engine "node" is incompatible with this module. Expected version ">= 14.17.0". Got "8.17.0"

That docker image needs node 14 installed in it. We havven't noticed the problem until now, because usually owncloudci/core is used to install from a tarball (10.8.0, daily-master-qa etc). When doing that, the dependencies are already built-in to the tarball. So composer, node, yarn etc do not need to be run. Now to look into fixing that...

@phil-davis
Copy link
Contributor

After looking in owncloudci/core I remembered that we made a noddejs14 tag/image. core is already using that. The oC10 apps also need to use it. I pushed that change to this PR. It seems to be working:
https://drone.owncloud.com/owncloud/encryption/2131/3/2
git fetch --depth 1 --no-tags origin feat/storage-based-encryption-key-location-2

@ownclouders
Copy link
Contributor

💥 Acceptance tests pipeline apiCoreMKey-50-26-master-mysql8.0-php7.4 failed. The build has been cancelled.

https://drone.owncloud.com/owncloud/encryption/2131/45/1

@DeepDiver1975
Copy link
Member Author

@phil-davis - THX

Screenshot from 2021-10-26 09-24-18

@phil-davis
Copy link
Contributor

@DeepDiver1975 that should have been fixed by now - we accidentally broke some things when adding parameter and return types. Try a rebase and run CI again.

@DeepDiver1975
Copy link
Member Author

@DeepDiver1975 that should have been fixed by now - we accidentally broke some things when adding parameter and return types. Try a rebase and run CI again.

will do . thx a lot

@DeepDiver1975 DeepDiver1975 force-pushed the feat/decrypt-file-versions-from-IVersionedStorage branch from 02dde0f to dac20b2 Compare October 26, 2021 07:38
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@ownclouders
Copy link
Contributor

💥 Acceptance tests pipeline webUIcoreMKey-28-1-master-chrome-mysql8.0-php7.4 failed. The build has been cancelled.

https://drone.owncloud.com/owncloud/encryption/2143/77/1

@jnweiger
Copy link
Contributor

@DeepDiver1975 This branch now has conflicts. We cannot re-run drone -- afaik the node14 issue is fixed.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@ownclouders
Copy link
Contributor

💥 Acceptance tests pipeline apiCoreMKey-40-2-master-mysql8.0-php7.4 failed. The build has been cancelled.

https://drone.owncloud.com/owncloud/encryption/2395/21

@phil-davis
Copy link
Contributor

https://github.com/owncloud/core/tree/feat/storage-based-encryption-key-location-2
"This branch is 13 commits ahead, 307 commits behind master."

https://drone.owncloud.com/owncloud/encryption/2395/21/20

--- Expected
+++ Actual
@@ @@
-'30000'
+'60'

The default value of pollinterval was changed "recently" in core master. The CI is installing a quite-old version of core from branch feat/storage-based-encryption-key-location-2 and so the system-under-test and test-runner expectations are out-of-sync.

@DeepDiver1975 I suggest rebase that core branch, then run CI again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants