[PIP-45] Remove ConfigurationCacheService from AuthorizationProvider - #12064
Merged
Conversation
merlimat
requested review from
BewareMyPower,
cckellogg,
codelipenghui,
freeznet,
hangc0276 and
rdhabalia
September 16, 2021 16:45
bharanic-dev
pushed a commit
to bharanic-dev/pulsar
that referenced
this pull request
Mar 18, 2022
…pache#12064) * [PIP-45] Remove ConfigurationCacheService from AuthorizationProvider * Fixed DiscoveryService * Fixed WebSocketService * Fixed references in Worker * Fixed BrokerService * Fixed ServerCnxTest * Fixed ProxyService
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.