sindhushree
02/27/2026, 9:30 AMRunLLM
02/27/2026, 9:30 AMgetTopics2() and getAllocatorStats() explicitly call validateSuperUserAccess() to ensure only superusers can access stats data. According to BrokerStatsBase.java and WorkerImpl.java, this is a strict requirement.
Would you like more detail on which stats endpoints require superuser access or how to configure superuser roles?
Sources:
- BrokerStatsBase.java
- WorkerImpl.java 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.sindhushree
02/27/2026, 9:33 AMRunLLM
02/27/2026, 9:33 AMgetStats, but not for internal stats or administrative actions. See admin-api-topics#stats and TopicAuthZTest.java.
Would you like more detail on the difference between topic stats and internal stats permissions?
Sources:
- TopicAuthZTest.java
- admin-api-topics#stats 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.sindhushree
02/27/2026, 9:36 AMRunLLM
02/27/2026, 9:36 AMsindhushree
02/27/2026, 9:39 AMRunLLM
02/27/2026, 9:39 AMadmin.topics().getPartitionedStats(topic, true) requires the user to have either produce or consume permission on the topic. Superuser access is not required, but without at least one of these permissions, the operation will fail with an unauthorized error, as shown in TopicAuthZTest.java.
Would you like details on how to grant these permissions?
Sources:
- TopicAuthZTest.java 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.sindhushree
02/27/2026, 9:43 AMRunLLM
02/27/2026, 9:43 AMsindhushree
02/27/2026, 9:44 AMRunLLM
02/27/2026, 9:44 AMsindhushree
02/28/2026, 1:07 PMRunLLM
02/28/2026, 1:07 PMpulsar stats (for non-partitioned topics) requires only produce or consume permission, while pulsar partitioned stats may require permissions on the base partitioned topic, not just individual partitions. If you lack permission on the base topic, you will get an unauthorized error for partitioned stats, as shown in TopicAuthZTest.java and be651b4e PR discussion.
Would you like instructions on how to grant the correct permissions for partitioned topics?
Sources:
- TopicAuthZTest.java
- be651b4e PR discussion 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.sindhushree
03/02/2026, 4:11 AMRunLLM
03/02/2026, 4:11 AMproduce or consume permissions directly to the base partitioned topic (e.g., persistent://tenant/namespace/topic), not just to individual partitions (e.g., persistent://tenant/namespace/topic-partition-0). This ensures that pulsar partitioned stats works without unauthorized errors. You can do this using the Pulsar admin CLI:
pulsar-admin topics grant-permission \
--actions produce,consume \
--role <role-name> \
persistent://tenant/namespace/topic
This command grants the specified actions to the role on the base partitioned topic, which covers all partitions for stats queries. For more, see admin-api-topics#grant-permission and PR 16792 discussion.
Sources:
- PR 16792 discussion 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.