Table of Contents |
---|
Status
Current state: Under DiscussionClosed (Covered by KIP-189)
Discussion thread: (Original Archive) (Markmail)
...
This KIP introduces a change to Session
class to accept a parameter of Java Principal
type instead of KafkaPrincipal
type.
This change will not affect the default ACL Authorizer
(SimpleAclAuthorizer
) as we would generate a KafkaPrincipal
from the Java Principal
in the default Authorizer
.
Proposed Changes
Change the
Session
class to accept a parameter of typeJava Principal
instead ofKafkaPrincipal
.Code Block language java theme Midnight case class Session(principal: Principal, clientAddress: InetAddress)
The
Authorizer
can access this principal object as follows :Code Block language java theme Midnight public boolean authorize(RequestChannel.Session session, Operation operation, Resource resource) { ... Principal principal = session.principal(); User_Defined_Principal principal = (User_Defined_Principal) principal; ... }
User_Defined_Principal
is thePrincipal
generated by thePrincipalBuilder
and it implementsJava Principal.
...