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

[#422] Make the Django session length and the OIDC session check configurable #437

Merged
merged 1 commit into from
Oct 18, 2024
Merged
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
5 changes: 5 additions & 0 deletions backend/src/openarchiefbeheer/conf/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@
SESSION_COOKIE_SAMESITE = config("SESSION_COOKIE_SAMESITE", "Lax")
SESSION_COOKIE_SECURE = config("SESSION_COOKIE_SECURE", IS_HTTPS)
SESSION_COOKIE_HTTPONLY = True
SESSION_COOKIE_AGE = config("SESSION_COOKIE_AGE", 1209600) # 2 weeks in seconds

CSRF_COOKIE_SAMESITE = config("CSRF_COOKIE_SAMESITE", "Lax")
CSRF_COOKIE_SECURE = config("CSRF_COOKIE_SECURE", IS_HTTPS)
Expand Down Expand Up @@ -637,6 +638,10 @@
OIDC_REDIRECT_ALLOWED_HOSTS = config(
"OIDC_REDIRECT_ALLOWED_HOSTS", default="", split=True
)
# See issue #422 and https://mozilla-django-oidc.readthedocs.io/en/2.0.0/installation.html#validate-id-tokens-by-renewing-them
OIDC_RENEW_ID_TOKEN_EXPIRY_SECONDS = config(
"OIDC_RENEW_ID_TOKEN_EXPIRY_SECONDS", default=60 * 15
)

# Django privates
#
Expand Down
Loading