MIT-LCP / physionet-build

The new PhysioNet platform.
https://physionet.org/
BSD 3-Clause "New" or "Revised" License
56 stars 20 forks source link

Allow rotating SECRET_KEY #1941

Open bemoody opened 1 year ago

bemoody commented 1 year ago

There should be a way to change the Django SECRET_KEY value. Preferably, we should be able to rotate the key regularly (once per year, say), without breaking anything.

We really don't want to break:

We would prefer not to break:

https://pypi.org/project/django-rotate-secret-key/ is a package that claims to address the login session issue; I haven't looked at how it's implemented, whether it works with Django 4, or whether it addresses any of the other issues.

amitupreti commented 1 year ago

@bemoody This looks unassigned and super cool, if this is still open, would it be okay if i work on this?

tompollard commented 1 year ago

@amitupreti please feel free to take this on!

bemoody commented 12 months ago

Key rotation finally became an officially supported feature in Django 4.1, so we just have to turn it on. Probably everything should just work unless we have code that directly refers to SECRET_KEY.