Home / Insights / Architecture and Modernization
Architecture and Modernization
Designing Roles and Permissions for Enterprise Software: RBAC, Attributes and Audit
Permissions are where enterprise software meets the organisation chart, and both keep changing. This guide covers how to model roles, when to add attribute or relationship rules, how to handle segregation of duties and audit, and how to test it all.
TopicsArchitecture and ModernizationBusiness Operations and IntegrationQA and Software Testing
Key takeaways
- Start from a permission matrix built with the business, not from a list of job titles.
- Roles alone rarely scale; most enterprise systems need attributes such as branch, department or record ownership as well.
- Enforce authorisation on the server for every request, deny by default and check access to the specific record, not just the screen.
- Segregation of duties and approval limits are business controls; model them explicitly and log every override.
- Automated tests for the permission matrix are as important as functional tests, and should run on every release.
On this page
In an ERP, CRM, HR or help desk system, the question “who can see and do what?” is never static. People change departments, branches open, auditors ask for segregation of duties, and a customer service lead suddenly needs read access to invoices but not the power to issue credit notes. If the permission model cannot absorb these changes, organisations end up granting broad access “temporarily” and never taking it back.
This article sets out a practical approach to designing access control for enterprise software. It complements our guide to threat modeling for product teams, which helps identify where access control failures would hurt most.
Start with a permission matrix
Before discussing technology, build a matrix with the business: rows for actions on business objects, columns for groups of users. Keep the actions concrete.
| Action | Sales rep | Sales manager | Finance clerk | Finance manager | Auditor |
|---|---|---|---|---|---|
| View own customers | Yes | Yes (team) | Yes (all) | Yes (all) | Read-only |
| Create quotation | Yes | Yes | No | No | No |
| Approve discount above limit | No | Yes, up to limit | No | Yes | No |
| Issue credit note | No | No | Request | Approve | No |
| Export customer list | No | Team only | Yes | Yes | Read-only |
Notice how quickly the cells fill with qualifiers such as “team only”, “up to limit” or “own”. Those qualifiers are where a pure role model starts to strain.
Roles, attributes and relationships
Role-based access control (RBAC)
Users get roles; roles grant permissions. It is easy to understand and audit, and it suits coarse decisions such as “can use the finance module”. The failure mode is role explosion: “Sales Manager North”, “Sales Manager North Read-Only Finance” and so on, until nobody knows what each role means.
Attribute-based access control (ABAC)
Decisions use attributes of the user, the record and the context: department, branch, cost centre, record status, amount, time of day. “Managers may approve discounts on quotations in their own region up to their approval limit” is an attribute rule.
Relationship-based access control (ReBAC)
Access follows relationships: the account owner, members of the case team, the employee’s line manager. This fits CRM and HR systems where access depends on who is connected to a record.
The OWASP Authorization Cheat Sheet notes that role-only checks become hard to manage at scale and recommends attribute- and relationship-based models for finer-grained control, especially across organisations. In practice, most enterprise systems use a combination: roles for module-level access, attributes and relationships for record-level decisions.
Enforcement principles that prevent leaks
- Deny by default. New endpoints, reports and exports start inaccessible until permissions are explicitly granted.
- Check on the server, every request. Hiding a button in the interface is not access control. APIs, background jobs, file downloads and exports must apply the same checks.
- Check the specific record. Being allowed to view invoices does not mean being allowed to view this invoice. Insecure direct object references remain a common failure.
- Filter queries, not just results. List views, search and reports should apply permission filters in the query so data never leaves the database unnecessarily.
- Centralise the policy. Keep authorisation logic in one service or library rather than scattered across controllers, so changes apply everywhere.
- Fail safely. Errors should deny access and avoid leaking information about records the user cannot see.
These principles align with the OWASP guidance and with the access control risks covered in our article on the OWASP Top 10:2025 for product teams.
Segregation of duties and approval limits
Enterprise systems often carry financial and compliance controls. Model them explicitly rather than relying on people to follow policy.
- Maker-checker: the person who creates a payment, supplier or credit note cannot approve it.
- Approval limits: thresholds by amount, category or risk, with escalation when exceeded.
- Conflicting roles: define combinations that should never be held by one user, and warn or block when an administrator tries to assign them.
- Delegation: allow temporary delegation of approvals during leave, time-limited and logged.
- Break-glass access: emergency elevated access with a reason, notification and later review.
For example, a distribution business might allow a warehouse supervisor to adjust stock up to a small threshold, require a manager for larger adjustments, and block anyone from both adjusting stock and approving the related write-off.
Identity integration and access lifecycle
Most organisations already have an identity provider such as Microsoft Entra ID, Okta or Google Workspace. Integrating with it gives single sign-on, multi-factor authentication and central offboarding.
| Lifecycle event | What should happen |
|---|---|
| Joiner | Account created from the identity provider; default role from department or job attributes |
| Mover | Old permissions removed, new ones granted; avoid accumulating access across moves |
| Leaver | Access revoked centrally and immediately; sessions and tokens invalidated |
| Periodic review | Managers confirm their team’s access; unused or excessive rights removed |
Decide which attributes come from the identity provider (department, location, manager) and which are managed inside the application (approval limits, record ownership). Mapping groups to roles is convenient but can recreate role explosion inside the directory.
Audit trails and testing the model
What to log
- Changes to sensitive records: who, what, when, old and new values.
- Permission and role changes, including who granted them.
- Approvals, rejections, overrides and break-glass use.
- Exports and bulk actions on personal or financial data.
Logs should be tamper-resistant, time-synchronised and searchable by auditors without developer help.
Test the matrix automatically
Turn the permission matrix into automated tests: for each role and key action, assert allowed and denied outcomes through the API, including attempts to access another branch’s or user’s records. Run them on every release; a refactor that silently opens access is a serious incident. Pair this with periodic security testing such as vulnerability assessment and penetration testing.
PoliteTech’s enterprise software development work includes role-based access, audit logs, encryption and identity provider integration, with roles and permissions defined as one of the decisions made before build.
Frequently asked questions
Should we buy an authorisation service or build our own?
Policy engines and authorisation services can help when rules are complex or shared across several applications. For a single system with moderate rules, a well-structured internal module is often enough. Either way, keep policy central and tested.
How many roles is too many?
There is no fixed number, but if roles differ only by region, branch or limit, those differences probably belong in attributes rather than new roles.
Can business users manage permissions themselves?
Yes, with an admin interface that shows effective permissions, prevents conflicting assignments and logs every change. Keep the most sensitive grants behind an approval step.
How do we handle access for external users such as suppliers or customers?
Treat them as a separate population with their own identity flow and strictly scoped access to records linked to their organisation, usually using relationship-based rules.
Sources and methodology
Guidance reflects PoliteTech delivery experience. The external references below informed specific points in this article.
- OWASP Cheat Sheet Series: Authorization Cheat Sheet — Least privilege, deny by default, per-request and per-object checks, preference for ABAC/ReBAC over role-only models, safe failure, logging and testing.
Related reading
Continue your research
Is your permission model keeping up with your organisation?
We can review roles, record-level rules and audit needs for your enterprise system and design an access model that scales.
