Skip to main content

resolve_delivery_tier

Function resolve_delivery_tier 

Source
pub(super) fn resolve_delivery_tier(
    auth_via: ReactiveAuthVia,
    claimed: Option<&str>,
) -> String
Expand description

Server-derived delivery_tier for the LAN-key case only (docs/specs/SPEC_JEKT_LAN_TIER_SIGNING_2026_08_15.md §3): a lan_key caller is forced to "lan" whatever the body says, so claiming "host" can’t dodge LAN scrutiny. Any other caller’s claim (host/wan/lan/channel) is kept.

A full-auth_key caller is not downgraded from "lan": a jekt that arrived by lan_key and was relayed to a sibling instance on this machine authenticates that second hop with the sibling’s full auth_key (lan_key is peer-to-peer between machines only). Downgrading discarded an already-detected LAN signature failure’s forced-sensitive escalation (lan_verified/reagent_verified are #[serde(skip_deserializing)], so they re-derive on every hop). Honouring the claim costs nothing: the full key already grants full control, and a self-labelled tier only adds verification, never removes it.

"channel" (SPEC_JEKT_CROSS_CHANNEL_TRUST_2026_09_02.md §D4) follows the same rule: the forwarding instance sets it on a same-host Tier 2a/2b hop, and it only adds verify_cross_channel_signature.