Hi all, I'd like to start the discussion on PIP-503: Topic-scoped subscription permissions.
PIP: https://www.google.com/url?q=https://github.com/apache/pulsar/pull/27647&source=gmail&ust=1794993500335000&sa=E Subscription permissions are namespace-scoped today: the roles granted for a subscription name apply to that name on every topic of the namespace, so an operator cannot grant or restrict a subscription on a single topic. Issue #27578 describes the case, and #21254 was closed with the note that this needs a PIP, since it changes authorization semantics and the stored policy format. The proposal in short: - A topic-scoped entry for a topic and subscription takes precedence over the namespace-scoped entry for the same subscription name. Without one, the namespace-scoped entry applies as today, so existing grants keep their effect. - The permissions are stored next to the topic-level permissions (destination_auth) in the namespace policies, so the consume check needs no additional metadata read. - New AuthorizationProvider default methods, REST endpoints, Topics admin client methods and pulsar-admin topics commands, mirroring the namespace ones. One question I'd especially like feedback on: with the precedence rule, a topic-scoped entry can also widen a namespace-scoped restriction (allow a role on one topic that the namespace entry excludes). The alternative is to let topic-scoped entries only narrow it. Which behavior would operators expect? The PIP also covers rolling upgrades and rollback, since brokers that don't know the new field ignore it. Thanks, Ayush Kulshreshtha
