updated usage example (#9081)
* updated usage example * Docs: updated examples with base64 - removed herestring for echo instead that's more simple. * Docs: updated examples with base64 - removed herestring for echo instead that's more simple. Co-authored-by: Mehdi Ahmadi <aphorise@gmail.com>
This commit is contained in:
parent
312f7a1882
commit
9e20e4128d
|
@ -0,0 +1,4 @@
|
||||||
|
|
||||||
|
```release-note:improvement
|
||||||
|
website/docs: changed to echo for all string examples instead of (<<<) here-string.
|
||||||
|
```
|
|
@ -577,7 +577,7 @@ mechanism for this data as part of a JSON payload is to base64-encode it.
|
||||||
Fist, encode the plaintext with base64:
|
Fist, encode the plaintext with base64:
|
||||||
|
|
||||||
```shell-session
|
```shell-session
|
||||||
$ base64 <<< "the quick brown fox"
|
$ echo "the quick brown fox" | base64
|
||||||
dGhlIHF1aWNrIGJyb3duIGZveAo=
|
dGhlIHF1aWNrIGJyb3duIGZveAo=
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -131,7 +131,7 @@ management tool.
|
||||||
Write a policy and proceed to link it to the role:
|
Write a policy and proceed to link it to the role:
|
||||||
|
|
||||||
```shell-session
|
```shell-session
|
||||||
$ vault write consul/roles/my-role policy="$(base64 <<< 'key "" { policy = "read" }')"
|
$ vault write consul/roles/my-role policy="$(echo 'key "" { policy = "read" }' | base64)"
|
||||||
Success! Data written to: consul/roles/my-role
|
Success! Data written to: consul/roles/my-role
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -155,7 +155,7 @@ the proper permission, it can use this secrets engine.
|
||||||
mechanism for this data as part of a JSON payload is to base64-encode it.
|
mechanism for this data as part of a JSON payload is to base64-encode it.
|
||||||
|
|
||||||
```text
|
```text
|
||||||
$ vault write transit/encrypt/my-key plaintext=$(base64 <<< "my secret data")
|
$ vault write transit/encrypt/my-key plaintext=$(echo "my secret data" | base64)
|
||||||
|
|
||||||
Key Value
|
Key Value
|
||||||
--- -----
|
--- -----
|
||||||
|
|
Loading…
Reference in New Issue