tsturzl opened a new issue #14435:
URL: https://github.com/apache/pulsar/issues/14435
**Describe the bug**
The documentation suggest that the proper way to reference a file with
`brokerClientAuthenticationParameter` for JWT plugin is
`brokerClientAuthenticationParameters={"file":"///path/to/proxy-token.txt"}`,
which does not work. When you [look at the
source](https://github.com/apache/pulsar/blob/v2.9.1/pulsar-client/src/main/java/org/apache/pulsar/client/impl/auth/AuthenticationToken.java#L79)
you'll see that it parses a string like `file:/some/path` or
`token:someToken`, otherwise it tried JSON which explicitly only looks for the
`token` property. Runtime behavior confirms this, I get a long long stack trace
pointing back to trying to look at the `token` property of the provided JSON.
So either [the
docs](https://pulsar.apache.org/docs/en/2.8.2/security-jwt/#enable-token-authentication-on-brokers)
are wrong or the code is wrong.
**To Reproduce**
Steps to reproduce the behavior:
1. Setup [Client authentication using tokens based on JSON Web Tokens]
2. Instead of embeddeding the token directly into the config uncomment and
use the alternative to load from a file below, which reads:
`brokerClientAuthenticationParameters={"file":"///path/to/proxy-token.txt"}`
**Expected behavior**
The provided JSON parameter works as stated in the documentation, OR the
documentation instead recommends the non-JSON parameters.
**Screenshots**
N/A
**Desktop (please complete the following information):**
- Ubuntu 20.04, but this is running in the official container.
**Additional context**
Add any other context about the problem here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]