You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`demo/generate-server-certs.sh` only creates **server** TLS material (`server-ca.pem`, `server.pem`, ...). The local demo enrolls with `./demo/demo-agent.sh`, which starts a local `swtpm`, creates a persistent P-256 signing key in that simulated TPM, and prepares `machine-client.pem` as a certificate carrier for that public key and identity extension. The gateway does not trust a client CA bundle; it authorizes the exact subject public key recorded in signed Postgres permission rows.
26
+
The setup script generates demo TLS material, creates `config.toml` when needed,
27
+
starts Postgres and static HTTPS mock services with Podman Compose or Docker Compose, applies the
28
+
database migration, builds and starts the gateway, enrolls a demo principal,
29
+
grants access to `docstore` and `messaging`, creates a demo agent handle, and
30
+
verifies that Claude Code can fetch `https://docstore/health` through the
31
+
gateway.
32
+
33
+
`demo/generate-server-certs.sh` creates gateway TLS material (`server-ca.pem`,
34
+
`server.pem`, ...) and mock HTTPS service TLS material (`mock-ca.pem`,
35
+
`mock-services.pem`, ...). The local demo enrolls with `./demo/demo-agent.sh`,
36
+
which starts a local `swtpm`, creates a persistent P-256 signing key in that
37
+
simulated TPM, and prepares `machine-client.pem` as a certificate carrier for
38
+
that public key and identity extension. The gateway does not trust a client CA
39
+
bundle; it authorizes the exact subject public key recorded in signed Postgres
40
+
permission rows.
31
41
32
-
Typical first-time flow:
42
+
`demo/setup.sh` keeps its tpm2-pkcs11 state under the demo state directory by
43
+
default. Override `AGENT_GATEWAY_DEMO_TPM2_PKCS11_STORE` only when you
44
+
intentionally want the demo principal to use another store.
33
45
34
-
1.`./demo/generate-server-certs.sh` and `cp config.example.toml config.toml`.
35
-
2. Enroll a trusted principal signing key and grant its destination delegation scope.
36
-
3. The principal creates an agent handle; the script prepares the subject certificate, signs permission rows for its exact SPKI DER, and starts the sidecar.
37
-
4. Start the gateway (`cargo run -- --config config.toml`) before sending prompts through the sidecar.
46
+
After setup, prompt the demo agent:
47
+
48
+
```bash
49
+
./demo/demo-agent.sh prompt agent-alpha \
50
+
--prompt "Access https://docstore/documents using curl"
51
+
```
38
52
39
53
On later runs, start the gateway first and use `./demo/demo-agent.sh prompt`. `./demo/connect.sh` prepares `machine-client.pem` for the current simulated TPM key and identity extension whenever it prepares or starts the sidecar. `--regenerate-certs` creates a fresh simulated TPM state; any permissions for the old subject key will no longer match.
40
54
@@ -110,30 +124,26 @@ Register a principal signing key from the TPM owner machine with:
110
124
111
125
The script creates or reuses a non-exportable TPM-backed P-256 key through `tpm2_ptool` and PKCS#11, stores only the public key in `principal_signing_keys`, and uses the friendly `key_id` (`org-alice`, `org-bob`, etc.) for the registry row. Run it on the machine that owns the TPM, with `AGENT_GATEWAY_DATABASE_URL` or `DATABASE_URL` pointing at Postgres.
112
126
113
-
For the demo, use three windows:
127
+
For a manual demo without `./demo/setup.sh`, use three windows:
114
128
115
129
```bash
116
130
# Principal shell: enroll the principal TPM public key.
# Principal shell: grant another destination, then continue the same Claude session.
131
-
./demo/demo-agent.sh grant "$AGENT_HANDLE" --grant example.com
132
-
./demo/demo-agent.sh prompt "$AGENT_HANDLE" --prompt "now try the second destination"
143
+
./demo/demo-agent.sh prompt "$AGENT_HANDLE" \
144
+
--prompt "Access https://docstore/documents with curl."
133
145
```
134
146
135
-
The dashboard runs separately and observes Postgres plus OpenTelemetry. `demo-agent.sh` keeps gateway connection details out of the principal-facing command; set `AGENT_GATEWAY_DEMO_GATEWAY` and `AGENT_GATEWAY_DEMO_GATEWAY_CA` only when overriding the local defaults. `AGENT_GATEWAY_DEMO_GATEWAY_CA` is the CA for the gateway's server certificate, not a client trust root. The first prompt uses `claude -p`; later prompts for the same handle use `claude -c -p` from the handle's working directory.
136
-
137
147
## Authorization Registry
138
148
139
149
The gateway authorizes a CONNECT only when all of these checks pass:
respond/documents`{"documents":[{"id":"handbook","title":"Employee Handbook","summary":"Demo employees can find travel, device, and security policies here."},{"id":"incident-runbook","title":"Incident Runbook","summary":"Page the on-call lead, create a channel, and post status updates every 30 minutes."}]}` 200
respond/messages`{"messages":[{"from":"alice","channel":"demo-ops","text":"Quarterly planning starts at 2pm."},{"from":"bob","channel":"demo-ops","text":"Please review the incident runbook before the tabletop."}]}` 200
0 commit comments