You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
Currently when an initial deployment is made to cloud.gov the DJANGO_SECRET_KEY environment variable is copied from Circle CI project settings and used for the deployed site. Since this variable is used for a number of key security features in Django it should be treated as highly sensitive and be distinct for each deployed environment.
We should instead automatically generate a random and secure token string to use for this value as part of the set-backend-env-vars.sh script. This could be done quite easily by calling python from the script and utilizing standard library functionality that was added in Python 3.6, as shown below:
As a stretch goal, if we provide a reasonable default for this setting in local and CI contexts we could remove it entirely from Circle CI. This default should never be allowed for use in production contexts though so we would only want to define it in the local.py settings module.
Acceptance Criteria:
DJANGO_SECRET_KEY is automatically generated for initial deployments to Cloud.gov
Testing Checklist has been run and all tests pass
README is updated, if necessary
Tasks:
Update set-backend-env-vars.sh to generate a new DJANGO_SECRET_KEY instead of passing in the one from Circle CI
Description:
Currently when an initial deployment is made to cloud.gov the
DJANGO_SECRET_KEY
environment variable is copied from Circle CI project settings and used for the deployed site. Since this variable is used for a number of key security features in Django it should be treated as highly sensitive and be distinct for each deployed environment.We should instead automatically generate a random and secure token string to use for this value as part of the
set-backend-env-vars.sh
script. This could be done quite easily by calling python from the script and utilizing standard library functionality that was added in Python 3.6, as shown below:As a stretch goal, if we provide a reasonable default for this setting in local and CI contexts we could remove it entirely from Circle CI. This default should never be allowed for use in production contexts though so we would only want to define it in the
local.py
settings module.Acceptance Criteria:
DJANGO_SECRET_KEY
is automatically generated for initial deployments to Cloud.govTasks:
set-backend-env-vars.sh
to generate a newDJANGO_SECRET_KEY
instead of passing in the one from Circle CINotes:
Supporting Documentation:
Open Questions:
The text was updated successfully, but these errors were encountered: