pub enum ChronixAction {
Read,
Write,
Delete,
ManageKeys,
ManageBackups,
ManageConfig,
ManageModels,
ManageNamespaces,
ManageNodes,
ManageRegions,
ManageCluster,
ViewCluster,
}Expand description
An action chronixd asks about.
Every variant is issued by a request path, and every action in the schema
is a variant here — the two lists are checked against each other by
the_schema_describes_exactly_the_actions_we_issue. An action nothing
issues is a policy clause that silently never fires, which is the whole
failure mode this enum exists to avoid.
Admin is not here on purpose. It is an action group in the schema:
the granular administrative actions are members of it, so
action in Chronix::Action::"Admin" grants all of them while
action == Chronix::Action::"ManageBackups" grants one. Nothing requests
the group, so nothing can be granted by naming it as an equality.
Variants§
Read
Read data from a namespace (GET, HEAD, OPTIONS, and every query
RPC).
Write
Write data to a namespace, or change something in it.
Delete
Delete data from a namespace.
ManageKeys
Create, list and revoke API keys.
ManageBackups
Take, verify and restore backups.
ManageConfig
Change runtime configuration, such as the log level.
ManageModels
List, inspect, delete and retrain analytics models.
ManageNamespaces
Create, delete and inspect namespaces.
ManageNodes
Register, deregister and decommission cluster nodes.
ManageRegions
Create regions and drive their state transitions.
ManageCluster
Trigger cluster rebalancing.
ViewCluster
Read cluster topology, routing and health.
Implementations§
Source§impl ChronixAction
impl ChronixAction
Sourcepub const ALL: &'static [Self]
pub const ALL: &'static [Self]
Every action, in schema order. The inventory the schema is checked against.
Sourcepub fn to_entity_uid(self) -> EntityUid
pub fn to_entity_uid(self) -> EntityUid
Convert to the Cedar action entity UID.
Sourcepub const fn is_administrative(self) -> bool
pub const fn is_administrative(self) -> bool
Whether this action’s resource is the server rather than a namespace.
The split is the schema’s: an administrative action appliesTo
System, a data action appliesTo Namespace. Asking the wrong one
is a validation error at policy-load time rather than a decision that
silently never matches.
Trait Implementations§
Source§impl Clone for ChronixAction
impl Clone for ChronixAction
Source§fn clone(&self) -> ChronixAction
fn clone(&self) -> ChronixAction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ChronixAction
Source§impl Debug for ChronixAction
impl Debug for ChronixAction
Source§impl<'de> Deserialize<'de> for ChronixAction
impl<'de> Deserialize<'de> for ChronixAction
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 Display for ChronixAction
impl Display for ChronixAction
impl Eq for ChronixAction
Source§impl Hash for ChronixAction
impl Hash for ChronixAction
Source§impl Ord for ChronixAction
impl Ord for ChronixAction
Source§fn cmp(&self, other: &ChronixAction) -> Ordering
fn cmp(&self, other: &ChronixAction) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ChronixAction
impl PartialEq for ChronixAction
Source§impl PartialOrd for ChronixAction
impl PartialOrd for ChronixAction
Source§impl Serialize for ChronixAction
impl Serialize for ChronixAction
impl StructuralPartialEq for ChronixAction
Auto Trait Implementations§
impl Freeze for ChronixAction
impl RefUnwindSafe for ChronixAction
impl Send for ChronixAction
impl Sync for ChronixAction
impl Unpin for ChronixAction
impl UnsafeUnpin for ChronixAction
impl UnwindSafe for ChronixAction
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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