Connect AWS KMS, GCP Cloud KMS, Azure Key Vault, or HashiCorp Vault Transit to use customer-managed encryption on Northflank.
You will need the following to get started:
- An enterprise account with envelope encryption enabled by Northflank support
- Read and Create encryption permissions for your team or organization, plus Manage permission to activate the configuration
- The key and provider permissions listed in your provider's instructions below
Before setup, review your responsibilities for key availability. To learn about data keys, see how your secrets are encrypted.
Open the configuration form
- Open Settings → Encryption for your team or organization.
- Click Add encryption configuration. If configurations already exist, click Create encryption configuration above All configurations.
- Under Basic information, enter a unique Name and an optional Description.
- Select a Provider.
Continue with the instructions below for your provider.
Use AWS KMS
You will need the following to get started:
- An enabled symmetric encryption KMS key in your AWS account
- Permission to create an IAM role or IAM user and assign its policies
- Permission to grant that role or user access to the KMS key
We recommend using a cross-account role to avoid storing long-lived AWS credentials in Northflank.
The IAM role or user that Northflank uses to access your key needs kms:Encrypt, kms:Decrypt, kms:GenerateDataKey, and kms:DescribeKey permissions. The KMS key policy must also permit access, either directly or through IAM policies.
If you use a key alias, keep it pointing to the same KMS key. Changing its target prevents Northflank from decrypting older secrets, even if the original key remains enabled. To switch keys, use a new encryption configuration. Ask Northflank support to migrate existing data.
Connect with a cross-account role
Open the configuration form with AWS KMS selected. Then follow these steps:
- In Northflank, select Cross-account role under Credentials.
- Enter an External ID, or click the Generate icon beside the field.
- Click Copy Custom trust policy.
- In AWS IAM, open Roles → Create role → Custom trust policy.
- Paste the copied trust policy.
- Name and save the role.
- In Northflank, enter the role's IAM role ARN.
- Enter the key's Region under Key location.
- Enter the full key ARN in Key ID (id, ARN, or alias).
- Click Copy IAM policy.
- In AWS, add the copied policy as an inline policy on the role.
- Make sure that the KMS key policy permits this role to use the key.
- In Northflank, click Validate.
- Wait for Validation successful before you click Create encryption configuration.
The key field also accepts a key ID or alias. If you use either, replace placeholders in the copied IAM policy with the actual key ARN before saving it. The policy resource must identify the key.
Connect with access keys
Open the configuration form with AWS KMS selected. Then follow these steps:
- In AWS, create an IAM user and an access key for that user.
- In Northflank, select Access key under Credentials.
- Enter the Access key and Secret key.
- Enter the key's Region under Key location.
- Enter the full key ARN in Key ID (id, ARN, or alias).
- Click Copy IAM policy.
- In AWS, add the copied policy as an inline policy on the IAM user.
- Make sure that the KMS key policy permits this user to use the key.
- In Northflank, click Validate.
- Wait for Validation successful before you click Create encryption configuration.
For either authentication method, continue to verify and activate the configuration.
Use GCP Cloud KMS
You will need the following to get started:
- A Google Cloud project with Cloud KMS enabled
- A key ring containing an enabled symmetric encryption key
- Permission to grant a service account access to that key
We recommend Cross-project service account to avoid storing long-lived GCP credentials in Northflank.
The service account that Northflank uses needs the Cloud KMS CryptoKey Encrypter/Decrypter role (roles/cloudkms.cryptoKeyEncrypterDecrypter) on your key.
The Location field defaults to global. If your key ring uses another location, enter that location instead.
Connect with a cross-project service account
Open the configuration form with GCP Cloud KMS selected. Then follow these steps:
- In Northflank, select Cross-project service account under Credentials.
- Enter your Project ID and Location under Key location.
- Enter your Key ring and Crypto key names.
- Click Create encryption configuration. Northflank creates the configuration and opens its details page.
- Copy the Email under Service account.
- Click Open Cloud KMS in the GCP console.
- In Google Cloud, open the key's permissions.
- Add the copied service account email as a principal.
- Assign the Cloud KMS CryptoKey Encrypter/Decrypter role.
- Save the assignment.
- In Northflank, verify and activate the configuration.
The creation form does not show Validate because Northflank creates the service account when you create the encryption configuration. You must then grant the service account access to your key. The details page also provides a gcloud CLI tab with a command to grant access.
If verification fails after you grant access, make sure that the role applies to the correct service account and key. Allow time for Google Cloud to apply the permission change before retrying.
Connect with a service account key
This method also requires permission to create a service account and a JSON key.
Open the configuration form with GCP Cloud KMS selected. Then follow these steps:
- In Google Cloud, create a service account for Northflank.
- Grant that account the Cloud KMS CryptoKey Encrypter/Decrypter role on your key.
- Create and download a JSON key for the service account.
- In Northflank, select Service account key under Credentials.
- Add the JSON contents to Service account key (keyfile.json).
- Enter your Project ID and Location under Key location.
- Enter your Key ring and Crypto key names.
- Click Validate.
- Wait for Validation successful before you click Create encryption configuration.
- Continue to verify and activate the configuration.
Use Azure Key Vault
You will need the following to get started:
- A public Azure cloud Key Vault with an RSA key that supports
RSA-OAEP-256 - Network rules that allow Northflank to connect to the vault
- Permission to register an application and create a client secret in Microsoft Entra ID
- Permission to grant that application access to your key
- Azure sovereign clouds and Managed HSM are not supported.
The Key Vault Crypto Service Encryption User role grants key metadata access and wrapping operations. If your vault uses access policies, grant wrapKey and unwrapKey. A versionless key URL also requires get.
| Key identifier URL | Behavior |
|---|---|
https://example-vault.vault.azure.net/keys/northflank | A versionless URL lets new DEK wrapping follow key rotation. |
https://example-vault.vault.azure.net/keys/northflank/<version> | A versioned URL keeps new DEK wrapping on the specified version. Replace <version> with the actual version. |
Enable purge protection for production vaults. Follow the key-availability guidance for previous key versions.
Open the configuration form with Azure Key Vault selected. Then follow these steps:
- In Microsoft Entra ID, register an application for Northflank.
- Create a client secret for the application.
- In Azure Key Vault, grant its service principal the key access described above.
- In Northflank, enter the directory ID in Tenant ID and the application ID in Client ID.
- Enter the client secret value, not its identifier, in Secret.
- Enter the Key identifier URL under Key location.
- Click Validate.
- Wait for Validation successful before you click Create encryption configuration.
- Continue to verify and activate the configuration.
Use HashiCorp Vault Transit
You will need the following to get started:
- A Vault server reachable by Northflank over HTTPS
- An enabled Transit secrets engine
- A key for encryption and data-key generation with key derivation disabled
- A token with the required Transit permissions
Vault Transit performs encryption operations with a named key. Northflank uses it to wrap DEKs. This differs from a Vault KV integration, which stores secret values in Vault.
The token needs the update capability on these paths. Replace transit with your mount path and northflank with your key name:
path "transit/encrypt/northflank" {
capabilities = ["update"]
}
path "transit/decrypt/northflank" {
capabilities = ["update"]
}
path "transit/datakey/plaintext/northflank" {
capabilities = ["update"]
}
Open the configuration form with HashiCorp Vault Transit selected. Then follow these steps in Northflank:
- Under Connection, enter the HTTPS Address of your Vault server.
- Enter your Token.
- If your Vault uses a namespace, enter it in Namespace (optional).
- Under Key location, enter Mount path (optional), or leave it blank for
transit. - Enter the Key name.
- Use the displayed Vault policy to make sure that your token has the required permissions.
- Click Validate.
- After Validation successful appears, click Create encryption configuration.
- Continue to verify and activate the configuration.
Keep the token valid and replace it before it expires.