Skip to main content

Register the bank's key-encryption key for an onboarding case

POST 

/v1/onboarding-cases/:case_id/encryption-targets

Registers the bank-held key-encryption key. The key stays in the bank's AWS account; only its key ARN is recorded and no key material is accepted. The target is created with verification_state: PENDING; call POST .../encryption-targets/{target_id}/verify to prove the platform can use the key before you submit.

Before verifying, grant the platform's runtime role kms:GenerateDataKey, kms:Encrypt and kms:Decrypt on the key (see the Encryption Targets tag). As an alternative, POST .../key-generation-jobs with ENCRYPT_TRANSFER_SOURCE_MESSAGE creates, registers and verifies the key for you.

Required scope: connector:onboarding:artifacts:write.

Allowed states: AWAITING_BANK_ADMIN, BANK_CONFIGURING, NEEDS_CHANGES (otherwise 409). The first edit moves AWAITING_BANK_ADMIN to BANK_CONFIGURING.

Fields (all in data.attributes):

  • purpose (required): ENCRYPT_TRANSFER_SOURCE_MESSAGE. One target per purpose; a second one returns 409.
  • backend_class (required): AWS_KMS.
  • backend_ref (required): a KMS key ARN, arn:aws:kms:{region}:{account_id}:key/{key_id}, with a 12-digit account id. Alias ARNs are rejected, because a wrapped data key can only be unwrapped by the exact key that wrapped it. Surrounding whitespace is trimmed. A blank value returns 400 MISSING_FIELD; a malformed ARN returns 400 INVALID_FIELD_FORMAT.

Ownership check. The platform checks the ARN against the keys it has generated. A key the platform generated for another bank or case is rejected with 403 BANK_SCOPE_MISMATCH. This check needs the platform key service; if it is unavailable the call returns 503.

No Idempotency-Key is used. Repeating a successful request returns 409.

Request​

Responses​

Encryption target recorded with verification_state PENDING.