diff --git a/roles/haproxy/tasks/update-config.yml b/roles/haproxy/tasks/update-config.yml index 58506a4340e19d4386d1f9157c38cc49e38fb2ae..589af4073b7831e5dba3b48df1bda5e959a3a367 100644 --- a/roles/haproxy/tasks/update-config.yml +++ b/roles/haproxy/tasks/update-config.yml @@ -15,10 +15,10 @@ - stats - nifi - nifiports - - odfe + - opensearches - keycloak - thehive - cortex - misp - user-mgmt-ui - - kibana + - opensearch-dashboards diff --git a/roles/haproxy/templates/haproxy.cfg.j2 b/roles/haproxy/templates/haproxy.cfg.j2 index a5f25dd28b022f3558ceb8cc0c1b1a1588b5cbbe..3e3502f844115cc14afcb77e09d24557f9bea99c 100644 --- a/roles/haproxy/templates/haproxy.cfg.j2 +++ b/roles/haproxy/templates/haproxy.cfg.j2 @@ -16,6 +16,10 @@ defaults timeout client 20s timeout server 20s +userlist mycredentials + user {{soctools_users[0].username}} insecure-password {{lookup('password', '{{playbook_dir}}/secrets/passwords/{{soctools_users[0].username}}')}} + user {{soctools_users[0].email}} insecure-password {{lookup('password', '{{playbook_dir}}/secrets/passwords/{{soctools_users[0].username}}')}} + listen stats bind 0.0.0.0:8888 ssl crt /etc/ssl/haproxy alpn h2,http/1.1 stats enable @@ -134,6 +138,7 @@ listen user-mgmt-ui option httplog server soctools_server {{ soctools_network_gw }}:8050 tcp-request connection reject if !{ src -f /usr/local/etc/haproxy/user-mgmt-ui_whitelist.lst } + http-request auth unless { http_auth(mycredentials) } {% for port in range(5000, 5020) %} diff --git a/roles/opensearches/tasks/main.yml b/roles/opensearches/tasks/main.yml index 2e7a390abbb8ce24c2b29629f37d448f87530a9d..d693c3773ff54967d3564abe7aeafd8c069c69fd 100644 --- a/roles/opensearches/tasks/main.yml +++ b/roles/opensearches/tasks/main.yml @@ -6,17 +6,17 @@ - include: start.yml tags: - start - - start-odfees + - start-opensearches - init - include: stop.yml tags: - stop - - stop-odfees + - stop-opensearches - include: update-config.yml tags: - update-config - - update-odfees-config + - update-opensearches-config - include: restart.yml tags: - restart - - restart-odfees + - restart-opensearches diff --git a/update-config-soctools.yml b/update-config-soctools.yml index 742adee110d2637265b1bca12cd21bc9aed8f28f..3884667a0cd355c9ba2af6f3f5ca5cc513ae5037 100644 --- a/update-config-soctools.yml +++ b/update-config-soctools.yml @@ -30,7 +30,7 @@ roles: - opensearches -- name: Update Configs for Opensearch Kibana +- name: Update Configs for Opensearch Dashboards hosts: opensearchdashboardscontainers roles: - opensearch-dashboards