Skip to content

Conversation

@idyll
Copy link

@idyll idyll commented Jan 29, 2024

A Samly.Assertion cached in ETS or the Session will eventually expire.

Samly.State.Store.get_assertion/3 will return currently expired sessions. This is problematic because the Samly.AuthHandler looks for the cached session and doesn't replace it even if it is expired.

This is further exacerbated by Samly.get_active_assertion/1 returning expired assertions.

To address this I've updated the session and ETS logic to no longer return an expired session.
I contemplated purging ETS based on time, but it's most likely that the session store is being used in production.

@CLAassistant
Copy link

CLAassistant commented Jan 29, 2024

CLA assistant check
All committers have signed the CLA.

@k-cross k-cross merged commit 7637ebe into dropbox:main Jan 29, 2024
Copy link

@k-cross k-cross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed, and thank you for the fix!

@idyll idyll deleted the cached-saml-session-expiry branch January 29, 2024 19:49
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.

3 participants