Key Master
Overview
Signing keys and certificates are managed in FusionAuth using Key Master. After creating or importing a key, use it with other FusionAuth functionality, such as signing JSON Web Tokens or SAML Requests. This page describes the Admin UI for creating and managing signing keys.
You can also manage keys via the Keys API. You may also be interested in rotating your keys.
Create or Manage Keys
Navigate to
. Here you will see a list of keys and certificates.
From this page, you can add and import keys and certificates as well as view and remove keys. There are certain default keys that you cannot remove. See the FusionAuth limitations for more.
Select the operation from the menu on the listing page.
Importing vs Generating
You can import keys and certificates. This is useful if you are integrating with an external system. For instance, you may be migrating from another auth system and want to import keys generated by that auth system to ensure anything signed with those keys will continue to work.
You can generate keys as well. This is useful when FusionAuth is your system of record for such keys.
Import RSA Key Pair

Form Fields
- Id Optional
-
When this value is omitted, a unique Id will be generated automatically.
- Name Required
-
The name of the Key. This must be unique.
- Key Identifier Optional
-
The Key identifier. This is used in JWT metadata and, if applicable, the JWKS endpoint, as the
kid
value. When this value is omitted, one will be generated. - Algorithm Required
-
The particular RSA algorithm used to generate the Key.
- Public key Required
-
The PEM encoded public key to import.
- Private key Optional
-
The PEM encoded private key to import. If the key is to be used for token validation only, this field may be omitted as only a public key is necessary.
Import RSA Private Key

Form Fields
- Id Optional
-
When this value is omitted, a unique Id will be generated automatically.
- Name Required
-
The name of the Key. This must be unique.
- Key Identifier Optional
-
The Key identifier. This is used in JWT metadata and, if applicable, the JWKS endpoint, as the
kid
value. When this value is omitted, one will be generated. - Algorithm Required
-
The particular RSA algorithm used to generate the Key.
- Private key Required
-
The PEM encoded private key to import.
Import Elliptic Curve Key Pair

Form Fields
- Id Optional
-
When this value is omitted, a unique Id will be generated automatically.
- Name Required
-
The name of the Key. This must be unique.
- Key Identifier Optional
-
The Key identifier. This is used in JWT metadata and, if applicable, the JWKS endpoint, as the
kid
value. When this value is omitted, one will be generated. - Public key Required
-
The PEM encoded public key to import.
- Private key Optional
-
The PEM encoded private key to import. If the key is to be used for token validation only, this field may be omitted as only a public key is necessary.
Import Elliptic Curve Private Key

Form Fields
- Id Optional
-
When this value is omitted, a unique Id will be generated automatically.
- Name Required
-
The name of the Key. This must be unique.
- Key Identifier Optional
-
The Key identifier. This is used in JWT metadata and, if applicable, the JWKS endpoint, as the
kid
value. When this value is omitted, one will be generated. - Private key Required
-
The PEM encoded private key to import.
Import HMAC Secret

Form Fields
- Id Optional
-
When this value is omitted, a unique Id will be generated automatically.
- Name Required
-
The name of the Key. This must be unique.
- Key Identifier Optional
-
The Key identifier. This is used in JWT metadata and, if applicable, the JWKS endpoint, as the
kid
value. When this value is omitted, one will be generated. - Algorithm Required
-
The particular HMAC algorithm used to generate the Key.
- Secret Required
-
The HMAC secret to import.
Import Public Key

The type of the Key will be inferred from the PEM encoded value.
Form Fields
- Id Optional
-
When this value is omitted, a unique Id will be generated automatically.
- Name Required
-
The name of the Key. This must be unique.
- Key Identifier Optional
-
The Key identifier. This is used in JWT metadata and, if applicable, the JWKS endpoint, as the
kid
value. When this value is omitted, one will be generated. - Public key Required
-
The PEM encoded public key to import.
Import Certificate

The public key will be extracted from the certificate.
Form Fields
- Id Optional
-
When this value is omitted, a unique Id will be generated automatically.
- Name Required
-
The name of the Key. This must be unique.
- Key Identifier Optional
-
The Key identifier. This is used in JWT metadata and, if applicable, the JWKS endpoint, as the
kid
value. When this value is omitted, one will be generated. - Certificate Required
-
The PEM encoded certificate to import.
Generate RSA Key Pair

Form Fields
- Id Optional
-
When this value is omitted, a unique Id will be generated automatically.
- Name Required
-
The name of the Key. This must be unique.
- Issuer Optional
-
This name will be used as the CN issuer and subject of the certificate and it cannot be modified once created. This is an optional parameter and if omitted a default issuer will be used.
- Algorithm Required
-
The particular RSA algorithm used to generate the Key.
- Key length Required
-
The length of the Key.
Generate Elliptic Key Pair

Form Fields
- Id Optional
-
When this value is omitted, a unique Id will be generated automatically.
- Name Required
-
The name of the Key. This must be unique.
- Issuer Optional
-
This name will be used as the CN issuer and subject of the certificate and it cannot be modified once created. This is an optional parameter and if omitted a default issuer will be used.
- Algorithm Required
-
The particular ECC algorithm used to generate the Key.
Generate HMAC Secret

Form Fields
- Id Optional
-
When this value is omitted, a unique Id will be generated automatically.
- Name Required
-
The name of the Key. This must be unique.
- Algorithm Required
-
The particular HMAC algorithm used to generate the Key.
Limits On Updating Keys
Only the name of the Key may be changed; all other fields will remain the same. If you need to update a Key with a new certificate, algorithm or other attributes, please Import a Key.
For example, if you have a Key with an associated expiring certificate, you’ll need to follow the steps similar to those outlined in the JWT signing key rotation documentation:
-
Import this key, keypair or certificate into FusionAuth. This will create a new Key entity in FusionAuth.
-
Update the appropriate configuration with this new Key (JWT signing configuration, SAML validation configuration, etc).
-
Once the new Key is configured for use, remove the expired, previous Key.
Note that validation rules will prevent you from removing an in-use key.
Feedback
How helpful was this page?
See a problem?
File an issue in our docs repo
Have a question or comment to share?
Visit the FusionAuth community forum.