Skip to content

3. Authority Declaration ​

Status: draft, matches packages/authority/src/body.ts.

3.1 Purpose ​

An authority declaration states what a principal, or an agent acting for them, may do, within limits, for a period. It is the only source of authority.

3.2 Fields ​

All fields are required. Unknown fields MUST be rejected.

FieldTypeRule
authorityIdidentifier1–128 characters from A-Za-z0-9._:-
versioninteger≥ 1, contiguous per authorityId
organizationId, tenantIdidentifier
issueridentifierDescriptive. Not a trust input.
principalidentifier
agentidentifier or nullAgent acting under the principal
permittedActionslist of identifiersStrictly ascending, no duplicates
resourceScopelist of identifiers, or ["*"]* MUST be the only entry
maxAmountMinorinteger0 ≤ value ≤ 2^53−1, in minor units
currencieslist of ISO 4217 codesStrictly ascending
approvalAboveMinorinteger or nullAmounts strictly above need approval
approvalActionslist of identifiersOperations that always need approval
approverKeyIdslist of identifiersKeys allowed to approve this authority's requests
validFrom, validUntilUTC time, YYYY-MM-DDTHH:MM:SSZvalidFrom MUST precede validUntil. validUntil is exclusive.
delegatedFrom{authorityId, version} or nullSee 3.5
delegationAllowedbooleanWhether this authority may be a delegation parent
policyId, policyVersionidentifier, integer ≥ 1Policy this authority is bound to
protocolVersion"1.0"
signatureAlgorithm"Ed25519"
signingKeyIdidentifierMust name a trust root

3.3 Signature ​

The declaration is signed as Ed25519(domain "DIP-AUTHORITY-V1" ‖ canonical(body)). The signature is a 86-character base64url string without padding (see section 12).

3.4 Publication ​

Versions are published in order. A version MUST NOT be replaced. Publication MUST fail if the signature does not verify under a trust root that is ACTIVE.

3.5 Delegation ​

A declaration with delegatedFrom is valid only while its parent is in good standing, and only if it is within the parent's bounds: same organization, tenant and principal; maxAmountMinor ≤ parent's; permittedActions, currencies, resourceScope and approverKeyIds each a subset of the parent's; validity window inside the parent's. The parent MUST have delegationAllowed true. Delegation depth MUST NOT exceed 8.

3.6 Revocation ​

A revocation is a signed record, Ed25519(domain "DIP-REVOCATION-V1" ‖ canonical({authorityId, version, revokedAt, signingKeyId})). A version can be revoked once. Revoking a version does not affect later versions.

3.7 Semantics ​

StateAuthorization result
MissingDENY (AUTHORITY_NOT_FOUND)
Invalid signature or unknown keyDENY
Revoked version or revoked signing keyDENY
Superseded by a later versionDENY (AUTHORITY_SUPERSEDED)
Before validFrom or at/after validUntilDENY
Insufficient for the requestDENY (see section 6)

Released under the Apache License 2.0.