Fix: Remove validUntil attribute from SAML SP Metadata #5914
+1
−1
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.
This PR disables the
validUntilattribute in the generated SAML Service Provider (SP) metadata.Why this is needed
Currently, the underlying
php-samllibrary hardcodes the metadata validity (TIME_VALID) to 2 days and caching (TIME_CACHED) to 1 week (Source: Metadata.php).In many real-world scenarios, specifically with Identity Providers like Shibboleth, these default windows are too short. This causes the IdP to deny connections or require manual metadata refreshes once the hardcoded time passes.
The
getSPMetadatafunction in Settings.php allows for an$ignoreValidUntilparameter.getSPMetadatacall to set$ignoreValidUntiltotrue.validUntiltimestamp from the XML generated at<URL>/saml2/metadata, preventing arbitrary expiration issues.