If one forgets the password to this keyring, or wishes to start over:
keyring::keyring_delete("<NAME_OF_KEY_RING_HERE>")
Consistent behavior requires options(keyring_backend=keyring::backend_file)
to
be set. It is recommended to place this in ~/.Rprofile
.
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
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")
.