-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.x] [ResponseOps][Rules] Migrate alerting APIs without access tags. (…
…#204003) (#204190) # Backport This will backport the following commits from `main` to `8.x`: - [[ResponseOps][Rules] Migrate alerting APIs without access tags. (#204003)](#204003) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Antonio","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-13T10:51:27Z","message":"[ResponseOps][Rules] Migrate alerting APIs without access tags. (#204003)\n\nConnected with https://github.com/elastic/kibana-team/issues/1322\r\n\r\n## Summary\r\n\r\nSince most rule routes do not use access tags they need to be migrated\r\nto include a reason in the security params.\r\n\r\n\r\n[Documentation.](https://docs.elastic.dev/kibana-dev-docs/key-concepts/security-api-authorization#opting-out-of-authorization-for-specific-routes)\r\n\r\nSome routes **use** access tags and have already been migrated. These\r\nare:\r\n\r\n-`getFlappingSettingsRoute`\r\n-`updateFlappingSettingsRoute`\r\n-`createMaintenanceWindowRoute`\r\n-`getMaintenanceWindowRoute`\r\n-`updateMaintenanceWindowRoute`\r\n-`deleteMaintenanceWindowRoute`\r\n-`findMaintenanceWindowsRoute`\r\n-`archiveMaintenanceWindowRoute`\r\n-`finishMaintenanceWindowRoute`\r\n-`getActiveMaintenanceWindowsRoute`\r\n-`bulkGetMaintenanceWindowRoute`\r\n-`getQueryDelaySettingsRoute`\r\n-`updateQueryDelaySettingsRoute`\r\n\r\nAll other were assigned the default reason for opting out.","sha":"42704af65d32abe3824643dcf4cc37221cfe11fb","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Endpoint Response","v9.0.0","Feature:Alerting/RulesFramework","backport:prev-minor","v8.18.0"],"title":"[ResponseOps][Rules] Migrate alerting APIs without access tags.","number":204003,"url":"https://github.com/elastic/kibana/pull/204003","mergeCommit":{"message":"[ResponseOps][Rules] Migrate alerting APIs without access tags. (#204003)\n\nConnected with https://github.com/elastic/kibana-team/issues/1322\r\n\r\n## Summary\r\n\r\nSince most rule routes do not use access tags they need to be migrated\r\nto include a reason in the security params.\r\n\r\n\r\n[Documentation.](https://docs.elastic.dev/kibana-dev-docs/key-concepts/security-api-authorization#opting-out-of-authorization-for-specific-routes)\r\n\r\nSome routes **use** access tags and have already been migrated. These\r\nare:\r\n\r\n-`getFlappingSettingsRoute`\r\n-`updateFlappingSettingsRoute`\r\n-`createMaintenanceWindowRoute`\r\n-`getMaintenanceWindowRoute`\r\n-`updateMaintenanceWindowRoute`\r\n-`deleteMaintenanceWindowRoute`\r\n-`findMaintenanceWindowsRoute`\r\n-`archiveMaintenanceWindowRoute`\r\n-`finishMaintenanceWindowRoute`\r\n-`getActiveMaintenanceWindowsRoute`\r\n-`bulkGetMaintenanceWindowRoute`\r\n-`getQueryDelaySettingsRoute`\r\n-`updateQueryDelaySettingsRoute`\r\n\r\nAll other were assigned the default reason for opting out.","sha":"42704af65d32abe3824643dcf4cc37221cfe11fb"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/204003","number":204003,"mergeCommit":{"message":"[ResponseOps][Rules] Migrate alerting APIs without access tags. (#204003)\n\nConnected with https://github.com/elastic/kibana-team/issues/1322\r\n\r\n## Summary\r\n\r\nSince most rule routes do not use access tags they need to be migrated\r\nto include a reason in the security params.\r\n\r\n\r\n[Documentation.](https://docs.elastic.dev/kibana-dev-docs/key-concepts/security-api-authorization#opting-out-of-authorization-for-specific-routes)\r\n\r\nSome routes **use** access tags and have already been migrated. These\r\nare:\r\n\r\n-`getFlappingSettingsRoute`\r\n-`updateFlappingSettingsRoute`\r\n-`createMaintenanceWindowRoute`\r\n-`getMaintenanceWindowRoute`\r\n-`updateMaintenanceWindowRoute`\r\n-`deleteMaintenanceWindowRoute`\r\n-`findMaintenanceWindowsRoute`\r\n-`archiveMaintenanceWindowRoute`\r\n-`finishMaintenanceWindowRoute`\r\n-`getActiveMaintenanceWindowsRoute`\r\n-`bulkGetMaintenanceWindowRoute`\r\n-`getQueryDelaySettingsRoute`\r\n-`updateQueryDelaySettingsRoute`\r\n\r\nAll other were assigned the default reason for opting out.","sha":"42704af65d32abe3824643dcf4cc37221cfe11fb"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Antonio <[email protected]>
- Loading branch information
1 parent
4b0adec
commit 0097c42
Showing
62 changed files
with
170 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import type { RouteSecurity } from '@kbn/core-http-server'; | ||
|
||
/** | ||
* This constant is used as the default value for the security object in routes | ||
* where a reason for opting out needs to be provided. | ||
*/ | ||
export const DEFAULT_ALERTING_ROUTE_SECURITY: RouteSecurity = { | ||
authz: { | ||
enabled: false, | ||
reason: | ||
"This route is opted out from authorization because alerting uses it's own authorization model inside the alerts client.", | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.