pub struct AuthorizationPolicy {
pub subjects: Vec<String>,
pub allowed_pools: Vec<String>,
pub allowed_policy_packs: Vec<String>,
pub max_cells_per_hour: Option<u32>,
}Expand description
T12: authorization policy gate.
subjects is the allowlist of operator identities (currently a tenant id
in 1.0). allowed_pools and allowed_policy_packs narrow the surface
further — empty means “no restriction on this axis”. max_cells_per_hour
is an optional rolling-hour rate cap.
All sets are matched by exact equality; no glob/regex semantics. Identity
strings are opaque tokens — oidc:github:org/team,
k8s:serviceaccount:ns/name, or tenant:<id> are all valid.
Fields§
§subjects: Vec<String>Operator identities authorized by this policy. The supervisor compares
spec.correlation.tenantId against this list at admission. An empty
list rejects every spec — there is no implicit allow-all.
allowed_pools: Vec<String>Pool IDs the subject may target via spec.placement.poolId. Empty
means no pool restriction (all pools allowed).
allowed_policy_packs: Vec<String>Policy pack IDs the subject may reference via spec.policy.packId.
Empty means no pack restriction (all packs allowed).
max_cells_per_hour: Option<u32>Optional rolling-hour rate cap. When unset (None) there is no rate
limit; when set (Some(n)), at most n admitted cells per hour per
subject. The supervisor maintains the per-subject counter in-memory.
Trait Implementations§
Source§impl Clone for AuthorizationPolicy
impl Clone for AuthorizationPolicy
Source§fn clone(&self) -> AuthorizationPolicy
fn clone(&self) -> AuthorizationPolicy
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 AuthorizationPolicy
impl Debug for AuthorizationPolicy
Source§impl Default for AuthorizationPolicy
impl Default for AuthorizationPolicy
Source§fn default() -> AuthorizationPolicy
fn default() -> AuthorizationPolicy
Source§impl<'de> Deserialize<'de> for AuthorizationPolicy
impl<'de> Deserialize<'de> for AuthorizationPolicy
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>,
Source§impl PartialEq for AuthorizationPolicy
impl PartialEq for AuthorizationPolicy
Source§fn eq(&self, other: &AuthorizationPolicy) -> bool
fn eq(&self, other: &AuthorizationPolicy) -> bool
self and other values to be equal, and is used by ==.