Replies: 1 comment 2 replies
-
https://istio.io/latest/docs/reference/config/security/request_authentication/ Your yaml has jwks. It should be jwksUri. apiVersion: security.istio.io/v1beta1 kind: RequestAuthentication metadata: name: namespace: spec: selector: matchLabels: app: jwtRules: - forwardOriginalToken: true issuer: jwksUri: << issuer URL key URI >> |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to setup JWT authentication using Istio. I've configured RequestAuthentication resource for enabling JWT authentication.
Below I am sharing the YAML file content of the RequestAuthentication resource that I've created.
apiVersion: security.istio.io/v1beta1 kind: RequestAuthentication metadata: name: <RequestAuthenticationResourceName> namespace: <Namespace> spec: selector: matchLabels: app: <ApplicationName> jwtRules: - forwardOriginalToken: true issuer: <IssuerURL> jwks: | {"keys": [{"n": "<SecretAppliedHere>", "e": "AQAB", "kty": "RSA"}]}
We just received the JWT secret and changed it into Base64 using online Base64 converter websites. The YAML is applied successfully this way.
Then we logged in to a testing pod and tried to send a CURL request to the internal service URL of the pod that we used in "matchLabels" section in RequestAuthentication resource with a valid token. ( we have verified that token is valid with sending another request to another endpoint that accepts the token )
Below I am sharing the CURL command that we used for testing JWT authentication with Istio.
curl --location ' [http://<internal-service-url-and-path-applied-here> --header 'accept: application/json, text/plain, */*' --header 'authorization: Bearer <token-applied-here> --header 'Cookie: <cookie-applied-here>'
After performing this CURL operation, we are getting "JWT Verification Fails Error" in the output.
I'd be glad if someone can point the correct direction or help with this issue.
Beta Was this translation helpful? Give feedback.
All reactions