Skip to content

Commit 6b1da4e

Browse files
committed
Merge remote-tracking branch 'origin/release/v11.2.1' into release/v11.2.1
2 parents 9f75aec + 229d8be commit 6b1da4e

File tree

67 files changed

+417
-183
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+417
-183
lines changed

.github/workflows/v11-deployment-pipeline.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ jobs:
119119
name: Check Go Dependencies
120120
runs-on: ubuntu-24.04
121121
needs: [validations, setup_deployment]
122-
if: ${{ needs.setup_deployment.outputs.tag != '' && needs.setup_deployment.outputs.environment == 'rc' }}
122+
if: ${{ needs.setup_deployment.outputs.environment == 'rc' }}
123123
steps:
124124
- name: Check out code
125125
uses: actions/checkout@v4
@@ -228,7 +228,7 @@ jobs:
228228
build_agent_manager:
229229
name: Build Agent Manager Microservice
230230
needs: [build_agent, build_utmstack_collector, setup_deployment]
231-
if: ${{ needs.setup_deployment.outputs.tag != '' }}
231+
if: ${{ always() && needs.build_agent.result == 'success' && needs.build_utmstack_collector.result == 'success' && needs.setup_deployment.outputs.tag != '' }}
232232
runs-on: ubuntu-24.04
233233
steps:
234234
- name: Check out code into the right branch
@@ -399,6 +399,7 @@ jobs:
399399
build_user_auditor,
400400
build_web_pdf
401401
]
402+
if: ${{ always() && needs.build_agent_manager.result == 'success' && needs.build_event_processor.result == 'success' && needs.build_backend.result == 'success' && needs.build_frontend.result == 'success' && needs.build_user_auditor.result == 'success' && needs.build_web_pdf.result == 'success' }}
402403
runs-on: ubuntu-24.04
403404
steps:
404405
- run: echo "✅ All builds completed successfully."
@@ -432,7 +433,7 @@ jobs:
432433
deploy_installer_dev:
433434
name: Deploy Installer (Dev)
434435
needs: [all_builds_complete, setup_deployment]
435-
if: ${{ needs.setup_deployment.outputs.tag != '' && needs.setup_deployment.outputs.environment == 'dev' }}
436+
if: ${{ always() && needs.all_builds_complete.result == 'success' && needs.setup_deployment.outputs.tag != '' && needs.setup_deployment.outputs.environment == 'dev' }}
436437
uses: ./.github/workflows/installer-release.yml
437438
with:
438439
version: ${{ needs.setup_deployment.outputs.tag }}

agent-manager/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ require (
4444
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
4545
github.com/modern-go/reflect2 v1.0.2 // indirect
4646
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
47-
github.com/threatwinds/go-sdk v1.1.4
47+
github.com/threatwinds/go-sdk v1.1.7
4848
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
4949
github.com/ugorji/go/codec v1.3.1 // indirect
5050
golang.org/x/arch v0.23.0 // indirect

agent-manager/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl
8989
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
9090
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
9191
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
92-
github.com/threatwinds/go-sdk v1.1.4 h1:RASWY7333hFHqUl5oVDeLrBdS+cOMehZyTUgl/dZfPg=
93-
github.com/threatwinds/go-sdk v1.1.4/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw=
92+
github.com/threatwinds/go-sdk v1.1.7 h1:2IJAWTCxZU4BDFiavPjH8MqpA/mam1QyIsjySbZLlRo=
93+
github.com/threatwinds/go-sdk v1.1.7/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw=
9494
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
9595
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
9696
github.com/ugorji/go/codec v1.3.1 h1:waO7eEiFDwidsBN6agj1vJQ4AG7lh2yqXyOXqhgQuyY=

agent/go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ require (
99
github.com/google/uuid v1.6.0
1010
github.com/kardianos/service v1.2.4
1111
github.com/tehmaze/netflow v0.0.0-20240303214733-8c13bb004068
12-
github.com/threatwinds/go-sdk v1.1.4
12+
github.com/threatwinds/go-sdk v1.1.7
1313
github.com/threatwinds/logger v1.2.3
1414
golang.org/x/sys v0.40.0
1515
google.golang.org/grpc v1.78.0
@@ -48,6 +48,7 @@ require (
4848
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
4949
github.com/modern-go/reflect2 v1.0.2 // indirect
5050
github.com/ncruces/go-strftime v1.0.0 // indirect
51+
github.com/opensearch-project/opensearch-go/v4 v4.6.0 // indirect
5152
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
5253
github.com/prometheus/procfs v0.19.2 // indirect
5354
github.com/quic-go/qpack v0.6.0 // indirect

agent/go.sum

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G
8787
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
8888
github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w=
8989
github.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
90+
github.com/opensearch-project/opensearch-go/v4 v4.6.0 h1:Ac8aLtDSmLEyOmv0r1qhQLw3b4vcUhE42NE9k+Z4cRc=
91+
github.com/opensearch-project/opensearch-go/v4 v4.6.0/go.mod h1:3iZtb4SNt3IzaxavKq0dURh1AmtVgYW71E4XqmYnIiQ=
9092
github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4=
9193
github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=
9294
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
@@ -119,8 +121,8 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu
119121
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
120122
github.com/tehmaze/netflow v0.0.0-20240303214733-8c13bb004068 h1:1B+EAUqxEyPByCfk55tB21DtR7WF7Q2w71g7+uVkvIg=
121123
github.com/tehmaze/netflow v0.0.0-20240303214733-8c13bb004068/go.mod h1:QRP5wJOf7gGMGL2fCAfmh/5CMZQspRxT5DqghaPRrjM=
122-
github.com/threatwinds/go-sdk v1.1.4 h1:RASWY7333hFHqUl5oVDeLrBdS+cOMehZyTUgl/dZfPg=
123-
github.com/threatwinds/go-sdk v1.1.4/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw=
124+
github.com/threatwinds/go-sdk v1.1.7 h1:2IJAWTCxZU4BDFiavPjH8MqpA/mam1QyIsjySbZLlRo=
125+
github.com/threatwinds/go-sdk v1.1.7/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw=
124126
github.com/threatwinds/logger v1.2.3 h1:V2SVAXzbq+/huCvIWOfqzMTH+WBHJxankyBgVG2hy1Y=
125127
github.com/threatwinds/logger v1.2.3/go.mod h1:N+bJKvF4FQNJZLfQpVYWpr6D8iEAFnAQfHYqH5iR1TI=
126128
github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY=
@@ -131,10 +133,14 @@ github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JT
131133
github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
132134
github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4=
133135
github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
136+
github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY=
137+
github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28=
134138
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
135139
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
136140
github.com/ugorji/go/codec v1.3.1 h1:waO7eEiFDwidsBN6agj1vJQ4AG7lh2yqXyOXqhgQuyY=
137141
github.com/ugorji/go/codec v1.3.1/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4=
142+
github.com/wI2L/jsondiff v0.7.0 h1:1lH1G37GhBPqCfp/lrs91rf/2j3DktX6qYAKZkLuCQQ=
143+
github.com/wI2L/jsondiff v0.7.0/go.mod h1:KAEIojdQq66oJiHhDyQez2x+sRit0vIzC9KeK0yizxM=
138144
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
139145
go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
140146
go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8=

agent/updater/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.25.5
44

55
require (
66
github.com/kardianos/service v1.2.4
7-
github.com/threatwinds/go-sdk v1.1.4
7+
github.com/threatwinds/go-sdk v1.1.7
88
github.com/threatwinds/logger v1.2.3
99
gopkg.in/yaml.v3 v3.0.1
1010
)

agent/updater/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl
7474
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
7575
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
7676
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
77-
github.com/threatwinds/go-sdk v1.1.4 h1:RASWY7333hFHqUl5oVDeLrBdS+cOMehZyTUgl/dZfPg=
78-
github.com/threatwinds/go-sdk v1.1.4/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw=
77+
github.com/threatwinds/go-sdk v1.1.7 h1:2IJAWTCxZU4BDFiavPjH8MqpA/mam1QyIsjySbZLlRo=
78+
github.com/threatwinds/go-sdk v1.1.7/go.mod h1:N19iqJPaNAoWwZTCuFvV0hIvT0D1jOR1KkKYgAoPLmw=
7979
github.com/threatwinds/logger v1.2.3 h1:V2SVAXzbq+/huCvIWOfqzMTH+WBHJxankyBgVG2hy1Y=
8080
github.com/threatwinds/logger v1.2.3/go.mod h1:N+bJKvF4FQNJZLfQpVYWpr6D8iEAFnAQfHYqH5iR1TI=
8181
github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY=

backend/src/main/java/com/park/utmstack/domain/correlation/rules/UtmCorrelationRules.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ public class UtmCorrelationRules implements Serializable {
110110
@Setter(AccessLevel.NONE)
111111
private List<SearchRequest> afterEvents;
112112

113+
@JsonIgnore
114+
@Column(name = "rule_group_by_def")
115+
private String ruleGroupByDef;
116+
113117
@JsonIgnore
114118
@Column(name = "rule_deduplicate_by_def")
115119
private String deduplicateByDef;
@@ -136,6 +140,28 @@ public void setDeduplicateBy(List<String> deduplicateBy) throws UtmSerialization
136140
this.deduplicateBy = deduplicateBy;
137141
}
138142

143+
@Transient
144+
@JsonSerialize
145+
@JsonDeserialize
146+
@Getter(AccessLevel.NONE)
147+
@Setter(AccessLevel.NONE)
148+
private List<String> groupBy;
149+
150+
public List<String> getGroupBy() throws UtmSerializationException {
151+
if (StringUtils.hasText(ruleGroupByDef))
152+
groupBy = UtilSerializer.jsonDeserializeList(String.class, ruleGroupByDef);
153+
return groupBy == null ? new ArrayList<>() : groupBy;
154+
}
155+
156+
public void setGroupBy(List<String> groupBy) throws UtmSerializationException {
157+
if (CollectionUtils.isEmpty(groupBy))
158+
this.ruleGroupByDef = null;
159+
else
160+
this.ruleGroupByDef = UtilSerializer.jsonSerialize(groupBy);
161+
162+
this.groupBy = groupBy;
163+
}
164+
139165
@ManyToMany(fetch = FetchType.EAGER)
140166
@JoinTable(name = "utm_group_rules_data_type",
141167
joinColumns = @JoinColumn(name = "rule_id"),

backend/src/main/java/com/park/utmstack/service/dto/correlation/UtmCorrelationRulesDTO.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,7 @@ public class UtmCorrelationRulesDTO implements Serializable {
6262

6363
private List<String> deduplicateBy;
6464

65+
private List<String> groupBy;
66+
6567
}
6668

backend/src/main/java/com/park/utmstack/service/dto/correlation/UtmCorrelationRulesMapper.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public UtmCorrelationRulesDTO toDto(UtmCorrelationRules entity) {
3535
dto.setRuleActive(entity.getRuleActive());
3636
dto.setAfterEvents(entity.getAfterEvents());
3737
dto.setDeduplicateBy(entity.getDeduplicateBy());
38+
dto.setGroupBy(entity.getGroupBy());
3839
return dto;
3940
} catch (UtmSerializationException e) {
4041
logger.error("Error serializing rule references", e);
@@ -62,6 +63,7 @@ public UtmCorrelationRules toEntity(UtmCorrelationRulesDTO dto) {
6263
entity.setRuleLastUpdate(Instant.now(Clock.systemUTC()));
6364
entity.setAfterEvents(dto.getAfterEvents());
6465
entity.setDeduplicateBy(dto.getDeduplicateBy());
66+
entity.setGroupBy(dto.getGroupBy());
6567

6668
return entity;
6769
} catch (UtmSerializationException e) {

0 commit comments

Comments
 (0)