Workforce sign-in
Connect the GWA desk to an organization identity provider, assign employee access and verify offboarding.
Connect the desk
Use a dedicated HTTPS hostname for the employee desk and a separate hostname for the provider’s browser sign-in page. Browser cookies are scoped to a host across all its ports. Register a confidential OpenID Connect client with the exact callback URI https://desk.example.org/auth/callback. Enable authorization code flow, S256 PKCE, client-secret basic authentication and RS256 ID tokens. The desk requests the openid scope.
Set GWAD_AUTH_MODE=workforce and point GWAD_WORKFORCE_CONFIG to a service-readable JSON file. Keep the client secret in a separate, service-owned file. Relative paths resolve beside the JSON file.
{
"origin": "https://desk.example.org",
"issuer": "https://identity.example.org/realms/operations",
"client_id": "imsys-desk",
"client_secret_file": "desk-client.secret"
}
When discovery advertises endpoints on a different HTTPS origin, list each approved origin in endpoint_origins. Use ca_file for the provider’s private PEM trust anchor. Initialize a fresh PostgreSQL database with gwad init and retain the gateway provisioning policy from the service walkthrough.
Run gwad ui 127.0.0.1:7080 --desk web/desk/dist. Terminate HTTPS at a trusted reverse proxy on the same host. Forward the canonical desk Host header, Origin, cookies and the X-CSRF-Token and Idempotency-Key request headers to this loopback listener. Publish /, /desk.json, /favicon.svg, /assets/, /auth/ and /api/. Keep the device simulators and administrative CLI private. Pass Cache-Control through: the desk's hashed /assets/ are immutable and everything else is no-store. Configure proxy, tracing and error logs to omit request targets, query strings, headers and bodies on authentication routes. Status and duration suffice for monitoring.
Assign a shift
Use the exact issuer and opaque subject supplied for this client. Choose a permanent local employee ID and a display label. Grant access from the trusted database administration environment.
gwad workforce grant "$ISSUER" "$SUBJECT" alex "Alex Weber" dispatcher 0e5453540000000001
gwad workforce rename alex "Alex Berger"
Roles are viewer and dispatcher. Supply individual recipients, --all for the fleet, or --none to allow sign-in with an empty assignment. A label change preserves the employee ID and earlier audit labels. An employee with no binding sees an access-denied screen.
Open a bookmarked queue and choose Sign in with your organization. After login, the employee returns to that view. Sign out ends the current desk session. An accepted dispatch keeps its original grant and deadline. Sessions expire within eight hours. Signing in on a ninth browser ends the oldest session. A role or assignment replacement applies to active sessions and prevents another reservation under the earlier dispatch grant.
Verify offboarding
Connect the organization’s IAM disable event to this local command. Supply the issuer and subject as separate process arguments. Retry delivery until the command succeeds, then acknowledge the event. Repeating a disable is safe. Deliver events in subject order or reconcile with the current directory state before reinstatement, so an old queued disable cannot shut down a newly approved grant.
gwad workforce disable "$ISSUER" "$SUBJECT"
Before a pilot, open two sessions for a test employee. Disable that account in the organization directory and record the time until both sessions receive HTTP 401. Regrant access and confirm both old sessions still fail. Keep the delivery receipt and latency with the operator’s offboarding evidence. A pending or undelivered directory event leaves the local grant active.
Run the acceptance lab
The lab uses Dex, Chromium, a private HTTPS proxy and disposable PostgreSQL. From the workspace root, run the following with Docker, OpenSSL, Apache htpasswd, Node and Playwright available. Set CHROME_PATH to use an installed Chrome executable.
python3 xtask/check-workforce.py