IF Commons GitHub

governance/model

Written to: 2 requirements: 2 proved, 0 partly, 0 failing, 0 with no test recorded. 0002-tenancy FR-001, 0002-tenancy FR-002

The model of tenancy for a service provider (0002-tenancy FR-001, FR-002): parties (an operator and its clients), the principals who act for a party, and the grants that let a principal act on a client's tenant in a role, for a time. A client's own people are granted on their own tenant; an operator's people are granted on a client only through a live engagement between the two. What a role may do is data here, and nothing is allowed that no live grant gives.

import { ROLE_ACTIONS } from "./model.ts";
ROLE_ACTIONS.viewer; // ["read"]

Source: commons/tenancy/src/governance/model.ts

4 of 20 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

governance.ROLESconstno test imports it
const ROLES: readonly ["owner", "operator", "auditor", "viewer"]

What a person may be to a tenant.

governance.Roletypeno test imports it
type Role = (typeof ROLES)[number];

A role.

governance.ACTIONSconstno test imports it
const ACTIONS: readonly ["read", "record-evidence", "determine", "approve-change", "administer", "export"]

What can be done to a tenant.

governance.Actiontypeno test imports it
type Action = (typeof ACTIONS)[number];

An action.

governance.ROLE_ACTIONSconstno test imports it
const ROLE_ACTIONS: Readonly<Record<"auditor" | "operator" | "owner" | "viewer", readonly ("administer" | "approve-change" | "determine" | "export" | "read" | "record-evidence")[]>>

What each role may do: the owner everything; the operator's staff work in the tenant but neither determine an objective, approve a change nor administer; an auditor reads and determines; a viewer reads.

governance.Partytypeno test imports it
type Party = { readonly id: string; readonly kind: "operator" | "client"; readonly name: string };

A party: an operator (a service provider) or a client (an organization whose tenant it is).

governance.Principaltypeno test imports it
type Principal = { readonly id: string; readonly party: string };

A person or service that acts for a party.

governance.Granttypeno test imports it
type Grant = { readonly principal: string; readonly tenant: string; readonly role: Role; readonly from: string; readonly until?: string };

A grant of a role on a tenant (the client's id), from an instant until another (open where absent).

governance.Engagementtypeno test imports it
type Engagement = { readonly operator: string; readonly client: string; readonly from: string; readonly until?: string };

An engagement: an operator serves a client, from an instant until another (open where absent).

governance.Modeltypeno test imports it
type Model = { readonly parties: readonly Party[]; readonly principals: readonly Principal[]; readonly engagements: readonly Engagement[]; readonly grants: readonly Grant[] };

The whole model of one deployment.

ROLESconst
const ROLES: readonly ["owner", "operator", "auditor", "viewer"]

What a person may be to a tenant.

Imported by 6 tests of the run (6 passed, 0 failed): the library's results

Roletypeno test imports it
type Role = (typeof ROLES)[number];

A role.

ACTIONSconst
const ACTIONS: readonly ["read", "record-evidence", "determine", "approve-change", "administer", "export"]

What can be done to a tenant.

Imported by 6 tests of the run (6 passed, 0 failed): the library's results

Actiontypeno test imports it
type Action = (typeof ACTIONS)[number];

An action.

ROLE_ACTIONSconst
const ROLE_ACTIONS: Readonly<Record<"auditor" | "operator" | "owner" | "viewer", readonly ("administer" | "approve-change" | "determine" | "export" | "read" | "record-evidence")[]>>

What each role may do: the owner everything; the operator's staff work in the tenant but neither determine an objective, approve a change nor administer; an auditor reads and determines; a viewer reads.

Imported by 6 tests of the run (6 passed, 0 failed): the library's results

Partytypeno test imports it
type Party = { readonly id: string; readonly kind: "operator" | "client"; readonly name: string };

A party: an operator (a service provider) or a client (an organization whose tenant it is).

Principaltypeno test imports it
type Principal = { readonly id: string; readonly party: string };

A person or service that acts for a party.

Granttypeno test imports it
type Grant = { readonly principal: string; readonly tenant: string; readonly role: Role; readonly from: string; readonly until?: string };

A grant of a role on a tenant (the client's id), from an instant until another (open where absent).

Engagementtypeno test imports it
type Engagement = { readonly operator: string; readonly client: string; readonly from: string; readonly until?: string };

An engagement: an operator serves a client, from an instant until another (open where absent).

Modeltype
type Model = { readonly parties: readonly Party[]; readonly principals: readonly Principal[]; readonly engagements: readonly Engagement[]; readonly grants: readonly Grant[] };

The whole model of one deployment.

Imported by 6 tests of the run (6 passed, 0 failed): the library's results

Titles, headings, exports, tables, columns and requirements. Esc closes.