Figures come from the sources linked under each claim, checked on 28 November 2026. Where we give our own view, from building permission systems and audit logs into client products, we say so. This guide is about software design; it is not legal advice on UK GDPR or any certification.
Read the transcript
One hundred percent. That’s the share of applications OWASP tested that had some form of broken access control. It’s the number one risk on the web. And it’s the first thing enterprise buyers check. Most products start with one flag. Admin, or not. Then the first big customer sends a security questionnaire, and asks who can do what. So how do you build access control that passes an enterprise security review?
Part one. Roles and permissions. There are four ways to decide access. Roles. Roles scoped to a project. Relationships, like owner of a folder. And attributes, like region or time. Most B2B products start with scoped roles. Start with permissions, not roles. Name every action. Then group them into four to six roles. Keep powerful actions with admins. Make the default safe. And write it down.
Part two. Enforcing it. The most common bug is a check on the role, but not on the record. Change the number in the URL, and you’re reading another customer’s invoice. So every request takes the same path. Authenticate. Load the record inside the customer’s own tenant. Check the permission. Then act, or deny. And record it. OWASP’s guidance is blunt. Deny access by default. Check permissions on every request. And never trust a check made in the browser.
Part three. Identity and leavers. Large customers want people to sign in with single sign-on, and to be removed automatically with SCIM. When someone leaves, end their sessions and tokens too. A live session is still access. Your own staff are users too. Shared support logins fail every review. Buyers prefer access they grant, for a limited time, recorded in their own audit log.
Part four. The audit log. An audit log records actions that matter. Role changes, exports, deletions, sign-ins. Each event says when, where, who and what, and whether it worked. Never passwords or tokens. Not every actor is a person. API keys, integrations and AI agents change data too. Record the agent, and the user it acted for. A log that can be edited proves nothing. Make it append-only. And keep it. The NCSC suggests at least six months, because intrusions take an average of a hundred and one days to find.
Part five. Proving it. Buyers will ask for your role matrix, how tenants are separated, and who can see their data. Show them tests that try to read another tenant’s data, a recent penetration test, and an audit log they can export.
So, what do buyers check? That every request is checked, every customer is kept apart, and every important action is recorded. Start the audit log now. You can’t log the past. The full guide, with six working tools, is free at loomstrat.com.
In this guide25 sections
- 01The short answer
- 02Why buyers care
- 03The words that matter
- 04Four access models
- 05Designing your roles
- 06Keeping customers apart
- 07Enforcing permissions
- 08Custom and scoped roles
- 09SSO, SCIM and leavers
- 10Admins, support and break-glass
- 11API keys, integrations and AI agents
- 12What an audit log records
- 13Anatomy of an audit event
- 14Protecting the log
- 15How long to keep it
- 16The customer-facing audit log
- 17Access reviews
- 18Testing access control
- 19Passing the security review
- 20Build or buy
- 21A plan in four stages
- 22Ten mistakes to avoid
- 23Glossary
- 24Questions and answers
- 25Sources and method
The short answer
What do enterprise buyers expect from a SaaS product’s roles, permissions and audit logs?
They expect a small, documented set of roles built on least privilege, with permissions checked on the server for every request and every customer’s data kept strictly apart. Larger buyers want roles scoped to teams or projects, single sign-on with SCIM so leavers lose access automatically, and controlled, logged support access. They expect an audit log that records who did what, to which record, from where, when and whether it worked; that cannot be edited; that is kept for at least six months, and often a year; and that their own admins can search and export. Broken access control is the top risk in OWASP’s 2025 Top 10, so reviewers test it first.
Access control is the part of a product that decides who can see and change what. In a small product with a handful of users it can be a single “is admin” flag. Once you sell to companies with hundreds of staff, departments, contractors and auditors, that flag stops being enough. Buyers need to give each person the access their job requires and no more, and they need to prove afterwards who did what.
Two things make this hard to retrofit. Permission checks end up scattered through the code, so tightening them means touching almost every endpoint. And audit logging only helps for events you recorded at the time: you cannot go back and log last year. Both reward getting the design right early.
This guide covers the design decisions and the engineering behind them, in the order you would meet them. There are six working tools: an access model chooser, a role matrix that flags what a security reviewer would question, an authorisation check simulator, an audit event builder, a retention calculator and an enterprise readiness checklist.
Key facts
Checked 28 November 2026
- Top risk
- Broken access control is ranked first in the OWASP Top 10:2025, as it was in 2021. OWASP Top 10:2025
- How common
- OWASP reports that 100% of applications tested had some form of broken access control, with 1,839,701 occurrences across 40 weakness types. OWASP Top 10:2025
- Deny by default
- OWASP says applications should be configured to deny access by default and validate permissions on every request. OWASP Authorization Cheat Sheet
- What to log
- OWASP’s logging guidance says logs must record when, where, who and what for each event. OWASP Logging Cheat Sheet
- Keep logs
- The NCSC suggests keeping logs for at least six months, noting an average of 101 days before an intrusion is detected. NCSC
- User provisioning
- SCIM, the standard for syncing users from identity providers, is defined in RFC 7643 and RFC 7644, published in September 2015. IETF
- UK GDPR
- The ICO expects personal data to be accessed only by those you have authorised, acting within the scope of that authority. ICO
- RBAC standard
- Role-based access control was adopted as the ANSI/INCITS 359 standard in 2004 and revised in 2012. NIST
Why buyers care
When a company buys software that will hold its data, its security team becomes responsible for that data in a system it does not control. It cannot read your code. So it asks questions, usually in a long questionnaire, and asks for evidence. Access control and logging are near the top of every such questionnaire, for three reasons.
It is where applications most often fail. The OWASP Top 10:2025 ranks broken access control as the number one web application security risk. OWASP reports that every application it tested had some form of it: 1,839,701 occurrences across 40 related weakness types, with an average incidence rate of 3.74%. In the 2021 edition, where it also ranked first, the figure was 94% of applications tested. Security teams know these numbers, and many will test your product themselves or ask for your latest penetration test.
The law expects it. Under UK GDPR, a buyer that puts personal data into your product still has to keep it secure. The ICO’s guide to data security says organisations should make sure data can be accessed “only by those you have authorised to do so (and that those people only act within the scope of the authority you give them)”. It also quotes Article 32’s requirement for “appropriate technical and organisational measures to ensure a level of security appropriate to the risk”. A buyer cannot meet that if your product only has one kind of user.
Breaches start with access. Verizon’s 2026 Data Breach Investigations Report finds that 31% of breaches begin with the exploitation of software vulnerabilities. When something does go wrong, the audit log is how the customer’s security team works out what happened and whom they need to tell. If the log is missing or incomplete, they cannot answer either question.
In our experience the commercial effect is simple. A product with documented roles, enforced permissions and a usable audit log gets through security review in weeks. A product without them can lose the deal, or win it with a list of promised features and a deadline.
The words that matter
These terms get mixed up constantly, including in security questionnaires. It helps to use them precisely in your own documentation.
| Term | What it means | Example |
|---|---|---|
| Authentication | Proving who someone is | Password and passkey, or SSO through Okta |
| Authorisation | Deciding what an authenticated person may do | Can Priya delete this invoice? |
| Permission | One action on one kind of resource | invoice.delete |
| Role | A named bundle of permissions | Billing Admin |
| Scope | Where a role applies | Admin in the Marketing workspace only |
| Tenant | One customer’s isolated space | Acme Ltd’s organisation |
| Least privilege | Giving only the access a job needs | Support can read tickets but not export them |
| Audit log | A tamper-resistant record of security-relevant actions | Priya changed Sam’s role at 09:14 UTC |
Authentication is covered in our SaaS authentication guide. This guide starts once you know who the user is. Least privilege is the principle behind everything that follows. NIST defines it as “a security principle that a system should restrict the access privileges of users… to the minimum necessary to accomplish assigned tasks.”
Four access models
There are four common ways to decide whether a request is allowed. They are not exclusive: most mature products combine two of them.
Role-based access control (RBAC). Each user has one or more roles, and each role grants a set of permissions. NIST’s RBAC project describes it simply: “each user is assigned one or more roles, and each role is assigned one or more privileges”. The model became a US national standard, ANSI/INCITS 359, in 2004. RBAC is easy to explain to buyers, easy to document and easy to audit, which is why almost every B2B product starts with it.
Roles scoped to resources. The same idea, but a role is held in a particular place: an organisation, a workspace, a project or a team. A person can be an admin in one project and a viewer in another. This is what most B2B SaaS products need once customers grow past a single team, and it is still recognisably RBAC, so buyers understand it.
Relationship-based access control (ReBAC). Access follows relationships between users and objects: owner of, member of, parent of, shared with. If you can edit a folder, you can edit what is inside it. Document tools, file storage and anything with sharing or nested structures fit this model naturally.
Attribute-based access control (ABAC). Rules look at attributes of the user, the resource and the request: department, data classification, region, time, device. It is the most flexible model and the hardest to reason about, test and explain in a questionnaire.
The OWASP Authorization Cheat Sheet goes further than most guidance and says “ABAC and ReBAC should typically be preferred for application development”, because pure roles tend to multiply and cannot express rules about individual records. Our own view is a little more cautious: start with scoped roles, which cover most B2B needs, and add relationship rules where sharing or hierarchy genuinely requires them. Whatever the model, the check must look at the specific record, not just the role.
Decision tool
Which access model does your product need?
Tick what your customers ask for. The tool suggests the simplest model that covers it. Start simple: you can add scopes and relationships later, but removing complexity is hard.
Suggested starting point
Plain roles (RBAC)
A small fixed set of roles, each a bundle of permissions. Easy to explain to buyers and easy to audit.
Example: Owner, Admin, Member, Viewer across the whole account.
| RBAC | Scoped roles | ReBAC | ABAC | |
|---|---|---|---|---|
| Decides by | User’s roles | Roles held in a place | Relationships to the object | Attributes and context |
| Easy to explain to buyers | Yes | Yes | Mostly | Harder |
| Handles record-level sharing | No | Partly | Yes | Yes |
| Handles context like region or time | No | No | No | Yes |
| Risk of role explosion | High as customers grow | Medium | Low | Low |
| Typical fit | Early products, simple teams | Most B2B SaaS | Documents, files, sharing | Regulated and high-security data |
Designing your roles
Good role design starts with permissions, not roles. List every action in your product that changes data, exposes data or changes security settings, and give each one a name such as invoice.read, invoice.delete or member.invite. Then group them into roles that match real jobs at your customers.
- 1
List the actions
Walk through the product and write down every action as a permission. Include the dangerous ones that are easy to forget: export, bulk delete, API key creation, integration settings, SSO configuration and changing roles.
- 2
Keep roles few
Four to six built-in roles cover most products: Owner, Admin, Member, Viewer and perhaps a specialist role such as Billing. Every extra role is something a buyer has to understand and an auditor has to review.
- 3
Separate powerful actions
Changing roles, configuring SSO, exporting all data and deleting the account should sit with Owner and Admin only. Billing usually deserves its own role, because finance staff need invoices but not customer data.
- 4
Make the default safe
New users should get the least powerful role that lets them start working. Invitations should default to Member or Viewer, never Admin.
- 5
Write it down
Publish the role matrix in your help centre. Enterprise buyers will ask for it, and writing it down exposes inconsistencies before a reviewer does.
Interactive matrix
Design a role matrix and see what a security reviewer would flag
Click a cell to grant or remove a permission. The Owner row is fixed: someone must always be able to recover the account. Each change updates the reviewer’s warnings.
| Permission | Owner | Admin | Member | Viewer | Billing |
|---|---|---|---|---|---|
| View records | |||||
| Create and edit records | |||||
| Delete records | |||||
| Export data | |||||
| Invite and remove users | |||||
| Change roles | |||||
| Manage billing | |||||
| Configure SSO | |||||
| View audit log |
0
issues a reviewer would raise
2 roles can change roles. Keep that number small.
Clean. Each role does one job, and powerful actions stay with Owner and Admin.
The warnings in the matrix are the questions we see most often in enterprise security questionnaires. Who can export all data? Who can change roles, and is that change logged? Who can change SSO? Each has a good answer if you design for it, and an awkward one if you discover it during the review.
Keeping customers apart
In a multi-tenant product, the most damaging access bug is not a member doing an admin’s job. It is one customer seeing another customer’s data. Roles do not prevent this. A user can be a perfectly legitimate admin in their own organisation and still read someone else’s invoices if the code looks up records by ID without checking whose they are.
OWASP calls this an insecure direct object reference. The Authorization Cheat Sheet tells developers to “perform access control checks on every request for the specific object or functionality being accessed”. In practice that means three habits:
- Scope every query. Every database query that returns customer data includes the tenant identifier, taken from the user’s session, never from the request.
- Use the database as a backstop. Where your database supports it, row-level security policies enforce the tenant filter even if application code forgets it.
- Avoid guessable identifiers. Random identifiers make enumeration harder. They are not a control on their own, but they slow down anyone trying sequential numbers.
Our multi-tenant architecture guide covers the choice between shared tables, separate schemas and separate databases. Whichever you choose, the tenant check belongs in shared code, not in each endpoint.
Enforcing permissions
A well-designed role matrix is worthless if the code does not enforce it consistently. The OWASP Authorization Cheat Sheet sets out the rules most reviewers check against:
- Deny by default. “For security purposes an application should be configured to deny access by default.” A new endpoint with no rule should refuse access, not allow it.
- Check every request. “Permission should be validated correctly on every request.” OWASP adds that checking “just the majority of requests is insufficient”: attackers look for the one endpoint you missed.
- Check on the server. “Developers must never rely on client-side access control checks.” Hiding a button is good design, but the API behind it must still refuse.
- Apply least privilege in both directions. Horizontally, so users cannot reach other users’ or tenants’ records, and vertically, so they cannot reach admin functions.
Authenticate
Confirm the session or token is valid and identify the user and their organisation.
Load the object
Fetch the record within the user’s tenant only. Not found and not yours look the same.
Check the permission
Ask one shared policy function whether this user may do this action to this object.
Act or deny
Perform the action, or return 403 or 404. Nothing passes by default.
Record it
Write an audit event for changes and for denied attempts on sensitive actions.
Simulator
Follow one request through an authorisation check
A user asks for /api/invoices/8812. Change who they are, what they want to do and whose invoice it is. Then switch between a naive check and a safe one to see broken access control happen.
User’s role
Action
Whose invoice
Signed in
- Request carries a valid session
- Organisation not checked: the ID in the URL is trusted
- Member role includes “edit”
Allowed, and that is a data breach
The user’s role is fine, but the invoice is not theirs. Without an ownership check, changing the number in the URL exposes other customers’ data.
The simulator shows the most common failure. With the naive check, a Member who edits an invoice is allowed whether or not the invoice belongs to them, because the role grants “edit” and nothing checks ownership. Switching to the safe check stops the request before the role is even considered.
The practical fix is architectural. Put every permission decision behind one function or service, such as can(user, action, object), and call it from every endpoint, background job and export. When the rules live in one place, you can test them, review them and change them without hunting through the codebase. When they are scattered, every new feature is a new chance to forget.
Two smaller decisions come up in every review. The first is what to return when access is refused. For records in another tenant, return the same “not found” response you would give for a record that does not exist. A 403 confirms the record is there, which tells an attacker their guess was right. Inside the user’s own organisation, a clear 403 with a message such as “You need the Admin role to change billing” is better, because it tells a legitimate user what to ask for.
The second is speed. Permission checks run on every request, so teams are tempted to cache them. Caching is fine, but a cached “allowed” must expire quickly when roles change, or a demoted admin keeps their powers for the life of the cache. Our rule of thumb is that a role change or deprovisioning should take effect within a minute, and immediately for the person whose access was removed.
“If you cannot point to the one place in the code where a permission decision is made, a reviewer will assume there isn’t one.”
- Our view, from reviewing client codebases before enterprise security assessments
Custom and scoped roles
The first enterprise customer often asks for a role you do not have: a team lead who can approve but not delete, an external auditor who can read everything but change nothing, a regional manager who sees only their region. There are two sustainable ways to say yes.
Scoped roles let a customer assign your existing roles per workspace, project or team. This answers most requests without new roles, because the problem is usually where someone has access rather than what they can do.
Custom roles let a customer build their own role from your permission list. This is powerful and popular with large buyers, but it has costs. Every new permission you add must be placed into customers’ custom roles, or they silently miss features. Customers can create roles that make no sense, such as delete without read. And support becomes harder, because no two customers are configured the same way.
If you offer custom roles, keep the permission list stable and well named, give each permission a plain description, prevent combinations that cannot work, and show the effective permissions of any user on one screen. Changes to custom roles must be audited like any other security change.
SSO, SCIM and leavers
Large customers do not want to manage your product’s users by hand. They want people to sign in through their identity provider, and they want access to end when someone leaves. That is two features: single sign-on, which handles login, and SCIM, which handles the user list.
SCIM, the System for Cross-domain Identity Management, is an open standard. RFC 7643 defines the schema for users and groups and RFC 7644 defines the protocol, “an HTTP-based protocol that makes provisioning and management of identity data on the web easier”. Both were published in September 2015. With SCIM, the customer’s identity provider creates, updates and deactivates users in your product automatically.
Two details matter for access control. First, deprovisioning must take effect quickly. When SCIM deactivates a user, end their sessions and revoke their API tokens, not just their ability to sign in again. A leaver with a live session still has access. Second, map identity provider groups to your roles. If the customer can say “everyone in the Finance group gets Billing” in their identity provider, they manage access in one place and their auditors can check it there.
SSO and SCIM configuration are among the most powerful settings in your product. Restrict them to Owner and Admin, log every change, and consider requiring a second admin to confirm changes that could lock everyone out.
Admins, support and break-glass
Your own staff are users too. Support engineers need to see what a customer sees to help them, and engineers need to fix data problems. Enterprise buyers will ask exactly who at your company can access their data and how that is controlled.
| Approach | How it works | What buyers think |
|---|---|---|
| Shared admin login | Staff sign in to customer accounts with a common credential | Fails review. No individual accountability |
| Database access | Engineers query production directly | Accepted only with strict controls and logging |
| Impersonation | Staff view the product as a customer user | Accepted if logged, visible to the customer and time-limited |
| Customer-granted access | The customer switches on support access for a period | Preferred by most enterprise buyers |
| Break-glass | Emergency access with approval and alerts | Expected for incidents, if every use is reviewed |
Our recommendation is customer-granted, time-limited support access, recorded in the customer’s own audit log as your staff member, not as the customer’s user. The customer sees that support looked at their account, when and why. Keep a break-glass route for genuine emergencies, require approval or at least an immediate alert, and review every use.
Inside your company, apply the same least-privilege thinking: few people with production access, named accounts rather than shared ones, multi-factor authentication everywhere, and a regular review of who still needs access.
API keys, integrations and AI agents
Not every actor in your product is a person. API keys, connected integrations, scheduled jobs and, increasingly, AI agents all read and change data. Each needs permissions, and each needs to appear in the audit log as itself.
API keys should carry their own scopes, chosen when the key is created, rather than inheriting everything the creating user can do. A key that only syncs contacts should not be able to delete the account. Show admins every active key, who created it, its scopes and when it was last used, and let them revoke it. Creating, using for the first time and revoking a key are all audit events.
Integrations connected with OAuth should request the narrowest scopes they need. When an integration acts, the audit log should name the integration and the person who connected it, so a customer can tell “Sam deleted 400 contacts” from “the CRM sync Sam connected deleted 400 contacts”.
AI agents raise the same question in a sharper form. When an agent inside your product drafts, updates or sends something on a user’s behalf, it should act with that user’s permissions or fewer, never more. In our view the audit event should record both identities: the agent as the actor and the user it acted for. Customers deploying agents will ask exactly what they did, and “the system” is not an answer an auditor accepts.
| Actor | Permissions come from | Audit log should show |
|---|---|---|
| API key | Scopes chosen when the key is created | Key name and ID, plus who created it |
| OAuth integration | Scopes the user approved | Integration name, plus who connected it |
| Scheduled job | A service identity with fixed permissions | Job name, and the setting that triggered it |
| AI agent | The user it acts for, possibly narrowed | Agent as actor, user as “on behalf of” |
| SCIM | The identity provider connection | SCIM as actor, plus the identity provider |
What an audit log records
An audit log is not your application log. Application logs help engineers debug; they are noisy, short-lived and full of technical detail. An audit log is a curated record of actions that matter for security and accountability, kept for months or years and readable by the customer.
The OWASP Logging Cheat Sheet lists events that should always be logged where possible, including “authentication successes and failures”, “authorization (access control) failures” and “user administration actions such as addition or deletion of users, changes to privileges”. For a B2B product, we group audit events into five families:
| Family | Examples |
|---|---|
| Identity | Sign-in success and failure, MFA changes, password resets, SSO sign-ins, sessions revoked |
| Access | User invited, removed or suspended; role changed; custom role edited; SCIM sync changes |
| Security settings | SSO configured, allowed domains changed, API keys created or revoked, IP allow-lists edited |
| Data | Bulk export, bulk delete, records shared externally, integrations connected |
| Support and system | Support access granted and used, break-glass access, retention settings changed |
You do not need to log every page view. Reading a single record is usually too frequent and too low-risk for the audit log, though some regulated buyers will ask for read access to sensitive records. Start with every change to access and security settings, every export, every deletion and every failed authorisation attempt on sensitive actions.
Anatomy of an audit event
OWASP’s guidance is that logs must record “when, where, who and what” for each event. For an audit log that customers will rely on, that translates into a consistent structure.
- When: a precise timestamp in UTC. The NCSC recommends consistent time sources and UTC so events from different systems can be lined up.
- Who: the actor, with a type (user, API key, SCIM, support staff, system) and a stable identifier, plus the organisation.
- What: a dotted action name such as
role.updated, the target resource, the values before and after, and whether it succeeded. - Where: the IP address, user agent and a request identifier that links to your application logs.
Builder
Build an audit log event an enterprise customer can use
An admin has just promoted a member to admin. Choose what the audit event records. OWASP’s logging guidance asks for when, where, who and what. Try adding the fields that should never be logged.
Should never be logged
75/100
Useful for an investigation
{
"occurred_at": "2026-11-28T09:14:03.412Z",
"actor": { "type": "user", "id": "usr_41c9" },
"organization_id": "org_7d20",
"action": "role.updated",
"target": { "type": "membership", "id": "mem_88a1" },
"outcome": "success"
}An investigator would still ask: before and after, IP address and user agent, request ID.
Just as important is what stays out. OWASP lists data that “should usually not be recorded directly in the logs”, including session identifiers, “access tokens” and “authentication passwords”. Audit logs are exported, streamed to customers’ security tools and read by many people. A secret in an audit log is a secret published. Mask or hash anything sensitive, and think twice before logging the full content of records, which may contain personal data you then have to manage under UK GDPR.
Protecting the log
An audit log is only useful if people trust that nobody could have changed it. If an attacker or an insider can edit or delete events, the log proves nothing. The OWASP Logging Cheat Sheet recommends building in tamper detection “so you know if a record has been modified or deleted”, copying log data to read-only storage as soon as possible, and restricting and periodically reviewing who can read log data.
In practice that means:
- Append-only storage. The application can add events but has no code path to update or delete them. Use storage with write-once or object-lock features for the long-term copy.
- Separate permissions. The service that writes audit events should not be able to delete them, and engineers who can change production should not be able to quietly edit the log.
- Tamper evidence. Chaining each event’s hash to the previous one, or signing batches, lets you show that no event has been removed or altered.
- Protection in transit. The NCSC recommends encrypting logs in transit and restricting who can read and write them.
- Audit the audit log. Viewing and exporting the audit log, and changing its retention, are themselves audit events.
How long to keep it
The NCSC’s introduction to logging suggests keeping logs for at least six months, and points to an average of 101 days between an intrusion and its detection. A log that only goes back thirty days may not cover the start of an incident that is found three months later.
Enterprise contracts often ask for a year, and buyers in regulated sectors may ask for longer. The answer does not need to be the same for everyone. Many products keep a fixed period on standard plans, offer longer retention on enterprise plans, and let customers stream events to their own storage for as long as they like.
Calculator
How much audit data will you keep?
Estimate the size of an audit log at a given retention period. Most products log far fewer audit events than application events, so this is usually smaller than people fear.
80,000
audit events a day
29.2 m
events held at any time
35 GB
uncompressed storage
Meets the NCSC’s suggested minimum of six months. Many enterprise contracts ask for one year, and some regulated buyers ask for more.
Storage is rarely the constraint. A product with a few thousand active users generating dozens of audit events each a day produces gigabytes a year, not terabytes. The harder questions are search speed over long periods, which usually means moving older events to cheaper storage, and deletion: when a customer leaves, their audit log must be deleted along with their other data, according to your contract and privacy policy.
The customer-facing audit log
Recording events is half the job. Enterprise buyers expect their own admins to use the log without asking you. A good customer-facing audit log has four parts:
- 1
A screen admins can search
Filter by person, action, date range and target. Show events in plain language, such as “Priya changed Sam’s role from Member to Admin”, with the raw details a click away.
- 2
Export
Let admins download events for a period as CSV or JSON, for investigations and auditors.
- 3
An API
Let the customer’s security team pull events on a schedule into their own tools.
- 4
Streaming
For the largest customers, push events as they happen to their security information and event management (SIEM) system or storage.
Plan which tiers get which parts. Many products include a basic audit log screen on business plans and reserve long retention, the API and streaming for enterprise plans. Whatever you decide, write it down: “Do you provide an audit log, and how long is it kept?” appears in almost every security questionnaire we have seen.
Access reviews
Access tends to grow. People change teams and keep their old permissions; contractors finish and stay in the account; a temporary admin grant becomes permanent. Many enterprise customers run periodic access reviews, often quarterly for sensitive systems, in which a manager confirms that each person still needs their access. Your product can make that easy or painful.
At minimum, give admins a single view of every user, their role in each workspace, how they signed in and when they were last active, and let them export it. Better products flag accounts that have not been used for a set period, show external guests separately and let admins set time limits on elevated access, so a temporary admin reverts automatically.
Apply the same discipline internally. Review who at your company has production access and support access on a fixed schedule, remove what is no longer needed, and keep a record that the review happened. Buyers ask for evidence of both: that you review your own staff’s access, and that your product helps them review theirs.
Testing access control
Access control bugs rarely show up in normal use, because legitimate users do not try to read other customers’ invoices. They have to be looked for. OWASP calls logging “one of the most important detective controls” and recommends unit and integration tests for authorisation logic.
- Test the matrix. For every role and permission pair, write a test that confirms allowed actions succeed and forbidden ones fail. Generate these tests from the same matrix your documentation uses, so they cannot drift apart.
- Test across tenants. Create two organisations in your test suite and, for every endpoint, try to read and change the second organisation’s records with the first one’s users. Every one should fail.
- Test new endpoints by default. A test that lists every route and fails if one has no authorisation rule catches the forgotten endpoint before it ships.
- Test the audit trail. For each sensitive action, assert that the right audit event is written with the right actor and target.
- Get an independent test. A penetration test that specifically covers access control and tenant isolation is the evidence most buyers ask for. Our penetration testing guide explains how to scope and buy one.
Passing the security review
Enterprise security questionnaires vary in length, but the access control and logging questions are remarkably consistent. Expect to be asked:
- Which roles exist, and what can each do? Can you share the matrix?
- How is each customer’s data kept separate from other customers’?
- Is access enforced on the server for every request?
- Do you support SSO with SAML or OIDC, and SCIM provisioning?
- What happens to a user’s sessions and tokens when they are deprovisioned?
- Who at your company can access our data, and how is that approved and logged?
- What does your audit log record, how long is it kept, and can we export it?
- How are logs protected from tampering?
- When was your last penetration test, and did it cover access control?
- How do you review your own staff’s access?
Prepare written answers once and keep them current. A short security page or trust centre that covers these points saves weeks on every deal. Buyers also often ask about frameworks such as ISO 27001 and SOC 2. Both cover access control and logging, so the work in this guide feeds directly into them, but neither certificate replaces good answers to the questions above.
Checklist
Would your access controls pass an enterprise security review?
Ten things enterprise security teams look for when they assess a SaaS vendor. Tick what you could show evidence for today.
Fix the foundations before selling upmarket
Fix these first
- Scope every database query to the tenant, so one customer can never read another’s data by changing an ID.
- Log role changes, logins, exports, deletions and settings changes with who, what, when and where.
- Add tests that try to read and change another tenant’s data, and run them on every release.
Build or buy
Most products should build their role model and permission checks themselves, because they are tightly bound to the product’s own objects. What you can buy is the machinery around them.
| Part | Usually build | Consider buying when |
|---|---|---|
| Role matrix and permission names | Yes: it is your product | Never; it is your domain |
| Policy engine | Simple role checks in shared code | You need ReBAC or ABAC at scale, or policies changed without deploys |
| SSO and SCIM | Possible with libraries | You want many identity providers working quickly |
| Audit log storage and search | Possible for small volumes | You need long retention, streaming and fast search across years |
| Customer audit log screen | Often, to match your product | An embeddable component from your audit provider is good enough |
Open-source authorisation engines such as OpenFGA implement relationship-based models, and hosted services exist for authorisation, enterprise SSO and audit logs. They can save months. They do not remove the design work: you still decide the roles, the permissions and which events matter, and you still need tests that prove your product calls them on every request.
A plan in four stages
Checklist
Getting access control enterprise-ready
The order we use with clients preparing for their first enterprise deals.
0 of 16 done. Current stage: Design.
Stage 1 · Design
Stage 2 · Enforce
Stage 3 · Connect
Stage 4 · Prove
Ten mistakes to avoid
- Checking roles but not ownership. The role allows editing invoices; nothing checks the invoice is theirs.
- Trusting the client. A hidden button is not a permission check.
- Allow by default. New endpoints should be closed until a rule opens them.
- Permission checks scattered through the code. Nobody can review what they cannot find.
- A new built-in role for every big customer. Use scoped or custom roles instead.
- Deprovisioning that leaves sessions alive. Leavers keep access until their token expires.
- Shared support logins. No accountability, and an instant fail in review.
- Secrets in the audit log. Tokens and passwords in logs become everyone’s tokens and passwords.
- An editable audit log. If it can be changed, it proves nothing.
- Starting the audit log when the first enterprise customer asks. You cannot log the past.
- Access control
- The rules and mechanisms that decide who can see and change what in a system.
- Authorisation
- Deciding whether an authenticated user may perform a specific action on a specific resource.
- Permission
- A single allowed action on a type of resource, such as invoice.delete.
- Role
- A named group of permissions assigned to users.
- RBAC
- Role-based access control: access decided by the roles a user holds.
- ReBAC
- Relationship-based access control: access decided by relationships between users and objects.
- ABAC
- Attribute-based access control: access decided by rules over user, resource and request attributes.
- Least privilege
- Giving each user only the access their tasks require.
- Tenant isolation
- Keeping each customer’s data inaccessible to other customers.
- IDOR
- Insecure direct object reference: accessing a record by changing its identifier because ownership is not checked.
- SCIM
- System for Cross-domain Identity Management: a standard for syncing users and groups from identity providers.
- Deprovisioning
- Removing a user’s access when they leave or change role.
- Break-glass access
- Emergency access to systems or data, used rarely and reviewed every time.
- Audit log
- A tamper-resistant record of security-relevant actions: who did what, to what, when, where and with what outcome.
- SIEM
- Security information and event management: tools that collect and analyse security events from many systems.
Questions and answers
What is the difference between authentication and authorisation?
Authentication proves who a user is, for example with a password, passkey or single sign-on. Authorisation decides what that user is allowed to do once signed in, such as viewing, editing or deleting a particular record. Enterprise security reviews ask about both separately.
Should a SaaS product use RBAC or ABAC?
Most B2B products should start with role-based access control scoped to workspaces or projects, because it is easy to explain and audit. Add relationship-based rules for sharing and hierarchies, and attribute-based rules only where context such as region or data classification genuinely matters. OWASP’s Authorization Cheat Sheet says ABAC and ReBAC should typically be preferred for application development, because pure roles cannot express record-level rules.
How many roles should a SaaS product have?
Four to six built-in roles cover most products: Owner, Admin, Member, Viewer and perhaps a specialist role such as Billing. For larger customers, add roles scoped to teams or projects, or custom roles built from a fixed permission list, rather than adding more built-in roles.
What is broken access control?
Broken access control is when users can act outside their intended permissions, such as viewing another customer’s data or reaching admin functions. It is ranked first in the OWASP Top 10:2025, and OWASP reports that every application it tested had some form of it.
What should a SaaS audit log record?
Each event should record when (a UTC timestamp), who (the actor and organisation), what (the action, target, changes and outcome) and where (IP address, user agent and request ID). Log sign-ins, role and membership changes, security setting changes, exports, deletions, support access and failed authorisation attempts on sensitive actions.
What should never be in an audit log?
Passwords, session identifiers, access tokens, API keys and other secrets. OWASP’s Logging Cheat Sheet lists these among data that should be removed, masked, hashed or encrypted rather than logged directly. Avoid logging full record contents that contain personal data you do not need.
How long should audit logs be kept?
The NCSC suggests keeping logs for at least six months, because intrusions are often detected long after they begin; it cites an average of 101 days. Enterprise contracts commonly ask for a year, and some regulated buyers ask for longer. Many products offer longer retention or streaming on enterprise plans.
What is SCIM and do enterprise customers need it?
SCIM is an open standard, defined in RFC 7643 and RFC 7644, that lets a customer’s identity provider create, update and deactivate users in your product automatically. Larger customers often require it so that leavers lose access without anyone remembering to remove them by hand.
How should support staff access customer accounts?
Avoid shared logins. The approach most enterprise buyers prefer is customer-granted, time-limited support access, recorded in the customer’s own audit log under the support engineer’s name. Keep a separate break-glass process for emergencies, and review every use.
How should AI agents be handled in permissions and audit logs?
An AI agent acting inside a product should have the permissions of the user it acts for, or fewer, never more. Its audit events should record the agent as the actor and the user as the person it acted on behalf of, so customers can see exactly what the agent did and who started it.
How do I prevent one customer from seeing another customer’s data?
Scope every query to the tenant identifier taken from the user’s session, never from the request. Check ownership of the specific record on every request, use database row-level security as a backstop where available, and run automated tests that try to read and change another tenant’s data on every endpoint.
Sources and method
We read every source below on 27 and 28 November 2026. Quotations are taken from the pages as published. The tools use our own weightings and illustrative values, labelled in each tool. Views labelled as ours come from Loomstrat’s work designing permission systems and audit logs for client SaaS products and preparing them for enterprise security reviews.
Application security
- 01A01:2025 Broken Access Control
OWASP Top 10:2025, Checked November 2026. Ranking, 100% of applications tested, occurrences, weakness count and incidence rate.
- 02A01:2021 Broken Access Control
OWASP Top 10:2021, 2021. 2021 ranking and 94% of applications tested.
- 03Authorization Cheat Sheet
OWASP Cheat Sheet Series, Checked November 2026. Deny by default, checks on every request, server-side enforcement, IDOR, ABAC and ReBAC preference, testing.
- 04Logging Cheat Sheet
OWASP Cheat Sheet Series, Checked November 2026. Events to log, when/where/who/what, data not to log, tamper detection and log access.
Standards and government guidance
- 05Role Based Access Control
NIST Computer Security Resource Center, Checked November 2026. RBAC definition and ANSI/INCITS 359 history.
- 06Least privilege (glossary)
NIST, Checked November 2026. Definition of least privilege.
- 07Introduction to logging for security purposes
National Cyber Security Centre, Checked November 2026. Six-month retention, 101-day detection average, UTC, protecting logs.
- 08RFC 7644: SCIM Protocol
IETF, September 2015. Definition of the SCIM protocol.
- 09RFC 7643: SCIM Core Schema
IETF, September 2015. User and group schema.
- 10A guide to data security
Information Commissioner’s Office, Checked November 2026. Authorised access and UK GDPR Article 32.
Breach data
- 112026 Data Breach Investigations Report
Verizon, 2026. Share of breaches starting with exploited vulnerabilities.