-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: Send SNI in RemoteJWKS over TLS (#22177)
* update: send hostname in SNI for RemoteJWKS envoy request over TLS * update: add sni in golden files for JWT * add: UseSNI flag in JWT Provider Config entry * add: testcases for SNI in JWT provider * update: add UseSNI for JWKS in website doc
- Loading branch information
Showing
14 changed files
with
553 additions
and
306 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
```release-note:feature | ||
config: add UseSNI flag in remote JSONWebKeySet | ||
agent: send TLS SNI in remote JSONWebKeySet | ||
``` |
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
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
24 changes: 24 additions & 0 deletions
24
agent/xds/testdata/jwt_authn_clusters/http-provider-with-hostname-and-port-with-sni.golden
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,24 @@ | ||
{ | ||
"connectTimeout": "5s", | ||
"loadAssignment": { | ||
"clusterName": "jwks_cluster_okta", | ||
"endpoints": [ | ||
{ | ||
"lbEndpoints": [ | ||
{ | ||
"endpoint": { | ||
"address": { | ||
"socketAddress": { | ||
"address": "example-okta.com", | ||
"portValue": 90 | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"name": "jwks_cluster_okta", | ||
"type": "STATIC" | ||
} |
24 changes: 24 additions & 0 deletions
24
agent/xds/testdata/jwt_authn_clusters/http-provider-with-hostname-no-port-with-sni.golden
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,24 @@ | ||
{ | ||
"connectTimeout": "5s", | ||
"loadAssignment": { | ||
"clusterName": "jwks_cluster_okta", | ||
"endpoints": [ | ||
{ | ||
"lbEndpoints": [ | ||
{ | ||
"endpoint": { | ||
"address": { | ||
"socketAddress": { | ||
"address": "example-okta.com", | ||
"portValue": 80 | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"name": "jwks_cluster_okta", | ||
"type": "STATIC" | ||
} |
38 changes: 38 additions & 0 deletions
38
agent/xds/testdata/jwt_authn_clusters/https-provider-with-hostname-no-port-with-sni.golden
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,38 @@ | ||
{ | ||
"connectTimeout": "5s", | ||
"loadAssignment": { | ||
"clusterName": "jwks_cluster_okta", | ||
"endpoints": [ | ||
{ | ||
"lbEndpoints": [ | ||
{ | ||
"endpoint": { | ||
"address": { | ||
"socketAddress": { | ||
"address": "example-okta.com", | ||
"portValue": 443 | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"name": "jwks_cluster_okta", | ||
"transportSocket": { | ||
"name": "tls", | ||
"typedConfig": { | ||
"@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", | ||
"commonTlsContext": { | ||
"validationContext": { | ||
"trustedCa": { | ||
"filename": "mycert.crt" | ||
} | ||
} | ||
}, | ||
"sni": "example-okta.com" | ||
} | ||
}, | ||
"type": "STATIC" | ||
} |
38 changes: 38 additions & 0 deletions
38
agent/xds/testdata/jwt_authn_clusters/https-provider-with-ip-and-port-with-sni.golden
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,38 @@ | ||
{ | ||
"connectTimeout": "5s", | ||
"loadAssignment": { | ||
"clusterName": "jwks_cluster_okta", | ||
"endpoints": [ | ||
{ | ||
"lbEndpoints": [ | ||
{ | ||
"endpoint": { | ||
"address": { | ||
"socketAddress": { | ||
"address": "127.0.0.1", | ||
"portValue": 9091 | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"name": "jwks_cluster_okta", | ||
"transportSocket": { | ||
"name": "tls", | ||
"typedConfig": { | ||
"@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", | ||
"commonTlsContext": { | ||
"validationContext": { | ||
"trustedCa": { | ||
"filename": "mycert.crt" | ||
} | ||
} | ||
}, | ||
"sni": "127.0.0.1" | ||
} | ||
}, | ||
"type": "STATIC" | ||
} |
38 changes: 38 additions & 0 deletions
38
agent/xds/testdata/jwt_authn_clusters/https-provider-with-ip-no-port-with-sni.golden
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,38 @@ | ||
{ | ||
"connectTimeout": "5s", | ||
"loadAssignment": { | ||
"clusterName": "jwks_cluster_okta", | ||
"endpoints": [ | ||
{ | ||
"lbEndpoints": [ | ||
{ | ||
"endpoint": { | ||
"address": { | ||
"socketAddress": { | ||
"address": "127.0.0.1", | ||
"portValue": 443 | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"name": "jwks_cluster_okta", | ||
"transportSocket": { | ||
"name": "tls", | ||
"typedConfig": { | ||
"@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", | ||
"commonTlsContext": { | ||
"validationContext": { | ||
"trustedCa": { | ||
"filename": "mycert.crt" | ||
} | ||
} | ||
}, | ||
"sni": "127.0.0.1" | ||
} | ||
}, | ||
"type": "STATIC" | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.