You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "Asthenia0412 (via GitHub)" <gi...@apache.org> on 2026/10/13 18:05:34 UTC

[PR] docs: clarify tokenSecretKey base64 formats and explain semicolon usage [pulsar]

Asthenia0412 opened a new pull request, #26888:
URL: https://github.com/apache/pulsar/pull/26888

   ## Summary
   
   Clarifies the `tokenSecretKey` base64 inline documentation per issue #10584.
   
   ## Problem
   
   The previous comment was misleading:
   1. The `data:;base64,` format contains a semicolon that users mistakenly removed, thinking it was a typo. The semicolon is actually the **standard Java Data URL mediatype separator** and is required — `data:base64,xxx` (no semicolon) fails to parse correctly.
   2. Pulsar's `AuthTokenUtils.readKeyFromUrl` supports **three** key formats, but the config comment only listed two:
      - `data:;base64,xxx` (Data URL)
      - `file:///path` (file path)
      - **Pure base64 string** (no prefix — not documented before this change)
   
   ## Changes
   
   Updated the comment in all five config files to:
   - Document all three supported formats
   - Explain why the semicolon in `data:;base64,` is required
   - Add an explicit example of the pure-base64 format
   
   ## Test plan
   
   N/A — documentation-only change. Verified against the actual parsing logic in `AuthTokenUtils.readKeyFromUrl()`.
   
   ## Documentation
   
   - [x] No doc changes needed (this PR *is* the doc fix)
   
   ---
   
   ### DCO / CLA
   
   I have read and agree to the [Pulsar Contributor License Agreement](https://www.apache.org/licenses/ICLA.txt) and [Developer Certificate of Origin](https://developercertificate.org/). All commits carry the `Signed-off-by` trailer.
   
   Signed-off-by: Yancy <ya...@users.noreply.github.com>
   


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] docs: clarify tokenSecretKey base64 formats and explain semicolon usage [pulsar]

Posted by "Asthenia0412 (via GitHub)" <gi...@apache.org>.
Asthenia0412 commented on PR #26888:
URL: https://github.com/apache/pulsar/pull/26888#issuecomment-6156242638

   @lhotari Good point! I have now updated the `tokenPublicKey` documentation in all 5 config files (broker.conf, proxy.conf, standalone.conf, and both terraform-ansible templates) to mirror the expanded `tokenSecretKey` documentation — documenting all three supported formats with the semicolon explanation and the pure-base64 example. Pushed as a follow-up commit.
   
   Regarding whether to resolve the review comment thread — I will leave it open for you to decide since your suggestion has been addressed.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] docs: clarify tokenSecretKey base64 formats and explain semicolon usage [pulsar]

Posted by "merlimat (via GitHub)" <gi...@apache.org>.
merlimat merged PR #26888:
URL: https://github.com/apache/pulsar/pull/26888


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] docs: clarify tokenSecretKey base64 formats and explain semicolon usage [pulsar]

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on code in PR #26888:
URL: https://github.com/apache/pulsar/pull/26888#discussion_r4263171529


##########
conf/proxy.conf:
##########


Review Comment:
   Perhaps `tokenPublicKey` should be documented in a similar way



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] docs: clarify tokenSecretKey base64 formats and explain semicolon usage [pulsar]

Posted by "Asthenia0412 (via GitHub)" <gi...@apache.org>.
Asthenia0412 commented on PR #26888:
URL: https://github.com/apache/pulsar/pull/26888#issuecomment-6152200886

   Hi Pulsar maintainers 👋
   
   Submitting this doc-only fix for tokenSecretKey configuration per issue #10584. 
   
   **Problem**: The existing comment shows `data:;base64,xxx` with a semicolon that confused users into trying `data:base64,xxx` (no semicolon), which fails. Also, the pure-base64 format (supported by `AuthTokenUtils.readKeyFromUrl`) wasn't documented at all.
   
   **Fix**: Expanded the comment in all 5 config files to document all three valid formats with explanations. No code changes, just comments.
   
   Would appreciate a review when you have time! Thanks 🙏


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org