Role-Based Access Control (RBAC) is a critical part of securing a Wazuh deployment. Instead of giving every Wazuh user unrestricted administrative access, RBAC allows administrators to define what users can view, modify, or manage based on their assigned roles and policies.Wazuh’s RBAC implementation uses users, roles, rules, and policies to control access to Wazuh Server API resources. That makes RBAC configuration security-sensitive data. For this reason, organizations should treat Wazuh RBAC backups as part of their broader configuration and disaster recovery strategy.
A lost or corrupted role definition can prevent analysts from accessing required resources, while a missing role mapping can leave users without the permissions they need, or potentially cause an administrator to lose access to critical functionality.
How to Configure Wazuh RBAC — Use this guide for the initial creation and management of Wazuh roles, policies, users, and role mappings.
What Is Wazuh RBAC?
Wazuh RBAC controls access to Wazuh resources according to the privileges assigned to a user.
At the Wazuh Server API level, RBAC is organized around four primary components:
- Users — identities that make requests to Wazuh resources.
- Roles — collections of permissions, rules, and policies.
- Rules — conditions that determine when permissions apply.
- Policies — definitions of which actions users are allowed or denied to perform.
For example, an organization could create a read-only role for security analysts while giving security engineers additional permissions to modify rules, policies, or configurations.
Wazuh also uses security controls at the Indexer and Dashboard layers.
Internal users, Indexer roles, role mappings, tenants, and external identity-provider mappings can all affect what a person can access after authentication.
Therefore, when you backup Wazuh RBAC, you should not assume that copying a single RBAC-related file captures the entire access-control configuration.
Why Backing Up RBAC Configurations Is Important
RBAC configurations often represent months or years of security administration work.
An enterprise deployment may contain custom analyst roles, incident-response permissions, administrator mappings, read-only accounts, tenant assignments, and integrations with external identity providers.
Recreating this configuration manually after a failure can be time-consuming and error-prone.
A proper backup gives administrators a known-good reference that can be used to:
- Recover accidentally deleted roles.
- Restore role-to-user mappings.
- Recover custom permissions and policies.
- Rebuild security configuration after a server failure.
- Reproduce an RBAC configuration during a migration.
- Roll back unsuccessful security changes.
- Recover access after a configuration mistake.
- Maintain consistency across Wazuh nodes.
- Support disaster recovery and business continuity procedures.
Wazuh itself recommends backing up relevant Indexer security configuration files before making certain authorization changes.
For example, its LDAP integration documentation specifically recommends backing up the Indexer security configuration before modifying roles_mapping.yml.
This is an important distinction: RBAC should be backed up before significant access-control changes, not only after something goes wrong.
Risks of Losing Roles, Permissions, and Role Mappings
The impact of losing RBAC data depends on which component is affected.
If Wazuh Server API roles or policies are lost, users may no longer be able to perform required API operations.
Wazuh’s RBAC model can control actions such as reading agents, restarting agents, modifying rules, and managing security resources.
If Indexer roles or mappings are lost, users may authenticate successfully but receive insufficient permissions when accessing Dashboard data.
Role mappings are particularly important because they establish the relationship between an identity and its permissions.
A role defines what a user can do; the mapping determines which users or groups receive that role.
Losing either side can therefore produce an incomplete authorization system.
External authentication makes the situation more complicated.
Wazuh supports integrations with SAML, LDAP, Active Directory, and several identity providers for SSO.
These systems can supply identities or backend roles that are subsequently mapped to Wazuh permissions.
Consequently, a backup that contains only local users may be insufficient for an environment that relies on external authentication.
When Should You Perform a Wazuh RBAC Backup?
A Backup Wazuh RBAC procedure should be performed before and after significant security-management changes.
Good backup points include:
- Before creating or modifying custom roles.
- Before changing role permissions or policies.
- Before modifying role mappings.
- Before changing internal users.
- Before configuring SAML, OIDC, LDAP, or another authentication provider.
- Before modifying tenant or multi-tenancy settings.
- Before upgrading Wazuh.
- Before migrating Wazuh components to new servers.
- Before changing Indexer security configuration.
- Before modifying Dashboard security settings.
- After completing a major RBAC change.
- As part of a scheduled disaster recovery backup.
For production environments, scheduled backups are preferable to relying exclusively on manual backups.
A configuration backup should also be retained independently of the Wazuh servers so that a server failure does not destroy both the original configuration and its backup.
Backup vs. Full Wazuh Configuration Backup
A Wazuh RBAC backup is not necessarily the same thing as a full Wazuh configuration backup.
A full Wazuh backup may include manager configuration, custom rules and decoders, agent configuration, certificates, Filebeat configuration, Dashboard configuration, Indexer configuration, and other deployment-specific files.
An RBAC-focused backup instead concentrates on the authentication and authorization components required to reproduce access control.
For example, an RBAC backup may need to preserve:
- Wazuh Server API RBAC policies.
- Wazuh Server API roles.
- Wazuh Server API rules.
- User-to-role assignments.
- Indexer security roles.
- Indexer role mappings.
- Internal users.
- Tenant-related permissions.
- Authentication configuration.
- External identity-provider mappings.
- Relevant Dashboard security configuration.
See our How to Backup Wazuh Manager Configuration guide to understand how an RBAC backup fits into a complete disaster recovery strategy.
The safest approach is to maintain both: a targeted RBAC backup for quick access-control recovery and a comprehensive Wazuh configuration backup for full-system recovery.
Understanding What Wazuh RBAC Configuration Contains
Before creating a backup, you need to understand what actually constitutes the Wazuh access-control configuration.
There is no single universal file that represents every authorization decision in a Wazuh deployment.
Wazuh Server API RBAC, Wazuh Indexer security, Dashboard configuration, internal users, and external identity providers can each contribute to the final authorization model.
Wazuh’s documentation describes Server API RBAC in terms of users, roles, rules, and policies, while its user-administration functionality also supports internal users, SSO, and LDAP-based authentication and authorization.
Wazuh Security Roles
Roles are one of the most important objects to preserve.
At the Wazuh Server API level, a role groups rules and policies together.
A role can therefore represent a complete permission profile such as:
- Security analyst.
- Incident responder.
- SOC manager.
- Wazuh administrator.
- Auditor.
- Read-only user.
- Custom operational role.
For example, Wazuh provides default roles such as readonly, cluster_readonly, cluster_admin, and users_admin, while administrators can create custom roles for specific requirements.
A backup should preserve custom role definitions rather than relying solely on Wazuh’s default roles.
Default roles can generally be recreated from the appropriate Wazuh version’s documentation, but custom roles represent configuration decisions specific to your environment.
Role Permissions and Privileges
Roles alone are not enough.
You also need to preserve the permissions associated with them.
Wazuh policies define permissions using concepts such as:
- Actions: what the user can do.
- Resources: what the action applies to.
- Effect: whether the action is allowed or denied.
For example, a policy could permit agent:read against a particular agent or group while preventing users from performing administrative operations.
When backing up RBAC, preserve the relationship between:
Users → Roles → Policies → Rules → Resources
Breaking one of these relationships can produce a backup that looks complete but does not actually reproduce the original access model.
Role Mappings
Role mappings connect users or groups to roles.
This is particularly important because restoring a role without restoring its mappings may create a technically valid role that nobody can use.
Wazuh’s Dashboard security interface allows administrators to create role mappings and associate users with Wazuh roles.
A backup should therefore capture:
- Mapping names.
- Assigned roles.
- Internal users.
- Backend roles or groups.
- External identity attributes where applicable.
- Relevant tenant permissions.
Internal Users and Authentication Configuration
Wazuh can maintain an internal user database for authentication.
These internal users can subsequently be assigned appropriate roles and mappings.
Wazuh also supports using internal users alongside external authentication systems.
The backup strategy therefore needs to account for both the identity and authorization portions of the configuration.
However, avoid treating passwords and other authentication secrets as ordinary configuration files.
Sensitive credentials should be handled separately, encrypted at rest, and protected with appropriately restrictive permissions.
Wazuh’s password-management documentation also distinguishes Wazuh Indexer internal users from Wazuh Server API users, which reinforces why an RBAC backup should identify which authentication subsystem each configuration belongs to.
Tenant and Multi-Tenancy Settings
Multi-tenancy introduces another layer to the backup.
A role may grant a user access to specific tenants, while the tenant itself determines which Dashboard data and saved objects the user can access.
If tenant-related security configuration is omitted from a backup, users may successfully authenticate and receive their expected roles but still encounter missing dashboards, restricted data, or unexpected access boundaries.
When documenting your backup, record:
- Tenant names.
- Roles associated with each tenant.
- Users or groups mapped to those roles.
- Read/write permissions.
- Any organization-specific tenant structure.
SAML, OIDC, and LDAP-Related Mappings
External identity providers can significantly change the RBAC backup requirements.
For example, an organization may authenticate users through an identity provider and then use attributes, groups, or backend roles to determine their Wazuh permissions.
Wazuh supports SSO integrations with providers such as Okta, Microsoft Entra ID, Google Workspace, Keycloak, and others.
It also supports LDAP and Active Directory authentication and authorization.
The backup should therefore document or preserve:
- Identity-provider configuration.
- Group-to-role mappings.
- Backend roles.
- SAML attributes.
- OIDC claims.
- LDAP group mappings.
- Relevant certificates.
- Redirect or callback configuration.
- Wazuh-side role mappings.
Related Guides:
- How to Configure Wazuh SAML Authentication
- How to Configure Wazuh OIDC
- How to Configure Wazuh LDAP Authentication
For security reasons, do not expose client secrets, private keys, or other credentials in a publicly accessible backup repository.
Wazuh Dashboard Security Configuration
The Wazuh Dashboard is the interface through which administrators and analysts interact with the platform, but its authorization behavior depends on the underlying Wazuh and Indexer security configuration.
For example, Wazuh documentation shows that role mappings can be configured through Server management → Security → Roles mapping, while Indexer roles and internal users are managed through the Indexer security interface.
Relevant Dashboard-side configuration can include:
- Authentication settings.
- RBAC-related settings.
- SSO configuration.
- Tenant configuration.
- Security-related YAML configuration.
- Certificate configuration.
- Identity-provider integration settings.
One example is the run_as setting in the Dashboard’s wazuh.yml, which Wazuh documents as relevant to applying user role mappings.
See our How to Configure Wazuh SSO guide to learn more about dashboard authentication and external identity providers.
Wazuh Indexer Security Configuration
The Wazuh Indexer represents another major component of the access-control model.
Indexer security can include:
- Internal users.
- Roles.
- Role mappings.
- Permissions.
- Tenant permissions.
- Authentication settings.
- Backend roles.
- Security plugin configuration.
- Certificates required for secure communication.
Wazuh’s LDAP documentation specifically identifies /etc/wazuh-indexer/opensearch-security/roles_mapping.yml as an important configuration file and recommends backing up the Indexer security configuration before modifying LDAP role mappings.
Wazuh also provides the indexer-security-init.sh utility for backing up the Indexer security configuration, making it particularly useful when creating a structured backup of the Indexer security layer.
Furthermore, Wazuh’s official RBAC documentation covers internal users and role mappings.
Wazuh Server API RBAC documentation — Official documentation for Wazuh API roles, policies, rules, users, and authorization behavior.
Wazuh LDAP integration documentation — Particularly useful because Wazuh explicitly demonstrates backing up Indexer security configuration before changing LDAP role mappings.
Prerequisites for Backing Up Wazuh RBAC
Before beginning a Wazuh RBAC backup, identify exactly which Wazuh components participate in authentication and authorization within your deployment.
The required steps will vary between a single-node installation, a distributed Wazuh deployment, a multi-node Indexer cluster, and an environment integrated with an external identity provider.
Supported Wazuh Version
First, document the Wazuh version you are running.
This matters because RBAC capabilities, configuration structures, security components, and file locations can change between Wazuh releases.
Record at least:
- Wazuh version.
- Wazuh Server version.
- Wazuh Indexer version.
- Wazuh Dashboard version.
- Deployment method.
- Operating system.
- Number of Wazuh Server nodes.
- Number of Wazuh Indexer nodes.
When restoring an RBAC configuration, ideally use the same Wazuh version, or verify compatibility before importing configuration from another release.
Wazuh Administrator Privileges
You need sufficient privileges to access and export the security configuration.
Depending on the backup method, this may require:
- Wazuh administrator permissions.
- Wazuh Indexer administrative privileges.
rootor equivalent operating-system access.- Access to the Wazuh Dashboard Security interface.
- Permission to read protected configuration directories.
Do not assume that a normal Wazuh analyst account is sufficient.
Wazuh deliberately uses RBAC to restrict administrative operations, so a read-only role may not be able to inspect or modify all security configuration.
Access to the Wazuh Dashboard
Dashboard access is useful for inventorying the current authorization model before taking the backup.
Review:
- Server roles.
- Server role mappings.
- Indexer roles.
- Indexer role mappings.
- Internal users.
- Tenants.
- Authentication settings.
Wazuh’s current documentation provides separate interfaces for server security and Indexer security, so reviewing both layers helps prevent an incomplete backup.
SSH or Terminal Access to Wazuh Servers
Terminal access is strongly recommended even when most RBAC administration is performed through the Dashboard.
Command-line access allows you to:
- Locate configuration files.
- Create filesystem-level copies.
- Inspect file ownership and permissions.
- Run Wazuh security backup utilities.
- Calculate checksums.
- Compress backup files.
- Encrypt backup archives.
- Transfer backups to a secure repository.
- Verify that backup files can actually be read.
This is especially important for Indexer security configuration, where Wazuh documents a dedicated security initialization utility for creating a backup of the security configuration.
Identifying the Wazuh Indexer Nodes
In a clustered deployment, identify every Wazuh Indexer node that participates in the security configuration.
Do not automatically assume that backing up one Indexer node is sufficient for every deployment.
Record:
- Hostnames.
- IP addresses or DNS names.
- Node roles.
- Wazuh Indexer versions.
- Security configuration locations.
- Cluster membership.
- Backup status.
Wazuh supports both single-node and multi-node Indexer deployments, with data distributed across cluster nodes.
For a production cluster, your backup procedure should explicitly define how Indexer security configuration is captured and synchronized across the environment.
Identifying Relevant Configuration and Security Files
Before creating the backup, build an inventory of the files and security objects that apply to your installation.
Depending on the Wazuh version and architecture, this can include:
- Wazuh Server API RBAC configuration.
- Wazuh Indexer security configuration.
roles_mapping.yml.- Indexer role definitions.
- Internal-user configuration.
- Dashboard
wazuh.yml. - SSO configuration.
- LDAP configuration.
- SAML configuration.
- OIDC configuration.
- Certificate files.
- Relevant authentication-provider configuration.
Do not blindly copy every file under /etc or /usr/share.
Instead, identify the files that actually participate in your authentication and authorization architecture.
Wazuh’s own LDAP documentation provides a useful example: it identifies the Indexer security directory and specifically recommends backing up its contents before changing role mappings.
Creating a Secure Backup Location
The backup destination should be at least as carefully protected as the original RBAC configuration.
RBAC backups can contain information about:
- Administrative users.
- Roles and privileges.
- Internal users.
- Identity-provider mappings.
- Tenant permissions.
- Security configuration.
- Certificates or references to authentication infrastructure.
Store backups in a location with restrictive permissions and appropriate encryption.
A production backup strategy should ideally include:
- Encryption at rest.
- Restricted administrative access.
- Separate backup credentials.
- Off-server storage.
- Versioned backups.
- Retention policies.
- Integrity verification.
- Audit logging.
- Protection against accidental deletion.
Never place an RBAC backup in a publicly accessible web directory, source-code repository, or unrestricted shared folder.
The backup itself is a security-sensitive artifact: protecting the backup is part of protecting the RBAC system.
See our How to Configure Wazuh Field Level Security guide to learn more about sensitivity of authorization-related configuration and the principle of restricting access to security data.
Verify a Wazuh RBAC Backup
Creating a backup archive does not prove that the backup is usable.
A successful tar, cp, or API export command only confirms that a command completed; it does not guarantee that every required RBAC object was captured or that the backup can be restored.
A reliable Wazuh RBAC backup should therefore be verified immediately after creation and periodically through an actual restoration test.
The verification process should cover both the Wazuh Server API RBAC layer and the Wazuh Indexer security layer.
Check That Expected Configuration Files Exist
Start by inspecting the backup archive or directory and confirming that the expected files are present.
For an Indexer security backup, this may include files such as:
internal_users.yml
roles.yml
roles_mapping.yml
action_groups.yml
tenants.yml
config.ymlThe exact files depend on your Wazuh version and configuration.
Inspect a compressed archive with:
tar -tzpf wazuh-rbac-20260810-010000.tar.gzYou should also verify that the backup contains any relevant Dashboard and Wazuh Server configuration.
For example:
wazuh-rbac-backup/
├── indexer/
│ ├── internal_users.yml
│ ├── roles.yml
│ ├── roles_mapping.yml
│ └── ...
├── dashboard/
│ └── wazuh.yml
└── api/
├── users.json
├── roles.json
├── policies.json
├── rules.json
└── security-config.jsonDo not use a generic file-count check as your only validation.
A backup can contain many files while still missing the one custom role or mapping required for recovery.
Validate File Integrity
Compare the backup files against their original counterparts where appropriate.
For example:
sha256sum /etc/wazuh-indexer/opensearch-security/roles.yml
sha256sum /root/wazuh-rbac-backup/indexer/roles.ymlIf the files are expected to be identical, their hashes should match.
For an archive, generate a checksum:
sha256sum wazuh-rbac-20260810-010000.tar.gz \
> wazuh-rbac-20260810-010000.sha256Later, validate it with:
sha256sum -c wazuh-rbac-20260810-010000.sha256A successful result should resemble:
wazuh-rbac-20260810-010000.tar.gz: OKChecksums do not prove that the configuration is correct, but they help detect corruption or unexpected modification.
Verify Exported Roles and Mappings
If you created API exports, inspect the JSON files and verify that expected custom roles are present.
For example:
jq '.data' wazuh-rbac-roles.jsonYou can search for a specific custom role:
jq '.. | objects | select(.name? == "incident_responder")' \
wazuh-rbac-roles.jsonSimilarly, verify important users and role associations.
Check for:
- Custom analyst roles.
- Incident-response roles.
- Administrator roles.
- Auditor roles.
- Role mappings.
- Policies.
- Rules.
- Tenant assignments.
This is particularly important after a major RBAC change.
If a new role was created yesterday but is missing from today’s backup, the backup process has failed its primary objective.
See our Troubleshooting Wazuh RBAC for validation of role assignments.
Test Archive Extraction
Always verify that the archive can actually be extracted.
Create a temporary test directory:
mkdir -p /tmp/wazuh-rbac-restore-testExtract the archive:
tar -xzpf wazuh-rbac-20260810-010000.tar.gz \
-C /tmp/wazuh-rbac-restore-testThen inspect the resulting files:
find /tmp/wazuh-rbac-restore-test -type f -printClean up after the test:
rm -rf /tmp/wazuh-rbac-restore-testThis catches problems such as:
- Corrupted archives.
- Missing files.
- Incorrect archive paths.
- Permission problems.
- Incomplete backup jobs.
Confirm Backup Ownership and Permissions
RBAC backups should normally be accessible only to authorized administrators.
Check ownership:
ls -la /var/backups/wazuh-rbac/For more detailed information:
stat /var/backups/wazuh-rbac/wazuh-rbac-20260810-010000.tar.gzA typical protected backup might be owned by root with restrictive permissions:
-rw------- 1 root root ...The exact ownership model should follow your organization’s backup architecture.
Avoid permissions such as:
-rw-r--r-- for files containing sensitive security configuration unless there is a specific reason and the contents have been appropriately protected.
Maintain Backup Checksums
Keep the checksum separately from the backup archive where practical.
For example:
wazuh-rbac-20260810-010000.tar.gz
wazuh-rbac-20260810-010000.sha256When transferring the archive to another system, verify the checksum again after transfer.
For example:
sha256sum -c wazuh-rbac-20260810-010000.sha256This gives you confidence that the backup arrived intact.
For higher-assurance environments, consider signing backup manifests or checksums with an organizational signing key.
Perform Periodic Restore Tests
The most important verification step is an actual restoration test.
At scheduled intervals, restore a backup into an isolated Wazuh test environment.
Test:
- Internal-user authentication.
- Administrator access.
- Analyst permissions.
- Incident-response permissions.
- Role mappings.
- Indexer permissions.
- Tenant access.
- SSO mappings.
- Wazuh Server API permissions.
A restore test should answer one question:
Can this backup actually reproduce the intended authorization model?
A backup that passes a checksum test but fails to restore the expected administrator role is not a usable backup.
Restore Wazuh RBAC Configurations
RBAC restoration should be treated as a controlled security operation.
Replacing authentication and authorization configuration can immediately change who can access Wazuh and what they can do.
A poorly planned restoration can lock administrators out, grant excessive privileges, or cause SSO users to lose access.
Before restoring anything, identify the affected Wazuh component and determine whether the problem concerns:
- Wazuh Server API RBAC.
- Wazuh Indexer security.
- Wazuh Dashboard authentication.
- Internal users.
- Role mappings.
- Tenant configuration.
- SAML/OIDC/LDAP integration.
When RBAC Restoration Is Necessary
You may need to restore Wazuh RBAC after:
- Accidental deletion of a custom role.
- Incorrect role permissions.
- Corrupted security configuration.
- Failed authentication changes.
- Incorrect SSO mappings.
- Failed LDAP configuration.
- Failed Wazuh upgrade.
- Indexer security configuration corruption.
- Server replacement.
- Disaster recovery.
- Unauthorized configuration changes.
Restoration can also be useful when an administrator needs to roll back a known-bad security change.
For example, suppose an administrator changes an Indexer role mapping and unintentionally removes access for the SOC team.
Rather than manually reconstructing the previous configuration, the administrator can restore the last known-good backup after confirming that the backup is appropriate.
Prepare the Wazuh Environment for Restoration
Before restoring anything, record the current environment.
Capture:
Wazuh version:
Wazuh Manager version:
Wazuh Indexer version:
Wazuh Dashboard version:
Manager cluster topology:
Indexer cluster topology:
Authentication method:
Backup timestamp:
Restore reason:Also create a backup of the current broken or modified configuration before replacing it.
For example:
sudo cp -a /etc/wazuh-indexer/opensearch-security \
/root/wazuh-rbac-before-restore/This gives you a rollback point if the restoration does not produce the expected result.
Stop Affected Wazuh Services When Required
Whether services need to be stopped depends on the specific configuration being restored and the Wazuh-supported procedure for your version.
Do not blindly stop every Wazuh service.
For example, if you are replacing static configuration files that are read during service startup, the affected service may need to be stopped before the files are replaced and restarted afterward.
For an Indexer restoration, follow the Wazuh documentation for the applicable security administration procedure rather than treating the Indexer as a simple file-copy operation.
The general sequence is:
Backup current state
↓
Stop affected service if required
↓
Restore configuration
↓
Validate configuration
↓
Start/restart service
↓
Validate authentication
↓
Validate authorizationRestore RBAC Configuration Files
Extract the known-good archive into a temporary location first:
mkdir -p /tmp/wazuh-rbac-restore
tar -xzpf wazuh-rbac-20260810-010000.tar.gz \
-C /tmp/wazuh-rbac-restoreDo not immediately overwrite production files.
Review the extracted configuration:
find /tmp/wazuh-rbac-restore -type f -printConfirm:
- The backup is from the correct Wazuh version.
- The backup came from the correct environment.
- The expected custom roles exist.
- The expected mappings exist.
- The configuration paths match the target system.
Then restore the files using the appropriate Wazuh-supported procedure.
For example, when restoring a file-level Indexer configuration:
sudo cp -a \
/tmp/wazuh-rbac-restore/wazuh-rbac-backup/indexer/. \
/etc/wazuh-indexer/opensearch-security/Do not use this example blindly on a production cluster. Wazuh/OpenSearch security configuration can require additional initialization or security-admin operations depending on the configuration and version.
Restore Roles and Role Mappings
Roles and mappings must be restored together.
Restoring:
roleswithout:
role mappingscan produce a system where the required permissions exist but users are not assigned them.
Likewise, restoring mappings without the corresponding roles can produce references to missing or incompatible authorization objects.
For a Wazuh Server API restoration, use the API’s supported role, policy, rule, and user-management operations where appropriate.
For the Indexer, follow the Wazuh-supported security configuration procedure for restoring roles and mappings.
Restore Internal Users
If your deployment uses internal authentication, restore the relevant internal-user configuration.
The Indexer security configuration commonly includes:
internal_users.ymlBefore restoring it, confirm that:
- The backup belongs to the same environment.
- The Wazuh/Indexer versions are compatible.
- The required administrator account exists.
- Password hashes are from the intended configuration.
- File ownership and permissions are correct.
Do not restore an internal-user database from an unrelated Wazuh environment simply because the usernames appear similar.
Apply Restored Security Configuration
After restoring the files, apply them using the security-management mechanism appropriate to your Wazuh version.
This distinction matters because copying an Indexer security file onto disk does not necessarily mean that the running OpenSearch security subsystem has immediately adopted the change.
Wazuh’s documentation provides specific procedures and utilities for managing Indexer security configuration.
Follow the procedure corresponding to your installed version rather than improvising a production restoration command.
For Wazuh Server API RBAC, use the supported API operations to recreate or verify users, roles, policies, and rules where necessary.
Restart Affected Services
Once the configuration has been restored and validated, restart the affected services according to the Wazuh recovery procedure.
For example, a Dashboard configuration change may require restarting the Dashboard service.
An Indexer configuration change may require restarting or otherwise reloading the relevant security configuration depending on the restoration method.
Avoid restarting unrelated components unnecessarily.
After restarting, immediately inspect service status and logs.
For example:
sudo systemctl status wazuh-indexerand:
sudo journalctl -u wazuh-indexer --since "10 minutes ago"The exact service names and diagnostic locations depend on the Wazuh component being restored.
Verify RBAC Functionality
Restoration is not complete until authorization has been tested.
Test at least three permission levels:
Administrator
- Can authenticate.
- Can manage users.
- Can manage roles.
- Can access administrative interfaces.
Analyst
- Can access permitted security data.
- Cannot perform unauthorized administrative actions.
Incident responder
- Can perform the additional operational actions assigned to the responder role.
- Cannot perform administrator-only operations.
For API RBAC, test the actual API operations associated with each role.
For Dashboard/Indexer RBAC, test both data visibility and administrative actions.
A successful login alone is not sufficient. Authentication proves the identity was accepted; RBAC validation requires proving that the identity received the correct authorization.
Restore Wazuh RBAC After a Server Failure
A server failure can turn a straightforward RBAC restoration into a complete disaster-recovery exercise.
If the failed server hosted the Wazuh Indexer, Dashboard, or Manager, you may need to rebuild the underlying platform before restoring the security configuration.
The correct recovery order is generally:
Rebuild infrastructure
↓
Install compatible Wazuh components
↓
Restore base configuration
↓
Restore security configuration
↓
Restore RBAC
↓
Reconnect authentication
↓
Validate access
↓
Validate security boundariesRebuild the Wazuh Environment
First rebuild the failed component using a supported Wazuh version.
Document and match:
- Wazuh version.
- Operating system.
- Component versions.
- Cluster configuration.
- Hostnames.
- Certificates.
- Network configuration.
- Authentication architecture.
Do not restore an RBAC configuration from a significantly different Wazuh/Indexer version without first checking compatibility.
Restore the Wazuh Indexer Security Configuration
If the failed server hosted an Indexer node, restore the Indexer security configuration after the base Indexer installation and cluster configuration are ready.
This may include:
internal_users.yml
roles.yml
roles_mapping.yml
action_groups.yml
tenants.yml
config.ymlOnly restore the files that were part of your backup and applicable to the target deployment.
Use Wazuh’s documented Indexer security procedures to apply the restored configuration.
Then verify:
- Indexer cluster health.
- Internal-user authentication.
- Roles.
- Role mappings.
- Tenant access.
- Index permissions.
See our The Ultimate Wazuh Indexer Guide for rebuilding or troubleshooting the Indexer layer.
Restore Wazuh Dashboard Settings
Next restore the Dashboard security-related configuration.
This may include:
wazuh.yml.- SSO configuration.
- Authentication configuration.
- Tenant configuration.
- TLS certificates.
- Identity-provider settings.
For example, if your deployment uses Wazuh role mappings through the Dashboard, verify the run_as configuration documented by Wazuh.
Restart the Dashboard after applying the appropriate configuration, then test both local and SSO authentication as applicable.
Restore Custom Roles and Mappings
Recreate or restore your custom authorization model.
Verify:
Custom roles
↓
Policies
↓
Rules
↓
Role mappings
↓
Users / groups
↓
TenantsDo not stop after confirming that the role names appear.
For every critical role, confirm its actual permissions.
For example:
incident_responder
├── Read alerts
├── Read agents
├── Perform approved response actions
└── No administrative user-management accessThis ensures the restored configuration retains the intended least-privilege model.
Reconnect Authentication Providers
If the deployment uses SSO, restore the relationship between Wazuh and the external identity provider.
Depending on your architecture, this may involve:
- LDAP.
- Active Directory.
- SAML.
- OIDC.
- Microsoft Entra ID.
- Okta.
- Google Workspace.
- Keycloak.
Restore the appropriate Wazuh-side configuration and then verify the identity-provider configuration.
Do not assume that restoring Wazuh configuration restores the identity provider itself.
The external IdP remains an independent system.
Related Guides:
- How to Integrate Keycloak with Wazuh
- How to Integrate Wazuh with Okta
- How to Integrate Wazuh with Azure AD
- How to Integrate Wazuh with Google Workspace
Validate Administrator Access
Test an administrator account first.
Confirm that the administrator can:
- Log in.
- Access the Dashboard.
- Access the appropriate security-management interfaces.
- View Wazuh resources.
- Manage users.
- Manage roles.
- Access Indexer security administration where authorized.
- Perform required API operations.
If administrator access fails, stop the restoration process and resolve it before testing lower-privileged users.
A common recovery mistake is testing an analyst account first and then discovering that the administrator account cannot make the configuration changes required to correct the problem.
Validate Analyst and Responder Access
After administrator access works, test representative lower-privilege accounts.
For an analyst:
Login → Dashboard → Alerts → Allowed data
↓
Unauthorized action
↓
DENIEDFor an incident responder:
Login → Dashboard → Alerts
↓
Response actions
↓
Permitted actionsTest both positive and negative authorization cases.
You want to prove that users can perform the actions they need while remaining unable to perform actions outside their assigned roles.
This is particularly important after restoring a role mapping because a mapping error can accidentally grant excessive privileges.
Confirm Multi-Tenancy Behavior
If your deployment uses multi-tenancy, test each important tenant.
Verify that:
- Users can access their assigned tenant.
- Users cannot access unauthorized tenants.
- Saved objects appear where expected.
- Index permissions are correct.
- Analyst groups see the correct security data.
- Administrators retain the appropriate cross-tenant privileges.
A useful recovery test matrix is:
| Account | Role | Expected Tenant | Expected Result |
|---|---|---|---|
| SOC administrator | Administrator | Global | Full administrative access |
| SOC analyst | Read-only/Analyst | SOC | Read assigned data |
| Incident responder | Responder | Incident Response | Response permissions |
| Auditor | Auditor | Audit | Read-only audit access |
Finally, document the restoration.
Record:
- Failure date and time.
- Backup used.
- Wazuh version.
- Indexer version.
- Components restored.
- Authentication provider.
- Roles restored.
- Role mappings restored.
- Tenant configuration restored.
- Validation results.
- Any configuration changes made during recovery.
This turns a one-time recovery into a documented disaster-recovery procedure that can be repeated during the next Wazuh outage or server failure.

Be First to Comment