Skip to main content

Crate ic_auth_protocol_types

Crate ic_auth_protocol_types 

Source
Expand description

Passive portable authentication and delegation contracts, independent of runtime, storage and Candid. Principal comes directly from its canonical Types owner; external IC APIs convert at their boundary. Transport schemas belong to endpoint adapters, outside these domain contracts.

Decoding these values does not verify a proof or establish authority. Hosts must obtain expected audience, caller, time and issuer policy independently. Application credentials are not IC ingress delegations.

Modules§

limits
Structural protocol ceilings shared by validation and bounded transport. Hosts may impose tighter policy; transport allocation budgets are separate.

Structs§

AudienceId
Exact network-qualified audience, with existing protocol field labels. The host owns the meaning and trusted source of both identifiers; this type contains no fleet topology, membership, derivation or installation policy.
AuthRequestMetadata
Caller-provided request correlation and requested lifetime, not authorization.
AuthRole
Canonical 1..=64-byte role label, checked at construction and deserialization. The grammar matches the existing signed protocol; it adds no case folding, normalization, built-in roles or implicit role authority.
CanonicalId
Exactly 32 identity bytes, represented as lowercase hexadecimal on the wire. No sentinel bytes are reserved by this protocol. A host must compare this value with its protected identity, never enroll trust from a client claim.
ChainKeyBatchHeaderV1
Canonically signed batch header; all identities and epochs remain untrusted until matched against the host’s protected root policy.
ChainKeyBatchWitnessV1
Ordered Merkle inclusion path; verification bounds its length before hashing.
ChainKeyDelegationCertV1
Issuer authority committed as a leaf in a root-signed batch. This delegates application credential authority, not IC ingress identity or resource ownership.
ChainKeyKeyId
Chain-key identifier within the separately selected algorithm and network.
ChainKeyRootSignatureV1
Root signature with submitted key metadata. The public key is never a trust anchor by itself; verification compares it with independently enrolled policy.
DelegatedRoleGrant
Checked labels only; grant count, strict ordering and authority remain engine/host policy. Serialized labels retain their exact text representation.
DelegationCert
Application-facing delegation certificate checked against the root proof. Its issue time is consistency metadata, not independently root-signed authority.
DelegationProof
Unverified delegation certificate paired with its root authority proof.
IcCanisterSignatureProofV1
IC canister-signature material, checked against the delegated issuer binding.
IcChainKeyBatchSignatureProofV1
Signed batch and Merkle inclusion proof for one issuer’s delegation.
PortableClaims
Decoded signed material, not verified identity, enrollment or permission. Login windows survive renewal unchanged; admission expiry is distinct from both the absolute login deadline and the receiver’s session lease.
PortableCredential
Unauthenticated portable credential transport. claims contains the exact canonical signed bytes, not a Candid encoding of PortableClaims. Hosts must bound outer decoding and verify against protected enrollment.
Principal
An opaque IC identity containing at most 29 significant bytes.
ScopeLabel
Immutable 1..=64-byte scope label. Shape grants no authority. Colon-separated segments start with a lowercase ASCII letter or digit; subsequent bytes may also be underscore or hyphen. No normalization occurs.

Enums§

AdmissionRefusal
A receiver refusal. Only NotYetValid identifies a future-start retry hint; it grants no clock grace, new issuance, deadline extension or authorization. The caller owns bounded retries of the same credential and login generation.
ChainKeyAlgorithm
Supported root chain-key signature algorithm.
ChainKeyBatchWitnessStepV1
Position of a sibling relative to the running Merkle hash.
DelegationAudience
Claimed application audience; verification compares it with protected policy.
IdentifierError
Invalid protocol identifier syntax. This says nothing about authorization.
IssuerProofAlgorithm
Proof mechanism a root delegation permits the issuer to use.
IssuerProofBinding
Delegated key binding; the corresponding issuer identity is carried separately.
LogoutResult
Acknowledges only this destination’s committed revocation, never global logout.
LogoutUnavailable
No successful revocation is implied; transport failures also remain unknown.
PortableMechanism
Claimed proof mechanism. Only protected enrollment can authorize its use.
PortableProof
Transport selects proof material, never trusted authority or signing custody. Ed25519 signatures are exactly 64 bytes at verification; issuer keys are not carried here. Certified proofs reuse the existing Root and IC proof owners.
RootProof
Unverified root-authority proof; trusted root keys come from host enrollment.
ScopeLabelError
A scope label’s grammar failure. Offsets and lengths count UTF-8 bytes.
SessionReadRefusal
Proof-free session-read refusal; detailed host diagnostics are not transported.