Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Django secret key to make it more obvious it's a shim value #3422

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/env.docker
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PYTHONUNBUFFERED=0

DJANGO_SETTINGS_MODULE=conf.settings
DJANGO_SECRET_KEY="ny#b__$$f6ry4wy8oxre97&-68u_0lk3gw(z=d40_dxey3zw0v1"
DJANGO_SECRET_KEY=example_key
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making it a reminder to change it would be nice too.

Suggested change
DJANGO_SECRET_KEY=example_key
DJANGO_SECRET_KEY=example_key_CHANGE_IT_IN_PRODUCTION

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can also update settings.py to raise an error if it's unchanged.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion, and I like that idea @dhruvkb! I'll add an issue for it :)

DJANGO_DEBUG_ENABLED=True

BASE_URL=http://localhost:50280/
Expand Down
2 changes: 1 addition & 1 deletion api/env.template
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PYTHONUNBUFFERED=0

DJANGO_SETTINGS_MODULE=conf.settings
DJANGO_SECRET_KEY="ny#b__$$f6ry4wy8oxre97&-68u_0lk3gw(z=d40_dxey3zw0v1"
DJANGO_SECRET_KEY=example_key
DJANGO_DEBUG_ENABLED=True

BASE_URL=http://localhost:50280/
Expand Down