-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
Feature Description
Hello,
I have a small cluster running, setup with TLS. In order to use the Workload Identities in Nomad and do proper ACL things I need to setup this JWT Auth Method between consul and nomad. I use self-signed certificates.
When I supply this configuration:
{
"JWKSUrl": "https://10.0.1.3:4646/.well-known/jwks.json",
"JWKSCACert": "REDACTED",
"JWTSupportedAlgs": ["RS256"],
"BoundAudiences": ["consul.io"],
"ClaimMappings": {
"nomad_namespace": "nomad_namespace",
"nomad_job_id": "nomad_job_id",
"nomad_task": "nomad_task",
"nomad_service": "nomad_service"
}
}
I get this error:
Failed to create new auth method: Unexpected response code: 500 (Invalid Auth Method: error checking JWKSURL: fetching keys oidc: get keys failed Get "https://10.0.1.3:4646/.well-known/jwks.json": remote error: tls: certificate required)
I searched and tried a lot, and there seems to not be a way to supply a client certificate and key to this auth method to make it able to access the needed JWKS.
My suggestion:
Add 2 more fields to supply a client certificate and a client key, or even a .p12 file.
(I am not entirely sure if we would need the key here as well though)
...
"JWKSClientCert": "...",
"JWKSClientKey": "...",
...
Or maybe its just not at all documented since I don't see people having issues with this apparently. One workaround of course is to proxy it but that shouldn't be necessary...
Use Case(s)
Its basically impossible to run Jobs with proper security measures. Consul ACLs cant be used with services running on nomad in a connect service mesh when Consul ACLs are setup without a general key in the Agent and with a default deny rule.