Crate meadowcap

Source
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:

Structs§

CommunalCapability
A capability which implements communal namespaces.
CommunalHandover
Can be encoded to a bytestring to be signed for a new Delegation to a CommunalCapability.
Delegation
A delegation of access rights to a user for a given area.
McAuthorisationToken
To be used as the AuthorisationToken parameter for the Willow data model.
McSubspaceCapability
A capability that certifies read access to arbitrary SubspaceIds at some unspecified non-empty willow_data_model::Path.
NamespaceIsNotCommunalError
Returned when is_communal unexpectedly mapped a given namespace to false.
NotAWriteCapabilityError
Returned when an operation only applicable to a capability with access mode AccessMode::Write was called on a capability with access mode AccessMode::Read.
OwnedCapability
A capability that implements owned namespaces.
OwnedHandover
Can be encoded to a bytestring to be signed for a new Delegation to an OwnedCapability.
PersonalPrivateInterest
SubspaceDelegation
A delegation of read access for arbitrary SubspaceIds to a UserPublicKey.

Enums§

AccessMode
A mode granting read or write access to some Area.
FailedDelegationError
Returned when an attempt to delegate a capability to another UserPublicKey failed.
InvalidDelegationError
Returned when an existing delegation was an invalid successor to an existing delegation chain.
McCapability
A Meadowcap capability.
OwnedCapabilityCreationError
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::NamespaceId is communal or owned.
McNamespacePublicKey
An extension of NamespaceId augmented with traits required by Meadowcap.
McPublicUserKey
An extension of SubspaceId augmented with traits required by Meadowcap.