Operations

Resilience runbooks

Use these procedures to maintain connectivity, investigate Authority failover, back up the cluster and restore it. Verify fresh access and audit delivery after recovery, as well as process health.

0.10.x

Use these procedures to maintain connectivity, investigate Authority failover, back up the cluster and restore it. Verify fresh access and audit delivery after recovery, as well as process health.

Connectors with a single egress

Save the Connector config and current firewall rules before the cutover.

After the firewall change, from the Connector host run nc -z -w 3 "$AUTHORITY_FRONT" "$AUTHORITY_PORT" and nc -z -w 3 "$AUTHORITY_FRONT" "$ENROLL_PORT"; inspect the Proxy tunnel and request-gate metrics.

In a tunnel-only design both direct checks fail with a non-zero exit, while the reverse tunnel and the Proxy relay path are available. A Connector request that cannot obtain an Authority decision is denied and is not forwarded.

Stop if a supposedly tunnel-only Connector can still reach a direct Authority path, or if the tunnel is down and new sessions are being treated as allowed. Restore the prior firewall rule, inspect relay and reconnect metrics, and verify the configured route before retrying.

Restore the prior authority_transport and firewall rules together.

The reverse tunnel is the data plane. tunneled carries the Authority control plane inside it; direct and fronted use their configured egress routes. A Kubernetes request, database statement, model call, web request, or MCP request can require a per-request Authority decision, so existing data sessions do not prove a new session is authorized.

Shell
AUTHORITY_FRONT="<authority-front>"
AUTHORITY_PORT="<authority-control-port>"
ENROLL_PORT="<authority-enroll-port>"
nc -z -w 3 "$AUTHORITY_FRONT" "$AUTHORITY_PORT"
nc -z -w 3 "$AUTHORITY_FRONT" "$ENROLL_PORT"

The check is intentionally performed from the Connector host. A configured mode that leaves the direct path routable proves nothing.

Authority failover

Preserve the store, audit export, and current endpoint configuration before intervention.

Inspect Proxy relay outcomes and run gdsgate --config <operator-config> authority list-nodes --health; then perform a controlled client request through the surviving endpoint.

A follower refuses the leader-only calls; the Proxy repeats a refused call, or one that reached no instance, at the next endpoint, and the endpoint that answered becomes sticky. A tunnelled Connector's next relay stream reaches the new leader with no client traffic; while no instance holds the lease, the Proxy asks every 250 ms up to every 5 s. A short burst of unavailable calls during leadership movement is expected.

Stop admission if no endpoint serves, audit shipping does not recover, or authority verify-audit fails. Confirm store lease and leader ownership, find Authority pool moved to another instance in the Proxy log, and watch relay and reconnect counters return to baseline.

Restore the previous endpoint order only after the failed endpoint is understood. Do not split the store or create a second authority history.

The Proxy creates lazy channels and does not hold an active socket to every Authority. A tunneled Connector has no Authority address of its own; the Proxy relays each control-plane stream to the endpoint it finds leading when the stream opens. A long-lived tunnel does not pin the Connector to a stale leader. Every instance serves registration, token-less renewal, workload issuance and administrative commands (calls by instance); the Proxy relays a renewal to the next endpoint when one refuses the connection.

While no instance holds the lease, the audit rows of those calls wait in audit_outbox, and gdsgate_audit_outbox_oldest_age_secs grows. The new leader seals them on its first pass. Every instance keeps watching the queued rows it has seen through the failover, and reports one that leaves the queue without reaching the chain (queued rows). A row removed while no instance runs is not reported.

The surviving instances decide by the store's active policy version within 10 s and hold the stored CA state within 5 s of a change, including one committed by the failed instance just before it stopped. Check gdsgate_policy_version_applied against gdsgate_policy_version_stored and gdsgate_ca_bundle_stale on each instance (policy and CA reload).

A CA rotation the failed leader started is resumed by the new leader from the stored phase, after the rest of the stored propagation or retire wait. A write the former leader makes after the takeover is refused by the store.

Backup and disaster recovery

Take a paired store and key backup before every migration, restore, or destructive maintenance.

Use the backend-native backup command, such as pg_dump --format=custom --file "$BACKUP_FILE" "$STORE_URL" for PostgreSQL, or copy a quiesced SQLite store. Run sha256sum "$BACKUP_FILE", restore into an isolated store, and run gdsgate --config <restore-config> authority verify-audit.

The backup command and checksum exit 0; the restore copy opens and the audit verifier exits 0 with its external key.

Stop if a key is missing, a backup is unverified, the store is in-memory, or a restore cannot verify the chain. Retain the failed backup for investigation, make a new backup, and do not delete the last known-good set.

Restore the prior store, keys, and node state as a paired set.

Back up Authority's state store, which contains the transport CA, SSH CAs, registry, catalog, request state, and audit chain. Back up both keyrings of [security.integrity] and their custody records, each separately from the store, and any key file the deprecated [audit].*_key_path parameters still name. Keep anchor checkpoints and exported JSON lines off the Authority host. Persist each node's state_dir, including Connector SSH host-key material. A database-only backup cannot prove the same anchored history after restore.

Restoring a cluster

Preserve the failed cluster and every candidate backup before restore.

Restore the store and external files, run gdsgate --config <authority-config> authority migrate --check, run gdsgate --config <authority-config> authority verify-audit, start Authority, Proxy, and Connectors with their persisted state, then run HTTP readiness and a controlled session check.

Migration check is current, verification exits 0, /healthz is 200, /readyz is 200 when each role passes its readiness checks, node health and catalog match the backup, and a controlled session opens and closes.

Stop before opening traffic on any migration, chain, key, readiness, policy, catalog, or controlled-session failure. Keep traffic closed, return to the isolated host, select the last trusted paired backup, and repeat verification.

Stop restored services and restore the previous paired store, external keys, node state, and verified binary. Do not downgrade migration rows manually.

Restore the store and external audit material at their configured paths. The Authority resumes its transport CA from the store, and clients with persisted trust anchors can continue to verify existing node identities. Start Proxy and Connectors with their persisted state directories. Clients reuse cached identity tokens until expiry and then sign in again. Treat migrations as forward-only: an older binary refuses a store carrying versions it does not know.

Search this documentation edition.