Repository navigation
Document SAML identity provider metadata key cache settings - #55329
Open
SaintNick1214 wants to merge 1 commit into
Open
SaintNick1214 wants to merge 1 commit into
SaintNick1214 wants to merge 1 commit into
Conversation
Describe when keys loaded from the metadata descriptor URL are downloaded again, how the public-key-storage options minTimeBetweenRequests and maxCacheTime interact with cacheDuration and validUntil in the descriptor, and the trade-offs of changing these options. Closes keycloak#54974 Signed-off-by: Nicholas Geil <63267399+SaintNick1214@users.noreply.github.com> Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The documentation incorrectly promises an immediate retry when no key hint is present, overlooking that a cached empty key list delays downloading until expiration or maxCacheTime.
1 open issue
What changed in this PR
This documentation-only PR adds SAML identity-provider metadata cache guidance to help administrators balance key freshness against metadata endpoint traffic, addressing #54974 without changing runtime behavior.
Changes:
- Adds an anchored subsection linked from “Use metadata descriptor URL.”
- Explains refresh triggers, cache settings, metadata expiration, and security and operational trade-offs.
- Includes a configuration example and links to the All provider configuration guide.
| File | Description |
|---|---|
docs/documentation/server_admin/topics/identity-broker/saml.adoc |
Adds metadata key-cache guidance and a link from the existing settings table. |
Review effort: Balanced
Comment on lines
+127
to
+128
| A node downloads the descriptor when it validates a signature and its cache has no keys for the identity provider. | ||
| A node that has cached keys downloads the descriptor again in the following situations: |
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.
Closes #54974
The guidance is a new subsection of the SAML v2.0 identity provider topic that the "Use metadata descriptor URL" row links to, rather than more text in the table cell. The cell is already long, and this file keeps longer explanations (SP descriptor, subject confirmation, ProxyRestriction) in anchored subsections. The existing sentences of the cell are unchanged.
The text uses the option names as an administrator sets them and as the All provider configuration guide lists them (
spi-public-key-storage--infinispan--min-time-between-requests,spi-public-key-storage--infinispan--max-cache-time) instead of the Java property names, and links to that guide with the existing{allproviderconfigguide_link}attribute.The described behaviour is that of
InfinispanPublicKeyStorageProviderandSamlAbstractMetadataPublicKeyLoaderonmain. Three points are spelled out because they are easy to assume differently:maxCacheTimeis only consulted when all keys are requested and the descriptor has nocacheDurationorvalidUntil, so a cached key that a message identifies is used without a time-based refresh; an expiration from the descriptor replacesmaxCacheTimein both directions; the minimum interval is counted per identity provider and per node from the download that produced the cached keys, and it also applies to the "Reload keys" action.Metadata signature validation, entity ID matching and the SAML client topic (which has a similar sentence) are left out because they are non-goals of the issue. The provider option descriptions are unchanged; they are consistent with the new text. If #54971 changes when a key miss triggers a download, this section needs a matching update in that change.
Verified by building the documentation guides locally (the build fails on Asciidoctor warnings) and running
GuideTest.ExternalLinksTestwas not run locally. The less obvious statements were also confirmed with a throwaway unit test againstInfinispanPublicKeyStorageProviderthat is not part of this PR.An AI coding agent (Claude Code) was used to produce this change from a prompt, including the checks against the source code described above.
🤖 Generated with Claude Code