Hello Team,
We are Using Grafana Version 11.2.0 in our kubernetes containerized environment. We are trying to login Grafana application using JWT token from external app through http header with the header name of header_name: X-JWT-Assertion.
Getting error at the grafana validation side specifically on jwt signature validation. I have selected jwk_set_url as an option for signature verification. jwk_set_url=“https://dns_host_name.com/auth-server/jwks”.
JWT Authentication Failed - “Failed to authenticate request” error=“[jwt.invalid] failed to verify JWT: Get "https://https://dns_host_name.com/auth-server/jwks": tls: failed to verify certificate: x509: certificate signed by unknown authority”
Here is my current configuration…
auth.jwt:
enabled: true
tls_skip_verify_insecure: true
enable_login_token: true
header_name: X-JWT-Assertion
username_claim: sub
email_claim: sub
jwk_set_url: https://dns_host_name.com/auth-server/jwks
cache_ttl: 60m
auto_sign_up: true
skip_org_role_sync: true
Below are the error message from grafana container.
logger=authn.service t=2024-10-24T17:52:10.040244487Z level=info msg="Failed to authenticate request" client=auth.client.jwt error="[jwt.invalid] failed to verify JWT: Get \"https://https://dns_host_name.com/auth-server/jwks\": tls: failed to verify certificate: x509: certificate signed by unknown authority"
logger=context userId=0 orgId=0 uname= t=2024-10-24T17:52:10.040801065Z level=info msg="Request Completed" method=GET path=/ status=302 remote_addr=10.244.0.0 time_ms=17 duration=17.588575ms size=37 referer=https://dns_host_name.com/auth-server/jwks/externalApp handler=/ status_source=server
Here is the documentation reference link used. - Configure JWT authentication | Grafana documentation
Please advise to resolve this below issue… Appreciate your support and feedback!. “Failed to authenticate request” client=auth.client.jwt error=“[jwt.invalid] failed to verify JWT: Get "https://https://dns_host_name.com/auth-server/jwks": tls: failed to verify certificate: x509: certificate signed by unknown authority”