Skip to content

Add a reverse mapping from role to namespaces #5495

@PierreZ

Description

@PierreZ

Hi!

Is your feature request related to a problem? Please describe.
I'm working on KoP, and I'm currently implementing security on it. I'm currently struggling to list all topics according to a Pulsar role.

Part of the Kafka handshake is called the Metadata request:

[...] Kafka brokers can answer a metadata request that describes the current state of the cluster: what topics there are, which partitions those topics have, which broker is the leader for those partitions, and the host and port information for these brokers.

Most of the client implementation are expecting to retrieve all available topics by sending a MetadataRequest with an empty list of topics. In the context of authorization, I can't list all topics related to a Pulsar Role because I can't reverse from a role the associated tenants and namespaces.

Describe the solution you'd like
I would like to add a new internal function that, given a role, is answering the full list of associated namespaces.

I think this type of code should be exposed within the admin API but maybe there is another(and better!) location like the NamespaceService?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions