produce
: Allows the role to publish messages to a topic.consume
: Allows the role to subscribe to and consume messages from a topic.sources
: Allows the role to interact with Pulsar IO sources.sinks
: Allows the role to interact with Pulsar IO sinks.functions
: Allows the role to manage Pulsar Functions.packages
: Allows the role to manage packages.pulsar-admin
command-line tool to manage permissions.
pulsar-admin namespaces grant-permission
command.
Command Syntax:
--role <role>
: The role to which you are granting permissions.--actions <actions>
: A comma-separated list of actions to grant (e.g., produce,consume
).<tenant>/<namespace>
: The target namespace.my-app
permission to produce and consume messages on all topics in the my-namespace
namespace under the my-tenant
tenant, run the following command:
pulsar-admin topics grant-permission
command.
Command Syntax:
-r, --role <role>
: The role to which you are granting permissions.-a, --actions <actions>
: A comma-separated list of actions to grant.<topicName>
: The full name of the topic, in the format persistent://<tenant>/<namespace>/<topic>
.my-specific-app
permission to only produce messages to the topic my-topic
in the my-namespace
namespace and my-tenant
tenant, use this command: