Who administers an organization
An organization has two kinds of authority, and they answer different questions.
An application role is an application’s own vocabulary about its own data: who reads the
member register, who publishes an article. You declare roles in .mtd, the compiler checks them,
and the access matrix covers them.
An engine role is the organization’s authority over its administration: who may add a login, read the audit log, or reset a demonstration organization. The engine declares these roles. No application can declare them, change them, or name them in a rule.
The engine’s rights and roles
Section titled “The engine’s rights and roles”The administration under /matterdata is divided into five engine rights. Each right opens
some of its pages:
| Engine right | What it opens |
|---|---|
mtd.logins |
Logins, invitations, the acts on a login, and Groups |
mtd.overview |
Overview, Apps, and Usage |
mtd.audit |
Audit log |
mtd.jobs |
Jobs and Run now |
mtd.reset |
the nightly reset of a demonstration organization |
A login holds rights through three fixed engine roles:
| Engine role | Rights |
|---|---|
Administrator (administrator) |
all five |
Login manager (login_manager) |
mtd.logins, mtd.overview |
Auditor (auditor) |
mtd.audit, mtd.overview |
A login can hold any number of engine roles, directly or through a group. The administration shows only the tabs that the login’s rights open. A signed-in person who opens a page without the right gets 403.
The Apps tab lists, for each application, what each role may do, and it lists the engine roles with their rights.
An engine role grants nothing inside an application
Section titled “An engine role grants nothing inside an application”The engine roles decide who administers the organization. They decide nothing about the data inside an application.
One property test covers the whole access matrix. For every route of every application and every role, the decision with each engine role equals the decision without it.
An administrator who needs an application’s data needs a role in that application. Roles can be
granted or revoked separately for each application on the logins page. Each role granted or
revoked records an admin.authority event kept forever, naming the administrator, target login,
application, and role.
The cost is visible on purpose. An access that an administrator takes leaves a permanent record. An invisible bypass would cost nothing and would leave nothing to find.
A login gives only the authority it holds
Section titled “A login gives only the authority it holds”A login may give an engine role only when it holds every right that role carries. The same rule applies when it adds somebody to a group that holds an engine role, removes a member from that group, deletes the group, or gives the group an engine role.
- Only an Administrator can make an Administrator.
- A Login manager can make another Login manager. It cannot make an Auditor, because it does not
hold
mtd.audit. - Application roles carry no engine right, so a Login manager can give any application role.
For the same reason, a login cannot take over a login that outranks it. It cannot set a new password for, issue a new invitation link for, or disable a login that holds an engine role it could not give. With a new password it could sign in as that login.
The page draws only the boxes and buttons that the login may use. A form that asks for more is refused, and nothing is written.
Groups give roles in several applications
Section titled “Groups give roles in several applications”A group belongs to the organization. It holds roles in any number of applications, and it can also hold engine roles. A login’s roles in an application are its own roles there and the roles of every group it is a member of.
The organization decides who is in the group. Each application decides what its roles may do. A
role name never changes meaning, because a group holds board in the club application and
editor in the calendar, not a role called board everywhere.
Roles are read on every request. A new member gets the group’s roles on their next request, and a removed member loses them on their next request. Groups do not contain other groups.
Give a group roles in several apps walks through the page.
Why the authority is not an application role
Section titled “Why the authority is not an application role”A role name means what one application means by it. admin means “the whole calendar” in one
application and “the editorial lead” in another. An organization-wide role vocabulary would merge
two unrelated meanings and call the result a privilege.
So the engine keeps its roles apart. They are stored under the engine’s own name, matterdata,
and each application’s roles are stored under the application’s name. An application may declare
its own role called administrator, and it means only what that application says.
tenant_admin stays a reserved word. An application may not declare it or name it in a rule. An
application may not be named matterdata, and a rule cannot name an engine right.
See Reserved names for the whole reserved set.
How the first administrator exists, and why the last one cannot go
Section titled “How the first administrator exists, and why the last one cannot go”matterdata install gives its first login the Administrator role. Before install there is
nobody to ask; after it there is somebody to ask.
The organization always keeps at least one enabled login that holds Administrator, directly or through a group. These acts are refused when they would leave none:
- taking the role from a login,
- disabling a login,
- removing a member from a group,
- taking the role from a group,
- deleting a group.
An organization with no administrator has no repair inside its own database: there is no
higher authority in the file, and the only way back is somebody with shell access to the server
running matterdata grant-admin.
The rule is a condition of the statement that changes the rows, not a check before it. Two administrators who remove each other at the same moment therefore cannot both succeed.
Manage logins for your organization shows the acts on the page, and the two commands that set the role on a tenant file.
Why the page answers 403 and not 404
Section titled “Why the page answers 403 and not 404”A record that a person may not see answers 404, because 403 would confirm that the record exists. The administration page is not a record. Every organization has one, and its existence is not a secret. A person who gets 403 here is a colleague who is signed in with the wrong authority, so the ordinary refusal applies and no new refusal shape enters the engine.
What the engine roles cannot express
Section titled “What the engine roles cannot express”The engine roles are organization-wide. “They may manage the calendar’s logins and nothing else” is not expressible. The three roles are fixed, and an organization cannot make a new one out of the five rights.
The engine roles give no operator access to the server, and they give no access to another organization’s database.