Analyst Bootcamp Join on TelegramJoin
Junior+ · Systems Analysis

Who may do what: authentication, roles and the permission matrix

🕥 9 min read🧭 SA📅 updated 2026-10-15Читать на русском

Every feature has a hidden question: who is allowed to call it, on whose data. The answer is a short permission matrix, a few rules about ownership, and a decision about how callers prove who they are. Here is how to write all three before the first endpoint exists.

The feature that worked for everyone

A support tool got a new "view customer orders" screen. It worked beautifully. It also worked for the marketing intern, for a contractor whose access should have ended in March, and for anyone who changed the customer id in the URL. Nobody had written down who may see what, so the system let everyone.

Two different questions hide in "who may do what", and they have different answers:

The system analyst specifies both, in that order, for every feature. It takes an hour and it is the hour that prevents the audit finding.

Authentication: how callers prove who they are

You rarely design this from scratch; you pick from what the platform already has and state it in the ticket:

CallerUsual mechanismWhat the ticket says
Customer in the web or appsession cookie or OAuth 2.0 / OpenID Connect token"customer identity from the existing login; token carries customer id"
Staff in an internal toolcompany single sign-on (OIDC via the identity provider)"SSO required; roles come from the IdP groups"
Another internal serviceservice token or mutual TLS"service identity orders-service; no user context"
A partner's serverAPI key or OAuth client credentials, scoped"partner key, scoped to their own shipments, rotated yearly"

The point of the table is the last column: the ticket names the mechanism, where the identity comes from, and what the token carries. Without it, developers hard-code a check and the second caller type breaks it.

Authorisation: roles, ownership, and the matrix

Most Junior+ features need two kinds of rule, and they combine:

  1. Role: what a kind of user may do. Customers may create orders; agents may refund; admins may change roles.
  2. Ownership: on whose data. Customers see their own orders; team leads see their team's tickets; partners see their shipments.

Write both as a matrix, one row per action, one column per role, and the cell says the scope:

ActionCustomerSupport agentSupport leadFinanceService: orders
View orderownanyanyanyany
Create orderownon behalf, loggedon behalf, logged—yes
Cancel order (Paid, < 1 h)ownanyany——
Cancel order (Paid, > 1 h)—any, reason requiredany——
Refund—≤ 100, own queueany amountany—
Export orders CSV——own teamall—
Change customer e-mailown, re-verify—with ticket id——

Reading the matrix: the limit on refunds is a rule, not a role; "on behalf, logged" is an audit requirement; the service account can create but never cancel. All of those would otherwise be discovered in code review, or in production.

Identity first, then role, then ownership and conditions; a request passes all four or gets 401 / 403.
Identity first, then role, then ownership and conditions; a request passes all four or gets 401 / 403.

The three rules that get forgotten

Lifecycle: joining, changing, leaving

Permissions are a process, not a table. Three questions for the ticket:

The contractor from the first paragraph is a lifecycle failure, and the fix is a line in the ticket: "staff access only via SSO; no local accounts".

What goes where

With AI

Models produce a plausible role matrix for a generic shop in seconds. They will not know that your agents have a refund limit, that finance exports everything, or that your IdP groups define roles. Use the model to draft the rows and columns; fill the cells with the product owner; ask the platform team to confirm the mechanism row.

Try it (5–10 minutes)

Feature: "Managers approve their team's expense claims; finance pays them; employees see their own history; auditors read everything but change nothing."

  1. Write the authentication row for each caller type (employees, finance, an auditor from an external firm, the payroll system).
  2. Build the matrix for: submit claim, approve claim, reject claim, pay claim, view claim, export claims. Add two conditions (amount limit; no self-approval).
  3. Write one allowed and one forbidden Gherkin scenario for "approve", and the three lifecycle lines.

Where this shows up in real work

  • System analyst job posts list "access control", "RBAC" and "working with security on requirements"; interviewers ask "who should be able to see this, and how do you make sure?".
  • In real audits (SOC 2, ISO 27001, GDPR) the permission matrix with an audit log is the evidence auditors ask for; the team that has it finishes the audit in a day.
  • Freelance SaaS builds: the client who receives a matrix stops discovering "oh, and managers should not see salaries" after launch.

Sources worth reading

Practice it on real drills

Roles, permissions & access rulesREST API design for a featureRegulatory / policy change adoption

Finished reading and did the exercise?