-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TGrid] Alerts status update use RBAC api #108092
[TGrid] Alerts status update use RBAC api #108092
Conversation
…s and adds logic for switching between signal.status and workflow status when updating alerts in .siem-signals
… to use WORKFLOW_STATUS instead of ALERT_STATUS
…dtion to KQL string
adds replace ALERT_STATUS with ALERT_WORKFLOW_STATUS and updates tests and adds logic for switching between signal.status and workflow status when updating alerts in .siem-signals
…us' and not { signals: {status }} in alerts client
optionally use fields api in requests if _source does not contain authz properties
…emd/kibana into tgrid-bulk-actions-rbac-update
x-pack/test/functional/es_archives/rule_registry/alerts/data.json
Outdated
Show resolved
Hide resolved
x-pack/test/rule_registry/security_and_spaces/tests/basic/bulk_update_alerts.ts
Show resolved
Hide resolved
@@ -27,7 +27,7 @@ export const AlertConsumers = { | |||
SYNTHETICS: 'synthetics', | |||
} as const; | |||
export type AlertConsumers = typeof AlertConsumers[keyof typeof AlertConsumers]; | |||
export type STATUS_VALUES = 'open' | 'acknowledged' | 'closed'; | |||
export type STATUS_VALUES = 'open' | 'acknowledged' | 'closed' | 'in-progress'; // TODO: remove 'in-progress' after migration to 'acknowledged' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dplumlee - just pinging you here since you're working on these changes
x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts
Outdated
Show resolved
Hide resolved
return buildEsQuery( | ||
let esQuery; | ||
if (id != null) { | ||
esQuery = { query: `_id:${id}`, language: 'kuery' }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be helpful to have a comment here describing how these different scenarios happen
x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts
Outdated
Show resolved
Hide resolved
status: t.union([ | ||
t.literal('open'), | ||
t.literal('closed'), | ||
t.literal('in-progress'), // TODO: remove after migration to acknowledged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
status: t.union([ | ||
t.literal('open'), | ||
t.literal('closed'), | ||
t.literal('in-progress'), // TODO: remove after migration to acknowledged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
x-pack/plugins/timelines/public/components/t_grid/standalone/index.tsx
Outdated
Show resolved
Hide resolved
FWIW I've been attempting to do some type safe "workflow_status" migration updates in an existing PR that I'm hoping to get in today before I leave. |
…test fix a bug where we were not waiting for updates to complete when usin…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested again, works great and thanks for taking care of all of those changes! 💪🏾
Co-authored-by: Devin Hurley <[email protected]>
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
Co-authored-by: Devin Hurley <[email protected]> Co-authored-by: Sergi Massaneda <[email protected]> Co-authored-by: Devin Hurley <[email protected]>
💚 Build SucceededMetrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @dhurley14 @semd |
Summary
Call RBAC alerts bulk update endpoint from the tGrid status bulk update. It is used in 3 different places:
Bulk status update
Single status update from table row
SIngle status update from flyout
ℹ️- Currently allowing both
in-progress
andacknowledged
status. Thein-progress
status will need to be cleaned in the status field migration.Checklist
Delete any items that are not applicable to this PR.