Repository navigation
[improve][broker] Support OpenID multi-role authorization and improve proxy authentication defaults - #26549
Merged
Conversation
… proxy authentication defaults Assisted-by: Codex
lhotari
requested review from
Technoboy-,
dao-jun,
david-streamlio,
merlimat and
nodece
September 11, 2026 16:47
merlimat
approved these changes
Sep 11, 2026
Use a shared token authentication method constant and exercise both providers through their initialized provider list in either order.
4 of 10 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.
Motivation
Enable
MultiRolesTokenAuthorizationProviderto work withAuthenticationProviderOpenIDby reusing the configured authentication providers to validate tokens and extract role claims. This lets multi-role authorization use the same token handling and OpenID configuration as authentication.Align proxy and broker defaults so that forwarding client credentials and authenticating the original client are enabled together, reducing the configuration needed for token authentication through a proxy and helping avoid misconfiguration.
Modifications
AuthorizationProvider.InitialContextrecord containingServiceConfiguration,PulsarResources, andAuthenticationService. Deprecate the previous initializer while preserving compatibility for existing authorization providers.TokenAuthenticationProvider, with clear initialization errors when the shared token provider does not implement it.forwardAuthorizationCredentialsandauthenticateOriginalAuthDatatotruein Java configuration, shipped configuration files, and deployment templates.authenticateOriginalAuthData=falsesetting for TLS client-certificate and SASL authentication through a proxy and update the corresponding test fixtures.Verifying this change
Add coverage for OpenID multi-role authorization, Token/OpenID provider combinations, role-claim formats, asynchronous role extraction, shared-provider lifecycle, and initializer compatibility.
Extend proxy JWT tests to cover the default subject claim, a custom role claim, and multi-role authorization, verifying client topic permissions with the default proxy/broker configuration.
Run scoped broker-common, OpenID, broker, proxy, and websocket tests with retries disabled, plus
./gradlew quickCheck.Make sure that the change passes the CI checks.
Does this pull request potentially affect one of the following parts:
TokenAuthenticationProvider; TLS client-certificate and SASL proxy deployments need the explicit setting described above.