You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
After unlocking the keychain while Cryptomator is running, no option to use keychain features #1308
After fixing the Gnome keyring freeze by updating to secret-service. v1.1.0 in this commit it is possible to unlock a keychain even if you select cancel on the initial prompt to unlock your keychain.
After unlocking the keychain from somewhere else, it is not possible to access it from Cryptomator without restarting the app.
System Setup
Operating system and version: Lubuntu 19.10
Cryptomator version: post 1.5.7
Volume type: /
Steps to Reproduce
Have a working keychain set as default on your system
Start Cryptomator with the keychain locked
Select "Cancel" in the first prompt before the application actually starts.
Have a vault configured
Go to a separate application (your keychain manager) and unlock the keychain
Expected Behavior
I can use the "fast" / "unlock now" feature.
When unlocking a vault without the password saved, the checkbox to save the password is there.
And in the vault options in the password tab, there is the "Forget Saved Password" option.
Actual Behavior
Cryptomator does not re-check if the system has a supportedKeychain and the keychain features are not usable.
changed the title [-]After unlocking the keychain while Cryptomator is running, no option to "fast" unlock[/-][+]After unlocking the keychain while Cryptomator is running, no option to use keychain features[/+]on Aug 19, 2020
The following would be one possible way to solve this, but this would require some secret-service interface design changes.
A way to solve this would be a static method in SimpleCollection that checks whether a D-Bus object like Service is available on the bus. The way to do this would be via connection.getRemoteObject, similar to this:
I guess I don't handle the close()/disconnect() in the new isAvailable() method well or introduced these issues with my further fixes of the SignalHandler.
Feel free to test the version. I would appreciate some feedback on the integration, as I wasn't able to reproduce the initial KDE problem (#1268) with my virtual machine. Neither on 18.04 nor on 20.04.
I released a new 1.2.0-SNAPSHOT, which does not require explicit user permission by prompting for updating a collection item. I also tested the version with the current cryptomator master branch and it seems to be fine. The two mentioned issues occur like 1/50 and 1/25 times, but should be handled all time.
I released a new 1.2.0-SNAPSHOT, which does not require explicit user permission by prompting for updating a collection item. I also tested the version with the current cryptomator master branch and it seems to be fine. The two mentioned issues occur like 1/50 and 1/25 times, but should be handled all time.
I compiled Cryptomator 1.5.8 with the 1.2.0-SNAPSHOT and I was also not able to trigger the two issues mentioned above.
I tested this under the newest Ubuntu 20.10 and it works quite well. Especially, now at the application start i'm not always bugged by the question if I wanna open the keychain.
Regarding the two stack traces at the end: Do they have any security implications? @swiesend I don't know the DBUS system good enough to make any guesses, and all i can see that either there might be some unclosed connection or unused signal handler.
From my point of view @infeo there are no further security implications apart form the typical disclaimer for D-Bus messaging in general and for the Secret Service API in specific (CVE-2018-19358) as the transport encryption of the connection is valid per session.
I think this is whats happening for the two mentioned issues:
DBusConnection - broken pipe swiesend/secret-service#20 can occur, when a signal handler (one registered per singal kind) was removed yet, but the open connection still receives a signal of that kind, which it then does not know how to handle properly. And meanwhile the connection closes and further signal handlers can't remove themselves anymore.
Both cases need more attention from my side (as the thread pool handling seems to be fine in java-dbus). So that the secret-service library will await still expected but not yet occurred signals (in a reasonable time frame), before removing the signal handlers and then closing the D-Bus connection.
In the latest version 1.2.1 I fixed a bug, regarding the handling of the master secret for non-default collections (when connecting to an already existent non-default collection the user shouldn't be prompted as the master secret was already provided through the constructor). But as Cryptomator is just using the default collection that won't have any effect on your side.
Activity
[-]After unlocking the keychain while Cryptomator is running, no option to "fast" unlock[/-][+]After unlocking the keychain while Cryptomator is running, no option to use keychain features[/+]purejava commentedon Aug 29, 2020
Why doesn't it offer to use the keyring?
Creating a
SimpleCollectiontries to unlock the default collection and in case it stays locked,isSupported()returnsfalse.Since this test is only performed once during initialization, the keyring functionality stays disabled.
https://github.com/purejava/secret-service/blob/e13b5397cbfef0eed8f5376df34e7532b227c41f/src/main/java/org/freedesktop/secret/simple/SimpleCollection.java#L47-L60
cryptomator/main/keychain/src/main/java/org/cryptomator/keychain/LinuxSecretServiceKeychainAccessImpl.java
Lines 14 to 22 in 8f5c499
The following would be one possible way to solve this, but this would require some secret-service interface design changes.
A way to solve this would be a static method in
SimpleCollectionthat checks whether a D-Bus object likeServiceis available on the bus. The way to do this would be viaconnection.getRemoteObject, similar to this:This would offer to check whether gnome-keyring is installed and configured (and subsequently return true for
isSupported()).As there seem to be enough calls to unlock a keyring in the secret-service code, this would solve this issue.
purejava commentedon Aug 30, 2020
@swiesend and I made the changes described above. They are commited to swiesend/secret-service develop-1.0.0.
I tested Cryptomator 1.5.8 with
develop-1.0.0and it does solve this issue as the gnome-keyring functionality stays available.Maybe @BeyerMart has a chance to test it too? 😀
swiesend commentedon Sep 6, 2020
I made further changes and uploaded a
1.2.0-SNAPSHOTwhich lives on the currentdevelop-1.0.0branch as @purejava pointed out.The update mainly introduces the
staticisAvailable()method on theSimpleCollection. See the CHANGELOG.md and the open PR for 1.2.0 for all changes.But I could observe some non fatal issues with the
1.2.0-SNAPSHOTversion:dbus-javaDBusConnection - RejectedExecutionExceptionI guess I don't handle the
close()/disconnect()in the newisAvailable()method well or introduced these issues with my further fixes of theSignalHandler.Feel free to test the version. I would appreciate some feedback on the integration, as I wasn't able to reproduce the initial KDE problem (#1268) with my virtual machine. Neither on
18.04nor on20.04.swiesend commentedon Sep 10, 2020
I released a new
1.2.0-SNAPSHOT, which does not require explicit user permission by prompting for updating a collection item. I also tested the version with the current cryptomator master branch and it seems to be fine. The two mentioned issues occur like 1/50 and 1/25 times, but should be handled all time.purejava commentedon Sep 12, 2020
So theses two issues only occur on shutting down? Did I get this right?
purejava commentedon Sep 12, 2020
I compiled Cryptomator
1.5.8with the1.2.0-SNAPSHOTand I was also not able to trigger the two issues mentioned above.purejava commentedon Sep 12, 2020
If someone else is interested in testing there is a ready-to-go branch: purejava/cryptomator 1.2.0-SNAPSHOT.
swiesend commentedon Sep 17, 2020
yes on
disconnect()s, but as I reuse now the initial connection this really should only occur on shutdown.I released this now as 1.2.0. See CHANGELOG.md.
BeyerMart commentedon Sep 18, 2020
purejava commentedon Sep 18, 2020
overheadhunter commentedon Sep 21, 2020
infeo commentedon Oct 30, 2020
I tested this under the newest Ubuntu 20.10 and it works quite well. Especially, now at the application start i'm not always bugged by the question if I wanna open the keychain.
Regarding the two stack traces at the end: Do they have any security implications? @swiesend I don't know the DBUS system good enough to make any guesses, and all i can see that either there might be some unclosed connection or unused signal handler.
swiesend commentedon Nov 1, 2020
From my point of view @infeo there are no further security implications apart form the typical disclaimer for D-Bus messaging in general and for the Secret Service API in specific (CVE-2018-19358) as the transport encryption of the connection is valid per session.
I think this is whats happening for the two mentioned issues:
Both cases need more attention from my side (as the thread pool handling seems to be fine in
java-dbus). So that thesecret-servicelibrary will await still expected but not yet occurred signals (in a reasonable time frame), before removing the signal handlers and then closing the D-Bus connection.In the latest version
1.2.1I fixed a bug, regarding the handling of the master secret for non-default collections (when connecting to an already existent non-default collection the user shouldn't be prompted as the master secret was already provided through the constructor). But as Cryptomator is just using the default collection that won't have any effect on your side.BeyerMart commentedon Nov 9, 2020
Yeah, I also finally found some time to test this. 👍