-
Notifications
You must be signed in to change notification settings - Fork 385
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
remoteJWKS needs a caCert option #3536
Comments
I'd vote for adding a |
/assign |
is caCertificateRef field ok? |
@phantooom lets follow the BackendTLSPolicy spec https://gateway-api.sigs.k8s.io/api-types/backendtlspolicy/ as a guide and use |
ok |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. |
hey @phantooom this was discussed in the the community meeting a few weeks ago and the decision is to represent the remote jwks endpoint as a backendCluster. similar to what's done in ext auth gateway/api/v1alpha1/ext_auth_types.go Line 54 in 262e046
This would be an additional field in the existing struct allowing the user to define custom cluster level properties like custom caCert |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. |
+1 |
hey @phantooom do you any cycles to address the above comments ? |
sorry. my work has recently changed, and I am no longer able to continue following up on this pull request. |
/unassign |
Hi, we also need remoteJWKS to support extra CA, do we have any process for this issue ? |
hey @wengyao04 to implement this, we'd need to add and implement the |
As far as I understand the comments there is currently no way to use an internal JWKS server. Is that correct? To give some context here is my situation: I have a local Kubernetes cluster with Keycloak, Envoy Gateway and a self-signing cert-manager instance. A backend service is exposed via the Envoy Gateway and I want to add JWT authentication based on JWTs issued by my Keycloak instance. When I curl the endpoint with authentication enabled I get this error:
I would really like to move on with configuring authentication (and later authorization) in my development cluster but this is stopping me in my tracks. Is there a workaround or is this simply not supported until this issue is resolved? |
Lucas yes there is. We do so in our prod. and test setup. Keycloak being
the JWK broker and enovy the entrance gateway to authenticate through. I'm
not at the work computer right now. But, if interested I can try to fetch
some detail.s
…On Sun, Dec 8, 2024 at 11:18 AM Lucas Resch ***@***.***> wrote:
As far as I understand the comments there is currently no way to use an
internal JWKS server. Is that correct?
To give some context here is my situation: I have a local Kubernetes
cluster with Keycloak, Envoy Gateway and a self-signing cert-manager
instance. A backend service is exposed via the Envoy Gateway and I want to
add JWT authentication based on JWTs issued by my Keycloak instance.
When I curl the endpoint with authentication enabled I get this error: Jwks
remote fetch is failed. When using the verbose switch I see this in the
response:
curl -kv --header "Authorization: Bearer $BEARER" https://api.dev.example.com/service/resource
...
* Server certificate:
* subject: CN=Example
* start date: Nov 21 14:14:43 2024 GMT
* expire date: Feb 19 14:14:43 2025 GMT
* issuer: CN=Example
* SSL certificate verify result: self-signed certificate (18), continuing anyway.
* Certificate level 0: Public key type RSA (2048/112 Bits/secBits), signed using sha256WithRSAEncryption
...
< HTTP/2 401
< www-authenticate: Bearer realm="https://api.dev.example.com/service/resource", error="invalid_token"
...
Jwks remote fetch is failed
I would really like to move on with configuring authentication (and later
authorization) in my development cluster but this is stopping me in my
tracks. Is there a workaround or is this simply not supported until this
issue is resolved?
—
Reply to this email directly, view it on GitHub
<#3536 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABIERWXMSFMV57EGMP4ILRD2EQMGXAVCNFSM6AAAAABIY7UK5GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMRVGU3TKNZUHA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
Mvh. / Kind regards
Lars Bengtsson
- Health is wealth, movement is medicine -
My DevOps blog <https://bengtssondd.it>
My poetry website <https://skakmatdigte.dk>
|
I'm certainly interested. Any kind of guidance is much appreciated! From the docs alone I can't seem to make it work. |
I was able to resolve my issue. First I enabled signing of my certificates via Let's Encrypt. Then I resolved the |
Description:
When setting up JWT authentication we need to be able to set custom CA-certificate to allow Envoy to trust our internal HTTPS JWKS server.
Snippet from SecurityPolicy:
Relevant debug logs:
[2024-06-04 13:15:36.191][1][debug][connection] [source/extensions/transport_sockets/tls/cert_validator/default_validator.cc:325] verify cert failed: X509_verify_cert: certificate verification error at depth 1: unable to get local issuer certificate 2024-06-04T15:15:36.191711347+02:00 [2024-06-04 13:15:36.191][1][debug][connection] [source/extensions/transport_sockets/tls/ssl_socket.cc:241] [Tags: "ConnectionId":"8"] remote address:10.X.X.254:443,TLS_error:|268435581:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED:TLS_error_end
[optional Relevant Links:]
The text was updated successfully, but these errors were encountered: