Record the verified principal type on approver entries (schema v4)
An entry stored subject_id, assurance and evidence_ref but nothing about what kind of principal bound the approval, and subject_id is a naming convention rather than a verified claim. /entries is not restricted by principal type — only /consume is — and the approval-engine-operator client holds approval:approve, so a service can supply approver evidence today. Whether it may is gate-house doctrine; that it is legible is ours. Add entries.principal_type, populate it from the verified token, surface it on the object and the audit evidence path (not the claim, which stays least-disclosure), and migrate v3 stores leaving legacy rows null rather than back-filling a claim nobody made. Also corrects two statements in the requirements issued to informed-decision: agent tokens are not barred from approval:approve, and an empty assurance object is accepted rather than refused. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HyybaE7DUXrWYrhbnESCTe Assistant: claude-code Assistant-Model: opus Assistant-Process: 1275879@bnt-lap001 Assistant-Session: eb464208-f821-41b2-bc5a-a6c33d92a8ad
This commit is contained in:
parent
8b8ada6c4a
commit
31da1af5e4
6 changed files with 160 additions and 20 deletions
|
|
@ -20,8 +20,17 @@ cross-tenant reads and mutations are rejected before object lookup.
|
|||
| explicit heartbeat | `approval:emit` |
|
||||
|
||||
Create additionally requires `binding.actor == sub`. Approval-entry subject,
|
||||
assurance, and evidence reference are derived from the verified JWT, never the
|
||||
request body. KeyCape owns client registration and scope grants; approval-engine
|
||||
assurance, evidence reference, and **principal type** are derived from the
|
||||
verified JWT, never the request body.
|
||||
|
||||
`principal_type` is recorded on the entry (schema v4) because `subject_id`
|
||||
alone cannot answer what kind of principal bound the approval — `user:alice` is
|
||||
a naming convention, not a verified claim. This engine does not restrict
|
||||
`/entries` to human principals: whether a service or agent may supply approver
|
||||
evidence is approval doctrine and belongs to `gate-house`, and the
|
||||
`approval-engine-operator` registration holds `approval:approve` today. What
|
||||
this engine owes is that the evidence chain says which it was. Entries written
|
||||
before v4 stay `null` rather than being back-filled into a claim nobody made. KeyCape owns client registration and scope grants; approval-engine
|
||||
only verifies and enforces them. Requested registrations are:
|
||||
|
||||
- audience/resource server `approval-engine` with the scopes above;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue