pub struct AuthRuntime { /* private fields */ }Implementations§
Source§impl AuthRuntime
impl AuthRuntime
pub async fn from_process(config: AuthConfig) -> Result<Self, AuthFailure>
Sourcepub async fn from_isolated_state(
config: AuthConfig,
) -> Result<Self, AuthFailure>
pub async fn from_isolated_state( config: AuthConfig, ) -> Result<Self, AuthFailure>
Start an embedded relay with an administrator key owned only by its state directory.
This deliberately leaves the process credential untouched because the containing UI uses that credential for its outbound register, connect, status, and stream connections.
pub async fn start( admin_key: AesKeyType, config: AuthConfig, ) -> Result<Self, AuthFailure>
pub async fn shutdown_actor(&self)
pub async fn abort_actor(&self) -> Result<(), AuthFailure>
pub fn config(&self) -> &AuthConfig
pub fn admin_key(&self) -> Result<AesKeyType, AuthFailure>
pub fn derive_key(&self, key_id: KeyId) -> Result<AesKeyType, AuthFailure>
pub fn derive_previous_key(&self, key_id: KeyId) -> Option<AesKeyType>
pub fn authenticate_presented( &self, key_id: KeyId, presented_key: &AesKeyType, ) -> Result<AuthContext, AuthFailure>
pub fn legacy_protocol_allowed(&self) -> Result<bool, AuthFailure>
pub fn record_legacy_connection( &self, ) -> Result<LegacyConnectionGuard, AuthFailure>
pub async fn claim_admin_mutation( &self, authorization: &AuthContext, fingerprint: [u8; 32], client_timestamp: u64, ) -> Result<(), AuthFailure>
pub async fn issue( &self, authorization: &AuthContext, ttl: Duration, label: Option<String>, ) -> Result<IssuedTemporaryKey, AuthFailure>
pub async fn list( &self, authorization: &AuthContext, page: u32, page_size: u16, ) -> Result<KeyPage, AuthFailure>
pub async fn show( &self, authorization: &AuthContext, key_id: KeyId, reveal: bool, ) -> Result<IssuedTemporaryKey, AuthFailure>
pub async fn renew( &self, authorization: &AuthContext, key_id: KeyId, ttl: Duration, ) -> Result<IssuedTemporaryKey, AuthFailure>
pub async fn revoke( &self, authorization: &AuthContext, key_id: KeyId, ) -> Result<TemporaryKeyMetadata, AuthFailure>
pub async fn gc(&self, authorization: &AuthContext) -> Result<u64, AuthFailure>
pub async fn reset( &self, authorization: &AuthContext, ) -> Result<(), AuthFailure>
pub async fn rotate_root( &self, authorization: &AuthContext, new_key: AesKeyType, ) -> Result<(), AuthFailure>
pub async fn set_legacy_protocol( &self, authorization: &AuthContext, policy: LegacyProtocolPolicy, ) -> Result<(), AuthFailure>
pub async fn status( &self, authorization: &AuthContext, ) -> Result<AuthStatus, AuthFailure>
pub async fn audit_admin( &self, authorization: &AuthContext, action: impl Into<String>, key_id: Option<KeyId>, detail: Option<String>, ) -> Result<(), AuthFailure>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for AuthRuntime
impl !UnwindSafe for AuthRuntime
impl Freeze for AuthRuntime
impl Send for AuthRuntime
impl Sync for AuthRuntime
impl Unpin for AuthRuntime
impl UnsafeUnpin for AuthRuntime
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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