-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
Describe the bug
Currently, pulsar auth is divided into two parts, one is the authn and authz of the pulsar protocol (e.g. produce and consume) and the other is the authn and authz of the HTTP protocol (e.g. management of pulsar clusters), auth is divided into two phases authn and authz, currently in the authn phase will return a string role, authz phase will check this role's permissions, The string role contains very little information and that blocks some work in the authz phase, so in pulsar, there is an interface AuthenticationDataSource which is used to pass more information from the authn to the authz phase
In auth, there are two classes AuthenticationDataHttps and AuthenticationDataCommand that implement this interface AuthenticationDataSource. AuthenticationDataCommand is used to pass the state information after the pulsar protocol authentication. AuthenticationDataHttps is used to pass the status information after the HTTP protocol authentication. AuthenticationDataCommand and AuthenticationDataHttps are both default implementations, but now for the pulsar protocol there is support for using user-defined implementations https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java#L817, that gives the user the ability to extend the auth state and pass more information, but for the HTTP protocol data does not yet support the use of user-defined data
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS]
Additional context
Add any other context about the problem here.