pub struct ShieldResponse {Show 19 fields
pub decision: String,
pub actual_decision: Option<String>,
pub mode_overridden: Option<bool>,
pub effective_mode: Option<String>,
pub alerted: Option<bool>,
pub reason: Option<String>,
pub audit_id: Option<String>,
pub request_id: Option<String>,
pub timestamp: String,
pub determining_policies: Vec<DeterminingPolicy>,
pub detectors: Vec<DetectorResult>,
pub context: HashMap<String, Value>,
pub projected_context: HashMap<String, Value>,
pub latency_ms: Option<i64>,
pub eval_latency_ms: Option<i64>,
pub tiers_evaluated: Vec<String>,
pub tiers_skipped: Vec<String>,
pub session_delta: Option<SessionDelta>,
pub root_causes: Vec<RootCause>,
}Expand description
Response from POST /v1/guard.
Fields§
§decision: StringEnforced decision: "allow" or "deny".
actual_decision: Option<String>What Cedar would have decided before any mode override.
mode_overridden: Option<bool>true when a mode override changed the enforced decision.
effective_mode: Option<String>The effective policy mode that was applied.
alerted: Option<bool>true when an alert-mode policy fired (action allowed but flagged).
reason: Option<String>Human-readable reason for the decision (deny path).
audit_id: Option<String>Audit trail reference.
request_id: Option<String>Request correlation ID.
timestamp: StringISO 8601 response timestamp.
determining_policies: Vec<DeterminingPolicy>Policies that drove a deny decision.
detectors: Vec<DetectorResult>Per-detector results.
context: HashMap<String, Value>Merged raw detector context.
projected_context: HashMap<String, Value>Schema-normalised context sent to Cedar.
latency_ms: Option<i64>Total request latency in milliseconds.
eval_latency_ms: Option<i64>Cedar evaluation latency in milliseconds.
tiers_evaluated: Vec<String>Tiers that ran.
tiers_skipped: Vec<String>Tiers skipped due to early exit.
session_delta: Option<SessionDelta>Session state delta for this turn.
root_causes: Vec<RootCause>Root causes for a deny decision.
Implementations§
Trait Implementations§
Source§impl Clone for ShieldResponse
impl Clone for ShieldResponse
Source§fn clone(&self) -> ShieldResponse
fn clone(&self) -> ShieldResponse
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ShieldResponse
impl Debug for ShieldResponse
Source§impl<'de> Deserialize<'de> for ShieldResponse
impl<'de> Deserialize<'de> for ShieldResponse
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 ShieldResponse
impl RefUnwindSafe for ShieldResponse
impl Send for ShieldResponse
impl Sync for ShieldResponse
impl Unpin for ShieldResponse
impl UnsafeUnpin for ShieldResponse
impl UnwindSafe for ShieldResponse
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