Export one key
To export keys, you need the Admin role in the KMS project, or a custom role that can export keys.
1
In your KMS project, go to Overview, select the options menu on the key’s row, then select Export Key.
2
Copy or download the key material. For a Sign/Verify key, you can also copy or download the public key.
Export several keys
To export keys, you need the Admin role in the KMS project, or a custom role that can export keys.
1
In your KMS project, go to Overview and select the checkbox on each key’s row.
2
Select Export in the bar above the table.
kms-keys-export-<date>.json. To export keys through the API, call the bulk export endpoint.
Import keys
To import keys, you need the Admin or Member role in the KMS project, or a custom role that can create keys.
1
In your KMS project, go to Overview and select Add Key > Import Keys.
2
Upload a JSON file in the import file format.
3
Check the keys in the preview, then select Import. The button shows the number of keys, such as Import 3 Keys.
Import file format
An import file is a JSON array of up to 100 keys, in the same format as an export file:string
required
The key’s name, made of lowercase letters, numbers, and hyphens, up to 32 characters.
string
required
encrypt-decrypt, sign-verify, or generate-verify-mac.string
required
One of the algorithms for the key type.
string
For an Encrypt/Decrypt or Generate/Verify MAC key, the key material, Base64 encoded. An Encrypt/Decrypt key must be 16 or 32 bytes, and a Generate/Verify MAC key must be 16 to 1024 bytes.
string
For a Sign/Verify key, the private key in PKCS#8 format, Base64 encoded.
Use PEM encoding for an RSA, ECC, or Ed25519 key, and DER encoding for an ML-DSA key. Infisical derives the public key from the private key, so you don’t need to include
publicKey.boolean
default:"true"
Set to
false to stop anyone from exporting the imported key. You can’t change this after the import.boolean
default:"false"
Set to
true to protect the imported key from deletion.