[team] Review fixes: a deployment ticket and a MAC on target.request, an unknown author is unsatisfiable under others, a signed request cannot be refused afterwards; TEAM.md limits; v0.18.1
This commit is contained in:
+24
-3
@@ -1,4 +1,4 @@
|
||||
# Team vaults, policies and team signing (core 0.18.0)
|
||||
# Team vaults, policies and team signing (core 0.18.0; review fixes 0.18.1)
|
||||
|
||||
A **team vault** is a `.custos` file that a small team (1 to 32 people) shares: the team's release-signing keys,
|
||||
its target credentials, its external-signer credentials and its approval policy. Each member opens it with the
|
||||
@@ -159,7 +159,9 @@ its own production releases (the `others` rule needs two members); when a second
|
||||
1. No rule for `env`: `UnknownEnv`.
|
||||
2. `approvals == 0`: `Allowed { key_role: Test }`.
|
||||
3. Eligible = roster members in `approvers` (or all); minus the author when `others` and the roster has ≥ 2 members.
|
||||
The author is the member whose id equals `author` or whose handles contain it.
|
||||
The author is the member whose id equals `author` or whose handles contain it. Under `others` with 2+ members,
|
||||
an author no member is (or an empty one) is `Unsatisfiable` (core 0.18.1): the rule cannot exclude someone it
|
||||
cannot recognise, so it refuses instead of letting anyone approve.
|
||||
4. Counted = distinct eligible members among `approvers` given. Members not on the roster, ineligible members and
|
||||
duplicates are not counted (and listed in `ignored`).
|
||||
5. Counted ≥ `approvals`: `Allowed { key_role: Release }`. Eligible < `approvals`: `Unsatisfiable` (no set of
|
||||
@@ -274,13 +276,32 @@ layer's bytes, which are this payload.
|
||||
|
||||
A target credential is handed to the Fabrica server for one deployment: `team_target_release(target id, request,
|
||||
deployment, now)` returns the plaintext to seal, only when the target's `project` and `env` equal the deployment's,
|
||||
and records `target-released` with the deployment's request hash. One release per (target, deployment): a second
|
||||
**and the request's `mac` was made with that deployment's ticket** (core 0.18.1), and records `target-released`
|
||||
with the deployment's request hash.
|
||||
|
||||
**The ticket.** `team_sign` makes 32 random bytes per signed request, keeps them in the team body (`tickets`, 25
|
||||
hours) and puts them in the reply (`"ticket"`, base64), which only the requester can open. A `target.request` ends
|
||||
with `"mac":"<base64>"`: HMAC-SHA256(ticket, `"custos team target v1\0"` ‖ the canonical request up to and including
|
||||
`"expires":N`, without the closing brace). Knowing a deployment's hash (the service stores every request text; a
|
||||
proof names it) is not enough: without the ticket nobody else, not the service and not another connection, can ask
|
||||
for its credentials or use up its one release. One release per (target, deployment): a second
|
||||
call is `Replayed`. The app seals it to the server's one-time key (`team-target:<id>`); the service hands the box
|
||||
out once, to the caller that asked (Custos `docs/27_team_vault.md`).
|
||||
|
||||
`kind`: `ssh-key` (an OpenSSH private key), `winrm` (user and password), `openssh` (user and password),
|
||||
`registry` (a Docker registry token), `kubeconfig` (the kubeconfig text). `secret` ≤ 64 KiB.
|
||||
|
||||
## Limits (known, not fixed in 0.18.x)
|
||||
|
||||
- **Every member holds the team's secrets in their Custos**: the team identity, the release keys and the credentials
|
||||
are in the body every member decrypts. Custos never hands them out, but a member running a modified build of the
|
||||
public core can copy them before they are removed, and then sign directly, write proofs, or build a fork at a higher
|
||||
epoch for the remaining members, which `member_note_team` would accept as current. Removing a member you no longer
|
||||
trust means a new team (new identity, new keys), not only a new epoch.
|
||||
- **Any member can change the policy.** `team_set_rule` is one member's action (audited as `policy-set`, signed by the
|
||||
identity). A member who loosens production and then signs their own release passes `verify_proof`. Policy changes
|
||||
that need the current policy's approvals are future work; until then, review the team audit.
|
||||
|
||||
## Crates
|
||||
|
||||
`custos-team` (pure): member keys, wrapping, policy, request, statements, proof, envelopes, on `ed25519-dalek`,
|
||||
|
||||
Reference in New Issue
Block a user