Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ public class UtmModuleGroupConfiguration implements Serializable {
@Column(name = "conf_required", nullable = false)
private Boolean confRequired;

@Column(name = "conf_options", nullable = false)
private String confOptions;

@JsonIgnore
@ManyToOne
@JoinColumn(name = "group_id", insertable = false, updatable = false)
Expand Down Expand Up @@ -134,4 +137,12 @@ public UtmModuleGroup getModuleGroup() {
public void setModuleGroup(UtmModuleGroup moduleGroup) {
this.moduleGroup = moduleGroup;
}

public String getConfOptions() {
return confOptions;
}

public void setConfOptions(String confOptions) {
this.confOptions = confOptions;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public List<ModuleConfigurationKey> getConfigurationKeys(Long groupId) throws Ex
.withConfDataType("password")
.withConfRequired(true)
.build());

keys.add(ModuleConfigurationKey.builder()
.withGroupId(groupId)
.withConfKey("utmstack.socai.incidentCreation")
Expand All @@ -58,6 +59,7 @@ public List<ModuleConfigurationKey> getConfigurationKeys(Long groupId) throws Ex
.withConfDataType("bool")
.withConfRequired(false)
.build());

keys.add(ModuleConfigurationKey.builder()
.withGroupId(groupId)
.withConfKey("utmstack.socai.changeAlertStatus")
Expand All @@ -68,6 +70,33 @@ public List<ModuleConfigurationKey> getConfigurationKeys(Long groupId) throws Ex
.withConfRequired(false)
.build());

keys.add(ModuleConfigurationKey.builder()
.withGroupId(groupId)
.withConfKey("utmstack.socai.model")
.withConfName("Select AI Model")
.withConfDescription("Choose the AI model that SOC AI will use to analyze alerts.")
.withConfDataType("select")
.withConfRequired(true)
.withConfOptions(
"[" +
"{\"value\": \"gpt-4\", \"label\": \"GPT-4\"}," +
"{\"value\": \"gpt-4-0613\", \"label\": \"GPT-4 (0613)\"}," +
"{\"value\": \"gpt-4-32k\", \"label\": \"GPT-4 32K\"}," +
"{\"value\": \"gpt-4-32k-0613\", \"label\": \"GPT-4 32K (0613)\"}," +
"{\"value\": \"gpt-4-turbo\", \"label\": \"GPT-4 Turbo\"}," +
"{\"value\": \"gpt-4o\", \"label\": \"GPT-4 Omni\"}," +
"{\"value\": \"gpt-4o-mini\", \"label\": \"GPT-4 Omni Mini\"}," +
"{\"value\": \"gpt-4.1\", \"label\": \"GPT-4.1\"}," +
"{\"value\": \"gpt-4.1-mini\", \"label\": \"GPT-4.1 Mini\"}," +
"{\"value\": \"gpt-4.1-nano\", \"label\": \"GPT-4.1 Nano\"}," +
"{\"value\": \"gpt-3.5-turbo\", \"label\": \"GPT-3.5 Turbo\"}," +
"{\"value\": \"gpt-3.5-turbo-0613\", \"label\": \"GPT-3.5 Turbo (0613)\"}," +
"{\"value\": \"gpt-3.5-turbo-16k\", \"label\": \"GPT-3.5 Turbo 16K\"}," +
"{\"value\": \"gpt-3.5-turbo-16k-0613\", \"label\": \"GPT-3.5 Turbo 16K (0613)\"}" +
"]"
)
.build());

return keys;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ public class ModuleConfigurationKey {
private String confName;
private String confDescription;
private String confDataType;
private String confOptions;

private Boolean confRequired;

private ModuleConfigurationKey() {
Expand Down Expand Up @@ -59,6 +61,14 @@ public void setConfRequired(Boolean confRequired) {
this.confRequired = confRequired;
}

public String getConfOptions() {
return confOptions;
}

public void setConfOptions(String confOptions) {
this.confOptions = confOptions;
}

public static Builder builder() {
return new Builder();
}
Expand All @@ -71,6 +81,8 @@ public static class Builder {
private String confDataType;
private Boolean confRequired;

private String confOptions;

public Builder withGroupId(Long groupId) {
this.groupId = groupId;
return this;
Expand Down Expand Up @@ -101,6 +113,11 @@ public Builder withConfRequired(Boolean confRequired) {
return this;
}

public Builder withConfOptions(String confOptions) {
this.confOptions = confOptions;
return this;
}

public ModuleConfigurationKey build() {
ModuleConfigurationKey key = new ModuleConfigurationKey();
key.setGroupId(groupId);
Expand All @@ -109,6 +126,7 @@ public ModuleConfigurationKey build() {
key.setConfDescription(confDescription);
key.setConfDataType(confDataType);
key.setConfRequired(confRequired);
key.setConfOptions(confOptions);
return key;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">

<changeSet id="20250418001" author="Manuel">
<sql dbms="postgresql" splitStatements="true" stripComments="true">
ALTER TABLE utm_module_group_configuration ADD COLUMN conf_options TEXT;
INSERT INTO public.utm_module_group_configuration (
id,
group_id,
conf_key,
conf_value,
conf_name,
conf_description,
conf_data_type,
conf_required,
conf_options
) VALUES (
default,
1,
'utmstack.socai.model',
'gpt-4-turbo',
'Select AI Model',
'Choose the AI model that SOC AI will use to analyze alerts. Models differ in capability, performance, and cost.',
'select',
true,
'[
{ "value": "gpt-4", "label": "GPT-4 (Default)" },
{ "value": "gpt-4-0613", "label": "GPT-4 (0613)" },
{ "value": "gpt-4-32k", "label": "GPT-4 32K" },
{ "value": "gpt-4-32k-0613", "label": "GPT-4 32K (0613)" },
{ "value": "gpt-4-turbo", "label": "GPT-4 Turbo" },
{ "value": "gpt-4o", "label": "GPT-4 Omni" },
{ "value": "gpt-4o-mini", "label": "GPT-4 Omni Mini" },
{ "value": "gpt-4.1", "label": "GPT-4.1" },
{ "value": "gpt-4.1-mini", "label": "GPT-4.1 Mini" },
{ "value": "gpt-4.1-nano", "label": "GPT-4.1 Nano" },
{ "value": "gpt-3.5-turbo", "label": "GPT-3.5 Turbo" },
{ "value": "gpt-3.5-turbo-0613", "label": "GPT-3.5 Turbo (0613)" },
{ "value": "gpt-3.5-turbo-16k", "label": "GPT-3.5 Turbo 16K" },
{ "value": "gpt-3.5-turbo-16k-0613", "label": "GPT-3.5 Turbo 16K (0613)" }
]'
);

</sql>
</changeSet>
</databaseChangeLog>
3 changes: 3 additions & 0 deletions backend/src/main/resources/config/liquibase/master.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,7 @@

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

<include file="/config/liquibase/changelog/20250418001_add_options_module_group_config.xml" relativeToChangelogFile="false"/>


</databaseChangeLog>
Loading