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

    What happens after asymmetric key expiration?

    Scheduled Pinned Locked Moved
    Q&A
    3
    7
    7.5k
    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.
    • M
      mgetka Power User
      last edited by

      Maybe I'm not searching through the docs thoroughly enough, but the effect of the asymmetric signing key expiration is not clear to me. Will it be automatically re-generated based on original configuration or will it be just marked inapplicable for cryptographic operations? If the latter is correct, what will happen with configuration relying on such key - I am referring to tenant or application JWT keys settings?

      1 Reply Last reply Reply Quote 1
      • danD
        dan
        last edited by

        Hiya,

        Can you please point me to where you see an asymmetric key that might expire configured in FusionAuth?

        Or are you asking what will happen if the "Access token signing key" is revoked?

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

        1 Reply Last reply Reply Quote 0
        • M
          mgetka Power User
          last edited by

          I'm referring to keys generated under Settings > Key Master. Generated asymmetric keys (RSA and ECDSA) are marked by FusionAuth to be valid for 10 years. I'm asking what happens to the key entry after validity period passes?

          1 Reply Last reply Reply Quote 0
          • danD
            dan
            last edited by robotdan

            Ah, thank you for clarifying. I had a conversation with an engineer. The default key is valid for 10 years, as you noted. It is possible to upload a certificate that expires sooner. Right now we would not delete that key pair, and it may be possible to sign a JWT with that certificate. The JWT could not be verified however.

            I filed an issue to discuss how we may want to enhance this in the future with an expiration policy. https://github.com/FusionAuth/fusionauth-issues/issues/580

            Please vote it up, as that factors into our product roadmap.

            Thanks!

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

            1 Reply Last reply Reply Quote 0
            • M
              mgetka Power User
              last edited by

              Your finding is pretty important from the security perspective, but it is still not quite exactly the matter I'm asking about. However, because the expired keys can be used in cryptographic operations, I suppose that handling procedure of the case I am referring to is not yet covered in the current implementation. I'll try to explain with an example. Let's say we have FusionAuth instance with only one asymmetric key pairs in the key master. The key is defined as an JWT signing key in the tenant configuration. 10 years passed by, and - assuming fix is introduced - configured JWT signing key cannot be used. The user logs in - what key will be utilized to sign his JWT?

              1 Reply Last reply Reply Quote 0
              • danD
                dan
                last edited by robotdan

                Well, since we're talking about behavior based on a fix that isn't written yet, things are a bit theoretical. 🙂

                Here's one approach we'd consider. An expired key pair cannot be used to sign a JWT, so we would either have to generate a new key pair ahead of the expiration, or start failing login operations. The former is a better user experience, so a user will either have to regenerate the key, or we would do it based upon a configured policy.

                Also, wanted to be clear that we are aware of this limitation, which is why we set the default expiration period to 10 years (so we have a bit of time to solve this in the best way possible).

                Hope this helps. Let me know if you don't have the information you need.

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

                1 Reply Last reply Reply Quote 1
                • robotdanR
                  robotdan
                  last edited by

                  This post is deleted!
                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post