pub struct AdminDisabledVerifier;Expand description
Builds the configured AuthVerifier from the environment — secure by
default.
§Environment
| var | default | meaning |
|---|---|---|
AUTH_MODE | jwt | jwt (BYO) | smoo (hosted) | trusted (proxied, tokenless — see below) | none (dev only). |
AUTH_JWT_HS256_SECRET | — | HS256 shared secret. |
AUTH_JWT_RS256_PUBLIC_KEY | — | Static RS256 PEM public key. |
AUTH_JWT_JWKS_URL | — | JWKS endpoint to fetch signing keys from (any algorithm — ES256/RS256/…). |
AUTH_JWT_ISSUER | — | Required iss (optional). Also the JWKS auto-derivation root ({issuer}/.well-known/jwks.json). |
AUTH_JWT_AUDIENCE | — | Required aud (optional). |
AUTH_DEV_ORG_ID | dev-org | Org id for the none-mode admin principal. |
§Key-source precedence (jwt and smoo)
- Static
AUTH_JWT_RS256_PUBLIC_KEY(RS256 PEM) — the BYO path, unchanged. - Static
AUTH_JWT_HS256_SECRET(HS256 shared secret). - JWKS —
AUTH_JWT_JWKS_URLif set, else derived from the issuer as{AUTH_JWT_ISSUER}/.well-known/jwks.json. This is the ES256-capable path: keys are fetched + cached and selected per-token bykid, soauth.smoo.ai’s ES256 tokens verify and key rotation needs no redeploy.
So AUTH_MODE=smoo now needs only AUTH_JWT_ISSUER (+ optionally
AUTH_JWT_AUDIENCE) — no static public key required.
Explicitly setting AUTH_MODE=jwt/smoo with no usable key source
(no static key, no JWKS URL, and — for jwt — no issuer to derive one) is a
hard AuthError::Misconfigured error — not a silent fall-through to no-auth.
Leaving AUTH_MODE unset with no key source boots the server with the
admin API disabled (AdminDisabledVerifier) so /ws serves without
forcing auth config; /admin then returns 401 until configured (or
AUTH_MODE=none for dev).
A verifier that rejects every request. The default when neither AUTH_MODE
nor a key is configured: the server still boots (so /ws serves) but the
/admin API is disabled until an operator sets AUTH_MODE + a key, or
AUTH_MODE=none for local dev. Secure-by-default without hard-failing the
whole service over admin config.
Trait Implementations§
Source§impl AuthVerifier for AdminDisabledVerifier
impl AuthVerifier for AdminDisabledVerifier
Source§impl Clone for AdminDisabledVerifier
impl Clone for AdminDisabledVerifier
Source§fn clone(&self) -> AdminDisabledVerifier
fn clone(&self) -> AdminDisabledVerifier
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for AdminDisabledVerifier
Source§impl Debug for AdminDisabledVerifier
impl Debug for AdminDisabledVerifier
Source§impl Default for AdminDisabledVerifier
impl Default for AdminDisabledVerifier
Source§fn default() -> AdminDisabledVerifier
fn default() -> AdminDisabledVerifier
Auto Trait Implementations§
impl Freeze for AdminDisabledVerifier
impl RefUnwindSafe for AdminDisabledVerifier
impl Send for AdminDisabledVerifier
impl Sync for AdminDisabledVerifier
impl Unpin for AdminDisabledVerifier
impl UnsafeUnpin for AdminDisabledVerifier
impl UnwindSafe for AdminDisabledVerifier
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request