spring-projects / spring-projects/spring-security

support limiting session lifespan by the expiry of OpenID Connect identity tokens

Open
#6,814 4 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

in: oauth2 type: enhancement
Dominant language
Java
Stars
9.6k
Forks
6.3k
Avg merge
2d 11h
Merged PRs (30d)
52

Description

Per the OpenID Connect Session Management draft spec section 4:

An ID Token typically comes with an expiration date. The RP MAY rely on it to expire the RP session. However, it is entirely possible that the End-User might have logged out of the OP before the expiration date. Therefore, it is highly desirable to be able to find out the login status of the End-User at the OP.

This could be read a few ways (see also the discussion in #6742 ):

  • that the expiration date should be an upper bound on session lifespan, but other options to end the session sooner are provided in the session management spec
  • that respecting the expiration date is optional entirely

Having support for limiting the session lifespan to the expiration of the identity token would be greatly appreciated. This is analogous to SAML2's sessionNotOnOrAfter in an AuthnStatement, in being a way for identity providers to set an upper bound for session duration in a connected application without verifying that the user's session is still active at the identity provider

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with OpenID Connect Session Management draft section 4 and the discussion in issue #6742, since the issue does not name implementation files or tests. Clarify whether the identity token expiry is an upper bound or optional behavior, then identify the existing session-lifecycle entry points and define tests showing that the connected application's session is limited by token expiry.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
authentication, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.