-
Notifications
You must be signed in to change notification settings - Fork 30
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
linux-keyutils
credentials are lost after reboot
#271
Comments
We should discuss this further at the SIG-Registries weekly, but my proposal to fix this is:
|
calvinrp
pushed a commit
that referenced
this issue
May 13, 2024
Makes keyring backends user-selectable, as discussed in #271 (comment). - [x] Refactor `client::keyring` functions into a `Keyring` struct which can be instantiated with a backend selection. - [x] Add a config option to control what backend is used. - [x] Improve error reporting when the `secret-service` backend isn't working. - [ ] Add a `flat-file` backend that stores keys in plaintext alongside the config file.
#287 and #278 were merged and should resolve. @dfoxfranke Thank you again |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#270 made
linux-keyutils
the default credential builder on Linux in order to resolve errors for users who do not havegnome-keyring
installed. However, unlikegnome-keyring
,linux-keyutils
does not persist credentials on disk. They are stored in kernel memory only, are lost on reboot, and also time out after a configurable period of non-use.linux-keyutils
is designed primarily around the needs of cloud-based virtual machine instances which themselves have no persistence and are provisioned at boot by some sort of key distribution server. It isn't a good fit for dev desktops, or at least not on its own.There's no free lunch here, really. If credentials are going to survive across reboots, they need to be stored on disk somewhere. If they're stored in plaintext, that has the obvious security drawbacks, and there's no advantage to using the
keyring
crate at all rather than just using the filesystem. If they're stored encrypted, then the decryption key has to come from somewhere, so either you have to prompt for a password or it has to be already available from an agent, in which case the agent has to get it from somewhere. If you want decryption to appear seamless, then the only good option is to derive the key from the user's login password at the time of login, which is exactly whatgnome-keyring
does. But that can only work if the system is set up for it, havinggnome-keyring
installed andpam_keyring
configured. So basically, you're going to have to choose between:Ideally, you'd pick a sensible default (probably 3, maybe 2), but make it configurable.
The text was updated successfully, but these errors were encountered: