You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/04/18 08:23:27 UTC

[GitHub] [pulsar] erobot opened a new issue #6761: Wrong tokenSecretKey configuration description about using base64 inline

erobot opened a new issue #6761: Wrong tokenSecretKey configuration description about using base64 inline
URL: https://github.com/apache/pulsar/issues/6761
 
 
   **Describe the bug**
   When using base64 line in tokenSecretKey, config should specify like "tokenSecretKey=data:;base64,xxxxxxxxx" but not "tokenSecretKey=data:base64,xxxxxxxxx". Description in documnet is missing a semicolon.
   
   data URI scheme:
   https://en.wikipedia.org/wiki/Data_URI_scheme
   
   wrong documents:
   https://pulsar.apache.org/docs/en/reference-configuration/
   
   > Configure the secret key to be used to validate auth tokens. The key can be specified like: tokenSecretKey=data:base64,xxxxxxxxx or tokenSecretKey=file:///my/secret.key
   
   https://pulsar.apache.org/docs/en/security-jwt/
   
   >  \# If using secret key
   tokenSecretKey=file:///path/to/secret.key
   \# The key can also be passed inline:
   \# tokenSecretKey=data:base64,FLFyW0oLJ2Fi22KKCm21J18mbAdztfSHN/lAT5ucEKU=
   
   
   **To Reproduce**
   // correct result
   apache-pulsar-2.5.0>bin/pulsar tokens create --secret-key 'qcsXyb5eo8c09YXIMJaA97RYPCmIuyTlrN2KcI0zzxM=' --subject admin
   eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiJ9.L869nKrziQIPkgqIawIh-RxxDelfGIiol1DBhoBl26Y
   
   // wrong result
   apache-pulsar-2.5.0>bin/pulsar tokens create --secret-key 'data:base64,qcsXyb5eo8c09YXIMJaA97RYPCmIuyTlrN2KcI0zzxM=' --subject admin
   eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiJ9.ne2WjK3zY4cecotgUYkU0kkviOyslnCqPDHcPYF-HDc
   
   // correct result
   apache-pulsar-2.5.0>bin/pulsar tokens create --secret-key 'data:;base64,qcsXyb5eo8c09YXIMJaA97RYPCmIuyTlrN2KcI0zzxM=' --subject admin
   eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiJ9.L869nKrziQIPkgqIawIh-RxxDelfGIiol1DBhoBl26Y
   
   
   **Expected behavior**
   Correct tokenSecretKey base64 inline description in documents and examples.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services