Office docsRun it

Add people

An installation starts with one administrator. An operator adds everyone else on the host. There is no self-service sign-up.

IT admins8 min

Set up the operator login

Provision the operator login once per installation. It is the registered database login that may create workspaces and grant memberships.

bash
$ docker compose -p kernalworks-office -f compose.yaml exec office node /opt/kernalworks/operations/src/office.mjs provision-operator --config /srv/kernalworks/data/office-installation.json --superuser-connection /run/secrets/superuser

By default the operator can create workspaces and grant membership, and nothing else.

Add a local account

bash
$ docker compose -p kernalworks-office -f compose.yaml exec office node /opt/kernalworks/operations/src/office.mjs create-local-account --config /srv/kernalworks/data/office-installation.json --credential-id them@example.com --workspace-id <workspace> --role member

The command prints a generated password once and stores it nowhere.

OptionMeaning
--credential-idThe email address the person signs in with.
--workspace-idThe workspace to add them to. The browser shows it after you sign in. Leave it out to create the account before the workspace exists.
--rolemember or administrator.

If the command creates the account and then fails, for example on a wrong workspace id, run it again with the same --credential-id. It finds the account, finishes the membership and reports credential: "existing". It never changes an existing password.

Manage existing accounts

CommandWhat it does
reset-local-passwordGenerates a new password, clears the lockout and ends the person's sessions. Also use it for a generated password that was never written down.
enable-local-credentialRe-enables a disabled account.
designate-local-administratorHands the administrator role to another account when the current administrator is leaving.

Each takes the same --config option and the person's --credential-id. To recover a lost administrator, reset that account's password.

Grant more operator capabilities

Other administrative actions need a capability granted to the operator with --grant.

bash
$ docker compose -p kernalworks-office -f compose.yaml exec office node /opt/kernalworks/operations/src/office.mjs provision-operator --config /srv/kernalworks/data/office-installation.json --superuser-connection /run/secrets/superuser --grant administer-lifecycle
CapabilityUnlocks
administer-directoryregister-directory-authority, bind-directory-principal, bind-directory-group, reset-directory-authority, directory-status, directory-operation-status
administer-groupscreate-group, add-group-member, remove-group-member, retire-group, corroborate-group
administer-lifecycledeactivate-principal, reactivate-principal, revoke-sessions
resolve-principalresolve-principal
enrol-principalregister-enrolment-issuer, enrol-oidc-principal
Name the whole set every time

Each run of provision-operator sets the operator's capabilities to exactly what you name. A capability granted earlier and left off a later run is revoked. Separate several with commas, as in --grant administer-directory,administer-groups.

Grant the narrowest set the work needs, and run the command again without --grant when the work is done. administer-directory decides which identities map to which people and is the strongest. administer-lifecycle can deactivate people and end their sessions. Grant enrol-principal for an enrollment and revoke it afterwards.

Admit people from your identity provider

On a sovereign installation, a person your provider authenticates is refused until an operator enrolls them. Nothing is admitted automatically, including by email domain.

  1. Grant enrollment

    Run provision-operator with --grant enrol-principal.

  2. Register your issuer once

    Run kw-iam-operator register-enrolment-issuer --issuer https://sso.example.com.

  3. Enroll each person

    Run kw-iam-operator enrol-oidc-principal with the person's issuer and subject. The subject is the opaque sub claim your provider issues, not an email address or username. Read it from an ID token produced by that person's own sign-in.

  4. Give them a workspace

    Enrollment creates the person and nothing else. Use create-workspace for their first workspace, or grant-member to add them to an existing one.

Every kw-iam-operator command takes an --operation-id you generate and keep, and most take the current --recovery-epoch. If an outcome is unknown, retry with the same operation id. A new id would be a second operation.