pub struct ResourcePolicy {
pub allow: Vec<String>,
pub deny: Vec<String>,
pub significant: Vec<String>,
}Expand description
Allow/deny policy for the scoped MCP gateway, evaluated over a run’s
derived resources. deny wins: a run is rejected if any resource matches
a deny pattern. If allow is non-empty, every resource must additionally
match some allow pattern. Empty allow + empty deny is allow-all.
significant is the policy dimension: when set, the allow check is
evaluated only over the derived resources whose group names match a
significant pattern, and the ambient co-membership umbrella groups (ue,
ue_content, windows, a clusters parent…) are filtered out before the
check — so they never have to be enumerated in allow. This makes
allow=cluster_1node_* over significant=cluster_* a true default-deny: a
target that resolves to no significant resource cannot be proven in scope
and is rejected. deny is unaffected — it still spans every derived
resource, which is the conservative direction. Empty significant preserves
the legacy behavior (allow is checked over every derived resource).
It mirrors the lease’s LeaseFilter (which names the groups that carry a
lease); here the patterns name the groups that are significant for
policy. The two dimensions are configured independently.
Fields§
§allow: Vec<String>§deny: Vec<String>§significant: Vec<String>Implementations§
Trait Implementations§
Source§impl Clone for ResourcePolicy
impl Clone for ResourcePolicy
Source§fn clone(&self) -> ResourcePolicy
fn clone(&self) -> ResourcePolicy
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 ResourcePolicy
impl Debug for ResourcePolicy
Source§impl Default for ResourcePolicy
impl Default for ResourcePolicy
Source§fn default() -> ResourcePolicy
fn default() -> ResourcePolicy
Auto Trait Implementations§
impl Freeze for ResourcePolicy
impl RefUnwindSafe for ResourcePolicy
impl Send for ResourcePolicy
impl Sync for ResourcePolicy
impl Unpin for ResourcePolicy
impl UnsafeUnpin for ResourcePolicy
impl UnwindSafe for ResourcePolicy
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> 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