Repository navigation
Conversation
b99fb7c to
0fe204e
Compare
0fe204e to
34008c4
Compare
|
@loserwang1024 Please help review this PR when you have time, Thanks in advance! |
|
@affo Please take a look when you have time, Thanks! |
|
@polyzos PTAL, Thanks! |
affo
left a comment
There was a problem hiding this comment.
Hello and thanks for the amazing contribution!
While the contribution holds valuable, this looks to me as a divergence from the original https://cwiki.apache.org/confluence/spaces/FLUSS/pages/372214350/FIP-2+Fluss+Authentication+and+Authorization in that it replaces a single-principal model with a multi-principal model. It also touches a PublicEvolving interface.
I would favor an explicit FIP round, or even something lighter, but disclosed to the entire community in order to change the model.
For example, why having the concept of "additional principals" and not change FlussPrincipal createPrincipal(); to Iterable<FlussPrincipal> createPrincipals();?
Maybe I am just being picky, I suggest to involve into this review a committer/PMC with a solid grasp of this part of the codebase 🤝
|
This PR has been marked as stale because it has had no activity for 60 days. It will be closed in 10 days unless it receives a new comment, commit or other update. |
Resolve the authorization conflict while preserving immutable ACL snapshots and additional-principal matching in both resource authorization and ACL listing. Extend the group ACL test to cover listing.
|
@loserwang1024 I've merged the latest main and resolved the conflicts, preserving ACL snapshot consistency for primary and additional principals. Authentication and ACL authorization tests pass. Could you please help review this PR when you have time? Thanks! |
Purpose
Linked issue: close #3829
Allow authentication mechanisms to return user, group, and role principals through one
Iterable<FlussPrincipal> createPrincipals()contract. An authenticated session carries one collection of principals for authorization.Brief change log
ServerAuthenticator.createPrincipal()withcreatePrincipals()and remove the separate additional-principals API.FlussRequestandSession.Tests
112 focused tests passed with no failures, errors, or skips.
AuthenticationFactoryTest,PlainSaslServerTest,SaslAuthenticatorFactoryTest,AuthenticationTest,SessionTest,RequestChannelTest,DefaultAuthorizerTest,SaslAuthenticationITCase,FlussAuthorizationITCase,KafkaSaslConnectionTest,KafkaSaslConfigTest, andKafkaSaslPlainAuthenticationITCase.git diff --check.API and Format
This changes the
PublicEvolvingServerAuthenticatorinterface. Custom implementations must replacecreatePrincipal()withIterable<FlussPrincipal> createPrincipals()and be recompiled. Single-identity mechanisms can returnCollections.singletonList(principal). The iterable must be non-null and non-empty, without null elements.All authenticated principals participate in ACL and superuser checks. The first principal remains the client identity for logging, user metrics, and resource ownership.
No RPC wire format or storage format changes.
Documentation
Updated the authorization and security overview documentation, including the custom authenticator migration contract.