pub enum TenantSource {
Token {
claim: String,
},
Domain,
SignedContext,
None,
}Expand description
How the host resolves an app’s in-site “own” tenant for a request. Every source is host-verified and bound once per invocation; a guest never supplies the tenant value.
Variants§
Token
The verified JWT claim named claim (default tid), via the same JWKS/issuer machinery
the GraphQL data connector uses. Authenticated console/portal paths.
Domain
Derived from the already-verified request domain via its per-domain context tag
(crate::project::DomainOwner’s context). Storefront / public-render paths — no
app-side Host→slug lookup.
SignedContext
A host-verifiable signed-context envelope carried on a job/message — the async-lane “own”
(message consumers, cron, webhooks, workflow steps, fan-out workers), the async analog of
Token. The producer’s verified own-tenant is host-stamped onto the outgoing
message/invoke at publish (guest-blind, [boatramp_core::cose::mint_context]); a consumer
declaring this source resolves that tenant by verifying the envelope against the fleet anchor.
A forged/expired/absent envelope resolves no value ⇒ an “own” op fails closed (never
unscoped). The guest never names a tenant. Wired since v0.4.3 (producer-stamp at publish +
consumer resolution in tenant_resolve.rs).
None
Truly anonymous / non-token auth (funnel reads, HMAC webhooks): there is no “own” tenant,
so only the null/all access modes are meaningful (an “own” mode fails closed).
Trait Implementations§
Source§impl Clone for TenantSource
impl Clone for TenantSource
Source§fn clone(&self) -> TenantSource
fn clone(&self) -> TenantSource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TenantSource
impl Debug for TenantSource
Source§impl Default for TenantSource
impl Default for TenantSource
Source§fn default() -> TenantSource
fn default() -> TenantSource
Source§impl<'de> Deserialize<'de> for TenantSource
impl<'de> Deserialize<'de> for TenantSource
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TenantSource, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TenantSource, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for TenantSource
Source§impl PartialEq for TenantSource
impl PartialEq for TenantSource
Source§impl Serialize for TenantSource
impl Serialize for TenantSource
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for TenantSource
Auto Trait Implementations§
impl Freeze for TenantSource
impl RefUnwindSafe for TenantSource
impl Send for TenantSource
impl Sync for TenantSource
impl Unpin for TenantSource
impl UnsafeUnpin for TenantSource
impl UnwindSafe for TenantSource
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.