Prerequisites
- An active AWS account with permission to create IAM roles and KMS keys
- An existing Customer Managed Key (CMK) in the target AWS region — symmetric,
ENCRYPT_DECRYPTkey usage (not an AWS-managed key) - IAM Role (recommended): permission to create an IAM role in your AWS account and configure a cross-account trust relationship
- Static Credentials: an IAM user with programmatic access keys
Adding the connection in Enclave
- Navigate to Security → Key Management → BYOK Connections
- Click Add KMS Connection
- Select AWS KMS as the provider
- Choose your auth method and fill in the required fields (see tabs below)
- Click Save — Enclave runs an automatic connection test
Setup
- IAM Role (recommended)
- Static Credentials
Enclave assumes a cross-account IAM role in your AWS account. No static credentials are stored. Your organisation’s UUID is used as an External ID, preventing confused-deputy attacks.The Add KMS Connection dialog shows your organisation’s External ID — you will need it in Step 4 below.
Step 1 — Open IAM in your AWS accountGo to IAM → Roles → Create role.Step 2 — Select the trusted entityStep 5 — Add KMS permissionsReplace
Step 1 — Open IAM in your AWS accountGo to IAM → Roles → Create role.Step 2 — Select the trusted entity
- Trusted entity type: AWS account
- Choose Another AWS account
- Account ID: enter the Kvelden platform account ID (visible in the Add KMS Connection dialog)
- Leave “Require external ID” and “Require MFA” unchecked — the External ID is added in the next step
- Click Next
- On the “Add permissions” screen, do not attach any policies — click Next
- Role name:
enclave-kms-role(or any name you prefer) - Click Create role
- Find the new role → Trust relationships tab → Edit trust policy
- Replace the entire content with the following, substituting the Kvelden account ID and your organisation’s External ID shown in the Enclave dialog:
- Click Update policy
The
Principal is the Kvelden account root (avoids AWS creation-time validation errors). The sts:ExternalId condition scopes this role to your organisation only — no other Enclave tenant can assume it.- Permissions tab → Add permissions → Create inline policy
- Switch to the JSON editor and paste:
REGION, YOUR_ACCOUNT_ID, and YOUR_CMK_ID with your actual values. To allow all CMKs in an account, use "Resource": "*" and narrow later via key policy.- Click Next → name the policy (e.g.
enclave-kms-permissions) → Create policy
Click Save to test and activate the connection.