-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Backport 4.5-7.10] Add environment to wazuh 4.4 (#5359)
Add environment to wazuh 4.4 (#5355) * Add environment rel * Add 4.4 to kibana rel * fix(docker-environments): remove 4.3 version of wazuh-4.4-wz * fix(docker-environments): fix SAML on wazuh-4.4-wz * Fix saml * Fix 4.4 pre * Fix saml 4.3 * fix elastic pre 4.4.x * Change folder name --------- Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com> (cherry picked from commit 370c18f) Co-authored-by: Ian Yenien Serrano <63758389+yenienserrano@users.noreply.github.com>
- Loading branch information
1 parent
c138171
commit 6104643
Showing
43 changed files
with
2,392 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
_meta: | ||
type: "config" | ||
config_version: 2 | ||
|
||
config: | ||
dynamic: | ||
http: | ||
anonymous_auth_enabled: false | ||
authc: | ||
internal_auth: | ||
order: 0 | ||
description: "HTTP basic authentication using the internal user database" | ||
http_enabled: true | ||
transport_enabled: true | ||
http_authenticator: | ||
type: basic | ||
challenge: false | ||
authentication_backend: | ||
type: internal | ||
saml_auth: | ||
order: 1 | ||
description: "Keycloack SAML provider" | ||
http_enabled: true | ||
transport_enabled: false | ||
http_authenticator: | ||
type: saml | ||
challenge: true | ||
config: | ||
idp: | ||
metadata_url: http://idp:8080/realms/wazuh/protocol/saml/descriptor | ||
entity_id: http://idp:8080/realms/wazuh | ||
sp: | ||
entity_id: wazuh | ||
signature_private_key_filepath: "certs/admin-key.pem" | ||
kibana_url: https://localhost:5601 | ||
roles_key: Role | ||
exchange_key: 1a2a3a4a5a6a7a8a9a0a1b2b3b4b5b6b | ||
authentication_backend: | ||
type: noop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
_meta: | ||
type: "roles" | ||
config_version: 2 | ||
|
||
# Restrict users so they can only view visualization and dashboard on kibana | ||
kibana_read_only: | ||
reserved: true | ||
|
||
# The security REST API access role is used to assign specific users access to change the security settings through the REST API. | ||
security_rest_api_access: | ||
reserved: true | ||
|
||
# Allows users to view monitors, destinations and alerts | ||
alerting_read_access: | ||
reserved: true | ||
cluster_permissions: | ||
- "cluster:admin/opendistro/alerting/alerts/get" | ||
- "cluster:admin/opendistro/alerting/destination/get" | ||
- "cluster:admin/opendistro/alerting/monitor/get" | ||
- "cluster:admin/opendistro/alerting/monitor/search" | ||
|
||
# Allows users to view and acknowledge alerts | ||
alerting_ack_alerts: | ||
reserved: true | ||
cluster_permissions: | ||
- "cluster:admin/opendistro/alerting/alerts/*" | ||
|
||
# Allows users to use all alerting functionality | ||
alerting_full_access: | ||
reserved: true | ||
cluster_permissions: | ||
- "cluster_monitor" | ||
- "cluster:admin/opendistro/alerting/*" | ||
index_permissions: | ||
- index_patterns: | ||
- "*" | ||
allowed_actions: | ||
- "indices_monitor" | ||
- "indices:admin/aliases/get" | ||
- "indices:admin/mappings/get" | ||
|
||
# Allow users to read Anomaly Detection detectors and results | ||
anomaly_read_access: | ||
reserved: true | ||
cluster_permissions: | ||
- "cluster:admin/opendistro/ad/detector/info" | ||
- "cluster:admin/opendistro/ad/detector/search" | ||
- "cluster:admin/opendistro/ad/detectors/get" | ||
- "cluster:admin/opendistro/ad/result/search" | ||
- "cluster:admin/opendistro/ad/tasks/search" | ||
|
||
# Allows users to use all Anomaly Detection functionality | ||
anomaly_full_access: | ||
reserved: true | ||
cluster_permissions: | ||
- "cluster_monitor" | ||
- "cluster:admin/opendistro/ad/*" | ||
index_permissions: | ||
- index_patterns: | ||
- "*" | ||
allowed_actions: | ||
- "indices_monitor" | ||
- "indices:admin/aliases/get" | ||
- "indices:admin/mappings/get" | ||
|
||
# Allows users to read Notebooks | ||
notebooks_read_access: | ||
reserved: true | ||
cluster_permissions: | ||
- "cluster:admin/opendistro/notebooks/list" | ||
- "cluster:admin/opendistro/notebooks/get" | ||
|
||
# Allows users to all Notebooks functionality | ||
notebooks_full_access: | ||
reserved: true | ||
cluster_permissions: | ||
- "cluster:admin/opendistro/notebooks/create" | ||
- "cluster:admin/opendistro/notebooks/update" | ||
- "cluster:admin/opendistro/notebooks/delete" | ||
- "cluster:admin/opendistro/notebooks/get" | ||
- "cluster:admin/opendistro/notebooks/list" | ||
|
||
# Allows users to read and download Reports | ||
reports_instances_read_access: | ||
reserved: true | ||
cluster_permissions: | ||
- "cluster:admin/opendistro/reports/instance/list" | ||
- "cluster:admin/opendistro/reports/instance/get" | ||
- "cluster:admin/opendistro/reports/menu/download" | ||
|
||
# Allows users to read and download Reports and Report-definitions | ||
reports_read_access: | ||
reserved: true | ||
cluster_permissions: | ||
- "cluster:admin/opendistro/reports/definition/get" | ||
- "cluster:admin/opendistro/reports/definition/list" | ||
- "cluster:admin/opendistro/reports/instance/list" | ||
- "cluster:admin/opendistro/reports/instance/get" | ||
- "cluster:admin/opendistro/reports/menu/download" | ||
|
||
# Allows users to all Reports functionality | ||
reports_full_access: | ||
reserved: true | ||
cluster_permissions: | ||
- "cluster:admin/opendistro/reports/definition/create" | ||
- "cluster:admin/opendistro/reports/definition/update" | ||
- "cluster:admin/opendistro/reports/definition/on_demand" | ||
- "cluster:admin/opendistro/reports/definition/delete" | ||
- "cluster:admin/opendistro/reports/definition/get" | ||
- "cluster:admin/opendistro/reports/definition/list" | ||
- "cluster:admin/opendistro/reports/instance/list" | ||
- "cluster:admin/opendistro/reports/instance/get" | ||
- "cluster:admin/opendistro/reports/menu/download" | ||
|
||
# Allows users to use all asynchronous-search functionality | ||
asynchronous_search_full_access: | ||
reserved: true | ||
cluster_permissions: | ||
- "cluster:admin/opendistro/asynchronous_search/*" | ||
index_permissions: | ||
- index_patterns: | ||
- "*" | ||
allowed_actions: | ||
- "indices:data/read/search*" | ||
|
||
# Allows users to read stored asynchronous-search results | ||
asynchronous_search_read_access: | ||
reserved: true | ||
cluster_permissions: | ||
- "cluster:admin/opendistro/asynchronous_search/get" | ||
|
||
# Wazuh monitoring and statistics index permissions | ||
manage_wazuh_index: | ||
reserved: true | ||
hidden: false | ||
cluster_permissions: [] | ||
index_permissions: | ||
- index_patterns: | ||
- "wazuh-*" | ||
dls: "" | ||
fls: [] | ||
masked_fields: [] | ||
allowed_actions: | ||
- "read" | ||
- "delete" | ||
- "manage" | ||
- "index" | ||
tenant_permissions: [] | ||
static: false |
88 changes: 88 additions & 0 deletions
88
docker/wazuh-4.3-wz/config/wazuh_indexer/roles_mapping.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
--- | ||
# In this file users, backendroles and hosts can be mapped to Open Distro Security roles. | ||
# Permissions for Opendistro roles are configured in roles.yml | ||
|
||
_meta: | ||
type: "rolesmapping" | ||
config_version: 2 | ||
|
||
# Define your roles mapping here | ||
|
||
## Default roles mapping | ||
|
||
all_access: | ||
reserved: true | ||
hidden: false | ||
backend_roles: | ||
- "admin" | ||
hosts: [] | ||
users: [] | ||
and_backend_roles: [] | ||
description: "Maps admin to all_access" | ||
|
||
own_index: | ||
reserved: false | ||
hidden: false | ||
backend_roles: [] | ||
hosts: [] | ||
users: | ||
- "*" | ||
and_backend_roles: [] | ||
description: "Allow full access to an index named like the username" | ||
|
||
logstash: | ||
reserved: false | ||
hidden: false | ||
backend_roles: | ||
- "logstash" | ||
hosts: [] | ||
users: [] | ||
and_backend_roles: [] | ||
|
||
readall: | ||
reserved: true | ||
hidden: false | ||
backend_roles: | ||
- "readall" | ||
hosts: [] | ||
users: [] | ||
and_backend_roles: [] | ||
|
||
manage_snapshots: | ||
reserved: true | ||
hidden: false | ||
backend_roles: | ||
- "snapshotrestore" | ||
hosts: [] | ||
users: [] | ||
and_backend_roles: [] | ||
|
||
kibana_server: | ||
reserved: true | ||
hidden: false | ||
backend_roles: [] | ||
hosts: [] | ||
users: | ||
- "kibanaserver" | ||
and_backend_roles: [] | ||
|
||
kibana_user: | ||
reserved: false | ||
hidden: false | ||
backend_roles: | ||
- "kibanauser" | ||
hosts: [] | ||
users: [] | ||
and_backend_roles: [] | ||
description: "Maps kibanauser to kibana_user" | ||
|
||
# Wazuh monitoring and statistics index permissions | ||
manage_wazuh_index: | ||
reserved: true | ||
hidden: false | ||
backend_roles: [] | ||
hosts: [] | ||
users: | ||
- "kibanaserver" | ||
- "admin" | ||
and_backend_roles: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.