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 Settings -> Key Master. Here you will see a list of keys and certificates.

The default Key Master listing.

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

Import a RSA key pair.

Form Fields

Idoptional

When this value is omitted, a unique Id will be generated automatically.

Namerequired

The name of the Key. This must be unique.

Key Identifieroptional
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.
Algorithmrequired
The particular RSA algorithm used to generate the Key.
Public keyrequired
The PEM encoded public key to import.
Private keyoptional
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

Import a RSA private key.

Form Fields

Idoptional

When this value is omitted, a unique Id will be generated automatically.

Namerequired

The name of the Key. This must be unique.

Key Identifieroptional
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.
Algorithmrequired
The particular RSA algorithm used to generate the Key.
Private keyrequired
The PEM encoded private key to import.

Import Elliptic Curve Key Pair

Import an ECC key pair.

Form Fields

Idoptional

When this value is omitted, a unique Id will be generated automatically.

Namerequired

The name of the Key. This must be unique.

Key Identifieroptional
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 keyrequired
The PEM encoded public key to import.
Private keyoptional
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

Import an ECC private key.

Form Fields

Idoptional

When this value is omitted, a unique Id will be generated automatically.

Namerequired

The name of the Key. This must be unique.

Key Identifieroptional
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 keyrequired
The PEM encoded private key to import.

Import HMAC Secret

Import an HMAC secret.

Form Fields

Idoptional

When this value is omitted, a unique Id will be generated automatically.

Namerequired

The name of the Key. This must be unique.

Key Identifieroptional
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.
Algorithmrequired
The particular HMAC algorithm used to generate the Key.
Secretrequired
The HMAC secret to import.

Import Public Key

Import a public key.

The type of the Key will be inferred from the PEM encoded value.

Form Fields

Idoptional

When this value is omitted, a unique Id will be generated automatically.

Namerequired

The name of the Key. This must be unique.

Key Identifieroptional
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 keyrequired
The PEM encoded public key to import.

Import Certificate

Import a certificate.

The public key will be extracted from the certificate.

Form Fields

Idoptional

When this value is omitted, a unique Id will be generated automatically.

Namerequired

The name of the Key. This must be unique.

Key Identifieroptional
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.
Certificaterequired
The PEM encoded certificate to import.

Generate RSA Key Pair

Generate a RSA key pair.

Form Fields

Idoptional

When this value is omitted, a unique Id will be generated automatically.

Namerequired

The name of the Key. This must be unique.

Issueroptional
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.
Algorithmrequired
The particular RSA algorithm used to generate the Key.
Key lengthrequired
The length of the Key.

Generate Elliptic Key Pair

Generate an ECC key pair.

Form Fields

Idoptional

When this value is omitted, a unique Id will be generated automatically.

Namerequired

The name of the Key. This must be unique.

Issueroptional
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.
Algorithmrequired
The particular ECC algorithm used to generate the Key.

Generate HMAC Secret

Generate an HMAC Secret.

Form Fields

Idoptional

When this value is omitted, a unique Id will be generated automatically.

Namerequired

The name of the Key. This must be unique.

Algorithmrequired
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:

Note that validation rules will prevent you from removing an in-use key.