diff --git a/salt/elasticsearch/template.map.jinja b/salt/elasticsearch/template.map.jinja index c460f4ab1..5336f5db6 100644 --- a/salt/elasticsearch/template.map.jinja +++ b/salt/elasticsearch/template.map.jinja @@ -11,7 +11,8 @@ {% set DATA_RETENTION_METHOD = ELASTICSEARCHMERGED.data_retention_method %} {% set PILLAR_GLOBAL_OVERRIDES = {} %} -{% set ES_INDEX_PILLAR = salt['pillar.get']('elasticsearch:index_settings', {}) %} +{# merge into a copy: pillar.get returns a live reference and this map pops/updates ES_INDEX_PILLAR #} +{% set ES_INDEX_PILLAR = salt['defaults.merge'](salt['pillar.get']('elasticsearch:index_settings', {}), {}, in_place=False) %} {% if ES_INDEX_PILLAR.global_overrides is defined %} {% set PILLAR_GLOBAL_OVERRIDES = ES_INDEX_PILLAR.pop('global_overrides') %} {% endif %} diff --git a/salt/elasticsearch/templates/component/so/detections-alerts-mappings.json b/salt/elasticsearch/templates/component/so/detections-alerts-mappings.json index 5a2abfb7f..aad0c15d1 100644 --- a/salt/elasticsearch/templates/component/so/detections-alerts-mappings.json +++ b/salt/elasticsearch/templates/component/so/detections-alerts-mappings.json @@ -140,7 +140,23 @@ } } } - } + }, + "dynamic_templates": [ + { + "event_data_scalars_as_keyword": { + "path_match": "event_data.*", + "match_mapping_type": [ + "long", + "double", + "boolean" + ], + "mapping": { + "type": "keyword", + "ignore_above": 1024 + } + } + } + ] } }, "_meta": { diff --git a/salt/influxdb/defaults.yaml b/salt/influxdb/defaults.yaml index 29088fea9..c056db49f 100644 --- a/salt/influxdb/defaults.yaml +++ b/salt/influxdb/defaults.yaml @@ -8,10 +8,10 @@ influxdb: flux-log-enabled: false hardening-enabled: true http-bind-address: :8086 - http-idle-timeout: 0 + http-idle-timeout: 0s http-read-header-timeout: 10s - http-read-timeout: 0 - http-write-timeout: 0 + http-read-timeout: 0s + http-write-timeout: 0s influxql-max-select-buckets: 0 influxql-max-select-point: 0 influxql-max-select-series: 0 diff --git a/salt/influxdb/soc_influxdb.yaml b/salt/influxdb/soc_influxdb.yaml index 2b6bffe49..ff785fc57 100644 --- a/salt/influxdb/soc_influxdb.yaml +++ b/salt/influxdb/soc_influxdb.yaml @@ -42,17 +42,17 @@ influxdb: advanced: True helpLink: influxdb http-idle-timeout: - description: Keep-alive timeout while a connection waits for new requests. A value of 0 is the same as no timeout enforced. + description: Keep-alive timeout while a connection waits for new requests. A value of 0s is the same as no timeout enforced. global: True advanced: True helpLink: influxdb http-read-header-timeout: - description: The duration to wait for a request header before closing the connection. A value of 0 is the same as no timeout enforced. + description: The duration to wait for a request header before closing the connection. A value of 0s is the same as no timeout enforced. global: True advanced: True helpLink: influxdb http-read-timeout: - description: The duration to wait for the request to be fully read before closing the connection. A value of 0 is the same as no timeout enforced. + description: The duration to wait for the request to be fully read before closing the connection. A value of 0s is the same as no timeout enforced. global: True advanced: True helpLink: influxdb diff --git a/salt/influxdb/tools/sbin/so-influxdb-manage b/salt/influxdb/tools/sbin/so-influxdb-manage index b22d63bb6..1b53757f8 100644 --- a/salt/influxdb/tools/sbin/so-influxdb-manage +++ b/salt/influxdb/tools/sbin/so-influxdb-manage @@ -128,7 +128,7 @@ lookup_org_id_with_wait() { wait=10 while [[ $attempts -lt $max_attempts ]]; do response=$(request orgs?org=Security+Onion) - oid=$(echo "$response" | jq -r ".orgs[] | select(.name == \"Security Onion\").id") + oid=$(echo "$response" | jq -r ".orgs[]? | select(.name == \"Security Onion\").id") if [[ -z $oid ]]; then attempts=$((attempts+1)) log "Server does not appear to be running or fully initialized - will try again in $wait seconds ($attempts / $max_attempts)" diff --git a/salt/manager/tools/sbin/soup b/salt/manager/tools/sbin/soup index c12408017..4b6a6b22b 100755 --- a/salt/manager/tools/sbin/soup +++ b/salt/manager/tools/sbin/soup @@ -1260,6 +1260,8 @@ post_to_3.5.0() { salt-call state.apply salt.cloud.config concurrent=True || FINAL_MESSAGE_QUEUE+=("WARNING: Unable to update the salt-cloud profile. Run: sudo salt-call state.apply salt.cloud.config") fi + rollover_index "logs-detections.alerts-so" + set_postversion 3.5.0 } ### 3.5.0 End ### diff --git a/salt/registry/enabled.sls b/salt/registry/enabled.sls index 9b69a380a..50df4f615 100644 --- a/salt/registry/enabled.sls +++ b/salt/registry/enabled.sls @@ -18,7 +18,7 @@ include: # Install the registry container so-dockerregistry: docker_container.running: - - image: ghcr.io/security-onion-solutions/registry:3.1.1 + - image: ghcr.io/security-onion-solutions/registry:3.1.2 # Intentionally `always`-- registry is critical and must # come back up even if it was manually stopped. - restart_policy: always diff --git a/salt/soc/defaults.yaml b/salt/soc/defaults.yaml index f643ac09c..ec17a107c 100644 --- a/salt/soc/defaults.yaml +++ b/salt/soc/defaults.yaml @@ -1638,6 +1638,12 @@ soc: - "user.effective.name" - "weird.name" - "tags" + queryNotifications: + defaultLimit: 10 + maxLimit: 50 + summaryMaxLength: 1000 + fieldValueMaxLength: 200 + maxEntries: 25 onionconfig: saltstackDir: /opt/so/saltstack bypassEnabled: false diff --git a/salt/soc/soc_soc.yaml b/salt/soc/soc_soc.yaml index 6255fbd23..ff1ab291c 100644 --- a/salt/soc/soc_soc.yaml +++ b/salt/soc/soc_soc.yaml @@ -1112,6 +1112,32 @@ soc: description: A whitelist of fields to return when OnionAI uses the query_events tool. All other fields are removed. One field per line. global: True multiline: True + queryNotifications: + defaultLimit: + description: Number of notifications Onion AI reads with the query_notifications tool when it doesn't ask for a specific number. Must be greater than 0. Values above maxLimit use maxLimit. + global: True + advanced: True + forcedType: int + maxLimit: + description: Maximum number of notifications Onion AI may read with one query_notifications call. Must be greater than 0. Higher values put more notification text into the model's context. + global: True + advanced: True + forcedType: int + summaryMaxLength: + description: Maximum number of characters of each notification summary that query_notifications returns to Onion AI. Must be greater than 0. Longer summaries are shortened. + global: True + advanced: True + forcedType: int + fieldValueMaxLength: + description: Maximum number of characters of each notification field value that query_notifications returns to Onion AI. Must be greater than 0. Longer values are shortened. Link values are never shortened. + global: True + advanced: True + forcedType: int + maxEntries: + description: Maximum number of fields, of links, and of attachment names, each counted separately, per notification that query_notifications returns to Onion AI. Must be greater than 0. The result tells Onion AI how many were left out. + global: True + advanced: True + forcedType: int client: assistant: enabled: diff --git a/salt/telegraf/enabled.sls b/salt/telegraf/enabled.sls index 9fdb4ec46..4821063d3 100644 --- a/salt/telegraf/enabled.sls +++ b/salt/telegraf/enabled.sls @@ -24,6 +24,8 @@ so-telegraf: - environment: - HOST_ETC=/host/etc - HOST_SYS=/host/sys + - HOST_PROC=/host/proc + - HOST_PROC_MOUNTINFO=/proc/1 - HOST_MOUNT_PREFIX=/host - GODEBUG=x509ignoreCN=0 {% if DOCKERMERGED.containers['so-telegraf'].extra_env %}