Authority and Proxy on one Linux host with a public address, PostgreSQL on the
same host, connectors on other hosts. Profile: pilot.
Connectors join through the public domain or IP address. Verified discovery supplies registration trust and endpoints; Authority supplies the route and renewal settings. New Connectors in this recipe publish backends automatically within their assigned namespace. Shared manual resources use explicit assignments.
This recipe explicitly sets --authority-bind 127.0.0.1 for the tunneled and
fronted routes, keeping Authority on this host's loopback. PostgreSQL setup
still creates a one-member HA group. This is a single-host topology; before
adding Authorities on other hosts, use reachable individual addresses as in
Authority HA. The bind is independent of the PostgreSQL
host and public gateway name; see setup address selection.
| Placeholder | Meaning |
|---|---|
gate.example.com |
The name clients and connectors dial. Resolves to 203.0.113.10. |
203.0.113.10 |
The host's public address. |
https://idp.example.com/realms/gdsgate |
The OIDC issuer. |
Before you start
| Item | How to check | Reference |
|---|---|---|
| Linux with systemd, a root shell | systemctl --version |
service install |
gdsgate at /usr/local/bin/gdsgate |
gdsgate --version |
Installation |
Inbound ports open before you install, per the connector route. The administrator opens them; without them join and connect from other hosts fail |
from outside, after start: nc -vz 203.0.113.10 50061 |
Open the ports |
| The name resolves to the host (DNS modes) | getent hosts gate.example.com prints 203.0.113.10 |
Certificates |
| Certificate files for the chosen mode | openssl x509 -in /etc/gdsgate/tls/fullchain.pem -noout -subject -ext subjectAltName |
Certificates |
OIDC client gdsgate: public client, device authorization grant on; loopback redirect URI http://127.0.0.1:<port>/callback for gdsgate login --browser |
curl -s https://idp.example.com/realms/gdsgate/.well-known/openid-configuration prints JSON |
[oidc], gdsgate login |
PostgreSQL on the host, database and role gdsgate |
psql postgres://gdsgate@127.0.0.1:5432/gdsgate -c 'select 1' |
State store |
Group gdsgate for the service accounts |
getent group gdsgate |
service install |
production only: wrapped keyrings |
setup prepare --security-profile production --dry-run names what is missing |
[security.integrity] |
Ports
Purpose, dialer, and exposure per port: Listener
ports. On this host, 50050/50051
stay on the loopback unless the route is direct.
What each port carries: Endpoints.
Open the ports
Open the ports before you install. The host firewall is the
administrator's responsibility: setup prepare, service install and
--start do not change it. While a port is closed, the steps that cross it
fail: gdsgate join on a connector host, gdsgate connect on a
workstation.
| Route | Open to every address | Open to connector addresses only |
|---|---|---|
tunneled |
50061, 50062, 50063 |
|
tunneled, IP address only |
50061, 50062, 50063, 50064 |
|
direct |
50061, 50062, 50063 |
50050, 50051 |
fronted |
50061, 50062, 50063 |
The tunneled route:
| Firewall | Command |
|---|---|
| ufw | ufw allow 50061:50063/tcp |
| firewalld | firewall-cmd --permanent --add-port=50061-50063/tcp && firewall-cmd --reload |
nftables, the inet filter table of /etc/nftables.conf |
nft insert rule inet filter input tcp dport 50061-50063 accept, and the same rule in /etc/nftables.conf |
| Windows, elevated PowerShell | New-NetFirewallRule -DisplayName gdsgate-proxy -Direction Inbound -Protocol TCP -LocalPort 50061,50062,50063 -Action Allow |
For 50064 add it to the same command. For 50050 and 50051 on the
direct route, allow the connector networks only:
the Authority host's rule. A network firewall in front
of the host, such as a cloud security group, needs the same ports.
Connector routes
A connector reaches Authority by one of three routes. The route decides which ports face the connectors' network.
| Route | Ports open on the host | Server configuration | Connector |
|---|---|---|---|
tunneled (recommended) |
50061–50063 |
Default setup prepare; Authority stays on loopback. |
gdsgate join gate.example.com with backend and token inputs. |
tunneled, IP address only |
50061–50064 |
IP domain, cluster-issued registration TLS and join relay. | gdsgate join 203.0.113.10 --fingerprint "$CA_FINGERPRINT" with backend and token inputs. |
direct |
50061–50063; private 50050, 50051 |
--authority-bind 203.0.113.10 --no-public-join. Restrict Authority ports to connector networks. |
Join through the public entry; Authority advertises the direct route. |
fronted |
50061–50063 |
Set Authority's [connector].authority_transport = "fronted". |
Join through the public entry; Authority advertises the fronted route. |
The public entry is used for discovery regardless of the selected route.
Connectors need no registration URL, route flag or registration TLS name for
the advertised configuration. For an unknown CA, confirm the offered
fingerprint at a terminal or supply the approved --fingerprint unattended.
Registration limits and relayed control-plane limits are described in
Proxy configuration.
Full reference: split deployment, routes.
Configure
-
PostgreSQL on the host:
Shell apt-get install -y postgresql sudo -u postgres psql -c 'CREATE ROLE gdsgate LOGIN NOSUPERUSER NOCREATEDB NOCREATEROLE' sudo -u postgres psql -c '\password gdsgate' sudo -u postgres psql -c 'CREATE DATABASE gdsgate OWNER gdsgate' -
The configuration directory and the store password. Supply the same password in a protected file named
store.password:Shell groupadd --system --force gdsgate install -d -m 0750 -g gdsgate /etc/gdsgate install -o root -g gdsgate -m 0640 store.password /etc/gdsgate/store.password -
Certificate files, per Certificates:
Mode Files Let's Encrypt /etc/gdsgate/tls/fullchain.pem,/etc/gdsgate/tls/privkey.pem, and the deploy hookYour own CA the same two files; the root in the host's system store IP address only none: setup preparehas the cluster CA issue the registration certificate -
Write the configurations. Run with
--dry-runfirst: theto preparesection lists what the files will not satisfy; anx:line is refused at start.DNS name
Shell gdsgate setup prepare --domain gate.example.com --security-profile pilot \ --store-url postgres://gdsgate@127.0.0.1:5432/gdsgate \ --authority-bind 127.0.0.1 \ --store-password-file /etc/gdsgate/store.password \ --enroll-cert /etc/gdsgate/tls/fullchain.pem --enroll-key /etc/gdsgate/tls/privkey.pem \ --tls-cert /etc/gdsgate/tls/fullchain.pem --tls-key /etc/gdsgate/tls/privkey.pem \ --oidc-issuer https://idp.example.com/realms/gdsgate --oidc-client-id gdsgate \ --dry-runThen the same command without
--dry-run. For thedirectroute replace the bind with--authority-bind 203.0.113.10and add--no-public-join.IP address only
Shell gdsgate setup prepare --domain 203.0.113.10 --security-profile pilot \ --store-url postgres://gdsgate@127.0.0.1:5432/gdsgate \ --authority-bind 127.0.0.1 \ --store-password-file /etc/gdsgate/store.password \ --oidc-issuer https://idp.example.com/realms/gdsgate --oidc-client-id gdsgate \ --join-relay --dry-runThen the same command without
--dry-run. For thedirectroute replace the bind with--authority-bind 203.0.113.10, remove--join-relayand add--no-public-join. Authority binds that address and the Proxy dials it there.The run also has the cluster CA issue the registration certificate to
/var/lib/gdsgate/authority/enroll.pemand writes the cluster CA to/etc/gdsgate/transport-ca.pemfor the Proxy. Authority renews the certificate. See Certificates, IP address only. Windows: the Windows tab, IP address only.Each run writes the configurations, the seed policy, the two keyrings and the systemd units, and prints
transport_ca.fingerprint. Flags:setup prepare. -
The audit export, and the services:
Shell gdsgate setup change --authority-config /etc/gdsgate/authority.toml \ --set authority:audit.export_path=/var/lib/gdsgate/authority/audit.jsonl gdsgate --config /etc/gdsgate/authority.toml service install authority gdsgate --config /etc/gdsgate/proxy.toml service install proxyservice installwrites and enables each unit and gives thegdsgategroup/etc/gdsgateand every file the configuration names in it, keys included. -
Relevant sections of the written files. Keep the generated
[ha],[ha.authority_peers],[ha.keyring_sync]and Proxy peer settings in place; these excerpts do not repeat them:DNS name
/etc/gdsgate/authority.toml:toml store_url = "postgres://gdsgate@127.0.0.1:5432/gdsgate" # cluster state store_password_file = "/etc/gdsgate/store.password" # password, read at connect [security] profile = "pilot" # checks applied at start [security.integrity] control_keyring = "/etc/gdsgate/control.keys" # seals control rows audit_keyring = "/etc/gdsgate/audit.keys" # seals the audit chain [endpoints] authority = "127.0.0.1:50051" # control plane, bound authority_enroll = "127.0.0.1:50050" # registration, bound proxy_public = "gate.example.com:50061" # told to joining nodes proxy_internal = "gate.example.com:50062" # told to joining nodes proxy_ws = "gate.example.com:50063" # told to joining nodes [telemetry] metrics_listen = "127.0.0.1:9090" # /readyz, /healthz, /metrics [proxy] public_join = true # nodes renew at proxy_public [connector] authority_transport = "tunneled" # route told to connectors [authority] enroll_cert_file = "/etc/gdsgate/tls/fullchain.pem" # registration listener TLS enroll_key_file = "/etc/gdsgate/tls/privkey.pem" [policy] path = "/etc/gdsgate/policy.cedar" # seed, read while the store has no policy [oidc] issuer = "https://idp.example.com/realms/gdsgate" client_id = "gdsgate" [audit] export_path = "/var/lib/gdsgate/authority/audit.jsonl" # off-cluster copy for a log shipper/etc/gdsgate/proxy.toml. The three public listeners bind every interface; the file holds them in[endpoints]beside the two Authority addresses:Key Value Listener proxy_public0.0.0.0:50061clients; connector registration and renewal proxy_internal0.0.0.0:50062connector tunnels proxy_ws0.0.0.0:50063connector tunnels, WebSocket toml [endpoints] # proxy_public, proxy_internal, proxy_ws: the table above authority = "127.0.0.1:50051" # dialled authority_enroll = "127.0.0.1:50050" # where registration is forwarded [proxy] public_cert_file = "/etc/gdsgate/tls/fullchain.pem" # what clients and connectors see public_key_file = "/etc/gdsgate/tls/privkey.pem" public_join = true # connectors register and renew on 50061 [enroll] endpoint = "https://127.0.0.1:50050" # the Proxy's own registration transport_sni = "gate.example.com" # name verified on that certificate state_dir = "/var/lib/gdsgate/proxy" # enrolled identity [oidc] issuer = "https://idp.example.com/realms/gdsgate" # advertised to gdsgate connect client_id = "gdsgate" [security] profile = "pilot" [telemetry] metrics_listen = "127.0.0.1:9091"IP address only
/etc/gdsgate/authority.tomldiffers in the addresses told to joining nodes, in[authority], and has the join relay in place of[proxy]:toml [endpoints] authority = "127.0.0.1:50051" authority_enroll = "127.0.0.1:50050" proxy_public = "203.0.113.10:50061" proxy_internal = "203.0.113.10:50062" proxy_ws = "203.0.113.10:50063" proxy_join = "203.0.113.10:50064" # where nodes register and renew [authority] enroll_cert_from_cluster_ca = true # issued from the cluster CA, renewed by Authority enroll_cert_file = "/var/lib/gdsgate/authority/enroll.pem" enroll_key_file = "/var/lib/gdsgate/authority/enroll.key"/etc/gdsgate/proxy.toml; the listeners as in the DNS tab plusproxy_joinon port50064, the join relay; no[proxy]table:toml [endpoints] # proxy_public, proxy_internal, proxy_ws, proxy_join: 0.0.0.0, every interface authority = "127.0.0.1:50051" authority_enroll = "127.0.0.1:50050" [enroll] endpoint = "https://127.0.0.1:50050" transport_ca = "/etc/gdsgate/transport-ca.pem" # the cluster CA, written by setup prepare state_dir = "/var/lib/gdsgate/proxy" [oidc] issuer = "https://idp.example.com/realms/gdsgate" client_id = "gdsgate" [security] profile = "pilot" [telemetry] metrics_listen = "127.0.0.1:9091"Key reference: top level,
[endpoints],[enroll],[proxy],[authority],[audit]. -
Check Authority's file:
Shell gdsgate config check /etc/gdsgate/authority.toml --role authorityExpected:
0 error(s), 0 warning(s). The Proxy's file is checked once its token file is installed (Start). Seeconfig check.
Start
Linux
For a new installation, run the selected setup prepare command from
Configure, replacing --dry-run with --start. It installs and starts
both services, bootstraps the administrative identity and enrolls Proxy.
Check both readiness listeners before adding Connectors.
If the files were already prepared without --start, use this separate
startup procedure:
systemctl start gdsgate-authority
gdsgate --config /etc/gdsgate/authority.toml authority identities bootstrap --role admin \
--output-dir /etc/gdsgate/admin
gdsgate setup change --authority-config /etc/gdsgate/authority.toml \
--set authority:admin.identity_dir=/etc/gdsgate/admin \
--set authority:admin.endpoint=https://127.0.0.1:50051
(umask 077
gdsgate --config /etc/gdsgate/authority.toml authority tokens create \
--role proxy > /etc/gdsgate/proxy.token)
chgrp gdsgate /etc/gdsgate/proxy.token
chmod 0640 /etc/gdsgate/proxy.token
gdsgate setup change --proxy-config /etc/gdsgate/proxy.toml \
--set 'proxy:enroll.token=${file:/etc/gdsgate/proxy.token}'
gdsgate --config /etc/gdsgate/proxy.toml service install proxy
gdsgate config check /etc/gdsgate/proxy.toml --role proxy
systemctl start gdsgate-proxyWith --authority-bind 203.0.113.10, [admin].endpoint is
https://203.0.113.10:50051. The administrative identity lasts one day;
the same identities bootstrap --role admin command renews it. The Proxy spends the token
on its first start and keeps its identity in /var/lib/gdsgate/proxy.
After readiness, remove the spent token reference and file:
gdsgate setup change --proxy-config /etc/gdsgate/proxy.toml \
--set proxy:enroll.token=
rm /etc/gdsgate/proxy.token
systemctl restart gdsgate-proxyReadiness must recover from the persisted identity without another token.
Every service install checks the shared state parent at 0755; role
state remains private. For a working-directory refusal see
service permissions.
Step 4 with --start in place of --dry-run installs and starts both
services, bootstraps the admin identity and enrolls Proxy. Configure audit
export separately and remove the spent enrollment input after verification.
It reports the
gateway started once the Proxy's /readyz answers, and otherwise fails
with the last lines the Proxy logged.
Windows
From an elevated PowerShell prompt, with the files under
%ProgramData%\gdsgate. Step 4 with --start:
DNS name
gdsgate setup prepare --domain gate.example.com --security-profile pilot `
--store-url postgres://gdsgate@127.0.0.1:5432/gdsgate `
--authority-bind 127.0.0.1 `
--store-password-file C:\ProgramData\gdsgate\store.password `
--enroll-cert C:\ProgramData\gdsgate\tls\fullchain.pem --enroll-key C:\ProgramData\gdsgate\tls\privkey.pem `
--tls-cert C:\ProgramData\gdsgate\tls\fullchain.pem --tls-key C:\ProgramData\gdsgate\tls\privkey.pem `
--oidc-issuer https://idp.example.com/realms/gdsgate --oidc-client-id gdsgate `
--startIP address only
The firewall rule with the join relay:
New-NetFirewallRule -DisplayName gdsgate-proxy -Direction Inbound -Protocol TCP `
-LocalPort 50061,50062,50063,50064 -Action Allow
gdsgate setup prepare --domain 203.0.113.10 --security-profile pilot `
--store-url postgres://gdsgate@127.0.0.1:5432/gdsgate `
--authority-bind 127.0.0.1 `
--store-password-file C:\ProgramData\gdsgate\store.password `
--oidc-issuer https://idp.example.com/realms/gdsgate --oidc-client-id gdsgate `
--join-relay --startThe registration certificate is in
C:\ProgramData\gdsgate\state\authority\enroll.pem, the cluster CA
for the Proxy in C:\ProgramData\gdsgate\transport-ca.pem. The run
prints transport_ca.fingerprint for the Connector's and client's
--fingerprint.
--start registers and starts gdsgate-authority, takes the
administrative identity, writes the Proxy token to proxy.token, and
starts gdsgate-proxy. It does not write the audit export of step 5.
Add it, restart Authority and check the file:
Add-Content C:\ProgramData\gdsgate\authority.toml "`n[audit]`nexport_path = 'C:\ProgramData\gdsgate\state\authority\audit.jsonl'"
Restart-Service gdsgate-authority
gdsgate config check C:\ProgramData\gdsgate\authority.toml --role authorityExpected: 0 error(s), 0 warning(s). Certificate reload:
sc.exe control gdsgate-proxy paramchange.
A connector on another host
On Authority, issue one permission per Connector. The generated configuration
uses automatic publication; no resources set is needed:
(umask 077
gdsgate --config /etc/gdsgate/authority.toml authority tokens create --role connector \
> connector.token)Transfer the permission through a protected operator channel. On the Connector host, run in a root shell:
DNS name
gdsgate join gate.example.com --name conn-1 \
--serve demo-ssh=ssh --recording central --start < connector.token
rm connector.tokenIP address only
CA_FINGERPRINT='<approved SHA-256 fingerprint>'
gdsgate join 203.0.113.10 --fingerprint "$CA_FINGERPRINT" --name conn-1 \
--serve demo-ssh=ssh --recording central --start < connector.token
rm connector.tokenWindows connector
From an elevated PowerShell prompt:
Get-Content -Raw connector.token | gdsgate join gate.example.com --name conn-1 `
--serve demo-ssh=ssh --recording central --start
Remove-Item connector.tokenFor an IP entry, use its IP as the entry and supply the approved
--fingerprint.
With public DNS trust no fingerprint is needed. With an unknown private CA,
confirm at a terminal or pass the approved public-entry --fingerprint.
Discovery delivers registration trust separately, including the join relay
and TLS name when those are configured. The advertised direct or fronted
route also needs no --route override.
The command installs and starts the Connector service. It writes
/etc/gdsgate/connector.toml and /var/lib/gdsgate/connector; Windows uses
C:\ProgramData\gdsgate\connector.toml and
C:\ProgramData\gdsgate\state\connector. Keep these paths across upgrades.
For foreground installation and two verified Proxy connections, use
the HA Connector procedure.
Verify the admitted ID returned by the catalog, normally conn-1/demo-ssh.
Its short alias is usable only while unambiguous. To retain administrator-chosen
shared IDs, follow manual resource assignments.
Verify
| Command | Expected | If not: cause → fix |
|---|---|---|
systemctl is-active gdsgate-authority gdsgate-proxy |
active twice |
journalctl -u gdsgate-authority -n 30; see the rows below. |
curl -s 127.0.0.1:9090/readyz; curl -s 127.0.0.1:9091/readyz |
ready twice |
cannot bind `[telemetry].metrics_listen` = 127.0.0.1:9091: Address in use in the log → another process has that port; stop it, or change metrics_listen. |
journalctl -u gdsgate-authority -n 30 |
auth service serving gRPC ... enroll_mode="TLS from the configured certificate" |
the private key of ...: Permission denied (os error 13) → the key is outside /etc/gdsgate; copy it there and run service install authority again. |
journalctl -u gdsgate-proxy -n 30 |
enrolled and persisted a new transport identity, then proxy serving gRPC |
enrollment endpoint https://127.0.0.1:50050: certificate refused (...); checked for the name `...` against ... → the name or the trust named there; see Certificates. |
gdsgate --config /etc/gdsgate/authority.toml doctor |
ok registration listener TLS · ... |
The failing line names the key. |
gdsgate config check /etc/gdsgate/authority.toml --role authority |
0 error(s), 0 warning(s) |
[audit-export] warning → step 5; on Windows, the Add-Content of the Windows tab. audit export file: the service cannot write it → export_path outside /var/lib/gdsgate/authority (Windows: %ProgramData%\gdsgate\state\authority). |
journalctl -u gdsgate-authority \| grep 'audit export' |
audit export file open (JSON-lines) path=/var/lib/gdsgate/authority/audit.jsonl |
Read-only file system → as the row above. |
journalctl -u gdsgate-proxy \| grep 'node registration on the public listener' |
forward="TLS" |
forward="cleartext" → the Proxy's [enroll].endpoint is http://. No line → prepared with --join-relay or --no-public-join. |
gdsgate join ... on the connector host |
ok: joined gate.example.com as conn-1 · role connector |
certificate refused → inspect public-entry trust and the discovered registration CA and TLS name. An unknown public CA requires confirmation or the approved --fingerprint. UNAVAILABLE → the Proxy cannot reach or verify the registration listener; the Proxy log names why. |
tunneled: the same join output |
cluster settings: ... auth tunneled at none, renew https://gate.example.com:50061 |
renew https://gate.example.com:50064 → prepared with --join-relay. |
fronted: the same join output |
--route fronted: Authority gate.example.com:50061, renewal https://gate.example.com:50061 |
Line missing → --route fronted was not passed, and renewal goes to Authority's own address; run join again with --route fronted --if-missing. |
gdsgate --config /etc/gdsgate/authority.toml authority nodes list |
rows admin, proxy, connector, state active |
No connector row → the join output names the failure. |
gdsgate --config /etc/gdsgate/authority.toml authority offers list |
conn-1/demo-ssh ssh ... yes |
No row → journalctl -u gdsgate-connector; Read the reason: check the assigned automatic namespace/scope, backend requirements and admission result; gate_not_offered needs a capability receipt. Existing manual nodes need their catalog declarations and assignments. See startup diagnostics. |
On a workstation: gdsgate connect gate.example.com (DNS name) or gdsgate connect 203.0.113.10:50061 --fingerprint "$CA_FINGERPRINT" |
ok: wrote ~/.gdsgate/config.toml · gateway <version> |
See Certificates. |
On the workstation: gdsgate setup check --role client |
ok: trust anchor ...: the file --fingerprint wrote, or this host's trust store for a public certificate |
? no trust anchor is configured → run gdsgate connect first. |
gdsgate login |
-> to sign in, open https://idp.example.com/realms/gdsgate/device and enter code ... |
Error from the provider → the OIDC client in Before you start. |
If login uses the development issuer, check [oidc] on Authority and Proxy, restart changed roles,
then refresh the selected client configuration with gdsgate connect <entry> --force --output <selected-client-config> and sign
in again. If login succeeds but later calls return invalid identity token,
check matching issuer, client audience and validation on every Authority.
Use the same client configuration for login and resource commands. Follow the
OIDC diagnostics for grants, claims and polling failures.
After these checks pass, complete the access checks from a client workstation.
Backup
Back up PostgreSQL together with Authority's protected state, including the
complete /var/lib/gdsgate/authority/keyring-sync directory. Preserve
/etc/gdsgate, the administrative identity, Proxy identity and each Connector's
state, SSH host keys, publication journal and pending recordings. Preserve
ownership and modes. Original keyring files alone are insufficient after
synchronized rotation. Recovery follows
paired store and protected-state recovery.
Profile
pilot. These pages satisfy the profile matrix
rows profile-declared, store-postgres, registration-tls,
enroll-endpoint-tls, proxy-public-tls, proxy-internal-mtls,
connector-enrolled, audit-export, keyrings-distinct and
open-secret-file. For production add oidc-provider (already set here),
keyrings-named with wrapped keyrings, and key-file-access; run
setup prepare --security-profile production --dry-run for the list.