-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
What issue do you find in Pulsar docs?
when client authentication using tokens based on JSON web Tokens, my client will throw following exceptions.
Exception in thread "main" org.apache.pulsar.client.api.PulsarClientException$AuthenticationException: Unable to authenticate
at org.apache.pulsar.client.api.PulsarClientException.unwrap(PulsarClientException.java:920)
at org.apache.pulsar.client.impl.ProducerBuilderImpl.create(ProducerBuilderImpl.java:94)
at PulsarProducerTest.main(PulsarProducerTest.java:30)
some modified propertiey in my standalone.conf
- authenticationEnabled=true
- authorizationEnabled=true
- authenticationProviders=org.apache.pulsar.broker.authentication.AuthenticationProviderToken
- brokerClientAuthenticationPlugin=org.apache.pulsar.client.impl.auth.AuthenticationToken
- brokerClientAuthenticationParameters={"token":"xxx"}
- tokenSecretKey=file:///path/to/secret.key
What is your suggestion?
we need to add a property named superUserRoles into broker.conf or standalone.conf and the value of superUserRoles is the role that we use to create token;
Do you have any references?
https://github.com/apache/pulsar/blob/master/site2/docs/security-jwt.md
Would you like to fix this issue?
yes
Note
- I have researched my question.