Commit 603146f
Add tactics_techniques field on event definitions (#25977)
* Add MITRE categories field to event definitions
Adds a single `mitre_categories` keyword array on event definitions and stamps
it onto every produced event (mapped at the top level of the events index).
Validation accepts tactic, technique, and sub-technique IDs through one
combined regex; the 64-value cap is enforced. Frontend types, fixtures, and
event-def save telemetry track the new field.
Includes a `MitreBackwardsCompatibilityFilter` helper used by the three
storage-adapter `MoreSearchAdapter` implementations to OR the legacy
`event.fields.sigma_rule_tag_*` filter shape with the new `mitre_categories`
shape during the migration window. Scoped for removal alongside the legacy
path.
Co-Authored-By: Claude Opus 4.7 (1M context) <[EMAIL_ADDRESS_REDACTED]>
* Fix FilterPreviewContainer test fixture missing mitre_categories
CI yarn tsc surfaced a typed `EventDefinition` literal that hadn't been updated
when the field was added.
Co-Authored-By: Claude Opus 4.7 (1M context) <[EMAIL_ADDRESS_REDACTED]>
* Rename to tactics_techniques + add validator extension point
- Rename `mitre_categories` to `tactics_techniques` across DTO, JSON, ES
mapping, content-pack entity, FE types, fixtures.
- `TacticsTechniquesNormalizer` (mirrors `TagNormalizer`): trim, upper-case,
drop empties. Applied in `EventDefinitionDto.Builder.build()`.
- `TacticsTechniquesValidator` Guice extension point with OSS no-op default;
wired into create/update/validate endpoints. Enterprise overrides to
reject IDs not in the Illuminate LUTs.
- New "Tactics/Techniques" column on the Event Definitions list.
- Editor on the event-def edit form and chip on the list column are pluggable
(`eventDefinitions.tacticsTechniquesEditor`, `eventDefinitions.tacticsTechniquesChip`).
OSS leaves both empty.
- Rename `TagsCell` → `ChipsCell` with generic prop names. Tags and
Tactics/Techniques share the collapse / +N overflow UX.
- `EventImpl.equals/hashCode/toString` now include the new field.
- New TacticsTechniquesNormalizerTest; expanded EventDefinitionDtoTest,
EventProcessorEventFactoryTest, EventDefinitionsResourceTest.
* Drop tactics_techniques UI surfaces
Remove the events list column, event-defs list column, summary view
row, and expanded details row. Schema and plugin slot wiring remain.
Assisted with Claude Code
* Decouple tactics_techniques from UI: optional type + extension point
- Make `tactics_techniques` optional on the FE EventDefinition type so
consumers that don't set it (older fixtures, ad-hoc instances) still
type-check. Mutation hook fills `[]` when sending to the API.
- Drop tactics_techniques from the Event Definitions EntityAttribute
list; keep it as an extraSearchField so API search still works.
- Fix TableElement.getColumnRenderer typing to return the
ColumnRenderersByAttribute map instead of a single ColumnRenderer.
Make expandedSection / tableCellComponent optional and have the
consumer handle their absence.
Assisted with Claude Code
* Drop TableElement type cleanup from this PR
Roll back the getColumnRenderer signature fix and the optional
expandedSection/tableCellComponent change. They're a worthwhile
cleanup but they create cross-repo coupling — anywhere a downstream
plugin had `@ts-expect-error` working around the old signature, the
directive becomes unused once the type is corrected. That tripped CI
on this PR. Will revisit in a standalone follow-up that touches both
repos together.
Assisted with Claude Code
* Wording; always show TC Improve Coverage button
Assisted with Claude Code
* Review fixes
Assisted with Claude Code
* Review fixes: plugin contract location, key namespace, theme, lint
Assisted with Claude Code
* Fix test: error message uses upper-cased IDs
Assisted with Claude Code
* Add dedicated plugin slot for tactics/techniques column
Replaces use of the shared entityTableElements slot to keep the column
scoped to event definitions. The plugin owns the attribute (id/title/sortable),
the cell component, and the license gate.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* Fix padding-line-between-statements lint
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* Add plugin slots for tactics/techniques detail row and summary
Two new slots on the event-definition / events UI:
- events.components.tacticsTechniquesDetailRow - consumed by the events
details expanded section to render a row next to Tags.
- eventDefinitions.components.tacticsTechniquesSummary - consumed by the
event definition summary view to render a row next to Tags.
Server defines the slot contracts; the security plugin contributes the
components, gates them on the security license, and owns the dual-read
between the new tactics_techniques field and the legacy sigma_rule_tag_*
shape.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>1 parent 5936055 commit 603146f
42 files changed
Lines changed: 678 additions & 75 deletions
File tree
- graylog-storage-elasticsearch7/src/main/java/org/graylog/storage/elasticsearch7
- graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2
- graylog-storage-opensearch3/src/main/java/org/graylog/storage/opensearch3
- graylog2-server/src
- main/java/org
- graylog2/indexer/template
- graylog/events
- contentpack/entities
- event
- processor
- rest
- search
- test/java/org/graylog/events
- event
- processor
- rest
- graylog2-web-interface
- src
- components
- common
- event-definitions
- event-definition-form
- event-definition-types
- event-definitions
- hooks
- events
- __tests__
- events
- util
- test
- fixtures
- helpers/mocking
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
228 | 229 | | |
229 | 230 | | |
230 | 231 | | |
231 | | - | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
232 | 243 | | |
233 | 244 | | |
234 | 245 | | |
| |||
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
229 | 230 | | |
230 | 231 | | |
231 | 232 | | |
232 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
233 | 244 | | |
234 | 245 | | |
235 | 246 | | |
| |||
graylog-storage-opensearch3/src/main/java/org/graylog/storage/opensearch3/MoreSearchAdapterOS.java
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
167 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
168 | 179 | | |
169 | 180 | | |
170 | 181 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
102 | 106 | | |
103 | 107 | | |
104 | 108 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| |||
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
127 | 131 | | |
128 | 132 | | |
129 | 133 | | |
| |||
136 | 140 | | |
137 | 141 | | |
138 | 142 | | |
| 143 | + | |
139 | 144 | | |
140 | 145 | | |
141 | 146 | | |
| |||
190 | 195 | | |
191 | 196 | | |
192 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
193 | 201 | | |
194 | 202 | | |
195 | 203 | | |
| |||
230 | 238 | | |
231 | 239 | | |
232 | 240 | | |
| 241 | + | |
233 | 242 | | |
234 | 243 | | |
235 | 244 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
116 | 120 | | |
117 | 121 | | |
118 | 122 | | |
| |||
135 | 139 | | |
136 | 140 | | |
137 | 141 | | |
| 142 | + | |
138 | 143 | | |
139 | 144 | | |
140 | 145 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| 61 | + | |
60 | 62 | | |
61 | 63 | | |
62 | 64 | | |
| |||
130 | 132 | | |
131 | 133 | | |
132 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
133 | 138 | | |
134 | 139 | | |
135 | 140 | | |
| |||
149 | 154 | | |
150 | 155 | | |
151 | 156 | | |
| 157 | + | |
152 | 158 | | |
153 | 159 | | |
154 | 160 | | |
| |||
225 | 231 | | |
226 | 232 | | |
227 | 233 | | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
228 | 237 | | |
229 | 238 | | |
230 | 239 | | |
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| |||
339 | 340 | | |
340 | 341 | | |
341 | 342 | | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
342 | 353 | | |
343 | 354 | | |
344 | 355 | | |
| |||
375 | 386 | | |
376 | 387 | | |
377 | 388 | | |
| 389 | + | |
378 | 390 | | |
379 | 391 | | |
380 | 392 | | |
| |||
431 | 443 | | |
432 | 444 | | |
433 | 445 | | |
| 446 | + | |
434 | 447 | | |
435 | 448 | | |
436 | 449 | | |
| |||
439 | 452 | | |
440 | 453 | | |
441 | 454 | | |
442 | | - | |
| 455 | + | |
443 | 456 | | |
444 | 457 | | |
445 | 458 | | |
| |||
467 | 480 | | |
468 | 481 | | |
469 | 482 | | |
| 483 | + | |
470 | 484 | | |
471 | 485 | | |
472 | 486 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
106 | 110 | | |
0 commit comments