If one forgets the password to this keyring, or wishes to start over:
shelter::keyring_delete("<NAME_OF_KEY_RING_HERE>")
For production servers where the password must be stored in a readable
plain text file, it will search for ../<basename>.yml
. DO NOT USE
this unless one is a sysadmin, as this defeats the security and purpose of
a local encrypted file. The expected structure of this yaml file is
as follows:
other-config-stuff1: blah blah
redcapAPI:
keys:
intake: THIS_IS_THE_INTAKE_DATABASE_APIKEY
details: THIS_IS_THE_DETAILS_DATABASE_APIKEY
other-config-stuff2: blah blah
other-config-stuff3: blah blah
For production servers the use of ENV variables is also supported. The connection
string is converted to upper case for the search of ENV. If a YAML
and ENV variable both exist, the YAML will take precedence.
IMPORTANT: Make sure that R is set to NEVER save workspace to .RData
as this is writing the API_KEY to a local file in clear text because
connection objects contain the unlocked key in memory. Tips
are provided in vignette("redcapAPI-best-practices")
.