<@U078Y59KC3B> I have setup authentication and my ...
# ask-ai
m
@RunLLM I have setup authentication and my client consumer now throws an error with the following "Client is not authorized to Lookup" What does it mean and how can i mitigate it?
r
The error "Client is not authorized to Lookup" indicates that the client does not have the necessary permissions to perform a lookup operation on the specified topic. This typically occurs when the authorization settings in Apache Pulsar are configured to restrict access, and the client's role does not have the required permissions. To mitigate this issue, you need to ensure that the client's role has the appropriate permissions to perform lookup operations. You can grant the necessary permissions using the Pulsar admin CLI or through the StreamNative Cloud Console. Specifically, you should grant the
LOOKUP
permission to the client's role for the relevant namespace or topic. This can be done using the
pulsar-admin
command:
Copy code
./bin/pulsar-admin namespaces grant-permission namespace --role role --actions lookup
Would you like more details on how to configure these permissions? Sources: - https://github.com/apache/pulsar/issues/18716 - https://github.com/apache/pulsar/pull/13771 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
m
@RunLLM that does not appear to be a valid value, i get the following error "Illegal auth action 'lookup'. Possible values: [produce, consume, functions, sources, sinks, packages]"
r
The error message indicates that "lookup" is not a recognized authorization action in Apache Pulsar. The valid authorization actions are
produce
,
consume
,
functions
,
sources
,
sinks
, and
packages
. To resolve the "Client is not authorized to Lookup" error, you should ensure that the client has either
produce
or
consume
permissions, as these are typically required for lookup operations. You can grant these permissions using the
pulsar-admin
command:
Copy code
./bin/pulsar-admin namespaces grant-permission namespace --role role --actions produce,consume
This command grants both produce and consume permissions to the specified role for the given namespace, which should allow the client to perform lookup operations. Would you like more details on configuring these permissions? Sources: - https://github.com/apache/pulsar-client-go/blob/master/pulsaradmin/pkg/utils/auth_action.go - https://github.com/apache/pulsar/blob/master/pulsar-client-admin-api/src/main/java/org/apache/pulsar/common/policies/data/AuthAction.java 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.