[PIP-45] Remove ConfigurationCacheService from AuthorizationProvider #12064
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
The
AuthorizationProvideris initialized by passing a reference to theConfigurationCacheService.ConfigurationCacheServiceis completely tied to ZK access and to the ZoookeeperCache classes and it has been superseded byPulsarResources. As of now, the default authorization implementation is just using theConfigurationCacheServiceto pull out a ref to thePulsarResources.We need to remove
ConfigurationCacheServicefrom theAuthorizationProviderand pass instead thePulsarResources, while at the same time maintaining some degree of compatibility in the interface.The rationale here is that, this reference is in practice only needed in the Pulsar default authz implementation (where the ACLs are stored in ZK). 3rd party implementations will be validating the ACLs through other means, thus not accessing the internal ZK service.