Affects Version/s: 0.10.0.1
Fix Version/s: None
Currently kafka allows users to plugin a custom PrincipalBuilder and a custom Authorizer.
The Authorizer.authorize() object takes in a Session object that wraps KafkaPrincipal and InetAddress.
The KafkaPrincipal currently has a PrincipalType and Principal name, which is the name of Principal generated by the PrincipalBuilder.
This Principal, generated by the pluggedin PrincipalBuilder might have other fields that might be required by the pluggedin Authorizer but currently we loose this information since we only extract the name of Principal while creating KaflkaPrincipal in SocketServer.
It would be great if KafkaPrincipal has an additional field "channelPrincipal" which is used to store the Principal generated by the plugged in PrincipalBuilder.
The pluggedin Authorizer can then use this "channelPrincipal" to do authorization.