Skip to content

Commit 788b8b7

Browse files
authored
edited base64 decode command (istio#15691)
* edited base64 decode command Edited sincle it's failing with message- base64: invalid argument - * make gen changes
1 parent 88addbb commit 788b8b7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

content/en/docs/tasks/security/authorization/authz-jwt/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Caching and propagation can cause a delay.
112112
This causes Istio to generate the attribute `requestPrincipal` with the value `[email protected]/[email protected]`:
113113

114114
{{< text syntax="bash" expandlinks="false" >}}
115-
$ TOKEN=$(curl {{< github_file >}}/security/tools/jwt/samples/demo.jwt -s) && echo "$TOKEN" | cut -d '.' -f2 - | base64 --decode -
115+
$ TOKEN=$(curl {{< github_file >}}/security/tools/jwt/samples/demo.jwt -s) && echo "$TOKEN" | cut -d '.' -f2 - | base64 --decode
116116
{"exp":4685989700,"foo":"bar","iat":1532389700,"iss":"[email protected]","sub":"[email protected]"}
117117
{{< /text >}}
118118

@@ -162,7 +162,7 @@ Caching and propagation can cause a delay.
162162
1. Get the JWT that sets the `groups` claim to a list of strings: `group1` and `group2`:
163163

164164
{{< text syntax="bash" expandlinks="false" >}}
165-
$ TOKEN_GROUP=$(curl {{< github_file >}}/security/tools/jwt/samples/groups-scope.jwt -s) && echo "$TOKEN_GROUP" | cut -d '.' -f2 - | base64 --decode -
165+
$ TOKEN_GROUP=$(curl {{< github_file >}}/security/tools/jwt/samples/groups-scope.jwt -s) && echo "$TOKEN_GROUP" | cut -d '.' -f2 - | base64 --decode
166166
{"exp":3537391104,"groups":["group1","group2"],"iat":1537391104,"iss":"[email protected]","scope":["scope1","scope2"],"sub":"[email protected]"}
167167
{{< /text >}}
168168

content/en/docs/tasks/security/authorization/authz-jwt/snips.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ EOF
8787
}
8888

8989
snip_allow_requests_with_valid_jwt_and_listtyped_claims_5() {
90-
TOKEN=$(curl https://raw.githubusercontent.com/istio/istio/master/security/tools/jwt/samples/demo.jwt -s) && echo "$TOKEN" | cut -d '.' -f2 - | base64 --decode -
90+
TOKEN=$(curl https://raw.githubusercontent.com/istio/istio/master/security/tools/jwt/samples/demo.jwt -s) && echo "$TOKEN" | cut -d '.' -f2 - | base64 --decode
9191
}
9292

9393
! IFS=$'\n' read -r -d '' snip_allow_requests_with_valid_jwt_and_listtyped_claims_5_out <<\ENDSNIP
@@ -133,7 +133,7 @@ EOF
133133
}
134134

135135
snip_allow_requests_with_valid_jwt_and_listtyped_claims_9() {
136-
TOKEN_GROUP=$(curl https://raw.githubusercontent.com/istio/istio/master/security/tools/jwt/samples/groups-scope.jwt -s) && echo "$TOKEN_GROUP" | cut -d '.' -f2 - | base64 --decode -
136+
TOKEN_GROUP=$(curl https://raw.githubusercontent.com/istio/istio/master/security/tools/jwt/samples/groups-scope.jwt -s) && echo "$TOKEN_GROUP" | cut -d '.' -f2 - | base64 --decode
137137
}
138138

139139
! IFS=$'\n' read -r -d '' snip_allow_requests_with_valid_jwt_and_listtyped_claims_9_out <<\ENDSNIP

0 commit comments

Comments
 (0)