-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Followup: Error "Invalid Roles" during Handshake when connecting to broker via TLS with JWT-Auth #433
Comments
Most likely this is a problem with the token that the proxy uses towards the broker. It has to be a "proxy-admin" token. It's also worth checking your broker's effective configuration. You can run |
When I use the "proxy-admin" superuser token created as a secret when setting up the cluster (taken from the secret: "pulsar-token-proxy-admin" I still get the error. From the logs I can see that it authenticates as proxy-admin:
I connected to one of my brokers and ran
My proxy still logs:
Could the proxy-admin Token be misconfigured somehow? How could I check that? |
You shouldn't be using the proxy-admin token yourself. The proxy should be configured to use it. This is what the chart does by default with
and in proxy's statefulset:
The token should have the role Use this command in a proxy pod shell to check the content and role of the token:
|
Thank you!
I copied the token from the file and ran
I verified that this is the token I am using with my client.
You are right. I am fairly new to pulsar, so I took that token to test authorization/authentication, assuming that it will just work since it is a superuser token. Creating a separate token for my client will be a next step 😅 Using the proxy-admin token should work (even if it's a very bad practice) right? |
I don't think it works when the client uses a proxy role via a proxy. Forwarding authentication to the broker from the proxy is only possible for proxy roles. |
That's the problem. You cannot use that token on the client. |
Ah, now I got it. Thank you. |
Since I can't reopen Issue #431 I am creating a new one as followup. Somehow there was no "reopen" button. See the referenced Issue for more details.
I'm not able to connect my client to the pulsar cluster via a proxy using authentication and authorization after deploying it from the helm chart.
The error seems to persist even after correcting the "workaround" to be valid yaml, as suggested in #431
I tried recreating all pods and even restarting my Kubernetes Cluster.
When applying the workaround (#430 ) the authentication seems to work correctly. I got the following error message BEFORE applying the workaround:
AFTER applying the workaround I get another error message. It logs a succesful authentication, but then throws "Invalid Roles". Might this be an issue with the authorization?
My current .yaml:
When disabling authorization (and having authentication enabled) I am able to make a sucessful connection from my client.
Am I missing some additional configuration?
Thank you for your help so far!
The text was updated successfully, but these errors were encountered: