-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reverify for istio 1.21; add certs; easier jwt validation; verify thi…
…ngs still work
- Loading branch information
1 parent
08146f9
commit 89b015a
Showing
25 changed files
with
475 additions
and
458 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"iss": "https://idp-on-cloud-run-3kdezruzua-uc.a.run.app", | ||
"exp": $EXP, | ||
"iat": $IAT, | ||
"sub": "alice", | ||
"aud": "https://svc1.example.com" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,12 +25,12 @@ spec: | |
matchLabels: | ||
app: istio-ingressgateway | ||
jwtRules: | ||
- issuer: "$SA_EMAIL" | ||
- issuer: "https://idp-on-cloud-run-3kdezruzua-uc.a.run.app" | ||
audiences: | ||
- "https://foo.bar" | ||
- "https://svc1.example.com" | ||
- "https://svc2.example.com" | ||
jwksUri: "https://www.googleapis.com/service_accounts/v1/jwk/$SA_EMAIL" | ||
jwksUri: "https://idp-on-cloud-run-3kdezruzua-uc.a.run.app/certs" | ||
forwardOriginalToken: true | ||
--- | ||
apiVersion: security.istio.io/v1beta1 | ||
|
@@ -48,7 +48,7 @@ spec: | |
methods: ["GET"] | ||
when: | ||
- key: request.auth.claims[iss] | ||
values: ["[email protected]"] | ||
values: ["https://idp-on-cloud-run-3kdezruzua-uc.a.run.app"] | ||
--- | ||
apiVersion: security.istio.io/v1beta1 | ||
kind: RequestAuthentication | ||
|
@@ -59,10 +59,10 @@ spec: | |
matchLabels: | ||
app: svc1 | ||
jwtRules: | ||
- issuer: "$SA_EMAIL" | ||
- issuer: "https://idp-on-cloud-run-3kdezruzua-uc.a.run.app" | ||
audiences: | ||
- "https://svc1.example.com" | ||
jwksUri: "https://www.googleapis.com/service_accounts/v1/jwk/$SA_EMAIL" | ||
jwksUri: "https://idp-on-cloud-run-3kdezruzua-uc.a.run.app/certs" | ||
--- | ||
apiVersion: security.istio.io/v1beta1 | ||
kind: AuthorizationPolicy | ||
|
@@ -79,7 +79,7 @@ spec: | |
methods: ["GET"] | ||
when: | ||
- key: request.auth.claims[iss] | ||
values: ["$SA_EMAIL"] | ||
values: ["https://idp-on-cloud-run-3kdezruzua-uc.a.run.app"] | ||
- key: request.auth.claims[aud] | ||
values: ["https://svc1.example.com"] | ||
--- | ||
|
@@ -92,10 +92,10 @@ spec: | |
matchLabels: | ||
app: svc2 | ||
jwtRules: | ||
- issuer: "$SA_EMAIL" | ||
- issuer: "https://idp-on-cloud-run-3kdezruzua-uc.a.run.app" | ||
audiences: | ||
- "https://svc2.example.com" | ||
jwksUri: "https://www.googleapis.com/service_accounts/v1/jwk/$SA_EMAIL" | ||
jwksUri: "https://idp-on-cloud-run-3kdezruzua-uc.a.run.app/certs" | ||
--- | ||
apiVersion: security.istio.io/v1beta1 | ||
kind: AuthorizationPolicy | ||
|
@@ -115,7 +115,7 @@ spec: | |
# principals: ["cluster.local/ns/default/sa/svc1-sa"] | ||
when: | ||
- key: request.auth.claims[iss] | ||
values: ["$SA_EMAIL"] | ||
values: ["https://idp-on-cloud-run-3kdezruzua-uc.a.run.app"] | ||
- key: request.auth.claims[aud] | ||
values: ["https://svc2.example.com"] | ||
# - key: request.auth.claims[groups] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"groups": [ | ||
"group1", | ||
"group2" | ||
], | ||
"sub": "bob", | ||
"exp": $EXP, | ||
"iat": $IAT, | ||
"iss": "https://idp-on-cloud-run-3kdezruzua-uc.a.run.app", | ||
"aud": "https://svc2.example.com" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"sub": "bob", | ||
"exp": $EXP, | ||
"iat": $IAT, | ||
"iss": "https://idp-on-cloud-run-3kdezruzua-uc.a.run.app", | ||
"aud": "https://svc2.example.com" | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.