flex-auth/schemas/action_authorization.schema.json

72 lines
2.6 KiB
JSON
Raw Normal View History

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://flex-auth.netkingdom/schemas/action_authorization.schema.json",
"title": "ActionAuthorization",
Accept ActionAuthorization deferral; fix the state-hub authority constant approval-engine filed APPROVAL-IN-0002: secrets-engine built its PEP validator against our ActionAuthorization schema, pointed it at GET /v1/approvals/{id}/claim, and it rejects every response. Both envelopes declare schema_version 0.1, so it fails late and reads like an approval-engine outage rather than a contract mismatch. FLEX-DEC-2026-006 accepts the deferral and argues against flex-auth's own proposal. The composed object had the PIP republish our decision, which crosses the same layer boundary we invoked to decline authentication evidence and to win section 17's schema. The claim-plus-DecisionEnvelope split drops no check; each verification lands on the layer that owns it. approval-engine asked, before the decision, whether the open G3 finding argues for ratifying now. It does not: G3 is already closed the other way. FLEX-WP-0019 added lifetime to the DecisionEnvelope itself, required on every allow by schema conditional, published 2026-09-02. The trigger resolved by adding a field rather than by composition, so the decision stands alone and needs no bundle. The provenance.authority == state-hub constant is our defect and is fixed at source. It came from examples/caring/action_authorization.json, which contradicted the same contract's ownership section. That fixture now names approval-engine as the approval fact's authority and flex-auth as the decision's, and its stale secrets-engine.lifecycle pin is corrected to the reserved coordinate from FLEX-DEC-2026-005. The contract doc and schema are marked deferred-not-withdrawn so no other consumer builds a validator against them. The execute-time half is untouched: /v1/check, binding, the canonical digest, and flex-auth.decision-record.v1 stay published. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JTbVXpEiXA7mNJVpDnEPcB Assistant: claude-code Assistant-Model: opus Assistant-Process: 412054@bnt-lap001 Assistant-Session: 3968fae1-8d59-4209-9bd6-c22594b8ab19
2026-09-06 01:30:04 +02:00
"description": "DEFERRED, NOT WITHDRAWN (FLEX-DEC-2026-006, 2026-09-06). Proposed durable approval envelope for one exact authorization request; never ratified. GH-DEC-2026-003 named approval-engine's approval-claim as the step-1 artifact instead, and a PEP validates across that claim and flex-auth's DecisionEnvelope. Do not validate an approval-claim response against this schema. Live evaluation remains POST /v1/check.",
"type": "object",
"additionalProperties": false,
"required": ["schema_version", "id", "status", "request", "validity", "approvals", "decision"],
"properties": {
"schema_version": {"const": "0.1"},
"id": {"type": "string", "format": "uuid"},
"status": {
"enum": ["pending", "approved", "denied", "superseded", "expired", "revoked"]
},
"superseded_by": {
"type": ["string", "null"],
"format": "uuid"
},
"request": {"$ref": "https://flex-auth.netkingdom/schemas/check_request.schema.json"},
"validity": {"$ref": "#/$defs/validity"},
"approvals": {"$ref": "#/$defs/approvals"},
"decision": {
"allOf": [
{"$ref": "https://flex-auth.netkingdom/schemas/decision_envelope.schema.json"},
{"required": ["binding"]}
]
},
"provenance": {"type": "object", "additionalProperties": true}
},
"allOf": [
{
"if": {"properties": {"status": {"const": "superseded"}}},
"then": {"required": ["superseded_by"]}
}
],
"$defs": {
"validity": {
"type": "object",
"additionalProperties": false,
"required": ["expires_at"],
"properties": {
"not_before": {"type": "string", "format": "date-time"},
"expires_at": {"type": "string", "format": "date-time"}
}
},
"approvals": {
"type": "object",
"additionalProperties": false,
"required": ["required_count", "entries"],
"properties": {
"required_count": {"type": "integer", "minimum": 1},
"entries": {
"type": "array",
"uniqueItems": true,
"items": {"$ref": "#/$defs/approval_entry"}
}
}
},
"approval_entry": {
"type": "object",
"additionalProperties": false,
"required": ["subject_id", "approved_at"],
"properties": {
"subject_id": {"type": "string", "minLength": 1},
"approved_at": {"type": "string", "format": "date-time"},
"assurance": {"type": "string", "minLength": 1},
"evidence_ref": {"type": "string", "minLength": 1}
}
}
}
}