mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Merge pull request #14991 from Security-Onion-Solutions/cogburn/wip-module
Cogburn/wip module
This commit is contained in:
@@ -284,6 +284,86 @@ elasticsearch:
|
|||||||
hot:
|
hot:
|
||||||
actions: {}
|
actions: {}
|
||||||
min_age: 0ms
|
min_age: 0ms
|
||||||
|
so-assistant-chat:
|
||||||
|
index_sorting: false
|
||||||
|
index_template:
|
||||||
|
composed_of:
|
||||||
|
- assistant-chat-mappings
|
||||||
|
- assistant-chat-settings
|
||||||
|
data_stream:
|
||||||
|
allow_custom_routing: false
|
||||||
|
hidden: false
|
||||||
|
ignore_missing_component_templates: []
|
||||||
|
index_patterns:
|
||||||
|
- so-assistant-chat-*
|
||||||
|
priority: 501
|
||||||
|
template:
|
||||||
|
mappings:
|
||||||
|
date_detection: false
|
||||||
|
dynamic_templates:
|
||||||
|
- strings_as_keyword:
|
||||||
|
mapping:
|
||||||
|
ignore_above: 1024
|
||||||
|
type: keyword
|
||||||
|
match_mapping_type: string
|
||||||
|
settings:
|
||||||
|
index:
|
||||||
|
lifecycle:
|
||||||
|
name: so-assistant-chat-logs
|
||||||
|
mapping:
|
||||||
|
total_fields:
|
||||||
|
limit: 1500
|
||||||
|
number_of_replicas: 0
|
||||||
|
number_of_shards: 1
|
||||||
|
refresh_interval: 1s
|
||||||
|
sort:
|
||||||
|
field: '@timestamp'
|
||||||
|
order: desc
|
||||||
|
policy:
|
||||||
|
phases:
|
||||||
|
hot:
|
||||||
|
actions: {}
|
||||||
|
min_age: 0ms
|
||||||
|
so-assistant-session:
|
||||||
|
index_sorting: false
|
||||||
|
index_template:
|
||||||
|
composed_of:
|
||||||
|
- assistant-session-mappings
|
||||||
|
- assistant-session-settings
|
||||||
|
data_stream:
|
||||||
|
allow_custom_routing: false
|
||||||
|
hidden: false
|
||||||
|
ignore_missing_component_templates: []
|
||||||
|
index_patterns:
|
||||||
|
- so-assistant-session-*
|
||||||
|
priority: 501
|
||||||
|
template:
|
||||||
|
mappings:
|
||||||
|
date_detection: false
|
||||||
|
dynamic_templates:
|
||||||
|
- strings_as_keyword:
|
||||||
|
mapping:
|
||||||
|
ignore_above: 1024
|
||||||
|
type: keyword
|
||||||
|
match_mapping_type: string
|
||||||
|
settings:
|
||||||
|
index:
|
||||||
|
lifecycle:
|
||||||
|
name: so-assistant-session-logs
|
||||||
|
mapping:
|
||||||
|
total_fields:
|
||||||
|
limit: 1500
|
||||||
|
number_of_replicas: 0
|
||||||
|
number_of_shards: 1
|
||||||
|
refresh_interval: 1s
|
||||||
|
sort:
|
||||||
|
field: '@timestamp'
|
||||||
|
order: desc
|
||||||
|
policy:
|
||||||
|
phases:
|
||||||
|
hot:
|
||||||
|
actions: {}
|
||||||
|
min_age: 0ms
|
||||||
so-endgame:
|
so-endgame:
|
||||||
index_sorting: false
|
index_sorting: false
|
||||||
index_template:
|
index_template:
|
||||||
|
|||||||
@@ -0,0 +1,104 @@
|
|||||||
|
{
|
||||||
|
"template": {
|
||||||
|
"mappings": {
|
||||||
|
"properties": {
|
||||||
|
"@timestamp": {
|
||||||
|
"type": "date"
|
||||||
|
},
|
||||||
|
"so_kind": {
|
||||||
|
"ignore_above": 1024,
|
||||||
|
"type": "keyword"
|
||||||
|
},
|
||||||
|
"so_operation": {
|
||||||
|
"ignore_above": 1024,
|
||||||
|
"type": "keyword"
|
||||||
|
},
|
||||||
|
"so_chat": {
|
||||||
|
"properties": {
|
||||||
|
"role": {
|
||||||
|
"ignore_above": 1024,
|
||||||
|
"type": "keyword"
|
||||||
|
},
|
||||||
|
"content": {
|
||||||
|
"type": "object",
|
||||||
|
"enabled": false
|
||||||
|
},
|
||||||
|
"sessionId": {
|
||||||
|
"ignore_above": 1024,
|
||||||
|
"type": "keyword"
|
||||||
|
},
|
||||||
|
"createTime": {
|
||||||
|
"type": "date"
|
||||||
|
},
|
||||||
|
"deletedAt": {
|
||||||
|
"type": "date"
|
||||||
|
},
|
||||||
|
"tags": {
|
||||||
|
"ignore_above": 1024,
|
||||||
|
"type": "keyword"
|
||||||
|
},
|
||||||
|
"tool_use_id": {
|
||||||
|
"ignore_above": 1024,
|
||||||
|
"type": "keyword"
|
||||||
|
},
|
||||||
|
"userId": {
|
||||||
|
"ignore_above": 1024,
|
||||||
|
"type": "keyword"
|
||||||
|
},
|
||||||
|
"message": {
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"ignore_above": 1024,
|
||||||
|
"type": "keyword"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"ignore_above": 1024,
|
||||||
|
"type": "keyword"
|
||||||
|
},
|
||||||
|
"role": {
|
||||||
|
"ignore_above": 1024,
|
||||||
|
"type": "keyword"
|
||||||
|
},
|
||||||
|
"model": {
|
||||||
|
"ignore_above": 1024,
|
||||||
|
"type": "keyword"
|
||||||
|
},
|
||||||
|
"contentStr": {
|
||||||
|
"type": "text"
|
||||||
|
},
|
||||||
|
"contentBlocks": {
|
||||||
|
"type": "nested",
|
||||||
|
"enabled": false
|
||||||
|
},
|
||||||
|
"stopReason": {
|
||||||
|
"ignore_above": 1024,
|
||||||
|
"type": "keyword"
|
||||||
|
},
|
||||||
|
"stopSequence": {
|
||||||
|
"ignore_above": 1024,
|
||||||
|
"type": "keyword"
|
||||||
|
},
|
||||||
|
"usage": {
|
||||||
|
"properties": {
|
||||||
|
"input_tokens": {
|
||||||
|
"type": "long"
|
||||||
|
},
|
||||||
|
"output_tokens": {
|
||||||
|
"type": "long"
|
||||||
|
},
|
||||||
|
"credits": {
|
||||||
|
"type": "long"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"_meta": {
|
||||||
|
"ecs_version": "1.12.2"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"template": {},
|
||||||
|
"version": 1,
|
||||||
|
"_meta": {
|
||||||
|
"description": "default settings for common Security Onion Assistant indices"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
"template": {
|
||||||
|
"mappings": {
|
||||||
|
"properties": {
|
||||||
|
"@timestamp": {
|
||||||
|
"type": "date"
|
||||||
|
},
|
||||||
|
"so_kind": {
|
||||||
|
"ignore_above": 1024,
|
||||||
|
"type": "keyword"
|
||||||
|
},
|
||||||
|
"so_session": {
|
||||||
|
"properties": {
|
||||||
|
"title": {
|
||||||
|
"ignore_above": 1024,
|
||||||
|
"type": "keyword"
|
||||||
|
},
|
||||||
|
"sessionId": {
|
||||||
|
"ignore_above": 1024,
|
||||||
|
"type": "keyword"
|
||||||
|
},
|
||||||
|
"createTime": {
|
||||||
|
"type": "date"
|
||||||
|
},
|
||||||
|
"deleteTime": {
|
||||||
|
"type": "date"
|
||||||
|
},
|
||||||
|
"tags": {
|
||||||
|
"ignore_above": 1024,
|
||||||
|
"type": "keyword"
|
||||||
|
},
|
||||||
|
"userId": {
|
||||||
|
"ignore_above": 1024,
|
||||||
|
"type": "keyword"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"_meta": {
|
||||||
|
"ecs_version": "1.12.2"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"template": {},
|
||||||
|
"version": 1,
|
||||||
|
"_meta": {
|
||||||
|
"description": "default settings for common Security Onion Assistant indices"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -196,19 +196,23 @@ http {
|
|||||||
}
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
auth_request /auth/sessions/whoami;
|
auth_request /auth/sessions/whoami;
|
||||||
auth_request_set $userid $upstream_http_x_kratos_authenticated_identity_id;
|
auth_request_set $userid $upstream_http_x_kratos_authenticated_identity_id;
|
||||||
proxy_set_header x-user-id $userid;
|
proxy_set_header x-user-id $userid;
|
||||||
proxy_pass http://{{ GLOBALS.manager }}:9822/;
|
proxy_pass http://{{ GLOBALS.manager }}:9822/;
|
||||||
proxy_read_timeout 300;
|
proxy_read_timeout 300;
|
||||||
proxy_connect_timeout 300;
|
proxy_connect_timeout 300;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header Proxy "";
|
proxy_set_header Proxy "";
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "Upgrade";
|
proxy_set_header Connection "Upgrade";
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
|
||||||
|
proxy_buffering off;
|
||||||
|
proxy_cache off;
|
||||||
|
proxy_request_buffering off;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ ^/auth/.*?(login|oidc/callback) {
|
location ~ ^/auth/.*?(login|oidc/callback) {
|
||||||
|
|||||||
@@ -1491,6 +1491,8 @@ soc:
|
|||||||
- repo: file:///nsm/airgap-resources/playbooks/securityonion-resources-playbooks
|
- repo: file:///nsm/airgap-resources/playbooks/securityonion-resources-playbooks
|
||||||
branch: main
|
branch: main
|
||||||
folder: securityonion-normalized
|
folder: securityonion-normalized
|
||||||
|
assistant:
|
||||||
|
apiUrl: https://onionai.securityonion.net
|
||||||
salt:
|
salt:
|
||||||
queueDir: /opt/sensoroni/queue
|
queueDir: /opt/sensoroni/queue
|
||||||
timeoutMs: 45000
|
timeoutMs: 45000
|
||||||
@@ -2541,3 +2543,12 @@ soc:
|
|||||||
- ' -priv'
|
- ' -priv'
|
||||||
condition: all of selection_*
|
condition: all of selection_*
|
||||||
level: 'high' # info | low | medium | high | critical
|
level: 'high' # info | low | medium | high | critical
|
||||||
|
assistant:
|
||||||
|
enabled: false
|
||||||
|
investigationPrompt: Investigate Alert ID {socid}
|
||||||
|
contextLimitSmall: 200000
|
||||||
|
contextLimitLarge: 1000000
|
||||||
|
thresholdColorRatioLow: 0.5
|
||||||
|
thresholdColorRatioMed: 0.75
|
||||||
|
thresholdColorRatioMax: 1
|
||||||
|
lowBalanceColorAlert: 500000
|
||||||
@@ -580,7 +580,42 @@ soc:
|
|||||||
- field: folder
|
- field: folder
|
||||||
label: Folder
|
label: Folder
|
||||||
airgap: *pbRepos
|
airgap: *pbRepos
|
||||||
|
assistant:
|
||||||
|
apiUrl:
|
||||||
|
description: The URL of the AI gateway.
|
||||||
|
advanced: True
|
||||||
|
global: True
|
||||||
client:
|
client:
|
||||||
|
assistant:
|
||||||
|
enabled:
|
||||||
|
description: Set to true to enable the Onion AI assistant in SOC.
|
||||||
|
global: True
|
||||||
|
investigationPrompt:
|
||||||
|
description: Prompt given to Onion AI when beginning an investigation.
|
||||||
|
global: True
|
||||||
|
contextLimitSmall:
|
||||||
|
description: Smaller context limit for Onion AI.
|
||||||
|
global: True
|
||||||
|
advanced: True
|
||||||
|
contextLimitLarge:
|
||||||
|
description: Larger context limit for Onion AI.
|
||||||
|
global: True
|
||||||
|
advanced: True
|
||||||
|
thresholdColorRatioLow:
|
||||||
|
description: Lower visual context color change threshold.
|
||||||
|
global: True
|
||||||
|
advanced: True
|
||||||
|
thresholdColorRatioMed:
|
||||||
|
description: Middle visual context color change threshold.
|
||||||
|
global: True
|
||||||
|
advanced: True
|
||||||
|
thresholdColorRatioMax:
|
||||||
|
description: Max visual context color change threshold.
|
||||||
|
global: True
|
||||||
|
advanced: True
|
||||||
|
lowBalanceColorAlert:
|
||||||
|
description: Onion AI credit amount at which balance turns red.
|
||||||
|
advanced: True
|
||||||
apiTimeoutMs:
|
apiTimeoutMs:
|
||||||
description: Duration (in milliseconds) to wait for a response from the SOC server API before giving up and showing an error on the SOC UI.
|
description: Duration (in milliseconds) to wait for a response from the SOC server API before giving up and showing an error on the SOC UI.
|
||||||
global: True
|
global: True
|
||||||
|
|||||||
Reference in New Issue
Block a user