Created
March 9, 2019 15:35
-
-
Save weavenet/f3af28350f07176674a5474b2d891102 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Examples on how to store secret data outside of dotfiles | |
# | |
# Encyrpted cipher text created via: | |
# | |
# echo SECRET_VALUE | openssl enc -e -aes-256-cbc -a -salt -pass pass:`cat ~/.password` | |
# | |
password=`cat ~/.password` | |
cipher_text=U2FsdGVkX1/OGxV6uRFeFfihJXZ/DU8rOibHL3uKxcY= | |
export SECRET1=`echo $cipher_text | openssl enc -d -aes-256-cbc -a -salt -pass pass:$password` | |
# | |
# Password stored in AWS SSM Parameter Store via: | |
# | |
# aws ssm put-parameter --name /secret2 --value SECRET_VALUE --type SecureString | |
# | |
# More info: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-paramstore.html | |
# | |
export SECRET2=`aws ssm get-parameter --name /secret2 |jq -r .Parameter.Value` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment