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

Make getSession/verifySession stateless by default #1030

Open
porcellus opened this issue Aug 22, 2024 · 0 comments
Open

Make getSession/verifySession stateless by default #1030

porcellus opened this issue Aug 22, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@porcellus
Copy link
Collaborator

🚀 Feature

People generally do not expect getSession/verifySession to be calling the core.
Two main reasons that those functions call the core are:

  • claim value refreshes: we can alleviate this by setting the default refresh times to infinity.
  • marking the refresh token as "delivered" by making a core call that removes the parent refresh token hash from the payload: we can skip this by assuming that the delivery happened after some time.

Implementation details

  • we can assume (in the core) that the parent refresh token is delivered after a grace period
    • Okta uses 30 seconds by default
    • we should make this configurable in the core
    • We will do this with a new CDI (maybe after the OAuth2 release)
  • we can remove the "ping-back" based on parentRefreshTokenHash from getSession
    • doing this without the above core change will result in a security issue until the core change is released
    • We will do this with a new CDI (maybe after the OAuth2 release)
  • we should not clear the session if the core call to verify it returns unauthorized
    • basically remove unauthorised error from getSession
    • We can do this in the OAuth2 release
  • we set the defaultMaxAge to infinity to all built-in claim validators
    • this includes refetchTimeOnFalseInSeconds
    • We can do this in the OAuth2 release
@porcellus porcellus added the enhancement New feature or request label Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant