Skip to content

Commit

Permalink
Merge pull request #2553 from wazuh/2552-ism-rollover-add-role
Browse files Browse the repository at this point in the history
Add new role to grant ISM API permissions
  • Loading branch information
c-bordon authored Nov 7, 2023
2 parents a024eff + 70d6b1e commit 07ff16d
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 3 deletions.
1 change: 1 addition & 0 deletions stack/indexer/deb/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ override_dh_install:
cp /root/documentation-templates/wazuh/config.yml $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/tools/config.yml

# Copy Wazuh's config files for the security plugin
cp -pr $(REPO_DIR)/config/indexer/roles/action_groups.yml $(TARGET_DIR)$(CONFIG_DIR)/opensearch-security/
cp -pr $(REPO_DIR)/config/indexer/roles/roles_mapping.yml $(TARGET_DIR)$(CONFIG_DIR)/opensearch-security/
cp -pr $(REPO_DIR)/config/indexer/roles/roles.yml $(TARGET_DIR)$(CONFIG_DIR)/opensearch-security/
cp -pr $(REPO_DIR)/config/indexer/roles/internal_users.yml $(TARGET_DIR)$(CONFIG_DIR)/opensearch-security/
Expand Down
1 change: 1 addition & 0 deletions stack/indexer/rpm/wazuh-indexer.spec
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ cp %{REPO_DIR}/wazuh-passwords-tool.sh ${RPM_BUILD_ROOT}%{INSTALL_DIR}/plugins/o
cp /root/documentation-templates/wazuh/config.yml ${RPM_BUILD_ROOT}%{INSTALL_DIR}/plugins/opensearch-security/tools/config.yml

# Copy Wazuh's config files for the security plugin
cp %{REPO_DIR}/config/indexer/roles/action_groups.yml ${RPM_BUILD_ROOT}%{CONFIG_DIR}/opensearch-security
cp %{REPO_DIR}/config/indexer/roles/internal_users.yml ${RPM_BUILD_ROOT}%{CONFIG_DIR}/opensearch-security
cp %{REPO_DIR}/config/indexer/roles/roles.yml ${RPM_BUILD_ROOT}%{CONFIG_DIR}/opensearch-security
cp %{REPO_DIR}/config/indexer/roles/roles_mapping.yml ${RPM_BUILD_ROOT}%{CONFIG_DIR}/opensearch-security
Expand Down
12 changes: 12 additions & 0 deletions unattended_installer/config/indexer/roles/action_groups.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
_meta:
type: "actiongroups"
config_version: 2

# ISM API permissions group
manage_ism:
reserved: true
hidden: false
allowed_actions:
- "cluster:admin/opendistro/ism/*"
static: false
10 changes: 9 additions & 1 deletion unattended_installer/config/indexer/roles/roles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,12 @@ manage_wazuh_index:
- "manage"
- "index"
tenant_permissions: []
static: false
static: false

# ISM API permissions role
manage_ism:
reserved: true
hidden: false
cluster_permissions:
- "manage_ism"
static: false
11 changes: 9 additions & 2 deletions unattended_installer/config/indexer/roles/roles_mapping.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,19 @@ kibana_user:
and_backend_roles: []
description: "Maps kibanauser to kibana_user"

# Wazuh monitoring and statistics index permissions
# Wazuh monitoring and statistics index permissions
manage_wazuh_index:
reserved: true
hidden: false
backend_roles: []
hosts: []
users:
- "kibanaserver"
and_backend_roles: []
and_backend_roles: []

# ISM API permissions role mapping
manage_ism:
reserved: true
hidden: false
users:
- "kibanaserver"

0 comments on commit 07ff16d

Please sign in to comment.