mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-16 15:55:58 +02:00
updated with PR feedback
This commit is contained in:
parent
7520aaa4b4
commit
8e5bf18573
1 changed files with 4 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
||||||
# This script rotates the login.gov credentials, DJANGO_SECRET_KEY and DJANGO_SECRET_LOGIN_KEY that allow for identity sandbox to work on sandboxes and local.
|
# This script rotates the login.gov credentials, DJANGO_SECRET_KEY and DJANGO_SECRET_LOGIN_KEY that allow for identity sandbox to work on sandboxes and local.
|
||||||
# The echo prints in this script should serve for documentation for running manually.
|
# The echo prints in this script should serve for documentation for running manually.
|
||||||
|
# Run this script once a year for each environment
|
||||||
# NOTE: This script was written for MacOS and to be run at the root directory.
|
# NOTE: This script was written for MacOS and to be run at the root directory.
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,12 +28,12 @@ if [[ ! $REPLY =~ ^[Yy]$ ]]
|
||||||
then
|
then
|
||||||
cf login -a https://api.fr.cloud.gov --sso
|
cf login -a https://api.fr.cloud.gov --sso
|
||||||
fi
|
fi
|
||||||
echo "targeting space"
|
echo "Targeting space"
|
||||||
cf target -o "cisa-dotgov" -s $1
|
cf target -o cisa-dotgov -s $1
|
||||||
|
|
||||||
echo "Creating new login.gov credentials for $1..."
|
echo "Creating new login.gov credentials for $1..."
|
||||||
django_key=$(python3 -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())')
|
django_key=$(python3 -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())')
|
||||||
openssl req -nodes -x509 -days 365 -newkey rsa:2048 -keyout private-$1.pem -out public-$1.crt
|
openssl req -noenc -x509 -days 365 -newkey rsa:2048 -keyout private-$1.pem -out public-$1.crt
|
||||||
login_key=$(base64 -i private-$1.pem)
|
login_key=$(base64 -i private-$1.pem)
|
||||||
|
|
||||||
echo "Creating the final json"
|
echo "Creating the final json"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue