Skip to content

Commit 43d4be1

Browse files
mjabascal10ylladaosmonteroKbayero
authored
Bugfix/10.8.0/macos (#1169)
* feat: Improve installer to add RHELD support * fix: Update windows ARM collector * wip * feat: Add SELinux configuration for RedHat systems * fix interface agent problem * add bad gateway page * complete macos agent * feat(module-integration): add SOC AI model selection field * wip * complete macos agent * feat(module-integration): add SOC AI model selection field --------- Co-authored-by: Yadian Llada Lopez <[email protected]> Co-authored-by: Osmany Montero <[email protected]> Co-authored-by: Yorjander Hernandez Vergara <[email protected]>
1 parent a9cc47b commit 43d4be1

File tree

5 files changed

+110
-0
lines changed

5 files changed

+110
-0
lines changed

backend/src/main/java/com/park/utmstack/domain/application_modules/UtmModuleGroupConfiguration.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ public class UtmModuleGroupConfiguration implements Serializable {
4646
@Column(name = "conf_required", nullable = false)
4747
private Boolean confRequired;
4848

49+
@Column(name = "conf_options", nullable = false)
50+
private String confOptions;
51+
4952
@JsonIgnore
5053
@ManyToOne
5154
@JoinColumn(name = "group_id", insertable = false, updatable = false)
@@ -134,4 +137,12 @@ public UtmModuleGroup getModuleGroup() {
134137
public void setModuleGroup(UtmModuleGroup moduleGroup) {
135138
this.moduleGroup = moduleGroup;
136139
}
140+
141+
public String getConfOptions() {
142+
return confOptions;
143+
}
144+
145+
public void setConfOptions(String confOptions) {
146+
this.confOptions = confOptions;
147+
}
137148
}

backend/src/main/java/com/park/utmstack/domain/application_modules/factory/impl/ModuleSocAi.java

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public List<ModuleConfigurationKey> getConfigurationKeys(Long groupId) throws Ex
5050
.withConfDataType("password")
5151
.withConfRequired(true)
5252
.build());
53+
5354
keys.add(ModuleConfigurationKey.builder()
5455
.withGroupId(groupId)
5556
.withConfKey("utmstack.socai.incidentCreation")
@@ -58,6 +59,7 @@ public List<ModuleConfigurationKey> getConfigurationKeys(Long groupId) throws Ex
5859
.withConfDataType("bool")
5960
.withConfRequired(false)
6061
.build());
62+
6163
keys.add(ModuleConfigurationKey.builder()
6264
.withGroupId(groupId)
6365
.withConfKey("utmstack.socai.changeAlertStatus")
@@ -68,6 +70,33 @@ public List<ModuleConfigurationKey> getConfigurationKeys(Long groupId) throws Ex
6870
.withConfRequired(false)
6971
.build());
7072

73+
keys.add(ModuleConfigurationKey.builder()
74+
.withGroupId(groupId)
75+
.withConfKey("utmstack.socai.model")
76+
.withConfName("Select AI Model")
77+
.withConfDescription("Choose the AI model that SOC AI will use to analyze alerts.")
78+
.withConfDataType("select")
79+
.withConfRequired(true)
80+
.withConfOptions(
81+
"[" +
82+
"{\"value\": \"gpt-4\", \"label\": \"GPT-4\"}," +
83+
"{\"value\": \"gpt-4-0613\", \"label\": \"GPT-4 (0613)\"}," +
84+
"{\"value\": \"gpt-4-32k\", \"label\": \"GPT-4 32K\"}," +
85+
"{\"value\": \"gpt-4-32k-0613\", \"label\": \"GPT-4 32K (0613)\"}," +
86+
"{\"value\": \"gpt-4-turbo\", \"label\": \"GPT-4 Turbo\"}," +
87+
"{\"value\": \"gpt-4o\", \"label\": \"GPT-4 Omni\"}," +
88+
"{\"value\": \"gpt-4o-mini\", \"label\": \"GPT-4 Omni Mini\"}," +
89+
"{\"value\": \"gpt-4.1\", \"label\": \"GPT-4.1\"}," +
90+
"{\"value\": \"gpt-4.1-mini\", \"label\": \"GPT-4.1 Mini\"}," +
91+
"{\"value\": \"gpt-4.1-nano\", \"label\": \"GPT-4.1 Nano\"}," +
92+
"{\"value\": \"gpt-3.5-turbo\", \"label\": \"GPT-3.5 Turbo\"}," +
93+
"{\"value\": \"gpt-3.5-turbo-0613\", \"label\": \"GPT-3.5 Turbo (0613)\"}," +
94+
"{\"value\": \"gpt-3.5-turbo-16k\", \"label\": \"GPT-3.5 Turbo 16K\"}," +
95+
"{\"value\": \"gpt-3.5-turbo-16k-0613\", \"label\": \"GPT-3.5 Turbo 16K (0613)\"}" +
96+
"]"
97+
)
98+
.build());
99+
71100
return keys;
72101
}
73102
}

backend/src/main/java/com/park/utmstack/domain/application_modules/types/ModuleConfigurationKey.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ public class ModuleConfigurationKey {
66
private String confName;
77
private String confDescription;
88
private String confDataType;
9+
private String confOptions;
10+
911
private Boolean confRequired;
1012

1113
private ModuleConfigurationKey() {
@@ -59,6 +61,14 @@ public void setConfRequired(Boolean confRequired) {
5961
this.confRequired = confRequired;
6062
}
6163

64+
public String getConfOptions() {
65+
return confOptions;
66+
}
67+
68+
public void setConfOptions(String confOptions) {
69+
this.confOptions = confOptions;
70+
}
71+
6272
public static Builder builder() {
6373
return new Builder();
6474
}
@@ -71,6 +81,8 @@ public static class Builder {
7181
private String confDataType;
7282
private Boolean confRequired;
7383

84+
private String confOptions;
85+
7486
public Builder withGroupId(Long groupId) {
7587
this.groupId = groupId;
7688
return this;
@@ -101,6 +113,11 @@ public Builder withConfRequired(Boolean confRequired) {
101113
return this;
102114
}
103115

116+
public Builder withConfOptions(String confOptions) {
117+
this.confOptions = confOptions;
118+
return this;
119+
}
120+
104121
public ModuleConfigurationKey build() {
105122
ModuleConfigurationKey key = new ModuleConfigurationKey();
106123
key.setGroupId(groupId);
@@ -109,6 +126,7 @@ public ModuleConfigurationKey build() {
109126
key.setConfDescription(confDescription);
110127
key.setConfDataType(confDataType);
111128
key.setConfRequired(confRequired);
129+
key.setConfOptions(confOptions);
112130
return key;
113131
}
114132
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<databaseChangeLog
3+
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
6+
7+
<changeSet id="20250418001" author="Manuel">
8+
<sql dbms="postgresql" splitStatements="true" stripComments="true">
9+
ALTER TABLE utm_module_group_configuration ADD COLUMN conf_options TEXT;
10+
INSERT INTO public.utm_module_group_configuration (
11+
id,
12+
group_id,
13+
conf_key,
14+
conf_value,
15+
conf_name,
16+
conf_description,
17+
conf_data_type,
18+
conf_required,
19+
conf_options
20+
) VALUES (
21+
default,
22+
1,
23+
'utmstack.socai.model',
24+
'gpt-4-turbo',
25+
'Select AI Model',
26+
'Choose the AI model that SOC AI will use to analyze alerts. Models differ in capability, performance, and cost.',
27+
'select',
28+
true,
29+
'[
30+
{ "value": "gpt-4", "label": "GPT-4 (Default)" },
31+
{ "value": "gpt-4-0613", "label": "GPT-4 (0613)" },
32+
{ "value": "gpt-4-32k", "label": "GPT-4 32K" },
33+
{ "value": "gpt-4-32k-0613", "label": "GPT-4 32K (0613)" },
34+
{ "value": "gpt-4-turbo", "label": "GPT-4 Turbo" },
35+
{ "value": "gpt-4o", "label": "GPT-4 Omni" },
36+
{ "value": "gpt-4o-mini", "label": "GPT-4 Omni Mini" },
37+
{ "value": "gpt-4.1", "label": "GPT-4.1" },
38+
{ "value": "gpt-4.1-mini", "label": "GPT-4.1 Mini" },
39+
{ "value": "gpt-4.1-nano", "label": "GPT-4.1 Nano" },
40+
{ "value": "gpt-3.5-turbo", "label": "GPT-3.5 Turbo" },
41+
{ "value": "gpt-3.5-turbo-0613", "label": "GPT-3.5 Turbo (0613)" },
42+
{ "value": "gpt-3.5-turbo-16k", "label": "GPT-3.5 Turbo 16K" },
43+
{ "value": "gpt-3.5-turbo-16k-0613", "label": "GPT-3.5 Turbo 16K (0613)" }
44+
]'
45+
);
46+
47+
</sql>
48+
</changeSet>
49+
</databaseChangeLog>

backend/src/main/resources/config/liquibase/master.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,7 @@
8989

9090
<include file="/config/liquibase/changelog/20250414002_updating_gcp_filter.xml" relativeToChangelogFile="false"/>
9191

92+
<include file="/config/liquibase/changelog/20250418001_add_options_module_group_config.xml" relativeToChangelogFile="false"/>
93+
94+
9295
</databaseChangeLog>

0 commit comments

Comments
 (0)