Security Onion RBAC and custom roles

Security Onion RBAC decides who can see alerts, run hunts, change detections and query indexed data. Plan the roles, custom role syntax and Elasticsearch index access before you give analysts accounts.

On this page

Security Onion RBAC and custom roles: who can see and change what

Role-based access control in the Security Onion Console decides which analysts can triage alerts, which auditors can review activity without changing anything, and which administrators can alter the grid. A SOC lead granting access to a Security Onion grid should map those duties to roles before the first single sign-on user signs in. Once users arrive, every login inherits whatever default role the identity setup applies, so an unplanned default can quietly give a new hire more reach than intended. Treat the role model as a design artifact: list the tasks each group performs, the data each group needs, and the changes each group must never make.

Security Onion ships with built-in analyst and auditor roles, and it lets you build custom roles from existing roles or individual permissions. Custom roles are declared in the custom_roles file using the syntax <existing role or permission>:<new role>, so a role such as a tier-two analyst can start from the analyst set and add or remove specific capabilities. Index access is a separate question. Elasticsearch roles are defined as JSON files in /opt/so/saltstack/local/salt/elasticsearch/roles, and document-level security (limiting which individual documents a role can read) requires an Elastic subscription. Confirm with your licensing contact whether that subscription is needed for your data-separation requirements before you promise field or document restrictions to a business unit.

Security Onion is source-available under the Elastic License 2.0, not an OSI-approved open-source license, and that license terms matter when you plan access controls that depend on Elastic features. Ask your legal or procurement team to review the license text against your intended use, and confirm which Elastic capabilities your deployment and your Pro edition, if you use one, actually include. Then test each role in a non-production grid with a real account from every group, checking that the Console shows exactly the pages, alerts and indices that group should see and that the auditor role cannot change rules or settings.

Role design options and when each fits

This table compares three ways to assign access in Security Onion: keeping built-in roles, creating custom roles, and mapping default roles for SSO users. Read each row against your team size, audit expectations and upgrade plans to see which option carries the least maintenance for your environment. The main takeaway is that custom roles add control but must be re-checked after every platform upgrade.

OptionSpeed to deployAuditability and upgrade effortWhen it fits
Built-in roles unchangedFastest, since no role files are writtenSimple to explain; built-in roles change only with platform releases, so review release notes before upgradingSmall teams where analyst and auditor access already matches the duties you need to separate
Custom role from an existing role or permissionSlower, because you define the custom_roles entry and test what it grantsEach custom role needs a documented purpose and owner; confirm the base role's permissions still match after upgradesTeams that need a narrower or differently scoped analyst or auditor role than the built-ins provide
Custom Elasticsearch roles for index accessSlowest, because JSON role files must be written and validated against your index patternsIndex-level rules are separate from Console roles and need their own review; document-level security requires an Elastic subscriptionEnvironments where data segregation by index is a stated requirement and the subscription is confirmed
Default roles for SSO usersQuick to set once the identity provider is connected, but the default applies to every new userAssignments arrive without a ticket, so schedule regular reviews of who received the default roleOrganizations that provision users through SSO and want a least-privilege starting point before manual grants
Individual role assignments by adminModerate, because each user is set by hand in the ConsoleEasy to trace per user but hard to scale; keep a register of who approved each grantVery small deployments or temporary elevated access for a named investigation

Building custom roles from privileges or inheritance

Inheritance starts from a role that already exists and adds the privileges your team is missing. This approach is usually the smaller change to review, because the base role's permissions are already known and tested in your deployment. The custom_roles file uses the syntax <existing role or permission>:<new role>, so the left side names the starting point and the right side names the new role you are creating.

  • Pick the closest built-in role: Start from the role whose access is nearest to what the group needs, so you add the fewest privileges.
  • Keep the added set small: Each extra privilege widens access, so add only what a named task requires.
  • Name the new role for its purpose: The name should say what the group does, not who sits in it today.
  • Review the base role after upgrades: Confirm that the role you inherit from still means the same thing after an upgrade.

Before you rely on an inherited role, confirm the exact syntax and the permission names against the RBAC documentation for your Security Onion version.

Setting up RBAC in order: from role design to verified access

This sequence turns an access model into Security Onion roles that match real team tasks, and it confirms each role shows only the views it should before anyone relies on it. Each step closes with a check, so gaps surface while changes are still easy to reverse.

  1. Inventory teams and tasks

    The security lead and the Security Onion administrator list every group that will use the console, such as tier 1 triage, senior hunters, detection engineers, auditors and administrators. For each group, they write down the tasks it performs, the data it needs to see, and the actions it must never take, such as changing detections or managing users. The output is a single table that the rest of the sequence can be checked against. It is done when every group has a named owner and every task maps to a group.

  2. Map tasks to built-in roles

    The administrator compares the inventory with the built-in analyst and auditor roles described in the Security Onion RBAC documentation, and records which groups fit a built-in role without changes. Gaps, such as an analyst who needs a permission the built-in role does not grant, are noted for the next step rather than handled with ad hoc grants. The output is a mapping from each group to either a built-in role or a gap. It is done when no group is left without a role decision.

  3. Define custom roles only for confirmed gaps

    For each gap, the administrator decides whether a custom role built from an existing role or a permission is enough. Security Onion custom roles use the syntax <existing role or permission>:<new role> in the custom_roles file, so the new role inherits what the base grants and adds nothing else. Each custom role gets a written purpose and a short list of permissions. The output is a reviewed list of custom role names with their base and purpose. It is done when a second reviewer agrees each role is needed and cannot be met by a built-in role.

  4. Write Elasticsearch role JSON files

    Index access is controlled separately in Elasticsearch. The administrator creates one JSON file per Elastic role under /opt/so/saltstack/local/salt/elasticsearch/roles, naming index patterns and privileges exactly as the inventory requires. Document-level security needs an Elastic subscription, so any plan that depends on filtering rows within an index must confirm that licensing before the design is final. The output is a set of role files that match the mapping. It is done when each file parses as valid JSON and every index pattern traces back to a task in the inventory.

  5. Apply the change and confirm the grid picks it up

    The administrator applies the custom role and Elastic role changes through the Salt-managed configuration on the manager, following the Security Onion documentation for the installed version. They then check that the change reached the nodes that serve the console and search, rather than assuming it did. The output is a clean configuration run with no errors and roles visible in the console or Elastic role list. It is done when a fresh login reflects the new role names, and any mismatch is traced back to the file, not patched by hand on one node.

  6. Assign default roles for SSO users

    Users who sign in through single sign-on should receive a role without manual setup. The administrator sets the default role for those users to the least-privileged role that still lets them do their first task, and confirms that group or claim mapping from the identity provider lands users in the intended role. Administrators should not be the default. The output is a documented default and a mapping table from identity groups to roles. It is done when a new SSO account, before any manual change, lands in the default role.

  7. Verify each role with a test account

    The administrator creates one test account per role, signs in as each, and works through the inventory tasks for that group. The test account should be able to complete its tasks and be blocked from the actions that the inventory excluded. For example, a test analyst account that opens the Detections interface and cannot save a change shows the role boundary is working. Any surprise access or missing view is logged as a defect against the role file, not fixed by granting extra permissions in the console. The output is a signed test record per role. It is done when every test case matches the inventory and the test accounts are removed or disabled.

Separate Elasticsearch roles for index access

Console roles decide what a user can do inside the Security Onion Console, such as viewing alerts, running hunts or managing cases. They do not by themselves limit which raw Elasticsearch indices a user can query through the Console's search features or through direct access to the Elasticsearch layer. If your analysts, auditors or contractors should see only part of the stored data, you need a second control at the Elasticsearch role level, and you should test that control separately from the Console role mapping.

Elasticsearch roles for Security Onion are defined as JSON files placed in /opt/so/saltstack/local/salt/elasticsearch/roles. Each file describes which index patterns a role can read and which privileges apply to them. Because the grid is Salt-managed, changes made there must be applied through the normal grid configuration process, and you should confirm the exact file format and index pattern names for your grid version against the Security Onion RBAC documentation before writing any role. Index naming has changed between releases, so an index pattern that worked on one version may not match on another.

Restricting which documents a user sees within an index, rather than which indices they can read, is document-level security. Document-level security requires an Elastic subscription, so budget for that licensing before you commit to a design that depends on it. Confirm the subscription level with Elastic and check whether your team can meet the requirement with index-level separation alone. Finally, verify each role with a test account that has only that role, confirming both allowed and blocked queries, and record the results as evidence for your access review.

How a login maps to Console and index permissions

A login starts at the identity provider or a local Console account, which receives a default role on first sign-in. That Console role, including any custom role built from privileges or inheritance, decides what the user can do in the Console. Index access is a separate control: Elasticsearch role files define which indexes the user can query, and the Console is the boundary where those two layers meet. Check both layers for every role, because a user can hold a permissive Console role while their Elasticsearch role still limits what data they see.

Login path from identity to Console roles and Elasticsearch index access.

Security risks in RBAC design and how to reduce them

Security Onion role design fails in predictable places: default roles given to every SSO user, custom roles that carry more privilege than their name suggests, and admin rights nobody reviews. The controls below pair each risk with a check your team can run, and they should be repeated after every upgrade and every change to identity groups.

Over-broad default roles for SSO users

Users who sign in through SSO may land in a default role that was chosen for convenience rather than least privilege. Check which role a new SSO user receives before any group mapping applies, and confirm that the default grants only read access to the alerts and dashboards that user needs. Use a dedicated test account in each role to confirm what a fresh login can actually see and change in the Console.

RBAC docs

Custom roles that inherit too much

A custom role built with the <existing role or permission>:<new role> syntax in the custom_roles file inherits everything its base carries. A role named for a narrow duty can quietly include administrative permissions from the base it extends. Write down the effective permission set of each custom role, compare it with the job description, and remove any permission that the duty does not need.

Unreviewed administrator assignments

Administrator rights often accumulate through emergency access, project work and copied role assignments, and nobody removes them afterward. Keep a named list of every account with an administrative role, the approver for each grant, and the reason it exists. Review that list on a fixed schedule and remove accounts that no longer have an owner.

Role drift after upgrades

Upgrades and rebuilds can change how roles, custom role files and permissions behave, so a configuration that was correct last quarter may not match today. Record the role configuration before each upgrade, rerun the test accounts afterward, and diff the results against the baseline. Treat any role that gained permissions as a finding until someone signs off on it.

Index access left open

Restricting Console access does not restrict the Elasticsearch indices behind it. A user blocked from the Console may still reach indexed data through separate Elastic roles if those roles were never scoped. Define index-level roles in JSON under the saltstack local Elasticsearch roles directory, map each to the data it should see, and test a query from each account. Confirm with your Elastic subscription terms whether document-level security is available to you.

Role changes without a record

Role edits made directly on a node, outside the configuration management workflow, leave no clear history of who changed what and why. Store the custom role files and the role mapping in version control, require a reviewer for each change, and keep the approval with the change record. This gives auditors a traceable path from each permission to a documented decision.

RBAC questions buyers ask before hiring outside help

How much does outside help for Security Onion RBAC usually cost?

The cost depends on scope, and DeployOpen does not publish a price list. A quote follows from a written scope that covers the number of roles, how many teams and identity sources are involved, whether single sign-on maps groups to roles, how index access rules are defined, and how much testing is required. Ask any partner to split the quote into design, build, testing and handover, and to state which items are one-time and which recur, such as role changes during staff turnover or retainer support. Ask whether the price includes a retest after fixes.

What makes a Security Onion role project take longer?

Duration rises with the number of roles, the number of teams whose needs must be agreed, and how many identity groups must map to Security Onion access. Index access rules add work because Security Onion custom roles are paired with separate Elasticsearch roles, which are JSON files that must be written, tested and reviewed. Document-level security needs an Elastic subscription, so confirm that licensing early, because it can change what is possible. Ask a partner for a timeline that lists these dependencies, rather than a single number with no assumptions behind it.

What does our team have to provide for an RBAC engagement?

Plan for three groups of people. Role owners, usually SOC leads and audit or compliance representatives, must define which analyst and auditor duties each role covers. Identity administrators must confirm how users and groups arrive through single sign-on and whether OIDC or other identity configuration is in place. Someone with accountable sign-off must approve the role matrix and the index access rules before they go live. Ask the partner to name these owners in the scope so that decisions do not stall during build.

Can our internal team design and build Security Onion custom roles without a partner?

Yes, if your team can read the RBAC documentation, edit configuration files on the manager and test the results against real analyst accounts. The documented custom role syntax uses the form existing role or permission, followed by the new role name, in the custom_roles file, and Elastic roles are JSON files under the Salt local Elasticsearch roles directory. The work becomes harder when many teams, SSO group mapping and index-level rules must be designed together and verified. Use a partner when you lack staff time or want an independent review of the role model before audit evidence depends on it.

Will custom roles survive a Security Onion upgrade?

Custom roles should be treated as configuration that must be checked after every upgrade, not assumed to carry over unchanged. Keep the custom_roles file and the Elastic role JSON files under version control, record which built-in roles each custom role inherits from, and retest analyst and auditor access after each upgrade on a test grid before production. Upgrade paths differ by release, so read the Security Onion end-of-life and upgrade guidance for your version and confirm the role behavior with the vendor before you plan the change window.

What should we check during testing of a Security Onion role model?

Test with real accounts from each group, not only with administrator access. For each role, confirm what it can see in the Console, what it can change in detections and what index data it can query. Check that inherited permissions do not grant more than intended, that users who lose a group membership lose access, and that auditor roles can read evidence without modifying rules. Record the results, fix gaps, and retest the changed roles. Ask a partner to include this retest in the scope and to deliver the test evidence in a form your auditors can read.

Does a role design project help with compliance evidence?

A role design project prepares access controls and evidence that compliance assessors may review, but it does not produce an audit report or certification. Independent auditors and certification bodies decide whether controls meet a requirement. Your evidence package might include the approved role matrix, the configuration files, test results and sign-off records. Ask the partner to confirm which artifacts they will hand over and to state clearly that the assessment itself remains with your auditor.

Limits to confirm in your environment before you rely on RBAC

Role design in Security Onion depends on four things outside the role file itself: the release you run, your Elastic licensing, how users sign in, and how network access is restricted. Confirm each one against the vendor documentation and your own test grid before you write custom roles that analysts and auditors depend on.

Security Onion version and role syntax

Custom role syntax, the custom_roles file format and the location of Elasticsearch role files can change between releases, and the platform moves on a fixed support calendar. Confirm which version your grid runs, check whether it is still within its end-of-life date, and compare the syntax in the RBAC docs for that exact version. Test a sample custom role on a non-production node before you copy it into a production configuration.

RBAC docs

Elastic subscription for document-level security

Document-level security, which limits which records a role can read inside an index, requires an Elastic subscription. Without it, index access is controlled at the index level only, so an analyst role may see more events than your data handling rules allow. Ask your team to confirm the subscription tier in writing and record which access model applies to each role before you promise data separation to a business unit.

SSO option and OIDC availability

Default roles are assigned to SSO users, so the identity option you use determines how groups or claims map to Security Onion roles. OIDC single sign-on to the Console is listed as a feature of the paid Security Onion Pro edition, so confirm which edition you license and which identity provider path you can use. Test one account from each role group to confirm the mapping before go-live.

Security Onion Pro page

Interaction with firewall host groups

A role grants what a user can do after login, but it does not decide whether the user's network path reaches the Console at all. Firewall host groups and per-role INPUT chains control which source addresses can connect, so a correctly scoped analyst role can still be blocked, or an overly broad host group can expose the login page. Map each role to its permitted source networks and test access from a device in each group.

Role separation for index access

Console roles and Elasticsearch roles are separate controls, and a user needs both to see the intended data. An auditor role built in the Console may still lack the index permissions required for a search, while a broad Elasticsearch role can expose logs the Console role was meant to hide. Document which index patterns each role may query, then verify both layers with a test account for every role.

Change control and retesting

Role definitions change when you upgrade, add a sensor, or onboard a new team, and a change that looks small can widen access. Keep role files in version control, record the release and license state with each change, and rerun the access tests after every upgrade. Ask whether your provider or internal team will own this retest cycle and how the results are kept as evidence.

How DeployOpen scopes and delivers Security Onion RBAC work

DeployOpen scopes Security Onion RBAC work as a fixed-scope engagement, with the scope, deliverables and handover agreed in writing before any change is made to the console or the grid. The first step is a role inventory: a list of every person and service account that signs in, the analyst, auditor or administrative work each one performs, and which of the built-in roles already fits. Where an identity provider supplies group membership, the inventory also records which group maps to which role, so the design can be checked against the directory your team already runs. Ask the partner to show the inventory format before signing, and confirm whether the built-in roles are enough for your teams or whether custom roles are needed.

Custom role design follows the inventory. DeployOpen documents each proposed role as the existing role or permission it extends, the custom_roles entries it needs using the <existing role or permission>:<new role> syntax, and any Elasticsearch role JSON files kept under /opt/so/saltstack/local/salt/elasticsearch/roles. Index access rules are written separately so that a user who can open a dashboard is not automatically able to read every index behind it. Confirm early whether your target design needs document-level security, because the RBAC documentation notes that it requires an Elastic subscription, which is a cost your team or the client carries outside the services fee. Testing uses dedicated test accounts for each role, covering both what the role can see and what it is blocked from seeing, and the results are recorded before handover.

The handover package normally includes the role matrix, the configuration files, the test account results, and a short runbook for adding a user or changing a role. Ongoing support, such as reviewing role drift after new detections or a Security Onion upgrade, is available as a retainer, which is a separate written agreement with its own scope. When you request a quote, ask what is excluded, who approves role changes after handover, and how test accounts are removed once the work is accepted. Use the Security Onion RBAC documentation to check the current syntax against the version you run.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.