pub struct EvaluationRequest {
pub subject: EntityRef,
pub action: EntityRef,
pub resource: EntityRef,
pub context: Value,
pub entities: Vec<Value>,
}Expand description
OpenID AuthZEN EvaluationRequest (subject/action/resource/context).
Per the AuthZEN draft, requests MAY include an entities array of
fully-formed Cedar entity JSON objects ({uid: {type, id}, attrs: {...}, parents: [...]}). When present they are unioned with the always-present
subject/action/resource entities and passed to the Cedar evaluator.
Without entities, every real-world policy that references any entity
attribute or hierarchy (the typical case) returns Deny because Cedar
resolves principal in Group::"admins" against an empty store. This
is the single most common AuthZEN integration bug.
Fields§
§subject: EntityRef§action: EntityRef§resource: EntityRef§context: Value§entities: Vec<Value>Optional list of entity JSON objects to make available to the Cedar evaluator. See module docs.
Trait Implementations§
Source§impl Debug for EvaluationRequest
impl Debug for EvaluationRequest
Source§impl<'de> Deserialize<'de> for EvaluationRequest
impl<'de> Deserialize<'de> for EvaluationRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EvaluationRequest
impl RefUnwindSafe for EvaluationRequest
impl Send for EvaluationRequest
impl Sync for EvaluationRequest
impl Unpin for EvaluationRequest
impl UnwindSafe for EvaluationRequest
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
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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 moreSource§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>
Wrap the input message
T in a tonic::Request