pub struct RequestIdentity {
pub namespace: String,
pub actor_id: Option<String>,
pub visible_namespaces: Vec<String>,
pub request_id: Option<u64>,
}Expand description
Per-request identity context that overrides a VerbRegistry’s
construction-baked default_namespace / actor_id / visible_namespaces
for exactly one VerbRegistry::dispatch_with_identity call (ADR-096
Fork 1 — warm-daemon per-request identity).
A single warm registry is built once with a baked identity, but must be
able to serve requests whose caller resolved a different attribution
identity (e.g. a different project-local [actor]) without a cold
fallback and without mis-stamping writes under the registry’s own baked
actor. Supplying Some(RequestIdentity { .. }) threads the caller’s
identity through token minting for that one call; the registry’s fields
(and every other in-flight call) are untouched. None is exactly
VerbRegistry::dispatch — the baked scalars apply, unchanged from
before this type existed.
Fields§
§namespace: StringStorage/gate default namespace for this request (used when the verb’s
own params carry no explicit namespace field). Overrides
VerbRegistry::default_namespace.
actor_id: Option<String>Write-stamp / gate actor label for this request (ADR-057). Overrides
VerbRegistry::actor_id. None mints ActorRef::anonymous(), same
as an unconfigured baked actor_id.
visible_namespaces: Vec<String>Extra read-visibility namespaces for this request (ADR-007 Rev 4 Rule
3b). Overrides VerbRegistry::visible_namespaces. Entries that fail
Namespace::parse are skipped with a tracing::warn! rather than
failing the whole request — a single malformed visibility entry from a
caller-supplied frame must not block dispatch.
request_id: Option<u64>Caller-supplied correlation id for this request (khive#948), carried
unchanged from the daemon frame’s request_id field. Stamped into the
audit event’s resource.request_id on every outcome (success, error,
and denied) so a client can join its own pre-send sample to the
server-side audit row for the same request. None means the caller
supplied no id (a pre-#948 client, or an internal/non-benchmark
caller) — the audit row then carries no request_id key at all.
Trait Implementations§
Source§impl Clone for RequestIdentity
impl Clone for RequestIdentity
Source§fn clone(&self) -> RequestIdentity
fn clone(&self) -> RequestIdentity
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 RequestIdentity
impl Debug for RequestIdentity
Source§impl Default for RequestIdentity
impl Default for RequestIdentity
Source§fn default() -> RequestIdentity
fn default() -> RequestIdentity
Auto Trait Implementations§
impl Freeze for RequestIdentity
impl RefUnwindSafe for RequestIdentity
impl Send for RequestIdentity
impl Sync for RequestIdentity
impl Unpin for RequestIdentity
impl UnsafeUnpin for RequestIdentity
impl UnwindSafe for RequestIdentity
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,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more