diff --git a/salt/elasticsearch/config.map.jinja b/salt/elasticsearch/config.map.jinja index cfbab8524..8eb62311c 100644 --- a/salt/elasticsearch/config.map.jinja +++ b/salt/elasticsearch/config.map.jinja @@ -6,8 +6,6 @@ {% from 'vars/globals.map.jinja' import GLOBALS %} {% import_yaml 'elasticsearch/defaults.yaml' as ELASTICSEARCHDEFAULTS with context %} -{% set HIGHLANDER = salt['pillar.get']('global:highlander', False) %} - {# this is a list of dicts containing hostname:ip for elasticsearch nodes that need to know about each other for cluster #} {% set ELASTICSEARCH_SEED_HOSTS = [] %} {% set node_data = salt['pillar.get']('elasticsearch:nodes', {GLOBALS.role.split('-')[1]: {GLOBALS.hostname: {'ip': GLOBALS.node_ip}}}) %} @@ -36,14 +34,8 @@ {% endfor %} {% endif %} {% elif grains.id.split('_') | last == 'searchnode' %} - {% if HIGHLANDER %} - {% do ELASTICSEARCHDEFAULTS.elasticsearch.config.node.roles.extend(['ml', 'master', 'transform']) %} - {% endif %} {% do ELASTICSEARCHDEFAULTS.elasticsearch.config.update({'discovery': {'seed_hosts': [GLOBALS.manager]}}) %} {% endif %} -{% if HIGHLANDER %} - {% do ELASTICSEARCHDEFAULTS.elasticsearch.config.xpack.ml.update({'enabled': true}) %} -{% endif %} {% do ELASTICSEARCHDEFAULTS.elasticsearch.config.node.update({'name': GLOBALS.hostname}) %} {% do ELASTICSEARCHDEFAULTS.elasticsearch.config.cluster.update({'name': GLOBALS.hostname}) %} diff --git a/salt/elasticsearch/files/ingest-dynamic/common b/salt/elasticsearch/files/ingest/common similarity index 95% rename from salt/elasticsearch/files/ingest-dynamic/common rename to salt/elasticsearch/files/ingest/common index 814d8d4d5..b7048cf3b 100644 --- a/salt/elasticsearch/files/ingest-dynamic/common +++ b/salt/elasticsearch/files/ingest/common @@ -1,5 +1,3 @@ -{%- set HIGHLANDER = salt['pillar.get']('global:highlander', False) -%} -{%- raw -%} { "description" : "common", "processors" : [ @@ -67,19 +65,7 @@ { "append": { "if": "ctx.dataset_tag_temp != null", "field": "tags", "value": "{{dataset_tag_temp.1}}" } }, { "grok": { "if": "ctx.http?.response?.status_code != null", "field": "http.response.status_code", "patterns": ["%{NUMBER:http.response.status_code:long} %{GREEDYDATA}"]} }, { "set": { "if": "ctx?.metadata?.kafka != null" , "field": "kafka.id", "value": "{{metadata.kafka.partition}}{{metadata.kafka.offset}}{{metadata.kafka.timestamp}}", "ignore_failure": true } }, - { "remove": { "field": [ "message2", "type", "fields", "category", "module", "dataset", "dataset_tag_temp", "event.dataset_temp" ], "ignore_missing": true, "ignore_failure": true } } -{%- endraw %} -{%- if HIGHLANDER %} - , - { - "pipeline": { - "name": "ecs" - } - } -{%- endif %} -{%- raw %} - , + { "remove": { "field": [ "message2", "type", "fields", "category", "module", "dataset", "dataset_tag_temp", "event.dataset_temp" ], "ignore_missing": true, "ignore_failure": true } }, { "pipeline": { "name": "global@custom", "ignore_missing_pipeline": true, "description": "[Fleet] Global pipeline for all data streams" } } ] } -{% endraw %} diff --git a/salt/kibana/map.jinja b/salt/kibana/map.jinja index bd333f1c4..b2e94806d 100644 --- a/salt/kibana/map.jinja +++ b/salt/kibana/map.jinja @@ -5,7 +5,6 @@ {% from 'vars/globals.map.jinja' import GLOBALS %} {% import_yaml 'kibana/defaults.yaml' as KIBANADEFAULTS with context %} -{% set HIGHLANDER = salt['pillar.get']('global:highlander', False) %} {% do KIBANADEFAULTS.kibana.config.server.update({'publicBaseUrl': 'https://' ~ GLOBALS.url_base ~ '/kibana'}) %} {% do KIBANADEFAULTS.kibana.config.elasticsearch.update({'hosts': ['https://' ~ GLOBALS.manager ~ ':9200']}) %} diff --git a/salt/kibana/so_dashboard_load.sls b/salt/kibana/so_dashboard_load.sls index 3222eabc6..7f733e7c6 100644 --- a/salt/kibana/so_dashboard_load.sls +++ b/salt/kibana/so_dashboard_load.sls @@ -3,7 +3,6 @@ # https://securityonion.net/license; you may not use this file except in compliance with the # Elastic License 2.0. -{% set HIGHLANDER = salt['pillar.get']('global:highlander', False) %} include: - kibana.enabled @@ -29,27 +28,3 @@ so-kibana-dashboard-load: - require: - sls: kibana.enabled - file: dashboard_saved_objects_template -{%- if HIGHLANDER %} -dashboard_saved_objects_template_hl: - file.managed: - - name: /opt/so/conf/kibana/hl.ndjson.template - - source: salt://kibana/files/hl.ndjson - - user: 932 - - group: 939 - - show_changes: False - -dashboard_saved_objects_hl_changes: - file.absent: - - names: - - /opt/so/state/kibana_hl.txt - - onchanges: - - file: dashboard_saved_objects_template_hl - -so-kibana-dashboard-load_hl: - cmd.run: - - name: /usr/sbin/so-kibana-config-load -i /opt/so/conf/kibana/hl.ndjson.template - - cwd: /opt/so - - require: - - sls: kibana.enabled - - file: dashboard_saved_objects_template_hl -{%- endif %} diff --git a/salt/kibana/tools/sbin_jinja/so-kibana-space-defaults b/salt/kibana/tools/sbin_jinja/so-kibana-space-defaults index cbd16a2de..fcb80e606 100755 --- a/salt/kibana/tools/sbin_jinja/so-kibana-space-defaults +++ b/salt/kibana/tools/sbin_jinja/so-kibana-space-defaults @@ -1,6 +1,5 @@ #!/bin/bash . /usr/sbin/so-common -{% set HIGHLANDER = salt['pillar.get']('global:highlander', False) %} wait_for_web_response "http://localhost:5601/api/spaces/space/default" "default" 300 "curl -K /opt/so/conf/elasticsearch/curl.config" ## This hackery will be removed if using Elastic Auth ## @@ -9,10 +8,6 @@ SESSIONCOOKIE=$(curl -K /opt/so/conf/elasticsearch/curl.config -c - -X GET http: # Disable certain Features from showing up in the Kibana UI echo -echo "Setting up default Space:" -{% if HIGHLANDER %} -curl -K /opt/so/conf/elasticsearch/curl.config -b "sid=$SESSIONCOOKIE" -L -X PUT "localhost:5601/api/spaces/space/default" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d' {"id":"default","name":"Default","disabledFeatures":["enterpriseSearch"]} ' >> /opt/so/log/kibana/misc.log -{% else %} +echo "Setting up default Kibana Space:" curl -K /opt/so/conf/elasticsearch/curl.config -b "sid=$SESSIONCOOKIE" -L -X PUT "localhost:5601/api/spaces/space/default" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d' {"id":"default","name":"Default","disabledFeatures":["ml","enterpriseSearch","logs","infrastructure","apm","uptime","monitoring","stackAlerts","actions","securitySolutionCasesV3","inventory","dataQuality","searchSynonyms","enterpriseSearchApplications","enterpriseSearchAnalytics","securitySolutionTimeline","securitySolutionNotes","entityManager"]} ' >> /opt/so/log/kibana/misc.log -{% endif %} echo diff --git a/setup/so-functions b/setup/so-functions index 052270932..e3ef10bc1 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -1366,9 +1366,6 @@ create_global() { echo " mdengine: 'ZEEK'" >> $global_pillar_file echo " ids: 'Suricata'" >> $global_pillar_file echo " url_base: '$REDIRECTIT'" >> $global_pillar_file - if [[ $HIGHLANDER == 'True' ]]; then - echo " highlander: True" >> $global_pillar_file - fi if [[ $is_airgap ]]; then echo " airgap: True" >> $global_pillar_file else