pub enum PrincipalKind {
Session {
id: i64,
},
ApiToken {
id: i64,
org: Option<OrgId>,
name: String,
scopes: Vec<String>,
},
Access,
Superadmin {
source: SuperadminSource,
},
Workspace {
org: OrgId,
name: String,
},
Agent {
label: String,
},
}Expand description
How a principal authenticated.
Variants§
Session
ApiToken
Fields
Access
A Cloudflare Access identity whose email is this user’s.
Superadmin
A superadmin (superadmin): a superadmin token or a tailnet
identity, acting as this (possibly synthetic) user.
Fields
§
source: SuperadminSourceWorkspace
An org’s workspace (docs/concepts/workspaces.md): its token (isb_ws_...),
held by the agents that live in it. Nobody’s account: a synthetic
principal confined to org with the role the workspace was given.
Agent
A tailnet or Cloudflare Access caller an org mapped to a role
(agent_identities): label is tailnet:<login or node> or
access:<name>. Nobody’s account, confined to the orgs that mapped it.
Trait Implementations§
Source§impl Clone for PrincipalKind
impl Clone for PrincipalKind
Source§impl Debug for PrincipalKind
impl Debug for PrincipalKind
impl Eq for PrincipalKind
Source§impl PartialEq for PrincipalKind
impl PartialEq for PrincipalKind
Source§impl Serialize for PrincipalKind
impl Serialize for PrincipalKind
impl StructuralPartialEq for PrincipalKind
Auto Trait Implementations§
impl Freeze for PrincipalKind
impl RefUnwindSafe for PrincipalKind
impl Send for PrincipalKind
impl Sync for PrincipalKind
impl Unpin for PrincipalKind
impl UnsafeUnpin for PrincipalKind
impl UnwindSafe for PrincipalKind
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key and return true if they are equal.