Skip to content

Commit

Permalink
[ResponseOps][Connectors]Migrate remaining routes. (#204042)
Browse files Browse the repository at this point in the history
Connected with elastic/kibana-team#1322

## Summary

This PR migrates the remaining response-ops routes that do not use
access tags.


[Documentation.](https://docs.elastic.dev/kibana-dev-docs/key-concepts/security-api-authorization#opting-out-of-authorization-for-specific-routes)

---------

Co-authored-by: kibanamachine <[email protected]>
  • Loading branch information
adcoelho and kibanamachine authored Dec 16, 2024
1 parent 3d79542 commit be8e298
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 be8e298

Please sign in to comment.