pub enum AccountManagerRequest {
    GetAccountIds {
        responder: AccountManagerGetAccountIdsResponder,
    },
    GetAccountMetadata {
        id: u64,
        responder: AccountManagerGetAccountMetadataResponder,
    },
    GetAccount {
        payload: AccountManagerGetAccountRequest,
        responder: AccountManagerGetAccountResponder,
    },
    DeprecatedGetAccount {
        id: u64,
        password: String,
        account: ServerEnd<AccountMarker>,
        responder: AccountManagerDeprecatedGetAccountResponder,
    },
    RegisterAccountListener {
        payload: AccountManagerRegisterAccountListenerRequest,
        responder: AccountManagerRegisterAccountListenerResponder,
    },
    RemoveAccount {
        id: u64,
        responder: AccountManagerRemoveAccountResponder,
    },
    ProvisionNewAccount {
        payload: AccountManagerProvisionNewAccountRequest,
        responder: AccountManagerProvisionNewAccountResponder,
    },
    DeprecatedProvisionNewAccount {
        password: String,
        metadata: AccountMetadata,
        account: ServerEnd<AccountMarker>,
        responder: AccountManagerDeprecatedProvisionNewAccountResponder,
    },
}
Expand description

AccountManager manages the overall state of system accounts and personae on a Fuchsia device. The AccountManager is the most powerful protocol in the account system and is intended only for use by the most trusted parts of the system.

Variants§

§

GetAccountIds

Returns a vector of all accounts provisioned on the device.

§

GetAccountMetadata

Returns the metadata for a single account.

id The account’s identifier as returned by GetAccountIds()

§

GetAccount

Connects a channel to read properties of and perform operations on one account. If the account is locked, an interactive authentication attempt will be invoked as part of this call.

id [required] The account’s identifier as returned by GetAccountIds() interaction An Interaction channel enabling the user to complete authentication challenges if these are necessary. account [required] The server end of an Account channel

Fails with:

  • INVALID_REQUEST if the id does not exist.
  • FAILED_PRECONDITION if the account is locked but no interaction channel was supplied to perform authentication.
  • ABORTED if the client closes the interaction channel.
§

DeprecatedGetAccount

Fields

§id: u64
§password: String
§account: ServerEnd<AccountMarker>

Connects a channel to read properties of and perform operations on one account. If the account is locked, the supplied password will be used to attempt authentication.

This is a temporary method used for an initial prototype of password-based encryption. Its usage will be replaced by the GetAccount method where the hardcoded authentication=password assumption is replaced by a channel that can support different authentication mechanisms.

id The account’s identifier as returned by GetAccountIds() password The account’s password account The server end of an Account channel

Fails with FAILED_AUTHENTICATION if the password was not correct.

§

RegisterAccountListener

Connects a channel that will receive changes in the provisioned accounts and their authentication state. Optionally this channel will also receive the initial set of accounts and authentication states onto which changes may be applied.

listener [required] The client end of an AccountListener channel initial_state If true, the listener will receive an event containing the initial state for all accounts. add_account If true, the listener will receive events when a new account is added to the device. remove_account If true, the listener will receive events when an account is removed from the device. granularity An AuthChangeGranularity expressing the magnitude of change in authentication state that will lead to AuthStateChange events. If absent, AuthStateChange events will not be sent.

§

RemoveAccount

Removes an account from the device.

id The account’s identifier as returned by GetAccountIds()

§

ProvisionNewAccount

Adds a new account to the device. If this operation if successful the newly created account will be unlocked and may be accessed using GetAccount without further authentication.

lifetime [required] The lifetime of the account metadata [required] Metadata for the new account interaction An Interaction channel enabling the user to select and enroll authentication mechanisms for the new account.

Returns: account_id The identifier of the newly added account

Fails with:

  • INVALID_REQUEST if policy requires authentication factors for the new account but no interaction channel was supplied.
  • ABORTED if the client closes the interaction channel.
§

DeprecatedProvisionNewAccount

Adds a new system account to the device using the supplied password as the only authentication mechanism. The account is automatically unlocked and the supplied channel is connected to read properties of and perform operations on the account.

This is a temporary method used for an initial prototype of password-based encryption. Its usage will be replaced by the ProvisionNewAccount method where the hardcoded authentication=password assumption is replaced by a channel that can support different authentication mechanisms.

password The password to be used for the new account metadata Metadata for the new account account The server end of an Account channel

Fails with INVALID_REQUEST if the password does not meet minimum strength requirements.

Implementations§

Trait Implementations§

source§

impl Debug for AccountManagerRequest

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more