Repository navigation
fix: accept xs:duration cacheDuration on SAML EntitiesDescriptor - #2961
Open
pcbeingused333 wants to merge 1 commit into
Open
pcbeingused333 wants to merge 1 commit into
pcbeingused333 wants to merge 1 commit into
Conversation
Federation metadata wrapped in EntitiesDescriptor was rejected when cacheDuration used a value such as PT5H. The parser treated that attribute as a Go duration integer. Those wrapper attributes are now removed before parsing, and the entity's own duration is left intact. Fixes supabase#1697
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SAML metadata whose root element is EntitiesDescriptor failed to parse when cacheDuration used a valid XML Schema duration such as PT5H. The parser read that wrapper attribute as a Go integer duration, so adding the provider returned an internal error. Those non-integer cacheDuration attributes are now dropped from EntitiesDescriptor before parsing. A duration on the EntityDescriptor itself is left as it was.
The new test parses a federation document with cacheDuration="PT5H" and checks that the identity provider entity, its sign-on URL, and its own one-hour cache duration are returned.
Prepared with the help of an AI coding assistant.
Fixes #1697