Operations

Change and release runbooks

Verify the replacement release, preserve persistent state and check access after changing a service. Record the installed version and recovery point before starting. Follow your organization's change and incident procedures.

0.11.x

Verify the replacement release, preserve persistent state and check access after changing a service. Record the installed version and recovery point before starting. Follow your organization's change and incident procedures.

Release verification

Preserve the prior running artifact and deployment manifest before replacement.

Run the signature, checksum, version, and SBOM checks below against the exact artifact set.

Every invoked verifier exits 0, and the inspected version, target, signature, checksum, and SBOM agree with the release record. No deployment starts on a failed or mismatched check.

Stop on a missing signature, unexpected signer, checksum mismatch, wrong tag, wrong target, or SBOM mismatch. Quarantine the artifact set, retain the verification output, and obtain a fresh signed set from the release owner.

Keep the current deployment unchanged. Roll back only to the last independently verified artifact.

Verify the exact artifact that will run before replacing the installed version.

Preflight verification signatures

Preserve the downloaded checksum and signature before replacing them.

cosign verify-blob --key <release-public-key> --signature <checksums-signature> <checksums-file> followed by sha256sum -c <checksums-file>.

Both commands exit 0. The second command reports every listed artifact as OK.

Stop on any non-zero exit, missing artifact, or signer mismatch. Delete or quarantine the set and redownload from the approved release channel.

Obtain the release public key through a trusted channel and confirm its fingerprint. A checksum match without an authenticated checksum file is not release verification.

Release provenance

Keep the signed checksums, signature, release version and target platform with the deployment record. Obtain release artifacts and their verification key through the deployment owner's trusted distribution channel. If provenance or checksums disagree, retain the current verified deployment and request a matching artifact set. A matching unsigned checksum does not identify the publisher.

SBOM

Preserve the SBOM with the artifact verification record.

jq -e '.metadata.component.name, .metadata.component.version, (.components | length)' <release-sbom>.cdx.json; compare the component name and version with the release record.

jq -e exits 0, the component is gdsgate at the release version, and the component list is non-empty. A malformed or mismatched SBOM is a release failure.

Stop deployment on a malformed, missing, or mismatched SBOM. Obtain the SBOM paired with the signed artifact set.

Keep the current artifact until a matching SBOM is available.

The SBOM filename is versioned but not target-specific. Verify the target from the signed binary filename and release record; do not infer a target from the SBOM metadata.

Surviving a redeploy

Back up the store, external audit keys, node state_dir, and deployment manifest immediately before replacement.

Run gdsgate --config <config> doctor, then use the replacement's explicit service command, such as gdsgate --config <connector-config> connector.

Doctor exits 0; the replacement stays active, preserves the identity, and later passes the verification procedure. A startup failure exits non-zero.

Stop if the store is in-memory or unreachable, identity material is missing, schema is incompatible, or readiness does not become 200 after the role sets it. Keep the old artifact and state, restore the previous process, and investigate without spending a new enrollment token.

Restart the last verified artifact against the unchanged persistent store and state directories. Do not downgrade a store schema that is ahead of the binary.

Three things must outlive the process:

State Source location If it is ephemeral
Authority store store_url, defaulting to the persistent file under the home state directory The CA, registry, audit chain, catalog, and request state are lost or replaced.
Node identity [enroll].state_dir The key and leaf are lost. A spent join token is not a recovery path.
Renewal path [enroll].renew_endpoint, derived from the Authority endpoint when unset A valid identity cannot renew if its control-plane route is unavailable.

The background renewal loop renews over the existing mTLS identity only. It never falls back to a spent enrollment or join token. A lost state directory requires a deliberate fresh enrollment with a newly minted token.

One-time token exhaustion

Preserve the old node state and registry evidence before deleting or replacing anything.

gdsgate --config <authority-config> authority tokens create --role <role>; start the node once with the token, then confirm its persistent identity and authority nodes list --health.

Token creation exits 0; the newly enrolled long-running service stays active with persistent identity. Subsequent restarts use mTLS renewal and do not consume another token.

Stop if the node has no persistent state, the role does not match, or the old identity may be compromised. Never retry a spent token against another endpoint. Install the new token through the approved secret channel, persist the state, and verify the registry row.

Stop the new node and revoke its identity if enrollment was incorrect. Do not restore or reuse the spent token.

systemd

Save the prior unit, config, identity directory, and journal cursor.

systemctl daemon-reload && systemctl restart gdsgate-connector && systemctl is-active --quiet gdsgate-connector; then run the verification procedure.

daemon-reload, restart, and is-active exit 0; the state directory remains the same across restart.

Stop if the unit cannot access its persistent state or config, or if readiness and tunnel checks fail. Restore the previous unit and config, reload systemd, and restart the last verified artifact.

systemctl stop gdsgate-connector, restore the saved unit/config, systemctl daemon-reload, then systemctl start gdsgate-connector.

StateDirectory=gdsgate/connector creates the connector's persistent directory, /var/lib/gdsgate/connector. Point [enroll].state_dir at it. A bootstrap token is single-use and should not be left in a long-lived unit file.

Windows service

Save the prior configuration, identity directory, and log file.

sc stop gdsgate-connector, wait for sc query gdsgate-connector to report STOPPED, then sc start gdsgate-connector; then run the verification procedure.

sc stop and sc start exit 0; the state directory remains the same across restart.

Stop if the service cannot access its persistent state or config, or if readiness and tunnel checks fail. Restore the previous configuration and restart the last verified artifact.

sc stop gdsgate-connector, restore the saved configuration, sc start gdsgate-connector.

gdsgate service install connector registers gdsgate-connector, running as the virtual account NT SERVICE\gdsgate-connector, with its persistent directory at %ProgramData%\gdsgate\state\connector. Point [enroll].state_dir at it. Its log is %ProgramData%\gdsgate\logs\gdsgate-connector\gdsgate-connector.log, rotated at 32 MiB with three files kept. The service manager has no restart verb: sc stop returns before the service has stopped, so wait for STOPPED before sc start. A bootstrap token is single-use and should not be left in the service registration.

Containers

Snapshot the store and persistent identity volume; save the prior manifest.

docker compose up -d connector or the equivalent platform rollout command, followed by docker compose ps connector and the verification procedure.

The platform reports the container running; the process keeps its identity and the role checks pass. A restart must not create a new registry identity.

Stop if state is mounted on the writable container layer, the store is in-memory, or the connector re-enrolls unexpectedly. Restore the prior manifest and persistent volume mapping. Quarantine any newly created identity for review.

Roll back the image and manifest while retaining the persistent state and store backup.

Mount configuration and identity material read-only where possible. Persist the store and audit keys separately. Expose only listeners required by the role.

Verifying

Preserve the pre-change doctor report, version, metrics snapshot, and audit cursor.

gdsgate --config <config> doctor; curl --fail --silent --show-error -o /dev/null -w '%{http_code}\n' "http://${METRICS_ADDR}/healthz"; the same for /readyz; then gdsgate --config <operator-config> authority nodes list --health.

Doctor exits 0, liveness is 200, readiness is 200 when startup and dependency checks pass, and the node report shows the expected state. A controlled session opens and closes with an audit event.

Stop traffic if doctor fails, readiness remains 503, node health is stale, or the controlled session does not produce the expected audit evidence. Keep the replacement isolated, compare logs and configuration with the saved pre-change report, and restore the prior service if needed.

Use the surviving-redeploy rollback with the old artifact and unchanged persistent state.

doctor is a read-only checklist. It can report an in-memory store, an ephemeral state directory, missing CA generation, schema drift, or an expired identity. It exits 2 for a failed check. The HTTP liveness and readiness endpoints are separate from the node health board.

Proxy restart behavior

Preserve the Proxy logs and metric snapshot before restart or failover.

Inspect gdsgate_active_connector_tunnels, reconnect, refusal, and duration metrics; run the controlled-session check after the Proxy is ready.

Existing Proxy sessions end. Connectors redial with backoff and full jitter; the active tunnel gauge returns to the expected fleet and a new controlled session succeeds.

Stop admission if tunnels remain absent, refusals rise, or the controlled session cannot open. Wait for the reconnect loop within its bounded backoff, then inspect refusal reasons and Authority reachability.

Do not attempt session handover. Roll back the Proxy artifact or configuration only after capturing the incident evidence.

Proxy session state is in memory. No session handover occurs between Proxy processes. Connector control-plane tunnels reconnect automatically; a tunnel that stays up for at least 20 seconds resets its backoff schedule. The gauges and logs are the implemented signals; readiness alone does not prove a tunnel.

Renewing a listener certificate

Keep the prior certificate and key pair together until the new pair is verified.

Atomically install the new pair. The listener re-reads it within a second. To request an immediate refresh, use kill -HUP <gdsgate-pid> on Linux or sc control gdsgate-proxy paramchange on Windows. Perform a new TLS client handshake against the listener.

Exit 0 confirms signal delivery or service control acceptance. Verify that the next handshake presents the new pair; established sessions are not renegotiated.

Stop if the pair cannot be parsed, the key does not match the certificate, or the listener logs listener certificate not reloaded. Leave the previous pair in force, restore file ownership and permissions, and validate the pair offline.

Replace the certificate and key together with the saved prior pair, reload the listener again, and repeat the handshake check.

The file-backed listener pairs are:

Listener Pair
Proxy client-facing [proxy].public_cert_file and public_key_file
Proxy browser origin [proxy].web_cert_file and web_key_file
Proxy clientless browser [proxy].webapps_cert_file and webapps_key_file
Authority registration [authority].enroll_cert_file and enroll_key_file

The listener rereads a certificate and key as a pair. A malformed or mismatched pair leaves the previous working pair in force. On Linux, SIGHUP rereads listener pairs only. On Windows, sc control <service> paramchange does the same, where <service> is gdsgate-proxy or gdsgate-authority. Neither reloads the TOML configuration, policy, listen addresses, transport identity, or trust bundle.

The clientless browser entry behind a front

Save the prior proxy config and front routing configuration.

Validate the front configuration, restart or reload the front as approved, then open the browser entry from a listed and an unlisted source and inspect the Proxy log.

A listed source with a valid header is served. A listed source without a header, or an unlisted source with or without a header, is closed.

Stop before exposing the route if the front list is wrong, the header is missing, or an unlisted source is accepted. Restore the prior list and front configuration, then retest direct and fronted paths.

Disable the setting and front together; do not leave only one half enabled on a live listener.

Set the front addresses in webapps_proxy_protocol_from. The observed source address binds the browser ticket and becomes context.src_ip. The default nobody is correct for a directly reached entry. An unreadable list stops startup; the policy is never silently shortened.

The public listener behind a front

Save both front and Proxy configurations before changing either.

Validate the front's proxy_protocol on setting, apply the paired change, then run a TLS handshake and controlled login from the fronted path.

Only a listed source carrying a valid header is served. single_port applies the same source rule to client and Connector tunnel traffic.

Stop if either switch is enabled without the other, if a no-header path is accepted, or if context.src_ip is not the intended front address. Restore the previous pair of configurations and close the public route until both sides agree.

Roll back the front and Proxy changes as one change.

The public listener's source address affects certificate source-IP pinning, context.src_ip, audit src_ip, and anonymous rate-limit buckets. The join relay and connector-facing listeners are separate and are not covered by this front setting.

Store schema

Take a paired store backup immediately before migration and record the binary version.

Set store_auto_migrate = false, run gdsgate --config <authority-config> authority store migrate --check, then run gdsgate --config <authority-config> authority store migrate once for the cluster.

migrate --check exits 0 when current and 1 when migrations are pending. migrate exits 0 after applying pending migrations or doing nothing when current. Connectivity, lock, or unknown-applied failures are non-zero.

Stop on an unknown-applied migration, a pending migration outside the window, a failed backup, or a migration error. Pending and unknown-applied are different stop states. For pending state, run the matching migration command in the approved window. For unknown-applied state, use the newer binary or restore the pre-upgrade backup.

Migrations are forward-only. Roll back the binary only with a store backup whose schema is not ahead of it. Never delete migration rows.

Each build carries its migrations. With automatic migration on, startup applies pending work after checking for unknown versions. With it off, startup refuses pending work and reports the command. The direct migration command does not require a running Authority and uses the same top-level store_url.

Concurrent migration runs

Preserve the store state and migration logs before intervention.

Run gdsgate --config <authority-config> authority store migrate --check; inspect the migration process and PostgreSQL lock state if the command waits.

PostgreSQL migration lock wait is bounded at 120 seconds. One winner applies the DDL; a follower waits and then sees no pending work. A timeout exits non-zero with the lock error. SQLite uses its own single-writer behavior and does not use the advisory lock.

Stop after 120 seconds or on an unknown-applied status. Do not run concurrent manual DDL. Identify the active writer, let it commit or roll back, then rerun the read-only check.

Do not roll back by deleting migration rows. Restore the paired pre-change backup only under database authority.

Store schema ahead of the binary

Preserve the current store before any attempted recovery.

Run gdsgate --config <authority-config> authority store migrate --check and gdsgate --config <authority-config> doctor; inspect the unknown_applied report.

Both checks report non-zero or a failed check identifying versions this binary does not know. The binary refuses to start or migrate that store.

Stop the older binary. Do not force migration, remove rows, or call the state current. Deploy the newer matching binary, or restore the backup from before the newer migration.

Restore the pre-upgrade store and the previous verified binary as a pair.

The migration report distinguishes pending, meaning migrations carried by this binary are absent, from unknown_applied, meaning the store contains a version this binary cannot account for. Both are stop states, but only pending work can be applied by this binary.

Search this documentation edition.