{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/daon/json-schema/daon-tenant-key-schema.json",
  "title": "TenantKey",
  "description": "A key belonging to a tenant.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/daon-tenant-key-management-api-openapi.yml#/components/schemas/TenantKey",
  "type": "object",
  "properties": {
    "permittedOperations": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "createdDtm": {
      "type": "string",
      "format": "date-time"
    },
    "lastUpdatedDtm": {
      "type": "string",
      "format": "date-time"
    },
    "id": {
      "type": "string",
      "description": "Unique 26-character database user ID."
    },
    "tenantId": {
      "type": "string",
      "description": "Unique 26-character database tenant ID."
    },
    "keyType": {
      "type": "string",
      "description": "The type of key, for example AES, RSA, elliptic curve.",
      "enum": [
        "AES_256",
        "EC_SECP256R1",
        "RSA_2048",
        "RSA_3072"
      ]
    },
    "keyUse": {
      "type": "string",
      "description": "The key usage, for example database encryption, key encryption.",
      "enum": [
        "DB_ENCRYPTION",
        "SYSTEM_SIGNING",
        "ROOT_CA",
        "KEY_ENCRYPTION"
      ]
    },
    "expiringDtm": {
      "type": "string",
      "format": "date-time",
      "description": "The key expiry. The key will be rolled over automatically either on or shortly before this date.\nSome keys have a key leniency which defines how long before this date they will be rolled over."
    },
    "current": {
      "type": "boolean",
      "description": "This is `false` if the key has expired, otherwise `true`."
    }
  },
  "required": [
    "expiringDtm",
    "id",
    "keyType",
    "keyUse",
    "tenantId"
  ]
}