diff --git a/content/en/docs/tasks/security/authorization/authz-jwt/index.md b/content/en/docs/tasks/security/authorization/authz-jwt/index.md index c50d145c7ff52..962cd6348920f 100644 --- a/content/en/docs/tasks/security/authorization/authz-jwt/index.md +++ b/content/en/docs/tasks/security/authorization/authz-jwt/index.md @@ -112,7 +112,7 @@ Caching and propagation can cause a delay. This causes Istio to generate the attribute `requestPrincipal` with the value `testing@secure.istio.io/testing@secure.istio.io`: {{< text syntax="bash" expandlinks="false" >}} - $ TOKEN=$(curl {{< github_file >}}/security/tools/jwt/samples/demo.jwt -s) && echo "$TOKEN" | cut -d '.' -f2 - | base64 --decode - + $ TOKEN=$(curl {{< github_file >}}/security/tools/jwt/samples/demo.jwt -s) && echo "$TOKEN" | cut -d '.' -f2 - | base64 --decode {"exp":4685989700,"foo":"bar","iat":1532389700,"iss":"testing@secure.istio.io","sub":"testing@secure.istio.io"} {{< /text >}} @@ -162,7 +162,7 @@ Caching and propagation can cause a delay. 1. Get the JWT that sets the `groups` claim to a list of strings: `group1` and `group2`: {{< text syntax="bash" expandlinks="false" >}} - $ TOKEN_GROUP=$(curl {{< github_file >}}/security/tools/jwt/samples/groups-scope.jwt -s) && echo "$TOKEN_GROUP" | cut -d '.' -f2 - | base64 --decode - + $ TOKEN_GROUP=$(curl {{< github_file >}}/security/tools/jwt/samples/groups-scope.jwt -s) && echo "$TOKEN_GROUP" | cut -d '.' -f2 - | base64 --decode {"exp":3537391104,"groups":["group1","group2"],"iat":1537391104,"iss":"testing@secure.istio.io","scope":["scope1","scope2"],"sub":"testing@secure.istio.io"} {{< /text >}} diff --git a/content/en/docs/tasks/security/authorization/authz-jwt/snips.sh b/content/en/docs/tasks/security/authorization/authz-jwt/snips.sh index 9f92c228609c6..57bf94db44e34 100644 --- a/content/en/docs/tasks/security/authorization/authz-jwt/snips.sh +++ b/content/en/docs/tasks/security/authorization/authz-jwt/snips.sh @@ -87,7 +87,7 @@ EOF } snip_allow_requests_with_valid_jwt_and_listtyped_claims_5() { -TOKEN=$(curl https://raw.githubusercontent.com/istio/istio/master/security/tools/jwt/samples/demo.jwt -s) && echo "$TOKEN" | cut -d '.' -f2 - | base64 --decode - +TOKEN=$(curl https://raw.githubusercontent.com/istio/istio/master/security/tools/jwt/samples/demo.jwt -s) && echo "$TOKEN" | cut -d '.' -f2 - | base64 --decode } ! IFS=$'\n' read -r -d '' snip_allow_requests_with_valid_jwt_and_listtyped_claims_5_out <<\ENDSNIP @@ -133,7 +133,7 @@ EOF } snip_allow_requests_with_valid_jwt_and_listtyped_claims_9() { -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 - +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 } ! IFS=$'\n' read -r -d '' snip_allow_requests_with_valid_jwt_and_listtyped_claims_9_out <<\ENDSNIP