You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by mm...@apache.org on 2026/10/14 03:18:24 UTC

(pulsar) branch master updated: docs: clarify tokenSecretKey base64 formats and explain semicolon usage (#26888)

This is an automated email from the ASF dual-hosted git repository.

merlimat pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new b82272a98b7a docs: clarify tokenSecretKey base64 formats and explain semicolon usage (#26888)
b82272a98b7a is described below

commit b82272a98b7aee579d90a11745e322c4194281bc
Author: Stochastic <13...@users.noreply.github.com>
AuthorDate: Wed Oct 14 11:18:18 2026 +0800

    docs: clarify tokenSecretKey base64 formats and explain semicolon usage (#26888)
    
    Signed-off-by: Yancy <ya...@users.noreply.github.com>
    Co-authored-by: Yancy <ya...@users.noreply.github.com>
---
 conf/broker.conf                                   | 22 ++++++++++++++++------
 conf/proxy.conf                                    | 22 ++++++++++++++++------
 conf/standalone.conf                               | 22 ++++++++++++++++------
 deployment/terraform-ansible/templates/broker.conf | 22 ++++++++++++++++------
 deployment/terraform-ansible/templates/proxy.conf  | 22 ++++++++++++++++------
 5 files changed, 80 insertions(+), 30 deletions(-)

diff --git a/conf/broker.conf b/conf/broker.conf
index 5a2611cecb8f..cf0ecd7fb494 100644
--- a/conf/broker.conf
+++ b/conf/broker.conf
@@ -1150,16 +1150,26 @@ basicAuthConf=
 
 ## Symmetric key
 # Configure the secret key to be used to validate auth tokens
-# The key can be specified like:
-# tokenSecretKey=data:;base64,xxxxxxxxx
-# tokenSecretKey=file:///my/secret.key    ( Note: key file must be DER-encoded )
+# The key can be specified in three ways:
+#   1. As a base64-encoded Data URL (the semicolon before "base64" is part of the
+#      standard data URL format and must not be omitted):
+#      tokenSecretKey=data:;base64,xxxxxxxxx
+#   2. As a base64-encoded string directly (no prefix required):
+#      tokenSecretKey=xxxxxxxxxxxxx
+#   3. As a file path (key file must be DER-encoded):
+#      tokenSecretKey=file:///my/secret.key
 tokenSecretKey=
 
 ## Asymmetric public/private key pair
 # Configure the public key to be used to validate auth tokens
-# The key can be specified like:
-# tokenPublicKey=data:;base64,xxxxxxxxx
-# tokenPublicKey=file:///my/public.key    ( Note: key file must be DER-encoded )
+# The key can be specified in three ways:
+#   1. As a base64-encoded Data URL (the semicolon before "base64" is part of the
+#      standard data URL format and must not be omitted):
+#      tokenPublicKey=data:;base64,xxxxxxxxx
+#   2. As a base64-encoded string directly (no prefix required):
+#      tokenPublicKey=xxxxxxxxxxxxx
+#   3. As a file path (key file must be DER-encoded):
+#      tokenPublicKey=file:///my/public.key
 tokenPublicKey=
 
 # The token "claim" that will be interpreted as the authentication "role" or "principal" by AuthenticationProviderToken (defaults to "sub" if blank)
diff --git a/conf/proxy.conf b/conf/proxy.conf
index ef073d8178a6..42259724f50e 100644
--- a/conf/proxy.conf
+++ b/conf/proxy.conf
@@ -423,16 +423,26 @@ basicAuthConf=
 
 ## Symmetric key
 # Configure the secret key to be used to validate auth tokens
-# The key can be specified like:
-# tokenSecretKey=data:;base64,xxxxxxxxx
-# tokenSecretKey=file:///my/secret.key    ( Note: key file must be DER-encoded )
+# The key can be specified in three ways:
+#   1. As a base64-encoded Data URL (the semicolon before "base64" is part of the
+#      standard data URL format and must not be omitted):
+#      tokenSecretKey=data:;base64,xxxxxxxxx
+#   2. As a base64-encoded string directly (no prefix required):
+#      tokenSecretKey=xxxxxxxxxxxxx
+#   3. As a file path (key file must be DER-encoded):
+#      tokenSecretKey=file:///my/secret.key
 tokenSecretKey=
 
 ## Asymmetric public/private key pair
 # Configure the public key to be used to validate auth tokens
-# The key can be specified like:
-# tokenPublicKey=data:;base64,xxxxxxxxx
-# tokenPublicKey=file:///my/public.key    ( Note: key file must be DER-encoded )
+# The key can be specified in three ways:
+#   1. As a base64-encoded Data URL (the semicolon before "base64" is part of the
+#      standard data URL format and must not be omitted):
+#      tokenPublicKey=data:;base64,xxxxxxxxx
+#   2. As a base64-encoded string directly (no prefix required):
+#      tokenPublicKey=xxxxxxxxxxxxx
+#   3. As a file path (key file must be DER-encoded):
+#      tokenPublicKey=file:///my/public.key
 tokenPublicKey=
 
 # The token "claim" that will be interpreted as the authentication "role" or "principal" by AuthenticationProviderToken (defaults to "sub" if blank)
diff --git a/conf/standalone.conf b/conf/standalone.conf
index b9e8facabe8d..c32fb04c3600 100644
--- a/conf/standalone.conf
+++ b/conf/standalone.conf
@@ -775,16 +775,26 @@ basicAuthConf=
 
 ## Symmetric key
 # Configure the secret key to be used to validate auth tokens
-# The key can be specified like:
-# tokenSecretKey=data:;base64,xxxxxxxxx
-# tokenSecretKey=file:///my/secret.key  ( Note: key file must be DER-encoded )
+# The key can be specified in three ways:
+#   1. As a base64-encoded Data URL (the semicolon before "base64" is part of the
+#      standard data URL format and must not be omitted):
+#      tokenSecretKey=data:;base64,xxxxxxxxx
+#   2. As a base64-encoded string directly (no prefix required):
+#      tokenSecretKey=xxxxxxxxxxxxx
+#   3. As a file path (key file must be DER-encoded):
+#      tokenSecretKey=file:///my/secret.key
 tokenSecretKey=
 
 ## Asymmetric public/private key pair
 # Configure the public key to be used to validate auth tokens
-# The key can be specified like:
-# tokenPublicKey=data:;base64,xxxxxxxxx
-# tokenPublicKey=file:///my/public.key    ( Note: key file must be DER-encoded )
+# The key can be specified in three ways:
+#   1. As a base64-encoded Data URL (the semicolon before "base64" is part of the
+#      standard data URL format and must not be omitted):
+#      tokenPublicKey=data:;base64,xxxxxxxxx
+#   2. As a base64-encoded string directly (no prefix required):
+#      tokenPublicKey=xxxxxxxxxxxxx
+#   3. As a file path (key file must be DER-encoded):
+#      tokenPublicKey=file:///my/public.key
 tokenPublicKey=
 
 
diff --git a/deployment/terraform-ansible/templates/broker.conf b/deployment/terraform-ansible/templates/broker.conf
index 8f329d009422..1c7d528c609f 100644
--- a/deployment/terraform-ansible/templates/broker.conf
+++ b/deployment/terraform-ansible/templates/broker.conf
@@ -587,16 +587,26 @@ anonymousUserRole=
 
 ## Symmetric key
 # Configure the secret key to be used to validate auth tokens
-# The key can be specified like:
-# tokenSecretKey=data:;base64,xxxxxxxxx
-# tokenSecretKey=file:///my/secret.key    ( Note: key file must be DER-encoded )
+# The key can be specified in three ways:
+#   1. As a base64-encoded Data URL (the semicolon before "base64" is part of the
+#      standard data URL format and must not be omitted):
+#      tokenSecretKey=data:;base64,xxxxxxxxx
+#   2. As a base64-encoded string directly (no prefix required):
+#      tokenSecretKey=xxxxxxxxxxxxx
+#   3. As a file path (key file must be DER-encoded):
+#      tokenSecretKey=file:///my/secret.key
 tokenSecretKey=
 
 ## Asymmetric public/private key pair
 # Configure the public key to be used to validate auth tokens
-# The key can be specified like:
-# tokenPublicKey=data:;base64,xxxxxxxxx
-# tokenPublicKey=file:///my/public.key    ( Note: key file must be DER-encoded )
+# The key can be specified in three ways:
+#   1. As a base64-encoded Data URL (the semicolon before "base64" is part of the
+#      standard data URL format and must not be omitted):
+#      tokenPublicKey=data:;base64,xxxxxxxxx
+#   2. As a base64-encoded string directly (no prefix required):
+#      tokenPublicKey=xxxxxxxxxxxxx
+#   3. As a file path (key file must be DER-encoded):
+#      tokenPublicKey=file:///my/public.key
 tokenPublicKey=
 
 # The token "claim" that will be interpreted as the authentication "role" or "principal" by AuthenticationProviderToken (defaults to "sub" if blank)
diff --git a/deployment/terraform-ansible/templates/proxy.conf b/deployment/terraform-ansible/templates/proxy.conf
index 98949a46bd3e..d795ca10a4b6 100644
--- a/deployment/terraform-ansible/templates/proxy.conf
+++ b/deployment/terraform-ansible/templates/proxy.conf
@@ -187,16 +187,26 @@ httpNumThreads=
 
 ## Symmetric key
 # Configure the secret key to be used to validate auth tokens
-# The key can be specified like:
-# tokenSecretKey=data:;base64,xxxxxxxxx
-# tokenSecretKey=file:///my/secret.key    ( Note: key file must be DER-encoded )
+# The key can be specified in three ways:
+#   1. As a base64-encoded Data URL (the semicolon before "base64" is part of the
+#      standard data URL format and must not be omitted):
+#      tokenSecretKey=data:;base64,xxxxxxxxx
+#   2. As a base64-encoded string directly (no prefix required):
+#      tokenSecretKey=xxxxxxxxxxxxx
+#   3. As a file path (key file must be DER-encoded):
+#      tokenSecretKey=file:///my/secret.key
 tokenSecretKey=
 
 ## Asymmetric public/private key pair
 # Configure the public key to be used to validate auth tokens
-# The key can be specified like:
-# tokenPublicKey=data:;base64,xxxxxxxxx
-# tokenPublicKey=file:///my/public.key    ( Note: key file must be DER-encoded )
+# The key can be specified in three ways:
+#   1. As a base64-encoded Data URL (the semicolon before "base64" is part of the
+#      standard data URL format and must not be omitted):
+#      tokenPublicKey=data:;base64,xxxxxxxxx
+#   2. As a base64-encoded string directly (no prefix required):
+#      tokenPublicKey=xxxxxxxxxxxxx
+#   3. As a file path (key file must be DER-encoded):
+#      tokenPublicKey=file:///my/public.key
 tokenPublicKey=
 
 # The token "claim" that will be interpreted as the authentication "role" or "principal" by AuthenticationProviderToken (defaults to "sub" if blank)