Re: Database passwords

From: Eric Lease Morgan <emorgan_at_nyob>
Date: Mon, 11 Oct 2021 14:43:17 -0400
To: CODE4LIB_at_LISTS.CLIR.ORG
On Oct 11, 2021, at 2:24 PM, Emily Lynema <ejlynema_at_NCSU.EDU> wrote:

> I'm curious to survey the community -- has anyone found a way to store
> database administration passwords used by technical services staff that is
> both user-friendly and secure? For example: the passwords to configure NC
> State's various OCLC resources / services / databases.
> 
> -- 
> Emily Lynema
> Head, Information Technology
> North Carolina State University Libraries
> 919-513-8031


A possible way to save secrets such as usernames and passwords is to save them as environment variables. This way there are only two different people who can read them: 1) the superuser of the computer, and 2) the person themselves. From the command line, a person can then issues commands like the following to get the username/password combination:

  $ echo $OCLCUSERNAME
  $ echo $OCLCPASSWORD

This technique also provides opportunities for automatic login or the completion of RESTful queries. This technique will work in just about any computer environment: Macintosh, Windows, Linux. 

--
Eric Morgan
Received on Mon Oct 11 2021 - 14:33:30 EDT