Prerequisites

If you plan to encrypt your keys, please contact us at support@unkey.dev to flag you in.

The root key used for migrating must have the api.*.encrypt_key permission to encrypt keys.

Extracting keys from your current system is likely the hardest part. It depends on how your keys are stored and how you can access them. Some providers have APIs to list all keys, while others require you to manually export them, some can provide the real key, and some only provide a hashed version.

Regardless of how you get your keys, you will need to provide either the plaintext key or the hash, as well as other settings to Unkey via the migrations.createKeys endpoint.

Nodejs Example

Was this page helpful?