Compare Pulsar permissions between clusters
Different roles, actions or tenant admins: which finding is which?

The recording shows kurkik pulsar diff on the demo sandbox; its data differs from this example.
Shown here: one cluster. Other broker setups are further down.
Command
Section titled “Command”kurkik pulsar diff a b --aclsOutput
Section titled “Output”a vs b
ACLs ~ tenant shop adminRoles - Who administers it differs. (a: shop-admin, b: platform,shop-admin) + analytics - b grants analytics consume on topic persistent://shop/orders/paid; a does not. + audit - b grants audit consume on namespace shop/orders; a does not. ! audit - a grants audit consume on topic persistent://shop/orders/created; b does not. ~ billing actions - billing on namespace shop/orders: consume on a, consume,produce on b. ! ops - a grants ops functions,sinks,sources on namespace shop/orders; b does not.
Notes - Not compared: consumers, schemas, functions, connectors, configuration. Add --consumers --schemas --functions --connectors --configs, or --all, to compare them.
Drift: 2 changed · 2 unmanaged · 2 missing (drift) - 13 matched
exit 2Exit code 2: drift found, so a CI job can stop here.
| Mark | Means |
|---|---|
~ |
both sides have it, but it differs |
! |
only the first side has it |
+ |
only the second side has it |
Other ways to give a side
Section titled “Other ways to give a side”| Compare | Command | Result |
|---|---|---|
| two clusters | kurkik pulsar diff a b --acls |
Drift: 2 changed · 2 unmanaged · 2 missing (drift) - 13 matched |
| a document and a cluster | kurkik pulsar diff a.yaml b --acls |
Drift: 2 changed · 2 unmanaged · 2 missing (drift) - 13 matched |
| two documents | kurkik pulsar diff a.yaml b.yaml --acls |
Drift: 2 changed · 2 unmanaged · 2 missing (drift) - 13 matched |
Download the JSON report (-o json)
The documents compared
Section titled “The documents compared”a.yaml, 186 lines
asyncapi: 3.0.0info: title: a Apache Pulsar API version: 1.0.0-SNAPSHOT description: Generated by reading Apache Pulsar of a (http://pulsar-a:8080).servers: standalone: host: pulsar-a:6650 protocol: pulsar protocolVersion: "4.0" description: Apache Pulsar cluster standalone. bindings: pulsar: bindingVersion: 0.1.0 tenant: shop x-kurkik: pulsar: server: cluster: standalone brokers: - localhost:8080 schemaRegistryUrl: http://pulsar-a:8080 schemaRegistryVendor: pulsar namespacePolicies: public/default: schema-autoupdate: "on" shop/orders: schema-autoupdate: "on" tenants: - tenant: public adminRoles: [] allowedClusters: - standalone - tenant: shop adminRoles: - shop-admin allowedClusters: - standalone security: - security: NONE tls: false acl: - role: billing resourceType: namespace name: shop/orders actions: - consume - role: checkout resourceType: namespace name: shop/orders actions: - produce - role: ops resourceType: namespace name: shop/orders actions: - functions - sinks - sources - role: audit resourceType: topic name: persistent://shop/orders/created actions: - consume consumers: [] producers: [] functions: [] sources: [] sinks: [] brokerConfiguration: advertisedAddress: localhost backlogQuotaDefaultLimitGB: "10.0" bookkeeperClientMinNumRacksPerWriteQuorum: "1" bookkeeperClientReorderReadSequenceEnabled: "false" bookkeeperNumberOfChannelsPerBookie: "1" clusterName: standalone enablePackagesManagement: "true" forceDeleteNamespaceAllowed: "true" functionsWorkerEnablePackageManagement: "true" isRunningStandalone: "true" loadBalancerEnabled: "false" loadManagerClassName: org.apache.pulsar.broker.loadbalance.NoopLoadManager managedLedgerCacheEvictionFrequency: "100.0" managedLedgerDefaultAckQuorum: "1" managedLedgerDefaultEnsembleSize: "1" managedLedgerDefaultMarkDeleteRateLimit: "0.1" managedLedgerDefaultWriteQuorum: "1" metadataStoreUrl: rocksdb:///pulsar/data/metadata packagesManagementStorageProvider: org.apache.pulsar.packages.management.storage.filesystem.FileSystemPackagesStorageProvider statusFilePath: /usr/local/apache/htdocs topicPublisherThrottlingTickTimeMillis: "2" webSocketServiceEnabled: "true" clientConfiguration: serviceUrl: pulsar://pulsar-a:6650 webServiceUrl: http://pulsar-a:8080 producerConfiguration: {} consumerConfiguration: {}channels: persistent-shop-orders-created: address: persistent://shop/orders/created bindings: pulsar: bindingVersion: 0.1.0 namespace: orders persistence: persistent x-kurkik: pulsar: channel: topic: persistent://shop/orders/created tenant: shop namespace: orders persistence: persistent partitions: 0 geo-replication: - standalone topicConfiguration: partitions: 0 persistence: persistent replication-clusters: - standalone schema-autoupdate: "on" persistent-shop-orders-paid: address: persistent://shop/orders/paid bindings: pulsar: bindingVersion: 0.1.0 namespace: orders persistence: persistent x-kurkik: pulsar: channel: topic: persistent://shop/orders/paid tenant: shop namespace: orders persistence: persistent partitions: 2 geo-replication: - standalone topicConfiguration: partitions: 2 persistence: persistent replication-clusters: - standalone schema-autoupdate: "on"operations: receive_persistent-shop-orders-created: action: receive channel: $ref: "#/channels/persistent-shop-orders-created" x-kurkik: pulsar: operation: security: - audit - billing consumerConfiguration: {} receive_persistent-shop-orders-paid: action: receive channel: $ref: "#/channels/persistent-shop-orders-paid" x-kurkik: pulsar: operation: security: - billing consumerConfiguration: {} send_persistent-shop-orders-created: action: send channel: $ref: "#/channels/persistent-shop-orders-created" x-kurkik: pulsar: operation: security: - checkout producerConfiguration: {} send_persistent-shop-orders-paid: action: send channel: $ref: "#/channels/persistent-shop-orders-paid" x-kurkik: pulsar: operation: security: - checkout producerConfiguration: {}b.yaml, 190 lines
asyncapi: 3.0.0info: title: b Apache Pulsar API version: 1.0.0-SNAPSHOT description: Generated by reading Apache Pulsar of b (http://pulsar-b:8080).servers: standalone: host: pulsar-b:6650 protocol: pulsar protocolVersion: "4.0" description: Apache Pulsar cluster standalone. bindings: pulsar: bindingVersion: 0.1.0 tenant: shop x-kurkik: pulsar: server: cluster: standalone brokers: - localhost:8080 schemaRegistryUrl: http://pulsar-b:8080 schemaRegistryVendor: pulsar namespacePolicies: public/default: schema-autoupdate: "on" shop/orders: schema-autoupdate: "on" tenants: - tenant: public adminRoles: [] allowedClusters: - standalone - tenant: shop adminRoles: - platform - shop-admin allowedClusters: - standalone security: - security: NONE tls: false acl: - role: audit resourceType: namespace name: shop/orders actions: - consume - role: billing resourceType: namespace name: shop/orders actions: - consume - produce - role: checkout resourceType: namespace name: shop/orders actions: - produce - role: analytics resourceType: topic name: persistent://shop/orders/paid actions: - consume consumers: [] producers: [] functions: [] sources: [] sinks: [] brokerConfiguration: advertisedAddress: localhost backlogQuotaDefaultLimitGB: "10.0" bookkeeperClientMinNumRacksPerWriteQuorum: "1" bookkeeperClientReorderReadSequenceEnabled: "false" bookkeeperNumberOfChannelsPerBookie: "1" clusterName: standalone enablePackagesManagement: "true" forceDeleteNamespaceAllowed: "true" functionsWorkerEnablePackageManagement: "true" isRunningStandalone: "true" loadBalancerEnabled: "false" loadManagerClassName: org.apache.pulsar.broker.loadbalance.NoopLoadManager managedLedgerCacheEvictionFrequency: "100.0" managedLedgerDefaultAckQuorum: "1" managedLedgerDefaultEnsembleSize: "1" managedLedgerDefaultMarkDeleteRateLimit: "0.1" managedLedgerDefaultWriteQuorum: "1" metadataStoreUrl: rocksdb:///pulsar/data/metadata packagesManagementStorageProvider: org.apache.pulsar.packages.management.storage.filesystem.FileSystemPackagesStorageProvider statusFilePath: /usr/local/apache/htdocs topicPublisherThrottlingTickTimeMillis: "2" webSocketServiceEnabled: "true" clientConfiguration: serviceUrl: pulsar://pulsar-b:6650 webServiceUrl: http://pulsar-b:8080 producerConfiguration: {} consumerConfiguration: {}channels: persistent-shop-orders-created: address: persistent://shop/orders/created bindings: pulsar: bindingVersion: 0.1.0 namespace: orders persistence: persistent x-kurkik: pulsar: channel: topic: persistent://shop/orders/created tenant: shop namespace: orders persistence: persistent partitions: 0 geo-replication: - standalone topicConfiguration: partitions: 0 persistence: persistent replication-clusters: - standalone schema-autoupdate: "on" persistent-shop-orders-paid: address: persistent://shop/orders/paid bindings: pulsar: bindingVersion: 0.1.0 namespace: orders persistence: persistent x-kurkik: pulsar: channel: topic: persistent://shop/orders/paid tenant: shop namespace: orders persistence: persistent partitions: 2 geo-replication: - standalone topicConfiguration: partitions: 2 persistence: persistent replication-clusters: - standalone schema-autoupdate: "on"operations: receive_persistent-shop-orders-created: action: receive channel: $ref: "#/channels/persistent-shop-orders-created" x-kurkik: pulsar: operation: security: - audit - billing consumerConfiguration: {} receive_persistent-shop-orders-paid: action: receive channel: $ref: "#/channels/persistent-shop-orders-paid" x-kurkik: pulsar: operation: security: - analytics - audit - billing consumerConfiguration: {} send_persistent-shop-orders-created: action: send channel: $ref: "#/channels/persistent-shop-orders-created" x-kurkik: pulsar: operation: security: - billing - checkout producerConfiguration: {} send_persistent-shop-orders-paid: action: send channel: $ref: "#/channels/persistent-shop-orders-paid" x-kurkik: pulsar: operation: security: - billing - checkout producerConfiguration: {}How to build this setup yourself
Clusters
Fixture
pulsar-admin tenants create shop --allowed-clusters <its cluster> --admin-roles shop-adminpulsar-admin namespaces create shop/orders --clusters <its cluster>pulsar-admin topics create persistent://shop/orders/createdpulsar-admin topics create-partitioned-topic persistent://shop/orders/paid --partitions 2Side a
pulsar-admin --admin-url http://pulsar-a:8080 namespaces grant-permission shop/orders --role billing --actions consumepulsar-admin --admin-url http://pulsar-a:8080 namespaces grant-permission shop/orders --role checkout --actions producepulsar-admin --admin-url http://pulsar-a:8080 topics grant-permission persistent://shop/orders/created --role audit --actions consumepulsar-admin --admin-url http://pulsar-a:8080 namespaces grant-permission shop/orders --role ops --actions functions,sources,sinksSide b
pulsar-admin --admin-url http://pulsar-b:8080 namespaces grant-permission shop/orders --role billing --actions consume,producepulsar-admin --admin-url http://pulsar-b:8080 namespaces grant-permission shop/orders --role checkout --actions producepulsar-admin --admin-url http://pulsar-b:8080 namespaces grant-permission shop/orders --role audit --actions consumepulsar-admin --admin-url http://pulsar-b:8080 topics grant-permission persistent://shop/orders/paid --role analytics --actions consumepulsar-admin --admin-url http://pulsar-b:8080 tenants update shop --admin-roles shop-admin,platform --allowed-clusters standaloneCompare
kurkik conn add pulsar a --admin-url http://pulsar-a:8080 --service-url pulsar://pulsar-a:6650kurkik conn add pulsar b --admin-url http://pulsar-b:8080 --service-url pulsar://pulsar-b:6650kurkik pulsar export a --this-cluster-only --acls --consumers --stdout > a.yamlkurkik pulsar export b --this-cluster-only --acls --consumers --stdout > b.yamlkurkik pulsar diff a b --acls # cluster-vs-clusterkurkik pulsar diff a.yaml b --acls # document-vs-clusterkurkik pulsar diff a.yaml b.yaml --acls # document-vs-documentOther broker setups
Section titled “Other broker setups”Two geo-replicated clusters, alike
Section titled “Two geo-replicated clusters, alike”Show the output
east vs west
ACLs ~ tenant shop adminRoles - Who administers it differs. (east: shop-admin, west: platform,shop-admin) + analytics - west grants analytics consume on topic persistent://shop/orders/paid; east does not. + audit - west grants audit consume on namespace shop/orders; east does not. ! audit - east grants audit consume on topic persistent://shop/orders/created; west does not. ~ billing actions - billing on namespace shop/orders: consume on east, consume,produce on west. ! ops - east grants ops functions,sinks,sources on namespace shop/orders; west does not.
Notes - Not compared: consumers, schemas, functions, connectors, configuration. Add --consumers --schemas --functions --connectors --configs, or --all, to compare them.
Drift: 2 changed · 2 unmanaged · 2 missing (drift) - 13 matched
exit 2How to build this setup yourself
Clusters
pulsar-admin --admin-url http://pulsar-east:8080 clusters create west --url http://pulsar-west:8080 --broker-url pulsar://pulsar-west:6650pulsar-admin --admin-url http://pulsar-west:8080 clusters create east --url http://pulsar-east:8080 --broker-url pulsar://pulsar-east:6650Fixture
pulsar-admin tenants create shop --allowed-clusters east,west --admin-roles shop-adminpulsar-admin namespaces create shop/orders --clusters east,westpulsar-admin tenants update public --allowed-clusters east,west # Pulsar's own tenant, allowed on the pair as shop ispulsar-admin topics create persistent://shop/orders/createdpulsar-admin topics create-partitioned-topic persistent://shop/orders/paid --partitions 2Side east
pulsar-admin --admin-url http://pulsar-east:8080 namespaces grant-permission shop/orders --role billing --actions consumepulsar-admin --admin-url http://pulsar-east:8080 namespaces grant-permission shop/orders --role checkout --actions producepulsar-admin --admin-url http://pulsar-east:8080 topics grant-permission persistent://shop/orders/created --role audit --actions consumepulsar-admin --admin-url http://pulsar-east:8080 namespaces grant-permission shop/orders --role ops --actions functions,sources,sinksSide west
pulsar-admin --admin-url http://pulsar-west:8080 namespaces grant-permission shop/orders --role billing --actions consume,producepulsar-admin --admin-url http://pulsar-west:8080 namespaces grant-permission shop/orders --role checkout --actions producepulsar-admin --admin-url http://pulsar-west:8080 namespaces grant-permission shop/orders --role audit --actions consumepulsar-admin --admin-url http://pulsar-west:8080 topics grant-permission persistent://shop/orders/paid --role analytics --actions consumepulsar-admin --admin-url http://pulsar-west:8080 tenants update shop --admin-roles shop-admin,platform --allowed-clusters east,westCompare
kurkik conn add pulsar east --admin-url http://pulsar-east:8080 --service-url pulsar://pulsar-east:6650kurkik conn add pulsar west --admin-url http://pulsar-west:8080 --service-url pulsar://pulsar-west:6650kurkik pulsar export east --this-cluster-only --acls --consumers --stdout > east.yamlkurkik pulsar export west --this-cluster-only --acls --consumers --stdout > west.yamlkurkik pulsar diff east west --acls # cluster-vs-clusterkurkik pulsar diff east.yaml west --acls # document-vs-clusterkurkik pulsar diff east.yaml west.yaml --acls # document-vs-documentTwo geo-replicated clusters that differ
Section titled “Two geo-replicated clusters that differ”Show the output
east vs west
Topics ! persistent://shop/east-only/records topic - Topic persistent://shop/east-only/records is not on west. (east: persistent://shop/east-only/records) + persistent://shop/west-only/records topic - Topic persistent://shop/west-only/records is not on east. (west: persistent://shop/west-only/records)
ACLs ~ tenant shop adminRoles - Who administers it differs. (east: shop-admin, west: platform,shop-admin) + analytics - west grants analytics consume on topic persistent://shop/orders/paid; east does not. + audit - west grants audit consume on namespace shop/orders; east does not. ! audit - east grants audit consume on topic persistent://shop/orders/created; west does not. ~ billing actions - billing on namespace shop/orders: consume on east, consume,produce on west. ! east-team - east grants east-team consume,produce on namespace shop/east-only; west does not. ! ops - east grants ops functions,sinks,sources on namespace shop/orders; west does not. + west-team - west grants west-team consume,produce on namespace shop/west-only; east does not.
Notes - Not compared: consumers, schemas, functions, connectors, configuration. Add --consumers --schemas --functions --connectors --configs, or --all, to compare them.
Drift: 2 changed · 4 unmanaged · 4 missing (drift) - 13 matched
exit 2How to build this setup yourself
Clusters
pulsar-admin --admin-url http://pulsar-east:8080 clusters create west --url http://pulsar-west:8080 --broker-url pulsar://pulsar-west:6650pulsar-admin --admin-url http://pulsar-west:8080 clusters create east --url http://pulsar-east:8080 --broker-url pulsar://pulsar-east:6650Fixture
pulsar-admin tenants create shop --allowed-clusters east,west --admin-roles shop-adminpulsar-admin namespaces create shop/orders --clusters east,westpulsar-admin tenants update public --allowed-clusters east,west # Pulsar's own tenant, allowed on the pair as shop ispulsar-admin topics create persistent://shop/orders/createdpulsar-admin topics create-partitioned-topic persistent://shop/orders/paid --partitions 2pulsar-admin --admin-url http://pulsar-east:8080 namespaces create shop/east-only --clusters eastpulsar-admin --admin-url http://pulsar-east:8080 topics create persistent://shop/east-only/recordspulsar-admin --admin-url http://pulsar-east:8080 namespaces grant-permission shop/east-only --role east-team --actions consume,producepulsar-admin --admin-url http://pulsar-east:8080 topics create-subscription persistent://shop/east-only/records --subscription east-reportspulsar-admin --admin-url http://pulsar-west:8080 namespaces create shop/west-only --clusters westpulsar-admin --admin-url http://pulsar-west:8080 topics create persistent://shop/west-only/recordspulsar-admin --admin-url http://pulsar-west:8080 namespaces grant-permission shop/west-only --role west-team --actions consume,producepulsar-admin --admin-url http://pulsar-west:8080 topics create-subscription persistent://shop/west-only/records --subscription west-reportsSide east
pulsar-admin --admin-url http://pulsar-east:8080 namespaces grant-permission shop/orders --role billing --actions consumepulsar-admin --admin-url http://pulsar-east:8080 namespaces grant-permission shop/orders --role checkout --actions producepulsar-admin --admin-url http://pulsar-east:8080 topics grant-permission persistent://shop/orders/created --role audit --actions consumepulsar-admin --admin-url http://pulsar-east:8080 namespaces grant-permission shop/orders --role ops --actions functions,sources,sinksSide west
pulsar-admin --admin-url http://pulsar-west:8080 namespaces grant-permission shop/orders --role billing --actions consume,producepulsar-admin --admin-url http://pulsar-west:8080 namespaces grant-permission shop/orders --role checkout --actions producepulsar-admin --admin-url http://pulsar-west:8080 namespaces grant-permission shop/orders --role audit --actions consumepulsar-admin --admin-url http://pulsar-west:8080 topics grant-permission persistent://shop/orders/paid --role analytics --actions consumepulsar-admin --admin-url http://pulsar-west:8080 tenants update shop --admin-roles shop-admin,platform --allowed-clusters east,westCompare
kurkik conn add pulsar east --admin-url http://pulsar-east:8080 --service-url pulsar://pulsar-east:6650kurkik conn add pulsar west --admin-url http://pulsar-west:8080 --service-url pulsar://pulsar-west:6650kurkik pulsar export east --this-cluster-only --acls --consumers --stdout > east.yamlkurkik pulsar export west --this-cluster-only --acls --consumers --stdout > west.yamlkurkik pulsar diff east west --acls # cluster-vs-clusterkurkik pulsar diff east.yaml west --acls # document-vs-clusterkurkik pulsar diff east.yaml west.yaml --acls # document-vs-documentAll flags: kurkik pulsar diff · more Apache Pulsar diff examples
Copyright © 2026 Pavel Bodiachevskii