Skip to content
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

[ResponseOps][Connectors]Migrate remaining routes. #204042

Merged
merged 7 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,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
2 changes: 1 addition & 1 deletion x-pack/plugins/triggers_actions_ui/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"@kbn/observability-alerting-rule-utils",
"@kbn/core-application-browser",
"@kbn/cloud-plugin",
"@kbn/response-ops-rule-form"
"@kbn/response-ops-rule-form",
],
"exclude": ["target/**/*"]
}