Skip to main content

Module delegation

Module delegation 

Source
Expand description

Agent Delegation Protocol 1.0 types and validation helpers.

Delegation events are ordinary Agent Identity envelopes whose actor is a controller key for an HTTPS principal document.

Structs§

Controller
Same type for active and retired bindings. Missing delegation means signing-only.
DelegationAcceptance
DelegationCredential
DelegationEventsResponse
DelegationGrantPayload
DelegationPolicy
DelegationQueryRequest
DelegationQueryResponse
DelegationRevokePayload
DelegationServiceDiscovery
DelegationServiceEndpoints
DelegationStatusDocument
DelegationSummary
PrincipalDescriptor
PrincipalDocument
PrincipalLink

Enums§

DelegationAuthority
DelegationPayload
DelegationStatus

Constants§

DELEGATION_GRANT
DELEGATION_REVOKE
PROTOCOL

Functions§

delegation_grant_event
delegation_revoke_event
is_principal_alias
Reports whether url is an alias the principal itself acknowledges. Any origin can redirect to any principal, so an alias must not be shown as a name for the principal unless it is listed here.
materialize_delegation_credential
Materializes an already accepted event with trusted previous state and the service’s actual acceptance time. This helper does not authorize the event.
validate_controller
validate_controller_enumeration
Per-result check; caller authenticates the actor and resolves the document.
validate_delegation_acceptance
Caller also enforces fresh HTTPS, live Identity replay rules, and atomic persistence.
validate_delegation_envelope
validate_delegation_event_authority
Pre-signing policy check over trusted document/state. No signature, HTTP, cache-age, live timestamp-window, or nonce verification is performed.
validate_delegation_grant_payload
validate_delegation_id
validate_delegation_query_request
A public delegation query is an existence check and must include both subject and principal_id. Omitting either side makes it an enumeration query, which services must authorize before answering; pass allow_enumeration when building such an authorized request. limit defaults to 20; services SHOULD cap it at 100.
validate_delegation_revoke_payload
validate_delegation_use
Audience/status/time only, after signature/history checks. Caller still authenticates the subject and enforces scopes and constraints.
validate_historical_delegation
Caller authenticates acceptance evidence and previous state. This checks the evidence’s hash binding and historical policy, not current status or application constraints.
validate_principal_document
validate_principal_resolution
Checks the authoritative-read rule of Agent Delegation Section 3: a principal document binds controller keys only when it is read at its own id. A document served anywhere else is a copy; its controllers must be discarded and document.id resolved instead.