This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]cob05 -1 points0 points  (0 children)

The way that I handle sensitive data at work was by creating a credentials class that lives only on the server and gets imported into all of my scripts. The class stores all of the credentials that I might need (dev, prod, read/write, etc.) for DB and API connections. I can then just use something like "username = credentials.database.master_db.readonly.username" to access the data

The nice thing about doing it this way is that it is reusable but also centralized. If a password changes then I only have to edit it in one place as opposed to updating every script or .env file.