Skip to content

i-zokirov/secret-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

secret-manager

SecretManager class with a couple of methods I use to create a secret value in Secretmanager and retrieve the value of stored secret for reuse.

Documentation

In order to use the class methods, add GCP service account credentials to ./keys/secret-manager-key.json file. The service account must have Secret Manager Admin IAM role assigned in GCP project.

Two main methods you will ever need to use are getSecret() and writeSecret(). Their job is retrieve active value of the given secret and destroy previous values of secret when writing the value. writeSecret() creates a secret record with a given name if one was not previously created.

License

MIT

Feel free to reuse, modify, distribute the code. Just don`t forget to leave ⭐️⭐️⭐️

About

SecretManager class with a couple of methods I use to create a secret value in Secretmanager and retrieve the value of stored secret for reuse.

Topics

Resources

Stars

Watchers

Forks