Skip to content
Security

How to set roles and permissions in an internal system to protect data

“User” and “administrator” are rarely a complete access model. A business needs to decide who may work with a particular record, under which conditions and what changes when someone moves role. Here is how to turn working responsibilities into understandable rules that the server enforces and your team can review over time.

How to set roles and permissions in an internal system to protect data

Consider an illustrative purchasing system where an employee creates a request and a manager approves it. The manager may also make purchases for their own team. If combining the two roles allows them to approve their own request, a technically functioning application breaks the company’s rule. These combinations need decisions before access is assigned.

Sign-in establishes the identity under which someone acts. This article takes the next step: deciding which work is permitted. The broader data security guide provides context for protecting company information. Here the deliverable is an actionable permission policy rather than another authentication mechanism.

01Start with operations and data owners

List activities that have business meaning: view a quotation, change a supplier, approve a request, download an attachment or export customers. “Access to the module” is too broad. Someone may need to read an order’s status without receiving procurement prices or permission to cancel that order.

Assign a business owner to each area. That person decides who needs the information and why; the development team implements the rule. An infrastructure administrator does not automatically need to read every commercial document. Separate the technical administration of accounts from working with their contents, and explain necessary exceptions.

A useful specification identifies the subject, operation, data scope, condition and approver. For example, a buyer can edit a draft request in their assigned branch, while changes after submission use a controlled correction process. This is more precise than a job title and easier to turn into a meaningful test.

02Combine roles with conditions that have an authoritative source

RBAC groups permissions into roles. It provides understandable bundles for recurring responsibilities such as buyer or approver. ABAC evaluates attributes of the subject, resource, operation and sometimes the environment, as described by NIST SP 800-162. It can account for a branch, document state or approval limit.

Policy elementExampleWhat must be defined
RoleA buyer may create purchase requests.Who approves the role and what it contains.
AttributeAn approver acts only within their branch.An authoritative, current source for branch membership.
RelationshipA project member can view assigned work.Who creates membership and when it ends.
Combination restrictionAn author cannot approve their own request.The rule still applies when several roles are combined.

Avoid creating a separate role for every combination of branch, project and limit when a condition can express the requirement. Equally, do not add an attribute whose origin cannot be trusted. A browser claiming that someone belongs to management is not authoritative evidence. Each condition needs an owner and an update procedure.

03Write decision examples that include explicit denials

A permission matrix should include both allowed and denied situations. Specify whether permissions from multiple roles combine and which restrictions take precedence. Job hierarchy does not have to determine access hierarchy. A director may need aggregate results without access to every individual personal record.

Illustrative situationOutcomePolicy reason
A buyer edits their draft in an assigned branch.Allow the specified fields.Role, scope and document state match.
The same person approves their own request as a manager.Deny.Separation between creation and approval takes precedence.
A substitute approves after the delegation has ended.Deny.The temporary authority is no longer valid.
An account administrator requests a commercial data export.Not automatically permitted by the role.Account management and export are different powers.

Define permitted fields for both reading and writing. A user may see the total but not an internal margin, or edit a note but not their own approval limit. Permission to open one record does not automatically authorize a bulk export. The API security guide explains how these distinctions affect the interfaces behind an application.

04Enforce decisions on the server and deny unresolved cases

The OWASP Authorization Cheat Sheet recommends denying by default and checking every request. A new operation without an explicit allowing rule should not become available to everyone who signs in. Hiding a button helps people navigate; the server must decide whether to release information or perform a change.

Check the particular record rather than only permission to open a screen. OWASP BOLA describes failures in object-level authorization. An unpredictable identifier does not replace that decision. The same policy must protect lists, details, search, exports and attachments.

For an important state change, authorization and the resulting write must refer to a consistent situation. If the amount or owner changes during approval, the earlier decision may no longer apply. Define the response to conflicts and authorization-service failures. Uncertainty should not silently allow a sensitive operation to proceed.

05Separate organisations and carry verified context

A tenant here means a separate customer organisation. Selecting a company in the interface requests a context; the server must verify membership and authority. Someone may approve work in one organisation while having read-only access in another. Switching between them must not merge those permissions into one global administrator identity.

OWASP’s multi-tenant guidance also covers caches, files and asynchronous work. Verified context must therefore accompany an export generated in the background. When its result is downloaded, decide again using the relevant current permissions. A separate database cannot fix a request assigned to the wrong company.

Our multi-tenant architecture article discusses isolation choices. For the permission specification, ask which paths return data and which control each path crosses. Include reports, notifications and shared links. An access boundary that exists only on the main record screen leaves the rest of the workflow unresolved.

Access decisions considering identity, organisation, operation, record and current conditions
A logical review model. The technical order of checks depends on the application; every required boundary still needs enforcement.

06Manage role changes, delegation and departure

When someone changes position, compare the required new access with what they already have. Merely adding another role gradually expands privileges. Record delegation with its purpose, scope, approver and expiry. A delegation should not grant more authority than the delegating person and company policy are allowed to provide.

Define when revocation takes effect in an open session, an existing token and queued work. A short token lifetime is not the same as immediate revocation. Verify the result through active access rather than only attempting another sign-in. For service accounts, connect this process with secrets management.

Make periodic reviews about actual need: who has privileged access, why they still need it and who confirmed that need. Choose the frequency according to risk and organisational change. A permission that has not been used may deserve review, but inactivity alone does not prove that an emergency role can safely be removed.

07Make exceptions and support access traceable

Support staff may need to investigate a customer problem. Design an approved, time-limited scope with a visible purpose. Record the actual operator and the organisation in which they acted. A permanent shared administrator account obscures responsibility and makes it harder to end one worker’s access without disrupting everyone else.

An audit record should explain permission changes and significant use: who acted, when, within which scope and with what outcome. Do not include passwords, tokens or complete confidential documents. Decide who may read the records and who investigates unusual exports or broad role assignments. The existence of a log is not the same as an effective review process.

08Validate the policy before launch and after meaningful changes

Turn each decision example into a test using non-production accounts and records. Include someone with the same role in another branch, a different organisation, an expired delegation and combined roles. A correct denial also means no unintended write and no disclosure of a protected field.

Repeat the relevant checks when roles, exports or workflows change. OWASP’s authorization regression guidance uses a test matrix to exercise access boundaries. During employee training on the new system, explain how to request a missing permission as well as how to complete the normal task.

Need to turn unclear roles into verifiable rules? A scoped security audit can examine specific operations and produce evidence for remediation. Prepare the role list, main data areas and most sensitive actions. Start with a workflow whose boundaries can be described and reviewed by its business owner.

Discuss data access

09Frequently asked questions about roles and permissions

Are user and administrator roles enough?

They can be enough for a simple application when their scope fits the work. Different organisations, branches, approval steps or data sensitivity require more precise rules. The number of roles is not the objective; an understandable, verified decision is.

Do we have to replace RBAC with ABAC?

Not automatically. Roles can remain understandable permission bundles while conditions define the specific scope. Choose a model you can explain, maintain and test. More complex technology does not resolve unclear business accountability.

Does a hidden button or random ID protect data?

Neither is sufficient on its own. The interface may be clearer and the identifier harder to guess, but the server must authorize the particular action and record. The check must still work when someone knows the correct link.

Should an administrator automatically see every record?

That is not an essential property of the role. Separate account management, configuration and commercial data access. Design any necessary emergency access explicitly, with approval, a defined purpose and traceable use.

What should we provide for a review?

The working roles, examples of allowed and forbidden operations, organisations or branches, and the delegation process. Describe known exceptions. Arrange any confidential data and access credentials through an agreed secure channel within the defined scope.

LISTIFY teamWebsites, apps and marketing from Prague since 2008

More articles

All articles →

Share this page

By email

Got an idea?

On a short call, we'll find out what you need and suggest the next step. Then you'll get a proposal with a fixed price and a timeline.

+420 771 166 199Mon to Fri, 8:30 a.m. to 4:00 p.m. (Prague time) · info@listify.cool

When should we call you?

Pick a day and a time window. We'll call you, and it takes about 15 minutes.

Day