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

Session management #1543

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

lullis
Copy link
Contributor

@lullis lullis commented Jan 27, 2025

Fixes #1130

Description of the Change

Implementation of OIDC Session Management. This PR:

  • Adds some settings variables to enable OIDC Session Management
  • Adds checks to validate OIDC Session Management settings - if it is enabled, then Django will require a OIDC_SESSION_MANAGEMENT_DEFAULT_KEY to be present.
  • Adds the session_state parameter to the parameters given to the end user client upon succcessful authorization. The session state is calculate by a salted hash combination of client id, origin and "OP user agent state", which for the intents of session management is itself just a hashed value of the session key for authenticated users, and OIDC_SESSION_MANAGEMENT_DEFAULT_KEY if the user is not authenticated. This is enough for the OP to indicate whether the end user session has changed (logged in, logged out)
  • Add a OIDCSessionManagementMiddleware that sets a cookie with the value of "OP user agent state"
  • Adds a SessionIFrameView endpoint for the "OP IFrame"

Checklist

  • PR only contains one change (considered splitting up PR)
  • unit-test added
  • documentation updated
  • CHANGELOG.md updated (only for user relevant changes)
  • author name in AUTHORS

@lullis lullis force-pushed the session_management branch 6 times, most recently from 62b4d39 to 926e384 Compare January 29, 2025 22:01
@lullis lullis force-pushed the session_management branch from 926e384 to 27f2c7b Compare January 29, 2025 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OpenID Connect Session Management 1.0
1 participant