Skip to content

4. Request Schema ​

Status: draft, matches packages/authorization/src/normalize.ts.

4.1 Fields ​

All fields are required. amount and approvalRef may be null. Unknown fields MUST be rejected.

FieldTypeRule
requestIdidentifier
transactionIdidentifierLinks the request to a business transaction
organizationId, tenantIdidentifier
actoridentifierMust be the authority's principal or agent
operationidentifierMust be in the authority's permittedActions
resourceidentifierMust be in resourceScope, or the scope is *
amount{minor, currency} or nullminor is an integer ≥ 0; currency is ISO 4217
parametersobjectValues MUST be canonically encodable (section 5). Floats are rejected.
authorityRef{authorityId, version}
policyRef{policyId, version}
approvalRefidentifier or nullAn approval record, if any
idempotencyKeyidentifierSame key, same content, means the same action
protocolVersion"1.0"

4.2 Digest ​

requestDigest = SHA-256("DIP-REQUEST-V1" ‖ 0x00 ‖ canonical(request without approvalRef)).

approvalRef is excluded because an approval must be created for the content before its reference exists. A change to any other field changes the digest and invalidates any approval for it.

4.3 Normalization ​

Normalization MUST reject ambiguous input rather than correct it. Equivalent requests MUST produce identical canonical bodies and digests. Parameter order MUST NOT affect the digest.

4.4 Errors ​

Malformed input raises a typed error with a stable code (INVALID_FIELD, UNKNOWN_FIELD, MISSING_FIELD, INVALID_PARAMETERS, UNSUPPORTED_PROTOCOL_VERSION). Malformed input never produces a decision.

Released under the Apache License 2.0.