Hello, I'm trying to use JWT Authentication w/ Goo...
# gooddata-ui
m
Hello, I'm trying to use JWT Authentication w/ Gooddata UI. However, I'm getting the error:
Copy code
Www-Authenticate: Bearer error="invalid_token", error_description="The JWT contains invalid claims: [name].", error_uri="<https://tools.ietf.org/html/rfc6750#section-3.1>"`
Any idea on what is going on?
m
Hi Michael, I would highly suggest revoking the token inmediately as it is considered sensitive information. Please also edit your message to exclude the token. Regarding the error itself, can you double check your JWK’s attributes? Sounds like the JWT and JWK are not matching
m
Thanks @Moises Morales - good catch. The decoded token is attached. I was wondering if my custom claim was a problem.
However, the
kid
here and the
kid
listed in (one of my)
/api/v1/entities/jwks
match.
The algorithm's also match as "RS256".
m
Thanks for checking that. From our logs, I see the following errors:
Copy code
JwtVerificationException: The JWT contains invalid claims: [name]
Jwt contains "sub" that does not satisfy given regex pattern.
Could you also check for the claim in question? It appears in the second step of the JWT creation: https://www.gooddata.com/docs/cloud/manage-organization/jwt-access-token/#SetUpAuthenticationUsingJSONWebTokens-CreateJWT
m
Hey Moises, I was directly using the JWT provided by our Auth0 tenant, which is configured to be the IdP for our GoodData instance. Is that not valid? If not, I can construct one myself, but was hoping to leverage the existing Auth0 infrastructure instead of generating JWTs myself.
m
Hi Michael, I am afraid that you will need to build the JWT based on the claims provided in our documentation. If you are still having issues with it, please do let us know.
m
Ok, I’ll give that a go. Thank you.
1
Hey @Moises Morales, I got this to work - thanks again.
🙌 1
m
Thank you for the update, I am glad to hear this is working! 🙂