support oauth authenrization - #3978
Draft
litiliu wants to merge 2 commits into
Draft
Conversation
Add a stateless factory that creates one complete authenticator per connection while preserving the existing global SASL mechanism configuration and PLAIN/JAAS behavior. Shared mechanism/session lifecycle is deferred.
litiliu
force-pushed
the
codex/fluss-3495-oauthbearer-pr2
branch
from
August 17, 2026 03:20
a466fb4 to
47a8d4d
Compare
litiliu
force-pushed
the
codex/fluss-3495-oauthbearer-pr2
branch
from
August 17, 2026 07:30
47a8d4d to
1bf9c0a
Compare
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.
Purpose
Linked issue: close #3495
Depends on #3865, which makes the existing SASL layer mechanism-extensible while preserving SASL/PLAIN behavior.
This PR adds built-in SASL/OAUTHBEARER authentication to the native Fluss RPC layer. It allows clients to obtain JWT access tokens through the OAuth 2.0 Client Credentials grant, validates those tokens against server-side JWKS, issuer, audience, and lifetime requirements, maps the validated
subclaim toFlussPrincipal, and reuses the existing ACL authorization flow.Brief change log
subprincipal mapping.kidwith rate limiting, and reject an authenticated connection after its JWT expires.PLAINandOAUTHBEARERthrough the same SASL plugin while keeping each connection's authenticator independent.Passwordvalues and redacted from configuration logs.Tests
./mvnw -q -pl fluss-common -Dtest=SaslAuthenticatorFactoryTest,OAuthBearerAuthenticationTest -Dsurefire.failIfNoSpecifiedTests=false test./mvnw -q -pl fluss-rpc -am -Dtest=SaslAuthenticationITCase -Dsurefire.failIfNoSpecifiedTests=false -DskipITs testgit diff --check codex/fluss-3495-sasl-pr1..HEADAPI and Format
ServerAuthenticator#validateSession()hook so an authenticated connection can be rejected after its JWT expires.jose4jruntime dependency for JWT/JWKS processing.Documentation
Updated
website/docs/security/authentication.mdwith OAUTHBEARER client and server configuration, Client Credentials behavior, JWKS caching/refresh behavior, token/session lifetime behavior, and configuration examples.