Skip to content

Tenant Holds No Key-Encryption Key

URI: https://docs.ankatech.co/errors/custody-move-no-key-encryption-key
HTTP Status: 409 Conflict

When you see this

A platform administrator asked to rotate (rotatePlatformTenantKek) or re-key (rekeyPlatformTenantKek) the key-encryption key of a tenant that holds no active key-encryption key yet. There is nothing to rotate or re-key, so no rotation was recorded and nothing was written.

A tenant is created without a key-encryption key. Its key-encryption key is created with the tenant's first key, and from then on the tenant always holds an active one. This refusal is answered before the question of where the key-encryption key is protected, so it is answered whatever the tenant's key protection is.

Common Causes

  • The tenant was provisioned recently and has not created its first key yet.
  • A scheduled or scripted rotation runs over every tenant of the deployment, including tenants that hold no keys.

Response Example

{
  "type": "https://docs.ankatech.co/errors/custody-move-no-key-encryption-key",
  "title": "Tenant Holds No Key-Encryption Key",
  "status": 409,
  "detail": "The tenant holds no active key-encryption key yet: it is created with the tenant's first key, so until then there is nothing to rotate or re-key. Nothing was written.",
  "instance": "/api/v3/admin/platform/tenants/8f14e45f-ceea-467a-9575-0d5b2a1f3c11/key-custody/kek/rotate",
  "timestamp": 1793696400,
  "extensions": {
    "requestId": "3b7d52e9-0c14-4a86-9f2b-6e81d4a0c537"
  }
}

Content-Type: application/problem+json — the response follows RFC 9457 Problem Details. The detail is fixed: it names no backend or key.

How to Resolve

  1. Nothing needs to be done for a tenant that holds no keys: no key material is wrapped yet, so there is nothing to protect by a rotation or a re-key.
  2. Once the tenant creates its first key, its key-encryption key exists. Wait for that, or create the tenant's first key, then rotate or re-key.
  3. Read the tenant's key custody (GET /api/v3/admin/platform/tenants/{tenantId}/key-custody) to confirm the key-encryption key before retrying.

For full schema definitions, examples, and interactive testing, see the Developer Hub Reference.