Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new role to grant ISM API permissions #2553

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"