aac-cli 0.1.6__tar.gz → 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. {aac_cli-0.1.6/aac_cli.egg-info → aac_cli-0.2.0}/PKG-INFO +185 -130
  2. {aac_cli-0.1.6 → aac_cli-0.2.0}/README.md +184 -129
  3. {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli/__init__.py +1 -1
  4. aac_cli-0.2.0/aac_cli/agent_cli.py +674 -0
  5. aac_cli-0.1.6/aac_cli/workspace_health.py → aac_cli-0.2.0/aac_cli/agent_health.py +144 -97
  6. aac_cli-0.1.6/aac_cli/workspace_layout.py → aac_cli-0.2.0/aac_cli/agent_layout.py +191 -120
  7. aac_cli-0.1.6/aac_cli/workspace_manifest.py → aac_cli-0.2.0/aac_cli/agent_record.py +48 -36
  8. {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli/cli.py +4 -4
  9. {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli/config_render.py +115 -72
  10. {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli/dev_material.py +268 -6
  11. {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli/init_cli.py +759 -374
  12. aac_cli-0.2.0/aac_cli/material_cases.py +175 -0
  13. {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli/reference.py +41 -12
  14. {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli/secure_files.py +1 -1
  15. aac_cli-0.2.0/aac_cli/supplied_material.py +293 -0
  16. {aac_cli-0.1.6 → aac_cli-0.2.0/aac_cli.egg-info}/PKG-INFO +185 -130
  17. {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli.egg-info/SOURCES.txt +6 -4
  18. {aac_cli-0.1.6 → aac_cli-0.2.0}/pyproject.toml +1 -1
  19. aac_cli-0.1.6/aac_cli/workspace_cli.py +0 -544
  20. {aac_cli-0.1.6 → aac_cli-0.2.0}/LICENSE +0 -0
  21. {aac_cli-0.1.6 → aac_cli-0.2.0}/MANIFEST.in +0 -0
  22. {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli/__main__.py +0 -0
  23. {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli/admin_key_pem.py +0 -0
  24. {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli/api_key_rotation_state.py +0 -0
  25. {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli/config.py +0 -0
  26. {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli/idp_recovery.py +0 -0
  27. {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli/profiles.py +0 -0
  28. {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli/registration_state.py +0 -0
  29. {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli/sso_login.py +0 -0
  30. {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli.egg-info/dependency_links.txt +0 -0
  31. {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli.egg-info/entry_points.txt +0 -0
  32. {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli.egg-info/requires.txt +0 -0
  33. {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli.egg-info/top_level.txt +0 -0
  34. {aac_cli-0.1.6 → aac_cli-0.2.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aac-cli
3
- Version: 0.1.6
3
+ Version: 0.2.0
4
4
  Summary: The aac platform CLI — headless operator interface to the AAC control plane (tenant registration, chain audit).
5
5
  Author: Agent Authority Cloud Project
6
6
  License-Expression: Apache-2.0
@@ -60,7 +60,7 @@ Python 3.10 or newer is required.
60
60
  registers the agent's identity with AAC and creates the keys, certificates
61
61
  and configuration its sidecar needs. The agent itself is yours. The first
62
62
  run also creates your profile and registers your tenant; run it again with
63
- a new `--workspace` and `--workload-path`, and the same `--trust-url` and
63
+ a new `--agent` and `--workload-path`, and the same `--trust-url` and
64
64
  `--idp`, for each further agent.
65
65
 
66
66
  Along the way it signs you in, registers a developer tenant (or reuses the
@@ -97,7 +97,7 @@ aac init --profile stage \
97
97
  offers developer tenants. If you need another sign-in provider, contact
98
98
  support@cascadeauth.com.
99
99
 
100
- `--trust-url` is required when a workspace is created: it is the public URL
100
+ `--trust-url` is required when an agent is created: it is the public URL
101
101
  where your AAC environment serves trust material, and for AAC stage it is
102
102
  `https://trust.stage.cascadeauth.dev`. If you leave it out, the command
103
103
  stops before creating anything and names the value your tenant already
@@ -108,137 +108,187 @@ registers the tenant, the second starts the tenant-admin session that
108
108
  registers the workload. The command says so before the first one.
109
109
 
110
110
  Progress lines `[1/5]` to `[5/5]` name the five steps: tenant, sign-in,
111
- hosted trust domain, workload, and material; the configuration files are
112
- rendered last. Rerunning the
111
+ hosted trust domain, workload, and material; the settings files are
112
+ written last. Rerunning the
113
113
  command is safe: it resumes an interrupted setup, reports a complete
114
- workspace, or names the exact conflict. It never overwrites private
114
+ agent, or names the exact conflict. It never overwrites private
115
115
  material. The sign-in you chose with `--idp` is remembered, so a rerun
116
116
  never asks you to pick between GitHub and Google again.
117
117
 
118
118
  ### What it creates, and where
119
119
 
120
- * `~/.aac/workspaces/<workspace>/` is the **workspace** for one workload
121
- (default name `starter`). `pki/` holds what the sidecar container mounts:
122
- the workload, terminal-attestation and localhost TLS key pairs, this
123
- workspace's root-signing key and the outbound CA bundle. `pair/` holds
124
- what both containers mount as secrets: the pairing secret and the public
125
- development CA certificate. `ca/` holds the development CA private key,
126
- kept out of both mounts so no container ever sees the key that mints
127
- identities. Beside them sit `sidecar-config.yaml`, `compose.env` and a
128
- manifest that lets a rerun resume.
120
+ * `~/.aac/agents/<agent>/` holds the files **one sidecar** needs (default
121
+ name `starter`), in folders named for where each file goes. `sidecar/` is
122
+ what you mount or copy into the sidecar: the workload, receipt and HTTPS
123
+ key pairs, this agent's root-signing key, the CA certificate and the
124
+ outbound CA bundle. `agent/` is what the paired application reads: the
125
+ pairing secret and the CA certificate. `keep/` stays with you — it holds
126
+ the development CA private key, out of both mounts, so no container ever
127
+ sees the key that mints identities; an agent whose certificates your own
128
+ issuer signed has no `keep/` at all. Beside them sit
129
+ `sidecar-config.yaml`, `compose.env`, `state/` and `record.json`, which
130
+ lets a rerun resume.
129
131
  * `~/.aac/tenants/<tenant-id>/` is **tenant-level** material shared by every
130
- workspace of that tenant: the tenant-admin signing key, the publisher's
131
- input directories (`root-keys/` and `spiffe-bundle/`, public halves only)
132
- and the rendered `publisher.env`.
133
- * `~/.aac/credentials/<tenant-id>` is the tenant API key. The rendered
132
+ agent of that tenant: the tenant-admin signing key, the publisher's input
133
+ directories (`root-keys/` and `spiffe-bundle/`, public halves only) and
134
+ the generated `publisher.env`.
135
+ * `~/.aac/credentials/<tenant-id>` is the tenant API key. The generated
134
136
  configuration references it by path.
135
137
 
136
- **Everything `aac init` generates is development material.** The
138
+ **By default everything `aac init` generates is development material.** The
137
139
  development CA lives seven days and the leaf certificates one day. Nothing
138
- here qualifies for production, whatever the tenant's domain. Moving to
139
- production means a tenant-admin key under production custody
140
- (`aac tenant rotate-admin-key`), a new root key id published by your
141
- publisher, and certificates from your approved issuer.
140
+ there qualifies for production, whatever the tenant's domain. If your own
141
+ issuer signs your agent's certificates instead, see "Two ways to get your
142
+ agent's certificates" below; moving to production also means a tenant-admin
143
+ key under production custody (`aac tenant rotate-admin-key`) and a root key
144
+ id published by your publisher.
142
145
 
143
- ### What a workspace is for, and how to use it
146
+ ### What an agent folder is for, and how to use it
144
147
 
145
- A workspace holds everything one workload needs to run beside an AAC
148
+ An agent folder holds everything one workload needs to run beside an AAC
146
149
  sidecar, kept apart from every other workload: its identity in your
147
- tenant's trust domain, its own root signing key and key id, its development
148
- CA and certificates, the pairing secret its sidecar and agent share, and the
149
- configuration files rendered for them. It also records how far setup got,
150
- so rerunning `aac init` resumes where it stopped.
150
+ tenant's trust domain, its own root signing key and key id, its
151
+ certificates, the pairing secret its sidecar and application share, and the
152
+ settings files written for them. It also records how far setup got, so
153
+ rerunning `aac init` resumes where it stopped.
151
154
 
152
- Use one workspace per workload. `aac init --workspace <name>` creates a
153
- workspace (with `--trust-url`) or resumes it (the default name is
154
- `starter`), and three commands look after it:
155
+ Use one agent per workload. `aac init --agent <name>` creates an agent
156
+ (with `--trust-url`) or resumes it (the default name is `starter`), and
157
+ three commands look after it:
155
158
 
156
159
  ```bash
157
- aac workspace status --workspace starter # what exists, what is due, and the next step
158
- aac workspace renew --workspace starter # fresh certificates and keys
159
- aac workspace render --workspace starter --force # rewrite the configuration files
160
+ aac agent status --agent starter # what exists, what is due, and the next step
161
+ aac agent renew --agent starter # replace the short-lived certificates
162
+ aac agent list # every agent on this machine
160
163
  ```
161
164
 
162
- A second workload is a second workspace with its own workload path:
165
+ There is no separate command for the settings files. Running setup again —
166
+ with the profile the agent belongs to — writes `sidecar-config.yaml`,
167
+ `compose.env` and the tenant's `publisher.env` from what the agent already
168
+ records, without touching a single key:
163
169
 
164
170
  ```bash
165
- aac init --profile stage --workspace worker --workload-path demo/worker \
171
+ aac init --profile stage --agent starter # write them again
172
+ aac init --profile stage --agent starter --layout container # and change the layout
173
+ ```
174
+
175
+ That is how you rebuild a settings file you lost and how you move between
176
+ running the sidecar directly on this machine and running it in a container.
177
+ `--profile` is required because setup picks the profile before it reads the
178
+ agent; `aac agent status` prints the same command with the right profile
179
+ whenever it is the next step.
180
+
181
+ A second workload is a second agent with its own workload path:
182
+
183
+ ```bash
184
+ aac init --profile stage --agent worker --workload-path demo/worker \
166
185
  --idp github --trust-url https://trust.stage.cascadeauth.dev
167
186
  ```
168
187
 
169
- Pass the same `--trust-url` and `--idp` as for your first workspace. Each
170
- workspace records its own, and the trust URL also goes into the tenant's
171
- `publisher.env`, which every workspace of the tenant shares. A render never
172
- changes that file's endpoints, so a workspace created with a different
173
- trust URL stops at its last step and has to be set up again under a new
174
- name.
175
-
176
- `--workspace` names the local files; `--workload-path` chooses the
177
- workload's identity, the path at the end of its SPIFFE ID (`demo/agent`
178
- unless you choose another). Two workspaces with the same workload path are
179
- the same workload holding different keys: that is what a replacement
180
- computer wants, and what a second workload does not. The workspace name is
181
- permanent, because the root key id is made from it. `aac init` needs the
182
- profile the workspace was created with; the `aac workspace` commands read it
183
- from the workspace itself.
184
-
185
- ### What "render" means
186
-
187
- To render is to write the configuration files that follow from what the
188
- workspace records, without touching any key: `sidecar-config.yaml` and
189
- `compose.env` in the workspace, and `publisher.env` in the tenant
190
- directory. They hold endpoints, identifiers, settings and the paths of the
191
- key files, never key material.
192
-
193
- `aac init` renders them as its last step. Render again with
194
- `aac workspace render --workspace <name> --force` when a configuration file
195
- is lost or to change the layout; without `--force`, `render` refuses to
196
- overwrite files that exist. The layout decides the paths written into the
197
- sidecar configuration: `host` (the default) uses paths on this machine, for
198
- a sidecar that runs directly on it, and `container` uses the paths where the
199
- files are mounted inside the containers. `compose.env` always holds the
200
- paths on this machine that Docker mounts from, and `publisher.env` the
201
- paths a publisher running on this machine reads.
202
-
203
- `publisher.env` belongs to the tenant, and every workspace of the tenant
204
- renders it. A render rewrites its paths and poll interval for this machine
205
- (hand edits to those are replaced), but refuses, even with `--force`, to
206
- change its tenant ID, trust domain or URLs, because that would repoint the
207
- publisher for every workspace. The refusal names the values that differ.
208
- If the file is the stale one, for example after you deliberately moved the
209
- tenant to new endpoints and set up its workspaces again, move it aside
210
- (`mv publisher.env publisher.env.old` in the tenant directory) and render
211
- again from a workspace with the intended endpoints. The admin key and the
212
- published public keys stay where they are.
213
-
214
- ### How profiles, workspaces and tenant data fit together
188
+ Pass the same `--trust-url` and `--idp` as for your first agent. Each agent
189
+ records its own, and the trust URL also goes into the tenant's
190
+ `publisher.env`, which every agent of the tenant shares. Writing the
191
+ settings files never changes that file's endpoints, so an agent created with
192
+ a different trust URL stops at its last step and has to be set up again
193
+ under a new name.
194
+
195
+ `--agent` names the local files; `--workload-path` chooses the workload's
196
+ identity, the path at the end of its SPIFFE ID (`demo/agent` unless you
197
+ choose another). Two agents with the same workload path are the same
198
+ workload holding different keys: that is what a replacement computer wants,
199
+ and what a second workload does not. The agent name is permanent, because
200
+ the root key id is made from it. `aac init` needs the profile the agent was
201
+ created with; the `aac agent` commands read it from the agent itself.
202
+
203
+ ### Two ways to get your agent's certificates
204
+
205
+ Find your situation here and use the flags it lists. Nothing is inferred:
206
+ which case you are in is decided by whether you pass certificates your own
207
+ issuer signed, and the agent records the answer, so `aac agent status` can
208
+ tell you later and `aac agent renew` behaves accordingly.
209
+
210
+ <!-- material-cases:start -->
211
+
212
+ <!-- Generated from aac_cli/material_cases.py. Do not edit by hand. -->
213
+
214
+ #### The CLI creates a development CA
215
+
216
+ The laptop case. The CLI creates a certificate authority on this machine and signs the agent's identity, receipt and HTTPS certificates with it.
217
+
218
+ **Flags.** No flags are needed. To reuse a development CA across agents, pass `--ca-key-file` and `--ca-cert-file` together; neither one alone.
219
+
220
+ **Keys and signatures.** The CA and the two identity keys are Ed25519; the HTTPS key is EC P-256.
221
+
222
+ **The CLI** creates a 7-day certificate authority and keeps its private key in the agent's keep/ folder; issues the workload, receipt and HTTPS certificates; publishes the CA certificate as a trust anchor named `<agent>-dev-ca`.
223
+
224
+ **The CLI does not** ask you for anything from your own certificate authority.
225
+
226
+ **Renewal.** `aac agent renew --agent <name>` issues fresh certificates from the same CA.
227
+
228
+ #### I bring my own CA
229
+
230
+ The production case. Your own issuer has already signed the agent's certificates, and your CA private key never reaches this machine.
231
+
232
+ **Flags.** All seven together: `--workload-cert-file`, `--terminal-cert-file` and `--tls-cert-file`, each with its key file (`--workload-key-file`, `--terminal-key-file`, `--tls-key-file`), plus `--ca-cert-file`. Never `--ca-key-file`: the CLI does not want your CA key.
233
+
234
+ **Keys and signatures.** Your CA's key must be Ed25519 or EC P-256, and it must have signed each certificate with Ed25519 or ECDSA-with-SHA-256. The two identity keys may be Ed25519 or EC P-256; the HTTPS key must be EC P-256. RSA is not supported: the sidecar cannot verify against it.
235
+
236
+ **The CLI** checks each certificate against its key, its issuer and its validity window; registers the workload and writes the settings files and the pairing secret; publishes your CA certificate as a trust anchor named `<agent>-ca`.
237
+
238
+ **The CLI does not** create a certificate authority; issue any certificate; ask for, read or store your CA private key.
239
+
240
+ **Renewal.** `aac agent renew --agent <name>` cannot reissue what it did not sign: it takes the replacements your issuer produced.
241
+
242
+ <!-- material-cases:end -->
243
+
244
+ The settings files, `sidecar-config.yaml` and `compose.env` in the agent
245
+ folder and `publisher.env` in the tenant directory, follow from what the
246
+ agent records, in both cases. They hold endpoints, identifiers, settings and
247
+ the paths of the key files, never key material. `aac init` writes them as
248
+ its last step and writes them again on any later run. The layout decides the
249
+ paths written into the sidecar configuration: `host` (the default) uses
250
+ paths on this machine, for a sidecar that runs directly on it, and
251
+ `container` uses the paths where the files are mounted inside the
252
+ containers.
253
+
254
+ `publisher.env` belongs to the tenant, and every agent of the tenant writes
255
+ it. A write rewrites its paths and poll interval for this machine (hand
256
+ edits to those are replaced), but refuses to change its tenant ID, trust
257
+ domain or URLs, because that would repoint the publisher for every agent.
258
+ The refusal names the values that differ. If the file is the stale one, for
259
+ example after you deliberately moved the tenant to new endpoints and set up
260
+ its agents again, move it aside (`mv publisher.env publisher.env.old` in the
261
+ tenant directory) and run setup again from an agent with the intended
262
+ endpoints. The admin key and the published public keys stay where they are.
263
+
264
+ ### How profiles, agents and tenant data fit together
215
265
 
216
266
  ```text
217
267
  profile (~/.aac/config) ── bound to ──> tenant
218
268
  ├── credentials: ~/.aac/credentials/<tenant-id>
219
269
  ├── tenant directory: ~/.aac/tenants/<tenant-id>/
220
- └── workspaces: ~/.aac/workspaces/<name>/, one per workload
270
+ └── agents: ~/.aac/agents/<name>/, one per workload
221
271
  ```
222
272
 
223
273
  * A **profile**, in `~/.aac/config`, names the AAC admin and data-plane
224
274
  endpoints you use and, once registration or sign-in has bound it, the one
225
275
  tenant it acts for. The trust URL and the sign-in choice are recorded in
226
- each workspace instead. "Profiles and configuration", further down,
276
+ each agent instead. "Profiles and configuration", further down,
227
277
  covers profiles in full.
228
- * The **tenant data** is shared by all of a tenant's workspaces on this
278
+ * The **tenant data** is shared by all of a tenant's agents on this
229
279
  machine: the tenant API key and the tenant-admin session in
230
280
  `~/.aac/credentials/`, and the tenant directory
231
281
  `~/.aac/tenants/<tenant-id>/` with the tenant-admin signing key, the public
232
282
  keys and certificates the publisher uploads, and `publisher.env`.
233
- * A **workspace**, in `~/.aac/workspaces/<name>/`, holds one workload's
283
+ * An **agent folder**, in `~/.aac/agents/<name>/`, holds one workload's
234
284
  material. It records the profile and the tenant it was created for and
235
- keeps them: one tenant can have many workspaces, and a workspace never
285
+ keeps them: one tenant can have many agents, and an agent never
236
286
  moves to another tenant.
237
287
 
238
288
  ### What each file is for, and what to back up
239
289
 
240
290
  The table lists every file the CLI creates, what it is for, how long it
241
- lives and whether to back it up. `<workspace>` is the workspace name
291
+ lives and whether to back it up. `<agent>` is the agent name
242
292
  (default `starter`) and `<tenant-id>` the tenant id AAC allocated.
243
293
 
244
294
  <!-- inventory-table:start -->
@@ -247,44 +297,48 @@ lives and whether to back it up. `<workspace>` is the workspace name
247
297
  | 1 | tenant_api_key | `~/.aac/credentials/<tenant-id>` | CLI data-plane calls; the sidecar's workload projection | until retired or rotated; `aac tenant reissue-api-key` | **Yes.** save a protected copy in your secret manager; loss needs `aac tenant reissue-api-key` |
248
298
  | 2 | tenant_admin_session | `~/.aac/credentials/<tenant-id>.session` | CLI admin calls | hours; `aac sso login` | No. sign in again |
249
299
  | 3 | tenant_admin_signing_key | `~/.aac/tenants/<tenant-id>/tenant-admin.pem`, `~/.aac/tenants/<tenant-id>/tenant-admin.pub.pem` | the publisher signs trust-material uploads; the public half is registered with AAC | until rotated; `aac tenant rotate-admin-key` | **Recommended.** recommended for developer tenants (loss needs `aac tenant rotate-admin-key`; a lost public half is derived from the private key); production custody belongs in an HSM/KMS, not a password manager |
250
- | 4 | root_signing_key | `~/.aac/workspaces/<workspace>/pki/root.pem`, `~/.aac/workspaces/<workspace>/pki/root.pub.pem`, `~/.aac/tenants/<tenant-id>/root-keys/<workspace>-root-v1.pub.pem` | the sidecar mints authority chains; the public half is published under the key id | until you retire its key id (root key ids are fixed per workspace name) | No. never restore the private key: a replacement workspace gets a new name and therefore a new key id, published alongside the old one until the old one is retired; its public copies are recreated from it |
251
- | 5 | development_ca | `~/.aac/workspaces/<workspace>/ca/dev-ca.key`, `~/.aac/workspaces/<workspace>/pki/dev-ca.crt`, `~/.aac/workspaces/<workspace>/pair/dev-ca.crt`, `~/.aac/tenants/<tenant-id>/spiffe-bundle/<workspace>-dev-ca.ca.pem` | signs the workload, terminal and TLS certificates; peers trust it via the published bundle | 7 days; `aac workspace renew --ca` | No. development only; reissue; a lost copy of the certificate is copied back from `pki/dev-ca.crt` |
252
- | 6 | workload_svid | `~/.aac/workspaces/<workspace>/pki/workload.key`, `~/.aac/workspaces/<workspace>/pki/workload.crt` | the sidecar's SPIFFE identity: proves on every live request that this workload holds the key behind its certificate | 1 day; `aac workspace renew` | No. development only; reissue |
253
- | 7 | terminal_attestation | `~/.aac/workspaces/<workspace>/pki/terminal.key`, `~/.aac/workspaces/<workspace>/pki/terminal.crt` | signs the receipt (terminal attestation) the sidecar issues when this workload completes a delegated request; auditors verify it offline against your published CA; kept separate from the workload key so neither can forge the other's role | 1 day; `aac workspace renew` | No. development only; reissue |
254
- | 8 | localhost_tls | `~/.aac/workspaces/<workspace>/pki/server.key`, `~/.aac/workspaces/<workspace>/pki/server.crt` | the sidecar's HTTPS listener | 1 day; `aac workspace renew` | No. development only; reissue |
255
- | 9 | outbound_ca_bundle | `~/.aac/workspaces/<workspace>/pki/outbound-ca.pem` | the sidecar verifies TLS to AAC and to itself | rebuilt by renew; `aac workspace renew` | No. derived |
256
- | 10 | pairing_secret | `~/.aac/workspaces/<workspace>/pair/pairing.secret` | the sidecar and its agent authenticate each other (same bytes in both) | until regenerated | No. regenerable; both processes must read the same file |
257
- | 11 | workspace_manifest | `~/.aac/workspaces/<workspace>/manifest.json` | the workspace's identities and progress; every `workspace` verb reads it first | for the life of the workspace | **Recommended.** cannot be recreated by any command; without it start a new workspace under a new name (see the new-computer setup procedure) |
258
- | 12 | published_public_inputs | `~/.aac/tenants/<tenant-id>/root-keys`, `~/.aac/tenants/<tenant-id>/spiffe-bundle` | the publisher's input directories: every root public key and CA certificate this tenant has published, across all workspaces | for the life of the tenant | **Recommended.** back up with the tenant directory: a replacement workspace must publish its new root key alongside a still-ACTIVE previous one (the control plane refuses a root-key set that drops every ACTIVE key at once) |
259
- | 13 | rendered_files | `~/.aac/workspaces/<workspace>/sidecar-config.yaml`, `~/.aac/workspaces/<workspace>/compose.env`, `~/.aac/tenants/<tenant-id>/publisher.env` | non-secret configuration derived from the manifest | re-rendered on demand; `aac workspace render --force` | No. derived; `aac workspace render --force` recreates them |
300
+ | 4 | root_signing_key | `~/.aac/agents/<agent>/sidecar/root.pem`, `~/.aac/agents/<agent>/sidecar/root.pub.pem`, `~/.aac/tenants/<tenant-id>/root-keys/<agent>-root-v1.pub.pem` | the sidecar mints authority chains; the public half is published under the key id | until you retire its key id (root key ids are fixed per agent name) | No. never restore the private key: a replacement agent gets a new name and therefore a new key id, published alongside the old one until the old one is retired; its public copies are recreated from it |
301
+ | 5 | development_ca | `~/.aac/agents/<agent>/keep/ca.key`, `~/.aac/agents/<agent>/sidecar/ca.crt`, `~/.aac/agents/<agent>/agent/ca.crt`, `~/.aac/tenants/<tenant-id>/spiffe-bundle/<agent>-dev-ca.ca.pem` | signs the workload, terminal and TLS certificates; peers trust it via the published bundle | 7 days; `aac agent renew --ca` | No. development only; reissue; a lost copy of the certificate is copied back from `sidecar/ca.crt` |
302
+ | 6 | workload_svid | `~/.aac/agents/<agent>/sidecar/workload.key`, `~/.aac/agents/<agent>/sidecar/workload.crt` | the sidecar's SPIFFE identity: proves on every live request that this workload holds the key behind its certificate | 1 day; `aac agent renew` | No. reissue |
303
+ | 7 | terminal_attestation | `~/.aac/agents/<agent>/sidecar/terminal.key`, `~/.aac/agents/<agent>/sidecar/terminal.crt` | signs the receipt (terminal attestation) the sidecar issues when this workload completes a delegated request; auditors verify it offline against your published CA; kept separate from the workload key so neither can forge the other's role | 1 day; `aac agent renew` | No. reissue |
304
+ | 8 | localhost_tls | `~/.aac/agents/<agent>/sidecar/server.key`, `~/.aac/agents/<agent>/sidecar/server.crt` | the sidecar's HTTPS listener | 1 day; `aac agent renew` | No. reissue |
305
+ | 9 | outbound_ca_bundle | `~/.aac/agents/<agent>/sidecar/outbound-ca.pem` | the sidecar verifies TLS to AAC and to itself | rebuilt by renew; `aac agent renew` | No. derived |
306
+ | 10 | pairing_secret | `~/.aac/agents/<agent>/agent/pairing.secret` | the sidecar and its agent authenticate each other (same bytes in both) | until regenerated | No. regenerable; both processes must read the same file |
307
+ | 11 | agent_record | `~/.aac/agents/<agent>/record.json` | the agent's identities and progress; every `aac agent` verb reads it first | for the life of the agent | **Recommended.** cannot be recreated by any command; without it start a new agent under a new name (see the new-computer setup procedure) |
308
+ | 12 | published_public_inputs | `~/.aac/tenants/<tenant-id>/root-keys`, `~/.aac/tenants/<tenant-id>/spiffe-bundle` | the publisher's input directories: every root public key and CA certificate this tenant has published, across all agents | for the life of the tenant | **Recommended.** back up with the tenant directory: a replacement agent must publish its new root key alongside a still-ACTIVE previous one (the control plane refuses a root-key set that drops every ACTIVE key at once) |
309
+ | 13 | settings_files | `~/.aac/agents/<agent>/sidecar-config.yaml`, `~/.aac/agents/<agent>/compose.env`, `~/.aac/tenants/<tenant-id>/publisher.env` | non-secret settings derived from the agent's record | written again on demand; `aac init --profile <profile> --agent <agent>` | No. derived; `aac init --profile <profile> --agent <agent>` writes them again |
260
310
  <!-- inventory-table:end -->
261
311
 
262
312
  In short: back up the tenant API key and the whole tenant directory while
263
313
  the machine is healthy. Everything else is regenerated.
264
314
 
265
- ### Inspect and maintain a workspace
315
+ ### Inspect and maintain an agent
266
316
 
267
317
  ```bash
268
- aac workspace status --workspace starter --output table # what exists, expiry, permissions, next command
269
- aac workspace status --workspace starter --remote # also: is the public trust material visible?
270
- aac workspace renew --workspace starter # fresh leaf keys and certificates; old ones archived
271
- aac workspace render --workspace starter --layout container --force # container path layout
318
+ aac agent status --agent starter --output table # what exists, expiry, permissions, next command
319
+ aac agent status --agent starter --remote # also: is the public trust material visible?
320
+ aac agent renew --agent starter # replace the short-lived certificates; old ones archived
321
+ aac agent list # every agent on this machine, with its case
322
+ aac init --profile stage --agent starter --layout container # write the settings again, container paths
272
323
  ```
273
324
 
274
325
  `status` works offline by default and exits with code 3 when material is
275
326
  missing, expired or unsafely permissioned. `renew` reissues the one-day
276
327
  certificates with fresh keys, and reissues the development CA only when it
277
328
  is expired or within a day of expiry (or when `--ca` is given); a new CA is
278
- published under the next anchor id and needs the publisher restarted.
279
- `render` never touches keys and refuses to overwrite rendered files unless
280
- `--force` is given.
329
+ published under the next anchor id and needs the publisher restarted. For an
330
+ agent whose own issuer signed its certificates, `renew` cannot reissue
331
+ anything: it takes the replacements your issuer produced, through the same
332
+ flags `aac init` accepts.
333
+ Re-running `aac init` writes the settings files again and never touches a
334
+ key.
281
335
 
282
336
  `status` also names one next step, `next_command`. When material is
283
337
  missing, it is the fix for the first missing item: restore it from your
284
- backup, recreate a lost public copy from the file it copies, renew, or
285
- render. Otherwise it is renewal when a certificate is due. After the step,
338
+ backup, recreate a lost public copy from the file it copies, renew, or run
339
+ setup again. Otherwise it is renewal when a certificate is due. After the step,
286
340
  run `status` again. Commands it names that change your tenant carry the
287
- workspace's own `--tenant-id` and `--admin-url`, so a value left in
341
+ agent's own `--tenant-id` and `--admin-url`, so a value left in
288
342
  `AAC_TENANT_ID` or `AAC_ADMIN_URL` cannot aim them at another tenant. The
289
343
  file recipes use `openssl`, which must be OpenSSL 1.1.1 or newer: the
290
344
  `openssl` that ships with macOS cannot read Ed25519 keys, so install a
@@ -296,32 +350,32 @@ and refuses with the full list if one already exists. `aac init` never
296
350
  installs or replaces a tenant-admin key for an existing tenant: the key on
297
351
  this machine must already be the tenant's active admin key, and replacing
298
352
  it is always the deliberate `aac tenant rotate-admin-key` command, never a
299
- side effect of setup. A second workspace for the same tenant
300
- (`--workspace other`) reuses the tenant-admin key and gets its own root key
353
+ side effect of setup. A second agent for the same tenant
354
+ (`--agent other`) reuses the tenant-admin key and gets its own root key
301
355
  id.
302
356
 
303
357
  ### What to do when keys and certificates expire
304
358
 
305
359
  It is the certificates that expire, and renewing replaces their keys with
306
- them. `aac workspace status` shows when each certificate runs out and flags
360
+ them. `aac agent status` shows when each certificate runs out and flags
307
361
  it before it does: six hours ahead for the one-day certificates, a day
308
362
  ahead for the development CA.
309
363
 
310
364
  | Material | Lasts | When it runs out | What to do |
311
365
  |---|---|---|---|
312
- | Workload, terminal-attestation and localhost TLS certificates | 1 day | the sidecar can no longer prove its identity, sign receipts or serve HTTPS | `aac workspace renew --workspace <name>`, then restart the sidecar so it loads them |
313
- | Development CA | 7 days | certificates it signed stop being trusted, and no new ones can be issued | `renew` also replaces the CA when it is expired or within a day of expiry, or when `--ca` is given, and then reissues every certificate under it: restart the publisher so the new CA is published, restart the sidecar and anything else that trusted the old CA, and confirm with `aac workspace status --workspace <name> --remote` |
366
+ | Workload, terminal-attestation and localhost TLS certificates | 1 day | the sidecar can no longer prove its identity, sign receipts or serve HTTPS | `aac agent renew --agent <name>`, then restart the sidecar so it loads them |
367
+ | Development CA | 7 days | certificates it signed stop being trusted, and no new ones can be issued | `renew` also replaces the CA when it is expired or within a day of expiry, or when `--ca` is given, and then reissues every certificate under it: restart the publisher so the new CA is published, restart the sidecar and anything else that trusted the old CA, and confirm with `aac agent status --agent <name> --remote` |
314
368
  | Tenant-admin session | hours | administration commands ask you to sign in again | `aac sso login` |
315
369
  | Tenant API key, tenant-admin signing key, root signing key | do not expire | — | replaced only on purpose: see "Keys" and "Setting up aac-cli on a new computer" |
316
370
 
317
371
  A simple routine: when you start work, run
318
- `aac workspace status --workspace <name>`, and when it names renewal, run
319
- `aac workspace renew --workspace <name>` and restart the sidecar. About once
372
+ `aac agent status --agent <name>`, and when it names renewal, run
373
+ `aac agent renew --agent <name>` and restart the sidecar. About once
320
374
  a week that renewal also replaces the development CA (`renew` then reports
321
375
  `republication_required: true`): restart the publisher, the sidecar and the
322
376
  agent, and anything else that trusted the old CA. Renewing is safe to
323
377
  repeat, but it is not a no-op: every run issues fresh keys and moves the old
324
- files to the workspace's `archive/` directory, so whatever reads them must
378
+ files to the agent's `archive/` directory, so whatever reads them must
325
379
  reload. With the
326
380
  [AAC Compose starter](https://github.com/CascadeAuth/aac-compose-starter),
327
381
  `./starter up` recreates the containers so they load the new files; it
@@ -400,12 +454,12 @@ profile; `aac profile show` prints it, and the example below uses
400
454
  directory the publisher runs from. Then run step 3 with
401
455
  `--tenant-admin-key-file tenant-admin.pem` added.
402
456
 
403
- 3. Run the guided setup with a **new workspace name**. A developer tenant
457
+ 3. Run the guided setup with a **new agent name**. A developer tenant
404
458
  passes its sign-in choice, so an expired session is renewed without a
405
459
  prompt:
406
460
 
407
461
  ```bash
408
- aac init --profile stage --workspace laptop-2 --idp github \
462
+ aac init --profile stage --agent laptop-2 --idp github \
409
463
  --trust-url https://trust.stage.cascadeauth.dev
410
464
  ```
411
465
 
@@ -415,7 +469,7 @@ profile; `aac profile show` prints it, and the example below uses
415
469
  the `aac sso login --idp-url …` command from step 1 first:
416
470
 
417
471
  ```bash
418
- aac init --profile stage --workspace laptop-2 \
472
+ aac init --profile stage --agent laptop-2 \
419
473
  --trust-url https://trust.stage.cascadeauth.dev
420
474
  ```
421
475
 
@@ -427,18 +481,19 @@ profile; `aac profile show` prints it, and the example below uses
427
481
  fresh after the revocations in step 2 holds only the new key, which is
428
482
  accepted because no other key is active any more.
429
483
 
430
- ### Why the replacement workspace needs a new name
484
+ ### Why the replacement agent needs a new name
431
485
 
432
- The workspace name is baked into two identifiers that are published for
433
- the whole tenant: the root key id `<workspace>-root-v1` and the development
434
- CA anchor id `<workspace>-dev-ca`. Other parties look up your keys and
486
+ The agent name is baked into two identifiers that are published for
487
+ the whole tenant: the root key id `<agent>-root-v1` and the CA
488
+ anchor id (`<agent>-dev-ca` for a development CA the CLI created,
489
+ `<agent>-ca` for your own issuer's). Other parties look up your keys and
435
490
  certificates by those ids. AAC therefore never accepts new key material
436
491
  under an id that has already been published: a key id names one key, for
437
492
  good. A new machine has to generate new keys, so it has to publish them
438
- under new ids, which means a new workspace name. The new ids are published
493
+ under new ids, which means a new agent name. The new ids are published
439
494
  alongside the old ones until the old ones are retired.
440
495
 
441
- Reusing the old workspace name on the new machine is refused on purpose:
496
+ Reusing the old agent name on the new machine is refused on purpose:
442
497
  the restored tenant directory still holds that name's published root key,
443
498
  and `init` never generates different key material under an existing key
444
499
  id. The development certificates and the pairing secret are regenerated by
@@ -544,7 +599,7 @@ output empty and take no `--output`.
544
599
  | `0` | Success. |
545
600
  | `1` | AAC or the identity provider rejected the request. |
546
601
  | `2` | Usage error: an invalid flag, value or flag combination. |
547
- | `3` | A local configuration or state problem: profile, credential file, cached session or workspace. |
602
+ | `3` | A local configuration or state problem: profile, credential file, cached session or agent. |
548
603
  | `4` | Transport failure: an endpoint could not be reached. |
549
604
 
550
605
  If AAC asks you to slow down, the command shows the interval to wait. The
@@ -640,7 +695,7 @@ A developer tenant set up with `aac init` keeps its tenant-admin key in its
640
695
  tenant directory, where the publisher's configuration points. To replace a
641
696
  lost key there, write the new pair in place, readable only by you, sign in,
642
697
  register the new public half, and then recreate every publisher container.
643
- Pass the tenant id and admin URL explicitly, as `aac workspace status`
698
+ Pass the tenant id and admin URL explicitly, as `aac agent status`
644
699
  does, so the change cannot land on another tenant. The `openssl` commands
645
700
  need OpenSSL 1.1.1 or newer, which macOS does not ship:
646
701