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.
Withdrawing a catalog resource removes that resource from each Proxy's route lease. Other resources and their existing sessions keep the same tunnel; even an empty lease retains the authenticated control path. Renewal only removes routes: a restored or changed resource needs a fresh admission. Node revocation, an activation epoch change, or lease expiry still closes the entire tunnel. The Connector negotiates withdrawal notices with its Proxy so a fresh automatic publication can request admission again on the same tunnel. Older Connectors retain withdrawal through reconnection; upgrade the Connector and Proxy to use the uninterrupted path.
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 nodes list --health; then perform a controlled client request through the surviving endpoint.
Ready followers forward leader-dependent calls to the fenced leader. The Proxy discovers a surviving route after failure; an uncertain state-changing call is not replayed. A tunnelled Connector's next control stream uses the current route. Fresh access recovers after lease takeover; no live lease means new leader-dependent access is refused.
Stop admission if no endpoint serves, audit shipping does not recover, or authority audit verify 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 using its current Authority route. A ready follower can forward it to the leader. 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 audit verify.
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.
With HA keyring sync enabled, include each Authority's entire configured
ha.keyring_sync.state_dir in that same backup generation. It holds the local
root (root.key or root.enc), independent receiver.key, snapshot.enc,
revision watermarks and any pending installation journal. The old seed keyring
files alone do not represent synchronized live material. Keep each directory
associated with its original ha.owner; never copy one member's receiver to
another. Preserve the matching configuration, local provider credentials and
access to any wrapping KMS key. See Authority recovery.
Pause CA, ring and distribution-root transitions while taking the final recovery set. A PostgreSQL dump is transaction-consistent for the database; it does not atomically capture private files on several hosts. Quiesce the changing fleet for the final paired set and rehearse restore in an isolated environment before accepting it. Include Connector recording buffers that have not reached central storage.
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 store migrate --check, run gdsgate --config <authority-config> authority audit verify, 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.
For synchronized Authority HA, restore the matching per-owner root, receiver,
cache and journals before startup. A database-only rollback can be refused by
the local watermark; deleting that watermark does not establish a trusted
restore. Verify keyring revisions, root epoch and /readyz on every restored
Authority, then test fresh access, denial, audit and recording delivery through
the public entry. Existing sessions are not restored.