API Reference RequestSeal v#0.2.0

Copy Markdown View Source

Modules

HTTP message signatures under explicit caller policy and custody.

RFC 9421 Section 5 signature requests and nonce challenges.

Bounded HTTP adapter failures, always nonretryable. message/1 includes only the reason and random correlation token; inspection excludes source details.

Explicit caller-owned identity mapping for Ash policies and actions.

Caller-bound actor, tenant, and bounded verification context for Ash actions.

Optional ash_hooks inbound RFC 9421 verification bridge (Elixir 1.20).

ash_hooks HTTP adapter signing final method, URL, headers, and body bytes.

Caller-owned body availability, without implicit reads or replayability.

OTP cryptographic primitives over exact signature-base bytes, for custodians.

Bounded primitive and public-key errors, containing no supplied material.

Caller-owned signing, secret verification, key unwrapping, and public metadata.

Absolute monotonic millisecond deadline and original caller PID.

Bounded custody failures. No exception, reference, key, socket path, peer text, or input bytes are retained. Only :deadline_exceeded and :custodian_unavailable are retryable; callers decide whether replay is safe.

Caller-owned OTP private keys and symmetric secrets, held in sensitive processes.

Non-exporting signing through a caller-selected OpenSSH agent Unix socket.

RFC 9530 content/representation digests and preference fields, using OTP hashes.

Bounded digest failures without body, field, or algorithm input bytes.

Explicit bounded HTTPS discovery of HTTP Message Signatures Directories, JWKS and Client ID Metadata Documents. Construct a Discovery.Source from trusted caller configuration. A message/key ID never defines a URL to fetch.

Optional caller-started bounded discovery cache; no timers or background refresh.

Bounded discovery failures, containing only reason and retryable.

Bounded source-bound public keys, freshness and directory proof status. revision is SHA-256 over the fetched JSON bytes, not an origin-assigned sequence. lookup/3 accepts IDs under the source's explicit key_id mode and an algorithm allowlist. Default IDs are computed RFC thumbprints; directory-assigned IDs never replace cryptographic identity or thumbprint revocation. It rejects stale, revoked, incompatible or malformed entries. Key restrictions remain enforced by PublicKey. Snapshot lookup uses system time; the cache's :clock supports caller-controlled time for resolution/fetching.

Public key and explicit discovery provenance. key_id is the selected lookup ID; thumbprint is always the computed cryptographic identity. algorithm is the selected cryptographic algorithm; asserted_algorithm is the source's HTTP token, if present. Neither the source nor a possession proof establishes a principal or authorizes an operation. Default inspection hides key material and provenance. revision is the resolved KeySet's SHA-256 revision, propagated by lookup. expires_at bounds the key/proof lifetime; KeySet separately bounds HTTP cache freshness. Access fields explicitly when applying caller trust policy.

Caller-configured discovery trust root. new/1 requires :type (:directory, :jwks_uri, or :cimd) and :location (HTTPS URL, at most 2,048 bytes). A directory origin expands to /.well-known/http-message-signatures-directory. CIMD requires a nonempty path; URLs reject userinfo, fragments and dot segments. For CIMD, pass :location with exactly the spelling of the document's client_id, including scheme/host case, any trailing host dot and explicit port. The client ID comparison is exact; origin normalization for fetching and same-origin checks never changes that comparison.

Bounded failures from RequestSeal.verify/3, RequestSeal.sign/4, RequestSeal.Policy.new/1, RequestSeal.Ash.scope/2, RequestSeal.Profile, quorum verification, and signature negotiation.

One ordered HTTP field occurrence, before normalization (RFC 9421 Section 2.1).

Optional finalized Finch translation and signing. No pool is started or owned.

Bounded compact JOSE envelopes over OTP cryptography.

Closed, redacted JOSE errors. Only :deadline_exceeded is retryable.

Compact RFC 7516 encryption with explicitly pinned algorithms and AES GCM.

Authenticated compact JWE plaintext. Recipient integrity establishes no origin or principal.

Compact RFC 7515 signatures over exact protected and payload segments.

Verified compact JWS. Header, protected segment and payload require explicit access.

Custodian-side RFC 7518 key wrapping primitives over OTP.

Verify exactly one compact JWS inside one authenticated compact JWE.

Caller-owned, algorithm-bound signing, verification, or key-unwrapping capability.

Internal trusted key equivalence, redacted from default inspection.

Lossless HTTP message values for later component derivation.

Bounded message-construction errors. No supplied bytes appear in errors.

Optional Plug/Phoenix integration with explicit origin and verification policy.

Capture a bounded request before destructive parsing or origin/IP rewriting.

Sign final buffered response bytes in a Plug before_send callback.

Verify the immutable captured request under an explicit policy and label.

Explicit generic RFC 9421 acceptance policy; no implicit profile or required choices.

Shared HTTP signature pipeline for profiles owned by extension packages.

Public-only RSA, P-256, P-384, and Ed25519 key formats and algorithm binding.

Explicit composite RFC 9421 verification policy.

Complete composite verification facts, returned only after all selected checks.

Atomic whole-envelope replay port with caller-owned stores and commitments.

Recommended durable replay store over AshOnetime.Transaction.nonce/2.

Bounded caller uniqueness and exclusive retention end in Unix seconds.

Local atomic replay store owned by a caller-supervised GenServer.

Bounded replay boundary failures, without adapter diagnostics or caller bytes.

Optional Postgrex atomic replay adapter. The caller owns connections and DDL.

Successful atomic claim; contains no namespace, uniqueness value, or store reference.

Caller-owned replay adapter and reference. Importing it starts nothing.

Optional Req final-attempt signing and verification before body decoding.

Exact ordered RFC 9421 Section 2 signature-base construction.

Bounded signature-base errors, without supplied bytes or partial output.

Bounded RFC 8941 / RFC 9651 parsing and canonical serialization.

Bounded Structured Fields errors, containing no input bytes.

Explicit field type restrictions and RFC revision (RFC 9651 Section 2).

Ordered Structured Fields data (RFC 9651 Section 3).

Enumerated caller declarations about HTTP transport.

Complete facts for one explicitly selected HTTP signature profile.

Source-bound HTTP request signing and verification for draft-ietf-webbotauth-httpsig-protocol-00.

Explicit policy for draft-ietf-webbotauth-httpsig-protocol-00.

Complete protocol-00 envelope facts after every selected signature succeeds.