-
Notifications
You must be signed in to change notification settings - Fork 369
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
fix: use tls config from BTP when connecting to the OIDC provider's well-known endpoint. #4857
Conversation
ef1e9fe
to
d9dc4eb
Compare
Signed-off-by: Huabing Zhao <[email protected]>
d9dc4eb
to
a5092a4
Compare
Signed-off-by: Huabing Zhao <[email protected]>
Signed-off-by: Huabing Zhao <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4857 +/- ##
==========================================
- Coverage 66.77% 66.72% -0.05%
==========================================
Files 209 209
Lines 32100 32162 +62
==========================================
+ Hits 21434 21460 +26
- Misses 9379 9416 +37
+ Partials 1287 1286 -1 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Huabing Zhao <[email protected]>
Signed-off-by: Huabing Zhao <[email protected]>
2195b65
to
26ee93a
Compare
Signed-off-by: Huabing Zhao <[email protected]>
b62874d
to
45aca68
Compare
Signed-off-by: Huabing Zhao <[email protected]>
45aca68
to
f82c92b
Compare
Signed-off-by: Huabing Zhao <[email protected]>
Signed-off-by: Huabing Zhao <[email protected]>
Signed-off-by: Huabing Zhao <[email protected]>
Signed-off-by: Huabing Zhao <[email protected]>
Signed-off-by: Huabing Zhao <[email protected]>
issuer: "http://keycloak.gateway-conformance-infra/realms/master" | ||
authorizationEndpoint: "http://keycloak.gateway-conformance-infra/realms/master/protocol/openid-connect/auth" | ||
tokenEndpoint: "http://keycloak.gateway-conformance-infra/realms/master/protocol/openid-connect/token" | ||
issuer: "https://keycloak.gateway-conformance-infra/realms/master" # Test fetching auth endpoint from the issuer url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing tokenEndpoint
and authorizationEndpoint
so they will be fetched by the Gateway API translator. This is used to verify that EG uses the CA from BackendTLSPolicy
when connecting to the OIDC provider's well-known endpoint.
image: busybox:stable | ||
command: ["sh", "-c", "until nc -v -z -w3 keycloak 80; do sleep 2; done"] | ||
image: curlimages/curl:latest | ||
command: ["sh", "-c", "until curl -s -o /dev/null -w '%{http_code}' http://keycloak:80; do sleep 2; done"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using curl
instead of nc
to verify that keycload is ready. This change fixed some flaky OIDC tests.
@@ -23,7 +23,7 @@ func init() { | |||
var OIDCBackendClusterTest = suite.ConformanceTest{ | |||
ShortName: "OIDC with BackendCluster", | |||
Description: "Test OIDC authentication", | |||
Manifests: []string{"testdata/oidc-keycloak.yaml", "testdata/oidc-securitypolicy-backendcluster.yaml"}, | |||
Manifests: []string{"testdata/oidc-keycloak.yaml"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see test/e2e/testdata/oidc-securitypolicy-backendcluster.yaml
being updated but not in use
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's used here:
Test: func(t *testing.T, suite *suite.ConformanceTestSuite) {
t.Run("oidc provider represented by a BackendCluster", func(t *testing.T) {
testOIDC(t, suite, "testdata/oidc-securitypolicy-backendcluster.yaml")
The creation of SecurityPolicy is now started after keycloak pod is ready, so EG can fetch the auth and token points from the keycloak's well-known endpoint.
Signed-off-by: Huabing Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Huabing Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
…ell-known endpoint. (envoyproxy#4857) * add e2e test for OIDC provider with TLS Signed-off-by: Huabing Zhao <[email protected]> * delete file Signed-off-by: Huabing Zhao <[email protected]> * fix lint Signed-off-by: Huabing Zhao <[email protected]> * use TLS config from BTLPolicy to fetch auth endpoint Signed-off-by: Huabing Zhao <[email protected]> * refactor Signed-off-by: Huabing Zhao <[email protected]> * update release note Signed-off-by: Huabing Zhao <[email protected]> * update release note Signed-off-by: Huabing Zhao <[email protected]> * fix test Signed-off-by: Huabing Zhao <[email protected]> * fix test Signed-off-by: Huabing Zhao <[email protected]> * fix test Signed-off-by: Huabing Zhao <[email protected]> * fix test Signed-off-by: Huabing Zhao <[email protected]> * fix test Signed-off-by: Huabing Zhao <[email protected]> * fix lint Signed-off-by: Huabing Zhao <[email protected]> --------- Signed-off-by: Huabing Zhao <[email protected]> Signed-off-by: Huabing (Robin) Zhao <[email protected]> (cherry picked from commit 3a39c35) Signed-off-by: Huabing Zhao <[email protected]>
* fix: nil pointer error (#5000) * fix: nil pointer error Signed-off-by: Huabing Zhao <[email protected]> (cherry picked from commit 10a31f1) Signed-off-by: Huabing Zhao <[email protected]> * fix: store one copy of HTTPRoute Extension Filters (#5002) * fix: store one copy of HTTPRoute Extension Filters Signed-off-by: Guy Daich <[email protected]> * fix code review comments Signed-off-by: Guy Daich <[email protected]> * check if httproutefilter crd exists Signed-off-by: Guy Daich <[email protected]> --------- Signed-off-by: Guy Daich <[email protected]> (cherry picked from commit 2a5ecaf) Signed-off-by: Huabing Zhao <[email protected]> * fix: enable ipv4 compat mode for dual stack cluster support (#5018) enable ipv4 compat mode for dual stack cluster support Signed-off-by: Will Tekulve <[email protected]> (cherry picked from commit e028254) Signed-off-by: Huabing Zhao <[email protected]> * fix: explicitly set ip family and family policy in gateway spec (#5019) * explicitly set ip family and family policy Signed-off-by: Will Tekulve <[email protected]> * add TestService cases Signed-off-by: Will Tekulve <[email protected]> (cherry picked from commit 4d5d3f0) Signed-off-by: Huabing Zhao <[email protected]> * fix: check before setting cookie TTL in sessionPersistence (#5026) * Check before setting Cookie TTL in Session Persistence Fixes a null ptr exception when the cookie ttl is nil but was being accessed without checking if its valid or not Signed-off-by: Arko Dasgupta <[email protected]> * simplify logic Signed-off-by: Arko Dasgupta <[email protected]> (cherry picked from commit dff0531) Signed-off-by: Huabing Zhao <[email protected]> * fix: dont shift listener ports for Standalone mode (#5027) * fix: dont shift listener ports for Standalone mode Fixes: #4981 Signed-off-by: Arko Dasgupta <[email protected]> * test Signed-off-by: Arko Dasgupta <[email protected]> * fix lint Signed-off-by: Arko Dasgupta <[email protected]> --------- Signed-off-by: Arko Dasgupta <[email protected]> (cherry picked from commit 84f2ad2) Signed-off-by: Huabing Zhao <[email protected]> * fix: shutdown-manager not respecting security context of container spec (#4938) * Fix shutdown-manager not respecting security context of container spec Signed-off-by: Dean Coakley <[email protected]> * Update securityContext testdata Signed-off-by: Dean Coakley <[email protected]> * Lint with gci Signed-off-by: Dean Coakley <[email protected]> --------- Signed-off-by: Dean Coakley <[email protected]> (cherry picked from commit 43621b4) Signed-off-by: Huabing Zhao <[email protected]> * fix: use tls config from BTP when connecting to the OIDC provider's well-known endpoint. (#4857) * add e2e test for OIDC provider with TLS Signed-off-by: Huabing Zhao <[email protected]> * delete file Signed-off-by: Huabing Zhao <[email protected]> * fix lint Signed-off-by: Huabing Zhao <[email protected]> * use TLS config from BTLPolicy to fetch auth endpoint Signed-off-by: Huabing Zhao <[email protected]> * refactor Signed-off-by: Huabing Zhao <[email protected]> * update release note Signed-off-by: Huabing Zhao <[email protected]> * update release note Signed-off-by: Huabing Zhao <[email protected]> * fix test Signed-off-by: Huabing Zhao <[email protected]> * fix test Signed-off-by: Huabing Zhao <[email protected]> * fix test Signed-off-by: Huabing Zhao <[email protected]> * fix test Signed-off-by: Huabing Zhao <[email protected]> * fix test Signed-off-by: Huabing Zhao <[email protected]> * fix lint Signed-off-by: Huabing Zhao <[email protected]> --------- Signed-off-by: Huabing Zhao <[email protected]> Signed-off-by: Huabing (Robin) Zhao <[email protected]> (cherry picked from commit 3a39c35) Signed-off-by: Huabing Zhao <[email protected]> --------- Signed-off-by: Huabing Zhao <[email protected]> Signed-off-by: Guy Daich <[email protected]> Signed-off-by: Will Tekulve <[email protected]> Signed-off-by: Arko Dasgupta <[email protected]> Signed-off-by: Dean Coakley <[email protected]> Signed-off-by: Huabing (Robin) Zhao <[email protected]> Co-authored-by: Guy Daich <[email protected]> Co-authored-by: Will Tekulve <[email protected]> Co-authored-by: Arko Dasgupta <[email protected]> Co-authored-by: Dean Coakley <[email protected]>
Fixes #4838
Release Notes: Yes