Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

forward jwt tokens after verification #2300

Merged
merged 3 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@
"@type": "type.googleapis.com/envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication",
"providers": {
"httproute/envoy-gateway-system/backend/rule/0/match/0/www_example_com/example": {
"forward": true,
"remoteJwks": {
"asyncFetch": {},
"cacheDuration": "300s",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ xds:
'@type': type.googleapis.com/envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication
providers:
httproute/envoy-gateway-system/backend/rule/0/match/0/www_example_com/example:
forward: true
remoteJwks:
asyncFetch: {}
cacheDuration: 300s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ xds:
'@type': type.googleapis.com/envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication
providers:
httproute/envoy-gateway-system/backend/rule/0/match/0/www_example_com/example:
forward: true
remoteJwks:
asyncFetch: {}
cacheDuration: 300s
Expand Down
1 change: 1 addition & 0 deletions internal/xds/translator/jwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ func buildJWTAuthn(irListener *ir.HTTPListener) (*jwtauthnv3.JwtAuthentication,
JwksSourceSpecifier: remote,
PayloadInMetadata: irProvider.Issuer,
ClaimToHeaders: claimToHeaders,
Forward: true,
}

if irProvider.ExtractFrom != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
first-route/example:
audiences:
- foo.com
forward: true
fromCookies:
- session_access_token
issuer: https://www.example.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
claimToHeaders:
- claimName: claim.neteased.key
headerName: one-route-example-key1
forward: true
issuer: https://www.example.com
payloadInMetadata: https://www.example.com
remoteJwks:
Expand All @@ -43,6 +44,7 @@
headerName: one-route-example2-key1
- claimName: name
headerName: one-route-example2-key2
forward: true
issuer: https://www.two.example.com
payloadInMetadata: https://www.two.example.com
remoteJwks:
Expand All @@ -59,6 +61,7 @@
claimToHeaders:
- claimName: claim.neteased.key
headerName: second-route-example-key1
forward: true
issuer: https://www.example.com
payloadInMetadata: https://www.example.com
remoteJwks:
Expand All @@ -73,6 +76,7 @@
audiences:
- one.foo.com
- two.foo.com
forward: true
issuer: https://www.two.example.com
payloadInMetadata: https://www.two.example.com
remoteJwks:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
claimToHeaders:
- claimName: claim.neteased.key
headerName: first-route-key
forward: true
issuer: https://www.example.com
payloadInMetadata: https://www.example.com
remoteJwks:
Expand All @@ -59,6 +60,7 @@
second-route/example:
audiences:
- foo.com
forward: true
issuer: https://www.example.com
payloadInMetadata: https://www.example.com
remoteJwks:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
first-route/example:
audiences:
- foo.com
forward: true
issuer: https://www.example.com
payloadInMetadata: https://www.example.com
remoteJwks:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
first-route/example:
audiences:
- foo.com
forward: true
issuer: https://www.example.com
payloadInMetadata: https://www.example.com
remoteJwks:
Expand Down