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.
- {aac_cli-0.1.6/aac_cli.egg-info → aac_cli-0.2.0}/PKG-INFO +185 -130
- {aac_cli-0.1.6 → aac_cli-0.2.0}/README.md +184 -129
- {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli/__init__.py +1 -1
- aac_cli-0.2.0/aac_cli/agent_cli.py +674 -0
- aac_cli-0.1.6/aac_cli/workspace_health.py → aac_cli-0.2.0/aac_cli/agent_health.py +144 -97
- aac_cli-0.1.6/aac_cli/workspace_layout.py → aac_cli-0.2.0/aac_cli/agent_layout.py +191 -120
- aac_cli-0.1.6/aac_cli/workspace_manifest.py → aac_cli-0.2.0/aac_cli/agent_record.py +48 -36
- {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli/cli.py +4 -4
- {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli/config_render.py +115 -72
- {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli/dev_material.py +268 -6
- {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli/init_cli.py +759 -374
- aac_cli-0.2.0/aac_cli/material_cases.py +175 -0
- {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli/reference.py +41 -12
- {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli/secure_files.py +1 -1
- aac_cli-0.2.0/aac_cli/supplied_material.py +293 -0
- {aac_cli-0.1.6 → aac_cli-0.2.0/aac_cli.egg-info}/PKG-INFO +185 -130
- {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli.egg-info/SOURCES.txt +6 -4
- {aac_cli-0.1.6 → aac_cli-0.2.0}/pyproject.toml +1 -1
- aac_cli-0.1.6/aac_cli/workspace_cli.py +0 -544
- {aac_cli-0.1.6 → aac_cli-0.2.0}/LICENSE +0 -0
- {aac_cli-0.1.6 → aac_cli-0.2.0}/MANIFEST.in +0 -0
- {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli/__main__.py +0 -0
- {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli/admin_key_pem.py +0 -0
- {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli/api_key_rotation_state.py +0 -0
- {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli/config.py +0 -0
- {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli/idp_recovery.py +0 -0
- {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli/profiles.py +0 -0
- {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli/registration_state.py +0 -0
- {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli/sso_login.py +0 -0
- {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli.egg-info/dependency_links.txt +0 -0
- {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli.egg-info/entry_points.txt +0 -0
- {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli.egg-info/requires.txt +0 -0
- {aac_cli-0.1.6 → aac_cli-0.2.0}/aac_cli.egg-info/top_level.txt +0 -0
- {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.
|
|
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 `--
|
|
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
|
|
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
|
|
112
|
-
|
|
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
|
-
|
|
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/
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
identities
|
|
128
|
-
|
|
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
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
* `~/.aac/credentials/<tenant-id>` is the tenant API key. The
|
|
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
|
-
**
|
|
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
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
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
|
|
146
|
+
### What an agent folder is for, and how to use it
|
|
144
147
|
|
|
145
|
-
|
|
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
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
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
|
|
153
|
-
|
|
154
|
-
|
|
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
|
|
158
|
-
aac
|
|
159
|
-
aac
|
|
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
|
-
|
|
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 --
|
|
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
|
|
170
|
-
|
|
171
|
-
`publisher.env`, which every
|
|
172
|
-
changes that file's endpoints, so
|
|
173
|
-
trust URL stops at its last step and has to be set up again
|
|
174
|
-
name.
|
|
175
|
-
|
|
176
|
-
`--
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
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
|
-
└──
|
|
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
|
|
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
|
|
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
|
-
*
|
|
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
|
|
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. `<
|
|
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/
|
|
251
|
-
| 5 | development_ca | `~/.aac/
|
|
252
|
-
| 6 | workload_svid | `~/.aac/
|
|
253
|
-
| 7 | terminal_attestation | `~/.aac/
|
|
254
|
-
| 8 | localhost_tls | `~/.aac/
|
|
255
|
-
| 9 | outbound_ca_bundle | `~/.aac/
|
|
256
|
-
| 10 | pairing_secret | `~/.aac/
|
|
257
|
-
| 11 |
|
|
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
|
|
259
|
-
| 13 |
|
|
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
|
|
315
|
+
### Inspect and maintain an agent
|
|
266
316
|
|
|
267
317
|
```bash
|
|
268
|
-
aac
|
|
269
|
-
aac
|
|
270
|
-
aac
|
|
271
|
-
aac
|
|
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
|
-
|
|
280
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
300
|
-
(`--
|
|
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
|
|
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
|
|
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
|
|
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
|
|
319
|
-
`aac
|
|
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
|
|
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
|
|
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 --
|
|
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 --
|
|
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
|
|
484
|
+
### Why the replacement agent needs a new name
|
|
431
485
|
|
|
432
|
-
The
|
|
433
|
-
the whole tenant: the root key id `<
|
|
434
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|