mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Support Kratos user.name lookup
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
{% set identities = salt['sqlite3.fetch']('/nsm/kratos/db/db.sqlite', 'SELECT id, json_extract(traits, "$.email") as email FROM identities;') %}
|
||||||
{
|
{
|
||||||
"package": {
|
"package": {
|
||||||
"name": "log",
|
"name": "log",
|
||||||
@@ -19,7 +20,7 @@
|
|||||||
],
|
],
|
||||||
"data_stream.dataset": "kratos",
|
"data_stream.dataset": "kratos",
|
||||||
"tags": ["so-kratos"],
|
"tags": ["so-kratos"],
|
||||||
"processors": "- decode_json_fields:\n fields: [\"message\"]\n target: \"\"\n add_error_key: true \n- add_fields:\n target: event\n fields:\n category: iam\n module: kratos",
|
"processors": "- decode_json_fields:\n fields: [\"message\"]\n target: \"\"\n add_error_key: true\n- add_fields:\n target: event\n fields:\n category: iam\n module: kratos\n- if:\n has_fields:\n - identity_id\n then:{% for id, email in identities %}\n - if:\n equals:\n identity_id: \"{{ id }}\"\n then:\n - add_fields:\n target: ''\n fields:\n user.name: \"{{ email }}\"{% endfor %}",
|
||||||
"custom": "pipeline: kratos"
|
"custom": "pipeline: kratos"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -28,3 +29,4 @@
|
|||||||
},
|
},
|
||||||
"force": true
|
"force": true
|
||||||
}
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user