Repository navigation
Conversation
Server-provided catalog configuration could override the OAuth token endpoint or catalog base URI and redirect a retained client secret during token refresh. Disable trust in server-selected OAuth endpoints by default. When client credentials are configured, require an explicit absolute HTTP(S) token endpoint before any I/O and preserve the client endpoint and trust policy after merging server configuration. Keep server endpoint overrides available through explicit opt-in, preserve token-only and unauthenticated behavior, and update regression tests to verify the refresh destination and client-secret submission.
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.
Why
REST catalog initialization merges server-provided defaults and overrides into the client configuration. Previously,
rest.auth.oauth2.trust-server-uridefaulted totrue, allowing the server to select the OAuth token endpoint.A server could override
oauth2-server-uri, or change the cataloguriused to resolve a relative token endpoint. A subsequent token refresh could then send the client's retained OAuth client secret to a server-selected destination.Trusting a catalog to provide metadata should not implicitly authorize it to choose where the client submits its credentials.
What changes
rest.auth.oauth2.trust-server-uritofalse, requiring explicit client opt-in for server-selected OAuth endpoints.credentialis configured and server endpoint trust is disabled, require a client-providedoauth2-server-uribeginning withhttp://orhttps://before any I/O.With the new default, clients using credentials must configure an absolute OAuth token endpoint, for example:
Clients that intentionally accept server-selected endpoints can explicitly configure:
Validation
Regression tests cover:
client_secretto the original client endpoint despite server overrides of the catalog URI, OAuth endpoint, and trust policy.The existing refresh-executor test now supplies an explicit token endpoint.