Skip to content

tenant-lifecycle

Tenant-destroy lifecycle: request/cancel destruction with compliance-profile grace, auth 410 gate for teardown states, cron trigger after grace, and staged destroy runner (extension fan-out, subject-key erase, tenant tombstone).

What this feature needs to run (Requires, top) and the write commands it provides (Provides, bottom).

flowchart TB
  n_tenant_lifecycle["tenant-lifecycle"]
  subgraph how_reqs["Requires"]
    n_tenant["tenant"]
    n_compliance_profiles["compliance-profiles"]
    n_sessions["sessions"]
  end
  n_uses_compliance_forTenant(("compliance.forTenant"))
  subgraph how_provides["Provides"]
    n_cmd_tenant_lifecycle_write_cancel_destruction(["cancel-destruction"])
    n_cmd_tenant_lifecycle_write_request_destruction(["request-destruction"])
  end
  n_tenant --> n_tenant_lifecycle
  n_compliance_profiles --> n_tenant_lifecycle
  n_sessions -.->|optional| n_tenant_lifecycle
  n_uses_compliance_forTenant -->|uses| n_tenant_lifecycle
  n_tenant_lifecycle --> n_cmd_tenant_lifecycle_write_cancel_destruction
  n_tenant_lifecycle --> n_cmd_tenant_lifecycle_write_request_destruction

Provides — write commands this feature registers (dispatch them through the command bus):

  • Exposes API: tenantLifecycle.runDestroySweep
  • Uses API: compliance.forTenant