You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by li...@apache.org on 2023/04/06 08:42:48 UTC
[pulsar-site] branch main updated: fix: update jwt examples (#505)
This is an automated email from the ASF dual-hosted git repository.
liuyu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git
The following commit(s) were added to refs/heads/main by this push:
new f87c4fcb46c fix: update jwt examples (#505)
f87c4fcb46c is described below
commit f87c4fcb46c7960488cdaefe62572d0c0187a858
Author: Eric Shen <er...@outlook.com>
AuthorDate: Thu Apr 6 16:42:43 2023 +0800
fix: update jwt examples (#505)
---
docs/security-jwt.md | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/docs/security-jwt.md b/docs/security-jwt.md
index 68a90b2a33f..8f7da27281b 100644
--- a/docs/security-jwt.md
+++ b/docs/security-jwt.md
@@ -38,21 +38,27 @@ JWT authentication supports two different kinds of keys to generate and validate
The administrators create the secret key and use it to generate the client tokens. You can also configure this key for brokers to validate the clients.
-The output file is generated in the root of your Pulsar installation directory. You can also provide an absolute path for the output file using the command below.
+The output file is generated in the root of your Pulsar installation directory.
```shell
bin/pulsar tokens create-secret-key --output my-secret.key
```
+You can also provide an absolute path for the output file using the command below.
+
+```shell
+bin/pulsar tokens create-secret-key --output /opt/my-secret.key
+```
+
To generate a base64-encoded private key, enter the following command.
```shell
-bin/pulsar tokens create-secret-key --output /opt/my-secret.key --base64
+bin/pulsar tokens create-secret-key --output my-secret.key --base64
```
### Create a key pair
-To use asymmetric key encryption, you need to create a pair of keys. The output file is generated in the root of your Pulsar installation directory. You can also provide an absolute path for the output file using the command below.
+To use asymmetric key encryption, you need to create a pair of keys. The output file is generated in the root of your Pulsar installation directory.
```shell
bin/pulsar tokens create-key-pair --output-private-key my-private.key --output-public-key my-public.key