Skip to main content

Crate coqui_access

Crate coqui_access 

Source
Expand description

Kinds and models for authentication, identity lookup, authorization and account management, on Guatiao.

A host and every provider library compile against this crate and against nothing else of each other. Providers name guatiao through [guatiao] (re-exported here), so the two sides cannot drift to different versions.

KindNameAnswers
Authenticatorcoqui_authenticatorAre these credentials valid, and which Lookup do they name?
Directorycoqui_directoryWho is the Person behind a Lookup?
Authorizercoqui_authorizerMay this Person do this action on this resource?
Accountscoqui_accountsOptional: list, put and remove accounts, list unaccepted peers.
SignInPolicycoqui_sign_in_policyWhich methods may this sign-in use, and what does it still need?
Challengercoqui_challengerOptional: the challenge a method’s answer is bound to (a passkey’s).

Every method is synchronous; a host calls a provider from a blocking thread. Kind names and their floor hashes are an ABI, pinned by this crate’s contract test: a provider built against one hash is refused by a host built against another. The hash covers every method of a kind, optional ones included, so a kind that exists is never appended to: it is extended by a new kind, and a model by an Option field.

Re-exports§

pub use kind::Accounts;
pub use kind::Authenticator;
pub use kind::Authorizer;
pub use kind::Challenger;
pub use kind::Directory;
pub use kind::SignInPolicy;
pub use guatiao;

Modules§

attributes
The names a consumer gives in SignInContext::attributes that a policy reads.
clients
What kind of client signs in, as SignInContext::client says.
error
The refusals providers and hosts agree on, as [ProviderError]s.
methods
The words that name how a person proves who they are, as a sign-in policy and a consumer agree on them.
purposes
Why a sign-in policy is asked, as SignInContext::purpose says.
takes
What an authenticator takes, as Description::takes names it.

Structs§

AccountInfo
An account as a provider that keeps its own lists it; never with what proves it.
AccountPut
An account to make, or what to change of one there is. A field not said is left as it is.
Attempt
Credentials and request facts presented to an authenticator.
AuthorizationDecision
Authorization result and provider-defined limits for the granted action.
AuthorizationRequest
A resource-scoped authorization request.
Challenge
What a Challenger made for one sign-in: a challenge the signed answer is bound to, and the text the client needs to answer it.
ChallengeRequest
What a consumer asks a Challenger for.
Claims
The identity an authenticator obtained, in full, for a matcher to tie to a directory account. A claim is what the credential says, not who the person is: the directory decides the account and its groups.
CredentialInfo
One credential of an account that holds several (a passkey), without anything that proves it.
Description
What an authenticator or a directory says it is.
Factor
One step of a sign-in that already succeeded.
Limit
At most a count, or no bound at all.
Lookup
An identity lookup key returned after an authenticator accepts credentials.
Offer
A method a sign-in may use next.
Person
A person record returned only by an authoritative directory.
PutOutcome
What came of putting an account.
SignInContext
What a consumer knows when it asks which methods a sign-in may use, and what is still needed.
SignInDecision
What a sign-in may do next.
SubjectError
Text that is not account:<name>, person:<id> or group:<name> with a value that is not empty, holds no control character and neither starts nor ends with whitespace (inner spaces are fine: group:Domain Users), or any:signed-in. Any other any: name is refused.
Waiting
Something an authenticator was shown and did not know, kept so that whoever runs the service can accept it as an account.

Enums§

Subject
One account, person or group, written account:<name>, person:<id> or group:<name>, or every signed-in person, written any:signed-in.
Verdict
Result of checking one credential attempt.

Constants§

KIND_PREFIX
The prefix of every kind name in this crate. A host scanning a directory keeps the libraries that declare a kind beginning with it.

Traits§

Accounts
Account management for a provider that keeps its own accounts.
Authenticator
Checks credentials and returns only a Lookup reference.
Authorizer
Authorizes one action on one resource for a Person a directory returned.
Challenger
Issues what a method needs before it can be answered: for a passkey, a challenge the signed answer is bound to.
Directory
Resolves an authenticated reference into the authoritative Person record.
SignInPolicy
Decides which methods a sign-in may use and what it still needs, from where and how it is made.