Skip to main content

Roles and access

See what a member, an org admin and a read-only auditor can read and change in memtrunk, and how the server enforces each role on every request.

Last updated

Every memtrunk account has a role. The roles include member, org admin and read-only auditor. The server checks the role on each request. The console only hides what you cannot use.

The roles#

  • A member works with own data: own keys, own accounts, own routing rules, own memory and own usage.
  • An org admin manages the users and teams of one organization.
  • A read-only auditor reads data across users and cannot change it.

An org admin who has no organization manages no one. The read gates for users and teams return 403 for that account.

What each role can do#

The table lists areas that the code confirms. "Own" means the data of the signed-in user. "403" means the server refuses the request.

AreaMemberOrg adminRead-only auditor
Usage viewsOwn. Some views widen to the organization when usage sharing is on.Own organizationAll users
Request logsOwn. Rows of the organization when usage sharing is on.Own organizationAll users
Tool events export and Projects pageOwnOwnAll users
Usage sharing switch403Own organization403
User list403Members of the own organizationAll users
User edits403Users of the own organization403
Memory grant change for a user403Users of the own organization403
Team list403Teams of the own organizationAll teams
Team create, edit and delete403Own organization403
Most settings pages and their data403403Read only
Tool collection switch and delete for a projectOwnOwn403
Console pages under OrgClosedOpenClosed

A few settings reads are open to every signed-in role. Usage and request log scopes are described in Usage and cost estimates and Request logs and telemetry.

What an org admin cannot do#

An org admin works inside the own organization. These limits apply on the Org users page:

  • The list shows only users of the own organization.
  • The Role control offers only Member and Org admin. A user with any other role shows a read-only role badge.
  • The Team control lists only teams of the own organization. The server refuses a team from another organization.
  • The page has no control to move a user to another organization. The server refuses the change.

Each organization can also switch off features for all of its users, and an admin can switch features off for one user. Those switches limit what a role can use.

The auditor write refusal#

The server refuses most write requests from an auditor. A write is any request that changes data. The server answers with status 403 and the text Auditor role is read-only. The console shows that text next to the action.

For example, an auditor can open the Projects page. The Collect checkbox and the Delete button are visible. If the auditor uses either one, the console shows the error Auditor role is read-only and nothing changes.

The refusal covers most write actions, not every action. Some routes accept only reads. A few routes use their own checks.

How the server enforces roles#

The console hides links by role. A page can also show "You can't open this page" when your role does not include it. These are presentation only. They do not protect data.

The server protects data with a check on each route:

  • A read check admits some roles. A write check admits fewer roles.
  • The server reads the account from the database on each console request. A disabled account loses access on the next request.
  • A route that works on users, teams or usage narrows an org admin to the own organization.

A request that fails a check returns 401 when the session is missing or 403 when the role is not allowed. A request for data in another organization can also return 404, so the response does not reveal that the data exists.

Next steps#