r-lib / keyring

:closed_lock_with_key: Access the system credential store from R
https://keyring.r-lib.org/
Other
196 stars 28 forks source link

Why does the file backend "work best on Linux servers" according the package README, versus the libsecret backend on Linux Desktop ? #125

Closed jbodart-argenx closed 2 years ago

jbodart-argenx commented 2 years ago

Why does the file backend "work best on Linux servers" according the package README, versus the libsecret backend on Linux Desktop ? Is this related to the default keyring being unlocked when the user logs in? Does that work differently if the users logs in to the desktop GUI vs loging in through a text console or through ssh ? I couldn't find the answers in the documentation...

gaborcsardi commented 2 years ago

The file backend works without a GUI, libsecret does not. (In theory there is a way to make it work, but in practice it is very hard.)

jmbo1190 commented 2 years ago

with this file backend, is it necessary to run R interactively in order to be able to enter a password when prompted (to unlock the "keyring")? Or only when using a "non-default keyring" ? Does this depend on how you log into the server ?

gaborcsardi commented 2 years ago

No, it is not necessary.

jbodart-argenx commented 2 years ago

I can't figure out how to setup the 'system' (=default) keyring on Linux server with file backend so that when Iogin to Rstudio Server (opensource), or to Rstudio Workbench, the default keyring will automatically unlock using my login password.

Is that actually feasible?

Does it require using a non-default keyring ? it seems keyring="" may not require a password

Or does automatic unlocking of the default keyring only work on Windows and MacOS using Rstudio Desktop, and on Linux Desktop ?

gaborcsardi commented 2 years ago

Is that actually feasible?

No, AFAIK it is not, unfortunately. You need to unlock the keyring (default or not) manually for the file backend, there is no way to pass the login password to keyring automatically.

jbodart-argenx commented 2 years ago

Thanks for clarifying