apache/pulsar

Configuring brokerClientAuthenticationParameter for AuthenticationToken plugin does not work as documented

Open

#14,435 建立於 2022年2月23日

在 GitHub 查看
 (4 留言) (0 反應) (0 負責人)Java (3,485 fork)batch import
Stalehelp wantedlifecycle/staletype/bug

倉庫指標

Star
 (13,697 star)
PR 合併指標
 (平均合併 3天 10小時) (30 天內合併 146 個 PR)

描述

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 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 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.

貢獻者指南