Backup and disaster recovery

Ipseity stores durable identity data and keys in Kubernetes; audit history is collected separately in Loki. To recover a cluster (or a realm), preserve identity data and the two key types. The platform's Orbit Deploy setup includes the k8s.tlspu.com/no-delete: "true" annotations on the RBAC/manifests to guard against accidental deletion.

What must be backed up

In each realm namespace (ipseity and every additional realm):

  1. Entity ConfigMaps — the identity database:
    • ipseity-principal-*
    • ipseity-group-*
    • ipseity-role-*
    • ipseity-client-*
    • ipseity-provider-*
  2. Signing-key Secrets —
    • ipseity-oidc-signing-key (ipseity realm),
    • ipseity-oidc-signing-key-ipseity-<realm> in each other realm's namespace.
  3. The encryption-key Secret — ipseity-encryption-key (IPSEITY_ENCRYPTION_KEY_SECRET_NAME).

Ephemeral state (auth codes, refresh tokens, KV revocation/lockouts) is not required for recovery — users simply re-authenticate, and the post-recovery system rebuilds it. Backing it up is optional.

Audit events are container logs collected by Loki. Configure log retention and backup in the logging stack separately from Kubernetes identity backups. The /api/audit cache is per-process and is not a durable backup source. Preserve legacy audit ConfigMaps separately if their history must be retained.

Backing up with kubectl

# ipseity realm
kubectl get cm -n ipseity -l app=ipseity,ipseity.io/entity=principals -o yaml > principals.yaml
kubectl get cm -n ipseity -l app=ipseity,ipseity.io/entity=groups -o yaml > groups.yaml
kubectl get cm -n ipseity -l app=ipseity,ipseity.io/entity=roles -o yaml > roles.yaml
kubectl get cm -n ipseity -l app=ipseity,ipseity.io/entity=clients -o yaml > clients.yaml
kubectl get cm -n ipseity -l app=ipseity,ipseity.io/entity=providers -o yaml > providers.yaml
kubectl get secret -n ipseity ipseity-oidc-signing-key ipseity-encryption-key -o yaml > keys.yaml

# for each additional realm <r>
kubectl get cm -n <r> -l app=ipseity -o yaml > realm-<r>-data.yaml
kubectl get secret -n <r> ipseity-oidc-signing-key-ipseity-<r> -o yaml > realm-<r>-key.yaml

Store these off-cluster, encrypted. The secrets files contain the private RSA key and the AES key — treat them as credentials.

Restoring

  1. Recreate the Realm namespaces (and re-apply the RBAC manifests from orbit-deployment/default/010-rbac.yaml).
  2. Re-apply the key Secrets first (so decryption and token verification work immediately).
  3. Re-apply the entity ConfigMaps.
  4. Start Ipseity. On startup it reads existing Secrets (never overwrites them) and discovers the realms from the labelled namespaces.

Alternative for simple identity re-creation (if you lost everything backup-less): operations may recreate roles → groups → principals → clients via the API or GitOps (see bootstrap-and-gitops.md).

Restoring a lost key (if unavoidable)

  • Encryption key lost → encrypted password/mfa_secret/client_secret values are unreadable. Affected principals must be recreated (new passwords); clients need new secrets. Identifiers (name, email, groups) remain readable.
  • Signing key lost → previously issued tokens stop verifying. Clients should re-authenticate; the JWKS will advertise the new key. Update any verifiers to fetch the current JWKS.