r-lib/keyring

Create the system keyring for Linux server users if the system keyring doesn't exist

nwstephens opened this issue · 1 comments

In order to use rstudioapi::askForSecret() with the file backend on a Linux server, users have to create the system keyring. Having to set up the system keyring manually is a barrier to adoption and makes it more likely that RStuidio Server [Pro] users store passwords unencrypted outside of keyring.

It would be nice to have an elegant way to create the system keyring on a Linux server when the system keyring doesn't exist: keyring::keyring_create("system"). It would be nice if customers didn't have to appeal to documentation to get up and running with keyring on Linux servers.

The system keyring is important because it is used by rstudioapi::askForSecret().

Currently, if you attempt to use rstudioapi::askForSecret() without a keyring you get this error:

Error in normalizePath(file_name, mustWork = TRUE) : 
  path[1]="/usr/home/nathan/.config/r-keyring/system.keyring": No such file or directory

This error makes it look like something is broken, when in fact all that is needed is for a new system keyring to be created. I would expect to see next steps on how to create a system keyring.