-
Notifications
You must be signed in to change notification settings - Fork 31
Description
I'm running shiny-server on CentOS and want to use the keyring package to store and access passwords.
Given that shiny apps run as shiny user, what is the process for initializing the keyring for shiny apps to utilize?
Here's what I've tried so far:
- Login to
shinyuser, - run R,
keyring::key_set(service = 'svcname', username = 'username', keyring = 'system')
Now when I do this, it returns a message statingThe 'system' keyring does not exist, enter a keyring password to create it:So I enter a password.- go to my shiny server url and run my app
The shiny app wants the password so the code for that in the app is: keyring::key_get(service = 'svcname', username = 'username') but this doesn't work. I get an error in the shiny app's log file which doesn't make any sense. I'm running key_get() and for some reason the error is about setting a password:
Warning: Error in b__file_set_keyring_pass: Aborted setting keyring password
112: stop
111: b__file_set_keyring_pass
110: private$set_keyring_pass
109: b_file_keyring_unlock
108: self$keyring_unlock
107: b_file_get
106: default_backend()$get
105: keyring::key_get
...
When I attempt to just run keyring::key_get('svcname', 'username') as the shiny user in an interactive session, I can see that I'm getting a prompt to unlock the 'system' keyring by entering a password. Am I doing something wrong? Running the shiny apps my Mac this 'just works', but from within shiny-server on Linux not so much.