JWT public keys are empty
-
I am trying to retrieve the JWT public keys via the api endpoint
/api/jwt/public-key
. The issue is that the response returns empty.{"publicKeys":{}}
When I try to target a specific application id via the endpoint
/api/jwt/public-key?applicationId={applicationId}
. That call throws an exception (from the logs):ERROR io.fusionauth.app.primeframework.error.ExceptionExceptionHandler - An unhandled exception was thrown org.primeframework.mvc.PrimeException: The @JSONResponse field [response] in the action [class io.fusionauth.app.action.api.jwt.PublicKeyAction] is null. It cannot be null!
Any insight in what is going on here or how to fix? Did I miss some configuration somewhere? I would have expected at least the default keys to be returned. For reference I am running debian self hosted v1.40.2
Thanks!
-
@stacey Have you published any asymmetric keypairs (RSA, EC, etc)?
FusionAuth by default ships only with HMAC keypairs, and since those are symmetric, they are not published at that endpoint.
-
@dan I did not initially publish any key pairs. This was part of the problem for sure.
-
@stacey Great. Did you end up getting it working?