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.
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.
$ 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
$ 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.
| Option | Meaning |
|---|---|
--credential-id | The email address the person signs in with. |
--workspace-id | The workspace to add them to. The browser shows it after you sign in. Leave it out to create the account before the workspace exists. |
--role | member 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
| Command | What it does |
|---|---|
reset-local-password | Generates 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-credential | Re-enables a disabled account. |
designate-local-administrator | Hands 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.
$ 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
| Capability | Unlocks |
|---|---|
administer-directory | register-directory-authority, bind-directory-principal, bind-directory-group, reset-directory-authority, directory-status, directory-operation-status |
administer-groups | create-group, add-group-member, remove-group-member, retire-group, corroborate-group |
administer-lifecycle | deactivate-principal, reactivate-principal, revoke-sessions |
resolve-principal | resolve-principal |
enrol-principal | register-enrolment-issuer, enrol-oidc-principal |
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.
- Grant enrollment
Run
provision-operatorwith--grant enrol-principal. - Register your issuer once
Run
kw-iam-operator register-enrolment-issuer --issuer https://sso.example.com. - Enroll each person
Run
kw-iam-operator enrol-oidc-principalwith the person's issuer and subject. The subject is the opaquesubclaim your provider issues, not an email address or username. Read it from an ID token produced by that person's own sign-in. - Give them a workspace
Enrollment creates the person and nothing else. Use
create-workspacefor their first workspace, orgrant-memberto 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.