USERNAME_MISSING failed to authenticate with authenticator authn-jwt service banpara:webservice:conjur/authn-jwt/eso: CONJ00123E Failed to fetch JWKS data from 'https://api-int.ocp.desenv.com:6443/openid/v1/jwks' with err

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USERNAME_MISSING failed to authenticate with authenticator authn-jwt service banpara:webservice:conjur/authn-jwt/eso: CONJ00123E Failed to fetch JWKS data from 'https://api-int.ocp.desenv.com:6443/openid/v1/jwks' with err

L1 Bithead

Hello community. I need help!!!

 

I'm running some tests with ESO + Conjur Self-hosted (13.4.0).

My infrastructure is an OCP4 cluster version 4.10.50 with Kubernetes version v1.23.12, where I implemented ESO (External Secrets Operator) via Helm Charts. A CyberArk Conjur Self-hosted cluster composed of 1VM-leader, 1VM-standby, 1VM-follower and 1POD-follower in the OCP4 cluster.

 

I configured it following the official documentation (links below), but I'm getting the error directly on my Webservice:

USERNAME_MISSING failed to authenticate with authenticator authn-jwt service banpara:webservice:conjur/authn-jwt/eso: CONJ00123E Failed to fetch JWKS data from 'https://api-int.ocp.desenv.com:6443/openid/v1/jwks' with error: #<Net::HTTPClientException: 403 "Forbidden">

 

This is my return from Service Account Issuer Discovery:

# curl -k https://kubernetes.default.svc/.well-known/openid-configuration

{"issuer":"https://kubernetes.default.svc","jwks_uri":"https://api-int.ocp.desenv.com:6443/openid/v1/jwks","response_ types_supported":["id_token"],"subject_types_supported":["public"],"id_token_signing_alg_values_supported":["RS256"]}#

 

I configured the variables:

conjur/authn-jwt/eso/audience: https://kubernetes.default.svc

conjur/authn-jwt/eso/ca-cert: certificate of https://kubernetes.default.svc

conjur/authn-jwt/eso/identity-path: eso-k8s

conjur/authn-jwt/eso/issuer: https://kubernetes.default.svc

conjur/authn-jwt/eso/jwks-uri: https://api-int.ocp.desenv.com:6443/openid/v1/jwks (I tried using the URL https://kubernetes.default.svc and it gives the same error)

host: eso-k8s/system:serviceaccount:eso:external-secrets (with permission in the Webservice as authenticate, read.

 

I also configured the SecretStore and ExternalSecret as documentation.

 

https://docs.cyberark.com/conjur-enterprise/13.4/en/content/integrations/k8s-ocp/k8s-jwt-secrets-store-eso.htm?tocpath=Integrations%7COpenShift%252FKubernetes%7CApp%20owner%253A%20Set%20up%20workloads%20in%20Kubernetes%7CSet%20up%20workloads%20(JWT-based%20authn)%7CConjur%20Provider%20for%20External%20Secrets%20Operator%7C_____0

 

https://docs.cyberark.com/conjur-enterprise/13. 4/en/content/integrations/k8s-ocp/k8s-jwt-secrets-store-eso-e2e.htm?tocpath=Integrations%7COpenShift%252FKubernetes%7CApp%20owner%253A%20Sep%20 up%20workloads%20in%20Kubernetes%7CSet%20up%20workloads%20(JWT-based%20authn)%7CConjur%20Provider%20for%20External%20Secrets%20Operator%7C_____1

 

https://docs.cyberark.com/conjur-enterprise/13.4/en/content/integrations/k8s-ocp/k8s-jwt-authn.htm#Discover

 

 

3 REPLIES 3

L7 Applicator

Hi @Jonas Ribas​ 

 

Generally 403 error refers to permission issues. Please check that,

 

  • The URL is correct and reachable from Conjur host.
  • The Kubernetes API server allows access to the JWKS endpoint from Conjur's IP range.
  • There are no network policies or firewalls blocking access between Conjur and the Kubernetes API server.
  • Obtain the CA certificate used by the Kubernetes API server and then add that CA certificate to Conjur's trusted certificate store
  • Also, the jwks-uri should point to the correct JWKS endpoint.

 

You can test the accessibility of the JWKS URI using command curl -k https://api-int.ocp.desenv.com:6443/openid/v1/jwks to check if the endpoint is reachable and if there are any SSL/TLS issues.

 

 

Hope it helps !

 

 

L4 Transporter

hi @Jonas Ribas​ 

 

It might be worth checking the container logs after enabling the DEBUG option there to see if there is more context on the 403 error

 

But most likely, the cause could be due to the reasons listed in the above comment, so check that first before the next test, especially ensuring that the JWKS endpoint is accessible from within your K8s/OpenShift cluster

L1 Bithead

Hello guys!!!

 

I will analyze these points that you gave me and get back to you with feedback on whether it worked or not.

 

Note: I had already checked some of the things you mentioned before opening this issue, but I will check them again.

 

Thank you.

  • 236 Views
  • 3 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!