I run a shiny app where I connect to a MariaDB database using the admin user id and password.
To avoid sharing my DB access password every time I connect to it, I have stored it on a keyring
using the keyring package of R and then call the dbConnect.
con <- DBI::dbConnect(RMariaDB::MariaDB(),user = "admin",password = keyring::key_get("MARIADB",keyring = "shiny",username = "admin"),dbname = "newdb")
But for every session the keyring needs to be unlocked and hence I have to use the following in my source code.
keyring_unlock("shiny",password = "XXXXXXX")
This exposes my keyring password in the source code that is then checked in github,
My question is: how safe are we if, to protect one password, we encrypt it with another password but expose the other password in the source code?