-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
authorize tenant level and namespace level access from the authorization provider #5720
Comments
Hi Geal, there was a discussion of role and authorize in pulsar dev mail list. And also a PIP is here: https://github.com/apache/pulsar/wiki/PIP-49%3A-Permission-levels-and-inheritance Would you please check if these could help your case. |
I agree with the thread, the current access levels are problematic for multi tenant systems. The underlying point I'd like to add is that there should be check for individual operations or resources, not just for super user, tenant admin (we already have the |
It seems too heavy to implement such fine-grained permission management in pulsar. I think it can be implemented in an external system, such as pulsar-manager https://github.com/apache/pulsar-manager. This external service can be used to proxy all HTTP requests and complete all permission management. I have considered the above fine-grained authorization management before. This is the PIP of pulsar-manager's permission management https://github.com/apache/pulsar-manager/wiki/Authentication-and-Authorization-in-Pulsar-Manager. I think you can consider implementing this feature based on this. @Geal |
How heavy would it be? From what I see, that would mean:
I could probably get the same feature throught the manager, but it is very surprising to me that a multitenant system could not expose basic management features to tenants without admin access |
I think the issue is asking for interfaces to be added to AuthorizationProvider. The default implementation can remain the same. The interfaces allow external parties to customize their own authorization implementation. The authorization provider can be enhanced into an extensible interface. What an authorization provider provides is if a The resources are:
For each resource, there are certain verbs and actions available for operating those resources. The authorization provider provides an implementation to check if a If we can abstract the authorization provider, it allows people to customize its own authorization provider implementation to allow finer granularity access controls. For the default implementation, Pulsar has, we can keep it as is due to the concerns raised around PIP-49. Does that make sense? |
Thanks for @KannarFr 's help on this issue. |
@KannarFr Thanks for your help. Currently, @KannarFr had added the basic interface of the Here a list about that:
KannarFr has done a part of those at #6428 . |
Fixes #5720 ### Motivation Provide "real" authz abilities to pulsar resources. ### Modifications Add stuff to `AuthorizationProvider` interface, and use them on every pulsar resource management auth (tenant, namespace, topics, functions, connectors, ...)
Fixes apache#5720 ### Motivation Provide "real" authz abilities to pulsar resources. ### Modifications Add stuff to `AuthorizationProvider` interface, and use them on every pulsar resource management auth (tenant, namespace, topics, functions, connectors, ...)
Fixes apache#5720 ### Motivation Provide "real" authz abilities to pulsar resources. ### Modifications Add stuff to `AuthorizationProvider` interface, and use them on every pulsar resource management auth (tenant, namespace, topics, functions, connectors, ...)
Fixes a part of #5720 ### Motivation add granularity in topics api authz
Fixes a part of apache#5720 ### Motivation add granularity in topics api authz
Is your feature request related to a problem? Please describe.
I am currently writing an authentication provider and an authorization provider, and the authorization API only provides the
isSuperUser
method for admin level usage. There is no way to authorise a client depending on the affected tenant or namespace. In my use case, I want my clients to have their own tenant, and be able to give limited access to some namespaces to their developers.Describe the solution you'd like
Adding new methods to
AuthorizationProvider
:CompletableFuture<Boolean> canManageNamespace(NamespaceName namespaceName, String role, NamespaceOperation operation, AuthenticationDataSource authenticationData)
NamespaceOperation
is an enum that can be any of the namespace management tasks, likecreate
,delete
,grant-permissions
, etc. The default implementation could ignore it, but other providers could manage more granular access (like, I can affect subscriptions, but not quotas and affinity). I think some operations should still require superuser access, likeset-clusters
orunload
?tenant.getAdminRoles()
list
, since it would not take a namespace name as argument?CompletableFuture<Boolean> canManageTopic(TopicName topic, String role, TopicOperation operation, AuthenticationDataSource authenticationData)
TopicOperation
is an enum listing all the possible operationstenant.getAdminRoles()
Add corresponding methods to
PulsarWebResource
. Right now it only hasvalidateSuperUserAccess
andvalidateAdminAccessForTenant
. We must modifyvalidateAdminAccessForTenant
to add the operation, and addvalidateAdminAccessForTopic
And the biggest part of the task: go through every usage of
validateSuperUserAccess
andvalidateAdminAccessForTenant
and check if they can be replaced with finer grain accessDescribe alternatives you've considered
I do not know any alternative way to get more granular admin access authorization
The text was updated successfully, but these errors were encountered: