Tenants
A tenant is an owner and creator of content. They are responsible for providing a service available to providers' nodes which can manage keys and encrypt/decrypt content.
Tenant Permissions
Tenant keys have the following permission levels, from most to least privileged
- Root level
- add/remove admins
- participate in space governance
- Admin level
- add/remove kmses
- add funds for billing
- KMS level
- create/remove content keys
- Content level
- co-author content object versions with nodes
Tenant Blockchain Storage
(TenantId) -> {
space: SpaceId,
root: AccountId,
}
(TenantId, KMSId) -> {
locator: BoundedString,
}
Tenant Blockchain Calls
CreateTenant(origin: Origin, space: SpaceId, tenant: TenantId)
- Checks
space
governance to see whetherorigin
can create a tenant - Creates
tenant
{ space: space, root: origin, }
- Registers
origin
withtenant
withADMIN
level - Bonds some currency from
origin
to thespace
undertenant
- Checks
AddKMS(origin: Origin, tenant: TenantId, kms: KMSId, locator: BoundedString)
- Checks that
origin
hasADMIN
permission fortenant
- Creates a KMS at
(tenant, kms)
{ locator: locator, }
- Checks that
RemoveKMS(origin: Origin, tenant: TenantId, kms: KMSId)
removes a node- Checks that
origin
has at leastADMIN
permissions intenant
- Removes
(tenant, kms)
- Checks that
- TODO: Remove Tenant, Top up billing balance