Skip to content

Commit

Permalink
[8.x] [ResponseOps][Connectors]Migrate remaining routes. (#204042) (#…
Browse files Browse the repository at this point in the history
…204769)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ResponseOps][Connectors]Migrate remaining routes.
(#204042)](#204042)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"Antonio","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-16T11:54:49Z","message":"[ResponseOps][Connectors]Migrate
remaining routes. (#204042)\n\nConnected with
https://github.com/elastic/kibana-team/issues/1322\r\n\r\n##
Summary\r\n\r\nThis PR migrates the remaining response-ops routes that
do not use\r\naccess
tags.\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\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"be8e29836bd805f613a25d4bc467c43a1c7a3649","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Alerting","release_note:skip","Team:ResponseOps","backport
missing","v9.0.0","backport:prev-minor","v8.18.0"],"number":204042,"url":"https://github.com/elastic/kibana/pull/204042","mergeCommit":{"message":"[ResponseOps][Connectors]Migrate
remaining routes. (#204042)\n\nConnected with
https://github.com/elastic/kibana-team/issues/1322\r\n\r\n##
Summary\r\n\r\nThis PR migrates the remaining response-ops routes that
do not use\r\naccess
tags.\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\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"be8e29836bd805f613a25d4bc467c43a1c7a3649"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/204042","number":204042,"mergeCommit":{"message":"[ResponseOps][Connectors]Migrate
remaining routes. (#204042)\n\nConnected with
https://github.com/elastic/kibana-team/issues/1322\r\n\r\n##
Summary\r\n\r\nThis PR migrates the remaining response-ops routes that
do not use\r\naccess
tags.\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\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"be8e29836bd805f613a25d4bc467c43a1c7a3649"}},{"branch":"8.x","label":"v8.18.0","labelRegex":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
  • Loading branch information
adcoelho authored Dec 19, 2024
1 parent c2f4597 commit 7dcfba5
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ export const getInferenceServicesRoute = (router: IRouter) => {
router.get(
{
path: `${INTERNAL_BASE_STACK_CONNECTORS_API_PATH}/_inference/_services`,
security: {
authz: {
enabled: false,
reason:
'This route is opted out of authorization as it relies on ES authorization instead.',
},
},
options: {
access: 'internal',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ export const getWellKnownEmailServiceRoute = (router: IRouter) => {
router.get(
{
path: `${INTERNAL_BASE_STACK_CONNECTORS_API_PATH}/_email_config/{service}`,
security: {
authz: {
enabled: false,
reason:
'This route is opted out from authorization as returning SMTP connection details does not require any.',
},
},
validate: {
params: paramSchema,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ export const validSlackApiChannelsRoute = (
router.post(
{
path: `${INTERNAL_BASE_STACK_CONNECTORS_API_PATH}/_slack_api/channels/_valid`,
security: {
authz: {
enabled: false,
reason:
"This route is opted out from authorization as it relies on Slack's own authorization.",
},
},
validate: {
body: bodySchema,
},
Expand Down
7 changes: 7 additions & 0 deletions x-pack/plugins/triggers_actions_ui/server/routes/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ export function createConfigRoute({
router.get(
{
path,
security: {
authz: {
enabled: false,
reason:
'This route is opted out from authorization as it uses the alerting client authorization.',
},
},
validate: false,
options: {
access: 'internal',
Expand Down
7 changes: 7 additions & 0 deletions x-pack/plugins/triggers_actions_ui/server/routes/health.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ export function createHealthRoute(
router.get(
{
path,
security: {
authz: {
enabled: false,
reason:
'This route is opted out from authorization as the health route does not require any.',
},
},
validate: false,
options: {
access: 'internal',
Expand Down

0 comments on commit 7dcfba5

Please sign in to comment.