feat(catalog): add WithOAuthTLSConfig for separate OAuth server TLS#895
Merged
Merged
Conversation
The OAuth2 server can be a different host than the catalog, requiring its own TLS configuration. Add WithOAuthTLSConfig to configure a dedicated HTTP client for token requests instead of reusing the catalog's client.
lovromazgon
commented
Apr 14, 2026
| // | ||
| // If not set, the OAuth2 client reuses the catalog's HTTP client (and its TLS | ||
| // configuration). | ||
| func WithOAuthTLSConfig(config *tls.Config) Option { |
Contributor
Author
There was a problem hiding this comment.
Alternatively this could be generalized to WithOAuthTransport or even WithOAuthHTTPClient.
Member
There was a problem hiding this comment.
@laskoviymishka what do you think from an API point of view, would we actually want to present a full WithOAuthTransport / WithOAuthHTTPClient? Or do you think this is sufficient? I'm curious about your thoughts here.
Contributor
There was a problem hiding this comment.
I think this is sufficient, plus this is flexible enough for most of the cases.
zeroshade
approved these changes
Apr 14, 2026
Member
zeroshade
left a comment
There was a problem hiding this comment.
Generally looks good to me, pending a response to my question above
laskoviymishka
approved these changes
Apr 21, 2026
96 tasks
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.
The Iceberg REST spec allows configuring the OAuth2 server separately from the catalog via
oauth2-server-uri. When the OAuth2 server is a different host, it may require different TLS settings (different CA, client certificates, etc.).Currently
setupOAuthManagerreuses the catalog's HTTP client for token requests, making it impossible to configure separate TLS trust without creating a custom AuthManager.This adds
WithOAuthTLSConfig(*tls.Config)which creates a dedicated HTTP client for OAuth token requests. When not set, behavior is unchanged.