pub struct RequestContext {
pub source_ip: Option<IpAddr>,
pub user_agent: Option<String>,
pub request_time: Option<SystemTime>,
pub secure_transport: bool,
pub existing_object_tags: Option<TagSet>,
pub request_object_tags: Option<TagSet>,
pub extra: HashMap<String, String>,
}Expand description
Per-request context fed into the policy evaluator. Caller is expected to fill what’s available; missing fields make any Condition that depends on them fail (= statement skipped, never silently allowed).
Fields§
§source_ip: Option<IpAddr>§user_agent: Option<String>§request_time: Option<SystemTime>§secure_transport: boolv0.6 #39: tags currently attached to the object the request
targets (resolved by the caller via TagManager ahead of
evaluate_with). Surfaced to policy via the
s3:ExistingObjectTag/<key> condition key. None here is
treated identically to “no tags exist” — every
ExistingObjectTag clause then fails.
v0.6 #39: tags carried in the request itself (PutObject’s
x-amz-tagging URL-encoded header, or PutObjectTagging’s
Tagging body). Surfaced to policy via the
s3:RequestObjectTag/<key> condition key.
extra: HashMap<String, String>Generic key → value map for any aws:* or s3:* context key not covered by the typed fields above (keeps the door open for any key the caller wants to plumb without changing the struct).
Trait Implementations§
Source§impl Clone for RequestContext
impl Clone for RequestContext
Source§fn clone(&self) -> RequestContext
fn clone(&self) -> RequestContext
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 RequestContext
impl Debug for RequestContext
Source§impl Default for RequestContext
impl Default for RequestContext
Source§fn default() -> RequestContext
fn default() -> RequestContext
Auto Trait Implementations§
impl Freeze for RequestContext
impl RefUnwindSafe for RequestContext
impl Send for RequestContext
impl Sync for RequestContext
impl Unpin for RequestContext
impl UnsafeUnpin for RequestContext
impl UnwindSafe for RequestContext
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> 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