Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
167 commits
Select commit Hold shift + click to select a range
59f8544
Merge pull request #14778 from Security-Onion-Solutions/vlb2
m0duspwnens Jun 25, 2025
378ecad
Merge pull request #14893 from Security-Onion-Solutions/vlb2
m0duspwnens Jul 30, 2025
4a4146f
ol9 profile update
reyesj2 Aug 5, 2025
b307667
Merge remote-tracking branch 'origin/2.4/main' into 2.4/dev
TOoSmOotH Aug 12, 2025
6381444
Update VERSION
TOoSmOotH Aug 12, 2025
d020932
Update 2-4.yml
TOoSmOotH Aug 12, 2025
ee27965
Merge pull request #14922 from Security-Onion-Solutions/TOoSmOotH-pat…
TOoSmOotH Aug 12, 2025
baf0f7b
firewall allow hypervisor for managersearch and standalone
m0duspwnens Aug 12, 2025
c1a5c2b
set elasticfleet aritifact registry artifact file permissions
reyesj2 Aug 12, 2025
3c5a03d
fix /nsm/pcap no group/user ownership
reyesj2 Aug 12, 2025
a19b992
don't create unused zeek home directory
reyesj2 Aug 12, 2025
4828471
Merge pull request #14925 from Security-Onion-Solutions/vlb2
m0duspwnens Aug 12, 2025
42874fb
Merge remote-tracking branch 'origin/2.4/dev' into reyesj2/ol9stg
reyesj2 Aug 13, 2025
50b34a1
disable rpm verify hash, salt packages are modified before install fo…
reyesj2 Aug 14, 2025
f09eff5
profile upd
reyesj2 Aug 14, 2025
c7e7a0a
add more detail to fail_setup output
m0duspwnens Aug 14, 2025
5f60ef1
Merge remote-tracking branch 'origin/2.4/dev' into vlb2
m0duspwnens Aug 14, 2025
97100cd
Merge pull request #14930 from Security-Onion-Solutions/vlb2
m0duspwnens Aug 14, 2025
af1fe86
update chrony config
reyesj2 Aug 15, 2025
292e1ad
use chrony system default
reyesj2 Aug 15, 2025
f7a1a3a
gui / nongui profile
reyesj2 Aug 15, 2025
6fae4a9
Merge pull request #14933 from Security-Onion-Solutions/reyesj2/ol9stg
reyesj2 Aug 15, 2025
a3cc6f0
reports
jertel Aug 18, 2025
9cb4291
Merge branch '2.4/dev' into jertel/wip
jertel Aug 18, 2025
8d3220f
fix salt issue
jertel Aug 18, 2025
884bec7
fix typo
jertel Aug 18, 2025
46e1f1b
fix typo
jertel Aug 18, 2025
7727344
fix typo
jertel Aug 18, 2025
751b5bd
switch version for tests
jertel Aug 19, 2025
95bee91
zeek dns.resolved_ip
reyesj2 Aug 19, 2025
d0ba6df
remove any "" from dns.resolved_ip
reyesj2 Aug 19, 2025
f8058a4
disable showing large stig profile update in salt log
reyesj2 Aug 20, 2025
24be2f8
enable stig on fleet nodes
reyesj2 Aug 20, 2025
ed0e24f
Merge remote-tracking branch 'origin/2.4/dev' into reyesj2/ol9stg
reyesj2 Aug 20, 2025
0cebcf4
upgrade whoislookup deps
reyesj2 Aug 20, 2025
6a0d40e
leave requirements.txt as is
reyesj2 Aug 20, 2025
2e94e45
whoislookup py 3.13
reyesj2 Aug 20, 2025
9ca0c7d
urlhaus dep upgrades + update to use authenticated abusech api
reyesj2 Aug 20, 2025
87a28e8
malwarebazaar dep upgrades + use auth
reyesj2 Aug 21, 2025
c412e9b
malwarebazaar api uses auth
reyesj2 Aug 21, 2025
d77556c
pcap dir
reyesj2 Aug 21, 2025
f72996d
Merge pull request #14949 from Security-Onion-Solutions/reyesj2-patch-7
reyesj2 Aug 21, 2025
424fdff
180 soup base
m0duspwnens Aug 21, 2025
65e7e56
Merge pull request #14950 from Security-Onion-Solutions/180soup
m0duspwnens Aug 21, 2025
87fdd90
Merge branch '2.4/dev' of github.com:Security-Onion-Solutions/securit…
TOoSmOotH Aug 21, 2025
7968de0
enable access to global stig pillar
reyesj2 Aug 21, 2025
58228f7
malwarehashregistry dep upgrades
reyesj2 Aug 21, 2025
0e0ab83
localfile dep upgrade
reyesj2 Aug 21, 2025
67f8fca
spamhaus dep upgrades
reyesj2 Aug 21, 2025
220e485
threatfox dep upgrade + use auth for api access
reyesj2 Aug 21, 2025
a3e0072
update readme threatfox uses auth for api now
reyesj2 Aug 21, 2025
cccc3bf
urlscan dep upgrades
reyesj2 Aug 21, 2025
418dbee
virustotal dep upgrades
reyesj2 Aug 21, 2025
ebd81c1
otx dep upgrades
reyesj2 Aug 21, 2025
7d883cb
echotrail api no longer available
reyesj2 Aug 21, 2025
d3108c3
greynoise dep upgrade + use community version with no auth
reyesj2 Aug 21, 2025
9f45792
pulsedive dep upgrades
reyesj2 Aug 21, 2025
b79c7b0
sublime dep upgrades
reyesj2 Aug 21, 2025
d16dfcf
emailrep dep upgrades
reyesj2 Aug 21, 2025
1a08833
typo
reyesj2 Aug 22, 2025
c2c96da
bump version
reyesj2 Aug 22, 2025
c91e9ea
return to normalcy
jertel Aug 22, 2025
1357f19
update wording
jertel Aug 22, 2025
924b069
spamhaus config typos
reyesj2 Aug 22, 2025
9f0bd4b
spamhaus enable multiline annotation on nameservers entries
reyesj2 Aug 22, 2025
2a6c749
Ruleset Name UiElement
coreyogburn Aug 22, 2025
d998570
Improved Label
coreyogburn Aug 22, 2025
d6c7252
Merge pull request #14956 from Security-Onion-Solutions/cogburn/playb…
coreyogburn Aug 22, 2025
304985b
Merge pull request #14959 from Security-Onion-Solutions/jertel/wip
jertel Aug 22, 2025
5479d49
greynoise breakup long line for linter
reyesj2 Aug 22, 2025
a6600b8
elasticsearch dep upgrades
reyesj2 Aug 22, 2025
b2e7f58
analyzer test updates
reyesj2 Aug 22, 2025
cbdd369
ensure x509 in mine
m0duspwnens Aug 25, 2025
e10d00d
support for managerhype
m0duspwnens Aug 26, 2025
ac2c044
Merge remote-tracking branch 'origin/2.4/dev' into vlb2
m0duspwnens Aug 26, 2025
a8a01b8
Merge branch 'bravo' into vlb2
m0duspwnens Aug 26, 2025
ccd79c8
Add script for bond0 channels
TOoSmOotH Aug 27, 2025
0858160
support for modifying nic channels
m0duspwnens Aug 27, 2025
69a5e1e
remove md file
m0duspwnens Aug 27, 2025
153a99a
Merge pull request #14971 from Security-Onion-Solutions/mikebond
TOoSmOotH Aug 27, 2025
e5920b6
add managerhype back to whiptail
m0duspwnens Aug 28, 2025
ebb78bc
Merge remote-tracking branch 'origin/2.4/dev' into vlb2
m0duspwnens Aug 28, 2025
d9127a2
Merge pull request #14957 from Security-Onion-Solutions/reyesj2-patch-6
reyesj2 Aug 28, 2025
1ea7b3c
es 8.18.6
reyesj2 Aug 28, 2025
a5675a7
es 8.18.6 pipeline upd
reyesj2 Aug 29, 2025
f51cd00
only manage bond script if bond0 exists
m0duspwnens Aug 29, 2025
31484d1
Merge pull request #14978 from Security-Onion-Solutions/mikebond
TOoSmOotH Aug 29, 2025
a7a81e9
always manage script, only run it if bond0 exists
m0duspwnens Aug 29, 2025
19362fe
Update so-combine-bond
TOoSmOotH Aug 29, 2025
94c5a1f
Merge pull request #14980 from Security-Onion-Solutions/mikebond
m0duspwnens Aug 29, 2025
285fbc2
Merge remote-tracking branch 'origin/2.4/dev' into vlb2
m0duspwnens Sep 2, 2025
a2b6968
Merge pull request #14975 from Security-Onion-Solutions/reyesj2/es8186
reyesj2 Sep 2, 2025
2181cdd
Move EnableReverseLookup
coreyogburn Sep 2, 2025
df0b484
More Descriptive Description
coreyogburn Sep 2, 2025
c7cdb0b
Merge pull request #14986 from Security-Onion-Solutions/cogburn/inter…
coreyogburn Sep 2, 2025
e26310d
elastic agent offline alerter
reyesj2 Sep 2, 2025
1a32a08
Merge remote-tracking branch 'origin/2.4/dev' into reyesj2/ea-alerter
reyesj2 Sep 2, 2025
a007fa6
Merge remote-tracking branch 'origin/2.4/dev' into vlb2
m0duspwnens Sep 3, 2025
38ef4a6
pass pillar properly
m0duspwnens Sep 4, 2025
dfec29d
custom kquery
reyesj2 Sep 4, 2025
915b9e7
use logrotate
reyesj2 Sep 5, 2025
348f9dc
prevent multiple script instances using file lock
reyesj2 Sep 5, 2025
ba5d140
Merge pull request #14996 from Security-Onion-Solutions/reyesj2/ea-al…
reyesj2 Sep 5, 2025
4afc986
firewall and logstash pipeline for managerhype
m0duspwnens Sep 5, 2025
207572f
remove debug added to fail_setup
m0duspwnens Sep 5, 2025
6c196ea
Merge branch '2.4/dev' into vlb2
jertel Sep 5, 2025
8cca58d
Merge pull request #14998 from Security-Onion-Solutions/vlb2
m0duspwnens Sep 5, 2025
f318a84
Update so-elastic-fleet-reset
defensivedepth Sep 8, 2025
624ec3c
Merge pull request #15003 from Security-Onion-Solutions/fix/wording
defensivedepth Sep 8, 2025
ec27517
New Config Values
coreyogburn Jul 11, 2025
ba601c3
Rough Go at New Mappings/Settings
coreyogburn Jul 29, 2025
6323fbf
Content Object
coreyogburn Jul 30, 2025
b1753f8
New Message Structure
coreyogburn Jul 30, 2025
cea4eaf
Updated Assistant Mapping
coreyogburn Aug 6, 2025
fc2d450
Update Settings
coreyogburn Aug 26, 2025
120e61e
ClientParams
coreyogburn Aug 26, 2025
73776f8
Cleaning up New ES Indexes
coreyogburn Aug 27, 2025
834e341
Non-dev URL
coreyogburn Aug 28, 2025
0a3ff47
Cleanup Annotations
coreyogburn Sep 3, 2025
673f9cb
Responding to Feedback
coreyogburn Sep 4, 2025
855b489
datastream
reyesj2 Sep 4, 2025
12959d1
added threshold config fields for assistant
mc-wright Sep 4, 2025
aa43177
Fix Setting Name
coreyogburn Sep 5, 2025
9f7bcb0
add --force flag to so-kafka-fleet-output-policy & default to using f…
reyesj2 Sep 9, 2025
6655276
force update to kafka-fleet-output-policy
reyesj2 Sep 9, 2025
2f68cd7
Merge pull request #14991 from Security-Onion-Solutions/cogburn/wip-m…
coreyogburn Sep 9, 2025
2535ae9
Fix Index Patterns
coreyogburn Sep 9, 2025
10511b8
Merge pull request #15008 from Security-Onion-Solutions/cogburn/fix-t…
coreyogburn Sep 9, 2025
8f36d2e
update log file name
reyesj2 Sep 9, 2025
29980ea
offline threshold check
reyesj2 Sep 9, 2025
4107fa0
fix repo files to remove
m0duspwnens Sep 9, 2025
d9e86c1
Merge pull request #15010 from Security-Onion-Solutions/vlb2
m0duspwnens Sep 9, 2025
0aa556e
Merge pull request #15009 from Security-Onion-Solutions/reyesj2/ea-al…
reyesj2 Sep 9, 2025
f5ec1d4
don't show sensoroni config changes
m0duspwnens Sep 10, 2025
d1a2b57
Merge pull request #15011 from Security-Onion-Solutions/hideroni
m0duspwnens Sep 10, 2025
fbdc0c4
add configurable realert threshold per agent
reyesj2 Sep 10, 2025
8dc0f8d
fix elastic agent ssl unpack error
reyesj2 Sep 10, 2025
e6eecc9
Merge pull request #15012 from Security-Onion-Solutions/reyesj2/ea-al…
reyesj2 Sep 10, 2025
890f76e
avoid delay in log ingest after a forced kafka output policy update
reyesj2 Sep 11, 2025
a7651b2
lower filestream fingerprint length
reyesj2 Sep 11, 2025
46f0afa
Merge pull request #15019 from Security-Onion-Solutions/reyesj2/ea-al…
reyesj2 Sep 11, 2025
588a1b8
suricata metadata index rollover 1d -> 30d
reyesj2 Sep 11, 2025
e5660b8
Merge pull request #15020 from Security-Onion-Solutions/reyesj2/essur…
reyesj2 Sep 11, 2025
0f235ba
receiver custom fqdn
reyesj2 Sep 11, 2025
5100032
Merge pull request #15022 from Security-Onion-Solutions/reyesj2/cfqdn…
reyesj2 Sep 11, 2025
a54cd00
Merge pull request #15013 from Security-Onion-Solutions/reyesj2/kfoutput
reyesj2 Sep 12, 2025
a959f90
Merge remote-tracking branch 'origin/2.4/dev' into reyesj2/pypy
reyesj2 Sep 12, 2025
889bb7d
Merge pull request #15024 from Security-Onion-Solutions/reyesj2/pypy
reyesj2 Sep 12, 2025
ab2cdd1
Support endpoint logs with no host.ip field
defensivedepth Sep 12, 2025
f0c1922
Support endpoint logs with no host.ip field
defensivedepth Sep 12, 2025
d89df5f
Merge pull request #15025 from Security-Onion-Solutions/2.4/fixes
defensivedepth Sep 12, 2025
62f04fa
fix role check
m0duspwnens Sep 12, 2025
b35b0aa
Merge pull request #14941 from Security-Onion-Solutions/reyesj2/lgest
reyesj2 Sep 12, 2025
bb984e0
Merge pull request #15026 from Security-Onion-Solutions/vlb2
m0duspwnens Sep 12, 2025
0606c0a
agent monitor template & dataset name update
reyesj2 Sep 12, 2025
4d24c57
Merge pull request #15028 from Security-Onion-Solutions/reyesj2/ea-al…
reyesj2 Sep 12, 2025
e6bcf5d
fix case of broken kafka output policy when new receiver is added and…
reyesj2 Sep 15, 2025
5da3fed
8.18.6 agent
reyesj2 Sep 15, 2025
f3c5746
Merge pull request #15033 from Security-Onion-Solutions/reyesj2/patch31
reyesj2 Sep 15, 2025
ce2cc26
run so-elastic-agent-gen-installers
reyesj2 Sep 15, 2025
3c847bc
Merge pull request #15034 from Security-Onion-Solutions/reyesj2/patch31
reyesj2 Sep 15, 2025
562b7e5
Merge pull request #15031 from Security-Onion-Solutions/reyesj2/kfoutput
reyesj2 Sep 15, 2025
456cad1
Update DOWNLOAD_AND_VERIFY_ISO.md for 2.4.180
dougburks Sep 17, 2025
4dae1af
Add files via upload
dougburks Sep 17, 2025
ff5ad58
Merge pull request #15040 from Security-Onion-Solutions/dougburks-pat…
dougburks Sep 17, 2025
5166db1
Merge pull request #15042 from Security-Onion-Solutions/2.4/main
dougburks Sep 17, 2025
d1f4e26
Merge pull request #15043 from Security-Onion-Solutions/2.4/dev
dougburks Sep 17, 2025
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 .github/DISCUSSION_TEMPLATE/2-4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ body:
- 2.4.150
- 2.4.160
- 2.4.170
- 2.4.180
- Other (please provide detail below)
validations:
required: true
Expand Down
22 changes: 11 additions & 11 deletions DOWNLOAD_AND_VERIFY_ISO.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
### 2.4.170-20250812 ISO image released on 2025/08/12
### 2.4.180-20250916 ISO image released on 2025/09/17


### Download and Verify

2.4.170-20250812 ISO image:
https://download.securityonion.net/file/securityonion/securityonion-2.4.170-20250812.iso
2.4.180-20250916 ISO image:
https://download.securityonion.net/file/securityonion/securityonion-2.4.180-20250916.iso

MD5: 50ECAAD05736298452DECEAE074FA773
SHA1: 1B1EB520DE61ECC4BF34E512DAFE307317D7666A
SHA256: 87D176A48A58BAD1C2D57196F999BED23DE9B526226E3754F0C166C866CCDC1A
MD5: DE93880E38DE4BE45D05A41E1745CB1F
SHA1: AEA6948911E50A4A38E8729E0E965C565402E3FC
SHA256: C9BD8CA071E43B048ABF9ED145B87935CB1D4BB839B2244A06FAD1BBA8EAC84A

Signature for ISO image:
https://github.com/Security-Onion-Solutions/securityonion/raw/2.4/main/sigs/securityonion-2.4.170-20250812.iso.sig
https://github.com/Security-Onion-Solutions/securityonion/raw/2.4/main/sigs/securityonion-2.4.180-20250916.iso.sig

Signing key:
https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/2.4/main/KEYS
Expand All @@ -25,22 +25,22 @@ wget https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/2.

Download the signature file for the ISO:
```
wget https://github.com/Security-Onion-Solutions/securityonion/raw/2.4/main/sigs/securityonion-2.4.170-20250812.iso.sig
wget https://github.com/Security-Onion-Solutions/securityonion/raw/2.4/main/sigs/securityonion-2.4.180-20250916.iso.sig
```

Download the ISO image:
```
wget https://download.securityonion.net/file/securityonion/securityonion-2.4.170-20250812.iso
wget https://download.securityonion.net/file/securityonion/securityonion-2.4.180-20250916.iso
```

Verify the downloaded ISO image using the signature file:
```
gpg --verify securityonion-2.4.170-20250812.iso.sig securityonion-2.4.170-20250812.iso
gpg --verify securityonion-2.4.180-20250916.iso.sig securityonion-2.4.180-20250916.iso
```

The output should show "Good signature" and the Primary key fingerprint should match what's shown below:
```
gpg: Signature made Fri 08 Aug 2025 06:24:56 PM EDT using RSA key ID FE507013
gpg: Signature made Tue 16 Sep 2025 06:30:19 PM EDT using RSA key ID FE507013
gpg: Good signature from "Security Onion Solutions, LLC <info@securityonionsolutions.com>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.170
2.4.180
5 changes: 5 additions & 0 deletions pillar/top.sls
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,9 @@ base:
- minions.adv_{{ grains.id }}
- kafka.nodes
- kafka.soc_kafka
- stig.soc_stig
- elasticfleet.soc_elasticfleet
- elasticfleet.adv_elasticfleet

'*_import':
- node_data.ips
Expand Down Expand Up @@ -319,10 +322,12 @@ base:
- elasticfleet.adv_elasticfleet
- minions.{{ grains.id }}
- minions.adv_{{ grains.id }}
- stig.soc_stig

'*_hypervisor':
- minions.{{ grains.id }}
- minions.adv_{{ grains.id }}
- stig.soc_stig

'*_desktop':
- minions.{{ grains.id }}
Expand Down
1 change: 1 addition & 0 deletions salt/allowed_states.map.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
),
'so-fleet': (
ssl_states +
stig_states +
['logstash', 'nginx', 'healthcheck', 'elasticfleet']
),
'so-receiver': (
Expand Down
3 changes: 3 additions & 0 deletions salt/elasticfleet/artifact_registry.sls
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ fleetartifactdir:
- user: 947
- group: 939
- makedirs: True
- recurse:
- user
- group
3 changes: 3 additions & 0 deletions salt/elasticfleet/config.sls
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
{% from 'elasticfleet/map.jinja' import ELASTICFLEETMERGED %}
{% set node_data = salt['pillar.get']('node_data') %}
include:
- elasticfleet.artifact_registry
# Add EA Group
elasticfleetgroup:
group.present:
Expand Down
1 change: 1 addition & 0 deletions salt/elasticfleet/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ elasticfleet:
- elasticsearch
- endpoint
- fleet_server
- filestream
- http_endpoint
- httpjson
- log
Expand Down
2 changes: 2 additions & 0 deletions salt/elasticfleet/enabled.sls
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ so-elastic-fleet-auto-configure-artifact-urls:
elasticagent_syncartifacts:
file.recurse:
- name: /nsm/elastic-fleet/artifacts/beats
- user: 947
- group: 947
- source: salt://beats
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"package": {
"name": "filestream",
"version": ""
},
"name": "agent-monitor",
"namespace": "",
"description": "",
"policy_ids": [
"so-grid-nodes_general"
],
"output_id": null,
"vars": {},
"inputs": {
"filestream-filestream": {
"enabled": true,
"streams": {
"filestream.generic": {
"enabled": true,
"vars": {
"paths": [
"/opt/so/log/agents/agent-monitor.log"
],
"data_stream.dataset": "agentmonitor",
"pipeline": "elasticagent.monitor",
"parsers": "",
"exclude_files": [
"\\.gz$"
],
"include_files": [],
"processors": "- decode_json_fields:\n fields: [\"message\"]\n target: \"\"\n- add_fields:\n target: event\n fields:\n module: gridmetrics",
"tags": [],
"recursive_glob": true,
"ignore_older": "72h",
"clean_inactive": -1,
"harvester_limit": 0,
"fingerprint": true,
"fingerprint_offset": 0,
"fingerprint_length": 64,
"file_identity_native": false,
"exclude_lines": [],
"include_lines": []
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
],
"data_stream.dataset": "import",
"custom": "",
"processors": "- dissect:\n tokenizer: \"/nsm/import/%{import.id}/evtx/%{import.file}\"\n field: \"log.file.path\"\n target_prefix: \"\"\n- decode_json_fields:\n fields: [\"message\"]\n target: \"\"\n- drop_fields:\n fields: [\"host\"]\n ignore_missing: true\n- add_fields:\n target: data_stream\n fields:\n type: logs\n dataset: system.security\n- add_fields:\n target: event\n fields:\n dataset: system.security\n module: system\n imported: true\n- add_fields:\n target: \"@metadata\"\n fields:\n pipeline: logs-system.security-2.3.3\n- if:\n equals:\n winlog.channel: 'Microsoft-Windows-Sysmon/Operational'\n then: \n - add_fields:\n target: data_stream\n fields:\n dataset: windows.sysmon_operational\n - add_fields:\n target: event\n fields:\n dataset: windows.sysmon_operational\n module: windows\n imported: true\n - add_fields:\n target: \"@metadata\"\n fields:\n pipeline: logs-windows.sysmon_operational-3.1.0\n- if:\n equals:\n winlog.channel: 'Application'\n then: \n - add_fields:\n target: data_stream\n fields:\n dataset: system.application\n - add_fields:\n target: event\n fields:\n dataset: system.application\n - add_fields:\n target: \"@metadata\"\n fields:\n pipeline: logs-system.application-2.3.3\n- if:\n equals:\n winlog.channel: 'System'\n then: \n - add_fields:\n target: data_stream\n fields:\n dataset: system.system\n - add_fields:\n target: event\n fields:\n dataset: system.system\n - add_fields:\n target: \"@metadata\"\n fields:\n pipeline: logs-system.system-2.3.3\n \n- if:\n equals:\n winlog.channel: 'Microsoft-Windows-PowerShell/Operational'\n then: \n - add_fields:\n target: data_stream\n fields:\n dataset: windows.powershell_operational\n - add_fields:\n target: event\n fields:\n dataset: windows.powershell_operational\n module: windows\n - add_fields:\n target: \"@metadata\"\n fields:\n pipeline: logs-windows.powershell_operational-3.1.0\n- add_fields:\n target: data_stream\n fields:\n dataset: import",
"processors": "- dissect:\n tokenizer: \"/nsm/import/%{import.id}/evtx/%{import.file}\"\n field: \"log.file.path\"\n target_prefix: \"\"\n- decode_json_fields:\n fields: [\"message\"]\n target: \"\"\n- drop_fields:\n fields: [\"host\"]\n ignore_missing: true\n- add_fields:\n target: data_stream\n fields:\n type: logs\n dataset: system.security\n- add_fields:\n target: event\n fields:\n dataset: system.security\n module: system\n imported: true\n- add_fields:\n target: \"@metadata\"\n fields:\n pipeline: logs-system.security-2.5.4\n- if:\n equals:\n winlog.channel: 'Microsoft-Windows-Sysmon/Operational'\n then: \n - add_fields:\n target: data_stream\n fields:\n dataset: windows.sysmon_operational\n - add_fields:\n target: event\n fields:\n dataset: windows.sysmon_operational\n module: windows\n imported: true\n - add_fields:\n target: \"@metadata\"\n fields:\n pipeline: logs-windows.sysmon_operational-3.1.2\n- if:\n equals:\n winlog.channel: 'Application'\n then: \n - add_fields:\n target: data_stream\n fields:\n dataset: system.application\n - add_fields:\n target: event\n fields:\n dataset: system.application\n - add_fields:\n target: \"@metadata\"\n fields:\n pipeline: logs-system.application-2.5.4\n- if:\n equals:\n winlog.channel: 'System'\n then: \n - add_fields:\n target: data_stream\n fields:\n dataset: system.system\n - add_fields:\n target: event\n fields:\n dataset: system.system\n - add_fields:\n target: \"@metadata\"\n fields:\n pipeline: logs-system.system-2.5.4\n \n- if:\n equals:\n winlog.channel: 'Microsoft-Windows-PowerShell/Operational'\n then: \n - add_fields:\n target: data_stream\n fields:\n dataset: windows.powershell_operational\n - add_fields:\n target: event\n fields:\n dataset: windows.powershell_operational\n module: windows\n - add_fields:\n target: \"@metadata\"\n fields:\n pipeline: logs-windows.powershell_operational-3.1.2\n- add_fields:\n target: data_stream\n fields:\n dataset: import",
"tags": [
"import"
]
Expand Down
30 changes: 22 additions & 8 deletions salt/elasticfleet/tools/sbin_jinja/so-elastic-fleet-outputs-update
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,28 @@ function update_logstash_outputs() {
}
function update_kafka_outputs() {
# Make sure SSL configuration is included in policy updates for Kafka output. SSL is configured in so-elastic-fleet-setup
SSL_CONFIG=$(curl -K /opt/so/conf/elasticsearch/curl.config -L "http://localhost:5601/api/fleet/outputs/so-manager_kafka" | jq -r '.item.ssl')

JSON_STRING=$(jq -n \
--arg UPDATEDLIST "$NEW_LIST_JSON" \
--argjson SSL_CONFIG "$SSL_CONFIG" \
'{"name": "grid-kafka","type": "kafka","hosts": $UPDATEDLIST,"is_default": true,"is_default_monitoring": true,"config_yaml": "","ssl": $SSL_CONFIG}')
# Update Kafka outputs
curl -K /opt/so/conf/elasticsearch/curl.config -L -X PUT "localhost:5601/api/fleet/outputs/so-manager_kafka" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d "$JSON_STRING" | jq
if kafka_policy=$(curl -K /opt/so/conf/elasticsearch/curl.config -L "http://localhost:5601/api/fleet/outputs/so-manager_kafka" --fail 2>/dev/null); then
SSL_CONFIG=$(echo "$kafka_policy" | jq -r '.item.ssl')
if SECRETS=$(echo "$kafka_policy" | jq -er '.item.secrets' 2>/dev/null); then
# Update policy when fleet has secrets enabled
JSON_STRING=$(jq -n \
--arg UPDATEDLIST "$NEW_LIST_JSON" \
--argjson SSL_CONFIG "$SSL_CONFIG" \
--argjson SECRETS "$SECRETS" \
'{"name": "grid-kafka","type": "kafka","hosts": $UPDATEDLIST,"is_default": true,"is_default_monitoring": true,"config_yaml": "","ssl": $SSL_CONFIG,"secrets": $SECRETS}')
else
# Update policy when fleet has secrets disabled or policy hasn't been force updated
JSON_STRING=$(jq -n \
--arg UPDATEDLIST "$NEW_LIST_JSON" \
--argjson SSL_CONFIG "$SSL_CONFIG" \
'{"name": "grid-kafka","type": "kafka","hosts": $UPDATEDLIST,"is_default": true,"is_default_monitoring": true,"config_yaml": "","ssl": $SSL_CONFIG}')
fi
# Update Kafka outputs
curl -K /opt/so/conf/elasticsearch/curl.config -L -X PUT "localhost:5601/api/fleet/outputs/so-manager_kafka" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d "$JSON_STRING" | jq
else
printf "Failed to get current Kafka output policy..."
exit 1
fi
}

{% if GLOBALS.pipeline == "KAFKA" %}
Expand Down
80 changes: 56 additions & 24 deletions salt/elasticfleet/tools/sbin_jinja/so-kafka-fleet-output-policy
Original file line number Diff line number Diff line change
Expand Up @@ -5,46 +5,78 @@
# Elastic License 2.0.

{% from 'vars/globals.map.jinja' import GLOBALS %}
{% if GLOBALS.role in ['so-manager', 'so-standalone', 'so-managersearch'] %}
{% if GLOBALS.role in ['so-manager', 'so-standalone', 'so-managersearch', 'so-managerhype'] %}

. /usr/sbin/so-common

force=false
while [[ $# -gt 0 ]]; do
case $1 in
-f|--force)
force=true
shift
;;
*)
echo "Unknown option $1"
echo "Usage: $0 [-f|--force]"
exit 1
;;
esac
done

# Check to make sure that Kibana API is up & ready
RETURN_CODE=0
wait_for_web_response "http://localhost:5601/api/fleet/settings" "fleet" 300 "curl -K /opt/so/conf/elasticsearch/curl.config"
RETURN_CODE=$?

if [[ "$RETURN_CODE" != "0" ]]; then
printf "Kibana API not accessible, can't setup Elastic Fleet output policy for Kafka..."
exit 1
echo -e "\nKibana API not accessible, can't setup Elastic Fleet output policy for Kafka...\n"
exit 1
fi

output=$(curl -sK /opt/so/conf/elasticsearch/curl.config -L "http://localhost:5601/api/fleet/outputs" | jq -r .items[].id)
KAFKACRT=$(openssl x509 -in /etc/pki/elasticfleet-kafka.crt)
KAFKAKEY=$(openssl rsa -in /etc/pki/elasticfleet-kafka.key)
KAFKACA=$(openssl x509 -in /etc/pki/tls/certs/intca.crt)
KAFKA_OUTPUT_VERSION="2.6.0"

if ! echo "$output" | grep -q "so-manager_kafka"; then
KAFKACRT=$(openssl x509 -in /etc/pki/elasticfleet-kafka.crt)
KAFKAKEY=$(openssl rsa -in /etc/pki/elasticfleet-kafka.key)
KAFKACA=$(openssl x509 -in /etc/pki/tls/certs/intca.crt)
KAFKA_OUTPUT_VERSION="2.6.0"
if ! kafka_output=$(curl -sK /opt/so/conf/elasticsearch/curl.config -L "http://localhost:5601/api/fleet/outputs/so-manager_kafka" --fail 2>/dev/null); then
# Create a new output policy for Kafka. Default is disabled 'is_default: false & is_default_monitoring: false'
JSON_STRING=$( jq -n \
--arg KAFKACRT "$KAFKACRT" \
--arg KAFKAKEY "$KAFKAKEY" \
--arg KAFKACA "$KAFKACA" \
--arg MANAGER_IP "{{ GLOBALS.manager_ip }}:9092" \
--arg KAFKA_OUTPUT_VERSION "$KAFKA_OUTPUT_VERSION" \
'{"name":"grid-kafka", "id":"so-manager_kafka","type":"kafka","hosts":[ $MANAGER_IP ],"is_default":false,"is_default_monitoring":false,"config_yaml":"","ssl":{"certificate_authorities":[ $KAFKACA ],"certificate": $KAFKACRT ,"key":"","verification_mode":"full"},"proxy_id":null,"client_id":"Elastic","version": $KAFKA_OUTPUT_VERSION ,"compression":"none","auth_type":"ssl","partition":"round_robin","round_robin":{"group_events":10},"topics":[{"topic":"default-securityonion"}],"headers":[{"key":"","value":""}],"timeout":30,"broker_timeout":30,"required_acks":1,"secrets":{"ssl":{"key": $KAFKAKEY }}}'
)
if ! response=$(curl -sK /opt/so/conf/elasticsearch/curl.config -L -X POST "localhost:5601/api/fleet/outputs" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d "$JSON_STRING" --fail 2>/dev/null); then
echo -e "\nFailed to setup Elastic Fleet output policy for Kafka...\n"
exit 1
else
echo -e "\nSuccessfully setup Elastic Fleet output policy for Kafka...\n"
exit 0
fi
elif kafka_output=$(curl -sK /opt/so/conf/elasticsearch/curl.config -L "http://localhost:5601/api/fleet/outputs/so-manager_kafka" --fail 2>/dev/null) && [[ "$force" == "true" ]]; then
# force an update to Kafka policy. Keep the current value of Kafka output policy (enabled/disabled).
ENABLED_DISABLED=$(echo "$kafka_output" | jq -e .item.is_default)
HOSTS=$(echo "$kafka_output" | jq -r '.item.hosts')
JSON_STRING=$( jq -n \
--arg KAFKACRT "$KAFKACRT" \
--arg KAFKAKEY "$KAFKAKEY" \
--arg KAFKACA "$KAFKACA" \
--arg MANAGER_IP "{{ GLOBALS.manager_ip }}:9092" \
--arg KAFKA_OUTPUT_VERSION "$KAFKA_OUTPUT_VERSION" \
'{ "name": "grid-kafka", "id": "so-manager_kafka", "type": "kafka", "hosts": [ $MANAGER_IP ], "is_default": false, "is_default_monitoring": false, "config_yaml": "", "ssl": { "certificate_authorities": [ $KAFKACA ], "certificate": $KAFKACRT, "key": $KAFKAKEY, "verification_mode": "full" }, "proxy_id": null, "client_id": "Elastic", "version": $KAFKA_OUTPUT_VERSION, "compression": "none", "auth_type": "ssl", "partition": "round_robin", "round_robin": { "group_events": 10 }, "topics":[{"topic":"default-securityonion"}], "headers": [ { "key": "", "value": "" } ], "timeout": 30, "broker_timeout": 30, "required_acks": 1 }'
)
curl -sK /opt/so/conf/elasticsearch/curl.config -L -X POST "localhost:5601/api/fleet/outputs" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d "$JSON_STRING" -o /dev/null
refresh_output=$(curl -sK /opt/so/conf/elasticsearch/curl.config -L "http://localhost:5601/api/fleet/outputs" | jq -r .items[].id)

if ! echo "$refresh_output" | grep -q "so-manager_kafka"; then
echo -e "\nFailed to setup Elastic Fleet output policy for Kafka...\n"
--arg KAFKACRT "$KAFKACRT" \
--arg KAFKAKEY "$KAFKAKEY" \
--arg KAFKACA "$KAFKACA" \
--arg ENABLED_DISABLED "$ENABLED_DISABLED"\
--arg KAFKA_OUTPUT_VERSION "$KAFKA_OUTPUT_VERSION" \
--argjson HOSTS "$HOSTS" \
'{"name":"grid-kafka","type":"kafka","hosts":$HOSTS,"is_default":$ENABLED_DISABLED,"is_default_monitoring":$ENABLED_DISABLED,"config_yaml":"","ssl":{"certificate_authorities":[ $KAFKACA ],"certificate": $KAFKACRT ,"key":"","verification_mode":"full"},"proxy_id":null,"client_id":"Elastic","version": $KAFKA_OUTPUT_VERSION ,"compression":"none","auth_type":"ssl","partition":"round_robin","round_robin":{"group_events":10},"topics":[{"topic":"default-securityonion"}],"headers":[{"key":"","value":""}],"timeout":30,"broker_timeout":30,"required_acks":1,"secrets":{"ssl":{"key": $KAFKAKEY }}}'
)
if ! response=$(curl -sK /opt/so/conf/elasticsearch/curl.config -L -X PUT "localhost:5601/api/fleet/outputs/so-manager_kafka" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d "$JSON_STRING" --fail 2>/dev/null); then
echo -e "\nFailed to force update to Elastic Fleet output policy for Kafka...\n"
exit 1
elif echo "$refresh_output" | grep -q "so-manager_kafka"; then
echo -e "\nSuccessfully setup Elastic Fleet output policy for Kafka...\n"
else
echo -e "\nForced update to Elastic Fleet output policy for Kafka...\n"
fi

elif echo "$output" | grep -q "so-manager_kafka"; then
else
echo -e "\nElastic Fleet output policy for Kafka already exists...\n"
fi
{% else %}
Expand Down
Loading
Loading