Expand description
§Meadowcap
An implementation of Meadowcap, a capability system for permissioning read and write access to the Willow data model.
Includes implementations of communal capabilities, owned capabilities, a type unifying the two, as well as the generation of McAuthorisationTokens for use with the Willow data model’s is_authorised_write parameter.
§Type parameters
Willow is a parametrised family of protocols, and so this crate makes heavy use of generic parameters.
The following generic parameter names are used consistently across this crate:
MCL- Ausizerepresentingmax_component_length.MCC- Ausizerepresentingmax_component_count.MPL- Ausizerepresentingmax_path_length.NamespacePublicKey- The type used forNamespacePublicKey(willowprotocol.org), must implement thewillow_data_model::NamespaceIdtrait.NamespaceSignature- The type used forNamespaceSignature(willowprotocol.org).UserPublicKey- The type used forUserPublicKey(willowprotocol.org), must implement theSubspaceIdtrait.UserSignature- The type used forUserSignature(willowprotocol.org).PD- The type used forPayloadDigest(willowprotocol.org), must implement thewillow_data_model::PayloadDigesttrait.
Structs§
- Communal
Capability - A capability that implements communal namespaces.
- Delegation
- A delegation of access rights to a user for a given area.
- McAuthorisation
Token - To be used as the
AuthorisationTokenparameter for the Willow data model. - McSubspace
Capability - A capability that certifies read access to arbitrary SubspaceIds at some unspecified non-empty
willow_data_model::Path. - Namespace
IsNot Communal Error - Returned when
is_communalunexpectedly mapped a givennamespacetofalse. - NotA
Write Capability Error - Returned when an operation only applicable to a capability with access mode
AccessMode::Writewas called on a capability with access modeAccessMode::Read. - Owned
Capability - A capability that implements owned namespaces.
- Subspace
Delegation - A delegation of read access for arbitrary
SubspaceIds to aUserPublicKey.
Enums§
- Access
Mode - A mode granting read or write access to some
Area. - Failed
Delegation Error - Returned when an attempt to delegate a capability to another
UserPublicKeyfailed. - Invalid
Delegation Error - Returned when an existing delegation was an invalid successor to an existing delegation chain.
- McCapability
- A Meadowcap capability.
- Owned
Capability Creation Error - Returned when an attempt to create a new owned capability failed.
Traits§
- IsCommunal
- Maps namespace public keys to booleans, determining whether that namespace of a particular
willow_data_model::NamespaceIdis communal or owned.