• Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login
FusionAuth
  • Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login

JWT public keys are empty

Scheduled Pinned Locked Moved
General Discussion
2
4
443
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    stacey
    last edited by 12 Oct 2022, 17:58

    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!

    D 1 Reply Last reply 26 Oct 2022, 03:01 Reply Quote 0
    • D
      dan @stacey
      last edited by 26 Oct 2022, 03:01

      @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.

      --
      FusionAuth - Auth for devs, built by devs.
      https://fusionauth.io

      S 1 Reply Last reply 27 Oct 2022, 14:55 Reply Quote 0
      • S
        stacey @dan
        last edited by 27 Oct 2022, 14:55

        @dan I did not initially publish any key pairs. This was part of the problem for sure.

        D 1 Reply Last reply 28 Oct 2022, 20:22 Reply Quote 1
        • D
          dan @stacey
          last edited by 28 Oct 2022, 20:22

          @stacey Great. Did you end up getting it working?

          --
          FusionAuth - Auth for devs, built by devs.
          https://fusionauth.io

          1 Reply Last reply Reply Quote 0
          • First post
            Last post