You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
hey @wengyao04 to implement this, we'd need to add and implement the backendRefs field similar to what was done for OIDC #4227, which would allow the user to specify a Backend/ Service resource as a backendRef + a BackendTLSPolicy as a policy to specify the custom CA
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?
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 -
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
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 Jwks remote fetch is failed error by pointing the jwksURL to the cluster internal URL of my Keycloak instance instead of the URL exposed by the Envoy gateway. I guess that URL is not resolvable by Envoy itself.
Activity
arkodg commentedon Jun 4, 2024
I'd vote for adding a
caCertificateRefsfield in here to solve thisphantooom commentedon Jun 6, 2024
/assign
phantooom commentedon Jun 15, 2024
is caCertificateRef field ok?
is there a scenario where users might need multiple CAs?
arkodg commentedon Jun 17, 2024
@phantooom lets follow the BackendTLSPolicy spec https://gateway-api.sigs.k8s.io/api-types/backendtlspolicy/ as a guide and use
caCertificateRefsand append them into one internallyphantooom commentedon Jun 18, 2024
ok
9 remaining items
phantooom commentedon Oct 24, 2024
sorry. my work has recently changed, and I am no longer able to continue following up on this pull request.
phantooom commentedon Oct 24, 2024
/unassign
wengyao04 commentedon Oct 27, 2024
Hi, we also need remoteJWKS to support extra CA, do we have any process for this issue ?
arkodg commentedon Oct 28, 2024
hey @wengyao04 to implement this, we'd need to add and implement the
backendRefsfield similar to what was done for OIDC #4227, which would allow the user to specify aBackend/Serviceresource as a backendRef + aBackendTLSPolicyas a policy to specify the custom CAMLNW commentedon Dec 8, 2024
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: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?
larssb commentedon Dec 8, 2024
MLNW commentedon Dec 8, 2024
I'm certainly interested. Any kind of guidance is much appreciated! From the docs alone I can't seem to make it work.
MLNW commentedon Dec 9, 2024
I was able to resolve my issue. First I enabled signing of my certificates via Let's Encrypt. Then I resolved the
Jwks remote fetch is failederror by pointing thejwksURLto the cluster internal URL of my Keycloak instance instead of the URL exposed by the Envoy gateway. I guess that URL is not resolvable by Envoy itself.