Skip to content

Conversation

@merlimat
Copy link
Contributor

Motivation

The AuthorizationProvider is initialized by passing a reference to the ConfigurationCacheService.

ConfigurationCacheService is completely tied to ZK access and to the ZoookeeperCache classes and it has been superseded by PulsarResources. As of now, the default authorization implementation is just using the ConfigurationCacheService to pull out a ref to the PulsarResources.

We need to remove ConfigurationCacheService from the AuthorizationProvider and pass instead the PulsarResources, 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.

@merlimat merlimat added type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages release/note-required labels Sep 16, 2021
@merlimat merlimat added this to the 2.9.0 milestone Sep 16, 2021
@merlimat merlimat self-assigned this Sep 16, 2021
Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good

+1

Copy link
Member

@michaeljmarshall michaeljmarshall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@merlimat merlimat merged commit 23ffdb7 into apache:master Sep 16, 2021
@merlimat merlimat deleted the configuration-cache branch September 16, 2021 21:04
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release/2.9.0 type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants