As I understand, "keyring' library in R allows to store a password through the OS system API and access it from inside Shiny application.
F.e., from R console I can enter something like
library(keyring)
key_set_with_value(service = "DEV1"
,user="Scott"
,password="postgres")
And then from inside my Shiny app I can make a call like
app_pwd<-key_get("DEV1",'Scott")
and the variable app_pwd will acquire a value of "postgres".
So first call stores a value in OS "keyring", and the second call retrieves it from OS and pass it on to R code.
As I also understand, in case of R server located on Linux Server, this library uses so called
'file backend' API where the key is stored in encrypted file on OS
I am quite confused with multiple descriptions of keyring package calls for keyring_default() and keyring_set_default() which AWS Linux does not recognize.
Now my question is:
Is it possible instead of first call from R, run Linux command (through the script etc), so that the value storage is implemented from Linux console, but should be available through the call from inside R code with 'key_get"?
I am talking about AWS virtual Linux servers.
Why?
We have Shiny-based application that works with Postgres DB, and DB credentials for connecting to the database have to be stored on server (don't ask me why, this is a manager's requirement). So I don't want to store a password in OS plain file and decided to utilize keyring package instead. But master pwd for connecting to PROD db will be set up by our AWS admin, he knows (supposedly) how to work with Linux scripts, and I don't want him to go into R console and deal with R commands. So I am trying to arrange for him a familiar environment, like, "login to prod Linux server and run this script", so he will be the only one who knows PROD DB password.