ownCloud encryption not working with Notes App
We are getting a lot of feedback concerning encryption not working in ownCloud Notes. As suggested by @Raydiation I hereby open this one in core. Please everyone out there:
- check your SSL Keychain before testing this issue
- give us as much feedback as possible on this
Dependent Issues
- owncloud/notes#48
- https://github.com/aykit/myownnotes-android/issues/35
Core Devs It would be great if you could comment on this.
Thanks.
@schiesbn Can you test?
I run an encrypted ownCloud. The Notes app is installed and enabled. Accessing the url /index.php/apps/notes/api/v0.2/notes gives me the contents. Trying to access with the myownnotes from Android generates an error "There was a connection error. Please check your username / password". The log contains the following: XXX - xxx [02/Jul/2014:21:08:15 +0000] "GET /index.php/apps/notes/api/v0.2/notes HTTP/1.1" 302 1599 "-" "Dalvik/1.6.0 (Linux; U; Android 4.2.2; A1-810 Build/JDQ39)" XXX - xxx [02/Jul/2014:21:08:16 +0000] "GET /apps/files_encryption/files/error.php?p=0&errorCode=1 HTTP/1.1" 403 2510 "-" "Dalvik/1.6.0 (Linux; U; Android 4.2.2; A1-810 Build/JDQ39)"
SSL keychain for the https connection? I have a RapidSSL cert, installed in Apache and intermediate cert in the config as well. Seems to work fine.
Oh man, that issue....
@Raydiation: Is owncloud/notes#48 still unresolved? @tigrino says the API is working fine. A quick check on our testmachine gave us the impression that the app is working too with ownCloud encryption enabled (https://github.com/aykit/myownnotes-android/issues/35).
However, I have no idea (nor time to look at atm) how ownCloud implemented encryption. It would be great if we could figure out if owncloud/notes#48 is solved and the app is the only "weak" link here.
Questions
- What is the best way to test an encrypted ownCloud setting with API and the app?
- How can I make sure, my ownCloud instance is encrypted?
- Is it important what app is being installed first (Notes or Encryption)? We should test all possibilities....
- Is it important to use a recovery key?
@tigrino : Please use https://www.ssllabs.com/ssltest/ to test your chain. Additionally, it would be great if you could test it with encryption disabled as well. Just to make sure... and please provide us with every step you take ;)
@maltemafia Can you try it with the newest beta of 7? Works for me
Mmm... Taking the server offline and replacing it with a fresh instance to check the working without/with encryption may be possible but I would rather avoid doing that if possible... Mine is encryption first, long time ago, notes installed yesterday.
Call to the API (/index.php/apps/notes/api/v0.2/notes) returns this: [{"modified":1404366591,"title":"Hello, world!","content":"Hello, world!","id":44061}]
The file on disk is encrypted and contains this: FnI7GrzEBZWUaETq+A==00iv00qrBKD5IemmX9hIbzx
ssllabs check reports all ok with the certificate except for limited support for forward secrecy. Do you want the complete report here?
That would be great. But if you don't want to share it, just report this:
Additional Certificates (if supplied)
Certificates provided x (z bytes) Chain issues REPORT THIS FIELD
@Raydiation : My colleague is testing 6.0.4 today and I will test 7 later on. Btw, my name is maltefiala, not to be confused with some mafia :)
@tigrino : What server version of ownCloud are you running?
My colleague @steppenhahn made various tests today. From our point of view, encryption seems to be the problem.
My Own Notes works like a charm with the encryption-plugin disabled. As soon as we activate the encryption-plugin, we get an 403 error and the following exception:
java.io.FileNotFoundException: https://myserver.com/owncloud/apps/files_encryption/files/error.php?p=0&errorCode=1
it does not matter if the encryption is disabled or enabled (admin-tab) - If the plugin is enabled, myownnotes does not work.
System tested
- ownCloud Server Version 6.0.4
- Notes Version: 0.9
- Encryption-Plugin-version: 0.5
Next Steps
We will investigate this issue on 7.0 this weekend.
Try to log out after enabling encryption. The error code in the URL means that encryption is not yet initialized
@maltefiala
Additional Certificates (if supplied) Certificates provided 2 (2295 bytes) Chain issues None
ownCloud 6.0.4 (stable)
@Raydiation I run for several months already on this version and with encryption enabled. I just installed notes and ran into problems, encryption was there before and is working fine.
The chain looks good then. I will investigate further on the weekend.
I came to the same conclusion as maltefiala: it must have to do with the encryption. My nginx-access.log reports [...] GET /owncloud/index.php/apps/notes/api/v0.2/notes HTTP/1.1" 302 5 "-" "Dalvik/1.6.0 (Linux; U; Android 4.1.2; GT-I8160 Build/JZO54K)" [...] GET /owncloud/ HTTP/1.1" 200 3017 "-" "Wget/1.14 (linux-gnu)" [...] GET /owncloud/apps/files_encryption/files/error.php?p=0&errorCode=1 HTTP/1.1" 403 2094 "-" "Dalvik/1.6.0 (Linux; U; Android 4.1.2; GT-I8160 Build/JZO54K)" when MyOwnNotes tries to refresh and it reports "There was a connection error. Please check your username and password.". I hope that helps, because I lost all my notes a moment ago.
@urenzel i am really sorry that you lost your notes. :( had this bug too and it was tricky to find. but i fixed it in version 1.2.2
@Raydiation tried logging out - still doesn't work.
here is exactly what i did:
- login
- make sure encryption plugin is disabled.
- logout
now myownnotes can connect properly - no errors
then:
- login
- enable encryption plugin.
- logout
now myownnotes can NOT connect. see error message from maltefiala (waiting 5 min. after logout does not change outcome)
then:
- login
- enable encryption recovery key + enter key.
- logout
same problem as above
System tested:
- ownCloud Server Version 6.0.4
- Notes Version: 0.9
- Encryption-Plugin-version: 0.5
Just for clarification https://github.com/owncloud/notes/issues/48 is not solved. I spent the entire weekend working on this without a solution. It's a high priority for users.
This issue is really a duplicate of https://github.com/owncloud/core/issues/8830.
With the new release, 1.3.1, I get a different message in the log file: x.x.x.x - guest [19/Jul/2014:19:29:21 +0000] "GET /index.php/apps/notes/api/v0.2/notes HTTP/1.1" 401 956 "-" "Dalvik/1.6.0 (Linux; U; Android 4.3; D5503 Build/14.2.A.1.114)"
Accessing the URL directly in the browser returns the expected [{"modified":1404366591,"title":"Hello, world!","content":"Hello, world!","id":44061}]
Nope, back to the original errors. x.x.x.x - guest [11/Aug/2014:11:10:53 +0000] "GET /index.php/apps/notes/api/v0.2/notes HTTP/1.1" 302 1619 "-" "Dalvik/1.6.0 (Linux; U; Android 4.3; D5503 Build/14.2.A.1.114)" x.x.x.x - guest [11/Aug/2014:11:10:54 +0000] "GET /apps/files_encryption/files/error.php?p=0&errorCode=1 HTTP/1.1" 403 2287 "-" "Dalvik/1.6.0 (Linux; U; Android 4.3; D5503 Build/14.2.A.1.114)"
Sry, we are in a summer limbo atm. We will try to find a solution in September.