Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -22,6 +22,12 @@ export const fillGapByIdRoute = (
router.post(
{
path: `${INTERNAL_ALERTING_GAPS_FILL_BY_ID_API_PATH}`,
security: {
authz: {
enabled: false,
reason: 'This route delegates authorization to the scoped ES client',
},
},
validate: {
query: fillGapByIdQuerySchemaV1,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ export const findGapsRoute = (
router.post(
{
path: INTERNAL_ALERTING_GAPS_FIND_API_PATH,
security: {
authz: {
enabled: false,
reason: 'This route delegates authorization to the scoped ES client',
},
},
validate: {
body: findGapsBodySchemaV1,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ export const getGapsSummaryByRuleIdsRoute = (
router.post(
{
path: `${INTERNAL_ALERTING_GAPS_GET_SUMMARY_BY_RULE_IDS_API_PATH}`,
security: {
authz: {
enabled: false,
reason: 'This route delegates authorization to the scoped ES client',
},
},
validate: {
body: getGapsSummaryByRuleIdsBodySchemaV1,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ export const getRuleIdsWithGapsRoute = (
router.post(
{
path: `${INTERNAL_ALERTING_GAPS_GET_RULES_API_PATH}`,
security: {
authz: {
enabled: false,
reason: 'This route delegates authorization to the scoped ES client',
},
},
validate: {
body: getRuleIdsWithGapBodySchemaV1,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export const getCaseRoute = () =>
export const resolveCaseRoute = createCasesRoute({
method: 'get',
path: `${CASE_DETAILS_URL}/resolve`,
security: DEFAULT_CASES_ROUTE_SECURITY,
routerOptions: {
access: 'internal',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ import { INTERNAL_CASE_SIMILAR_CASES_URL } from '../../../../common/constants';
import { createCaseError } from '../../../common/error';
import { createCasesRoute } from '../create_cases_route';
import type { caseApiV1 } from '../../../../common/types/api';
import { DEFAULT_CASES_ROUTE_SECURITY } from '../constants';

export const similarCaseRoute = createCasesRoute({
method: 'post',
path: INTERNAL_CASE_SIMILAR_CASES_URL,
security: DEFAULT_CASES_ROUTE_SECURITY,
params: {
params: schema.object({
case_id: schema.string(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import type { attachmentApiV1, userActionApiV1 } from '../../../../common/types/
import { INTERNAL_CASE_FIND_USER_ACTIONS_URL } from '../../../../common/constants';
import { createCaseError } from '../../../common/error';
import { createCasesRoute } from '../create_cases_route';
import { DEFAULT_CASES_ROUTE_SECURITY } from '../constants';

const params = {
params: schema.object({
Expand All @@ -22,6 +23,7 @@ const params = {
export const findUserActionsRoute = createCasesRoute({
method: 'get',
path: INTERNAL_CASE_FIND_USER_ACTIONS_URL,
security: DEFAULT_CASES_ROUTE_SECURITY,
params,
routerOptions: {
access: 'public',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ import { schema } from '@kbn/config-schema';
import { INTERNAL_CASE_OBSERVABLES_DELETE_URL } from '../../../../common/constants';
import { createCaseError } from '../../../common/error';
import { createCasesRoute } from '../create_cases_route';
import { DEFAULT_CASES_ROUTE_SECURITY } from '../constants';

export const deleteObservableRoute = createCasesRoute({
method: 'delete',
path: INTERNAL_CASE_OBSERVABLES_DELETE_URL,
security: DEFAULT_CASES_ROUTE_SECURITY,
params: {
params: schema.object({
case_id: schema.string(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ import { INTERNAL_CASE_OBSERVABLES_PATCH_URL } from '../../../../common/constant
import { createCaseError } from '../../../common/error';
import { createCasesRoute } from '../create_cases_route';
import type { observableApiV1 } from '../../../../common/types/api';
import { DEFAULT_CASES_ROUTE_SECURITY } from '../constants';

export const patchObservableRoute = createCasesRoute({
method: 'patch',
path: INTERNAL_CASE_OBSERVABLES_PATCH_URL,
security: DEFAULT_CASES_ROUTE_SECURITY,
params: {
params: schema.object({
case_id: schema.string(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ import { INTERNAL_CASE_OBSERVABLES_URL } from '../../../../common/constants';
import { createCaseError } from '../../../common/error';
import { createCasesRoute } from '../create_cases_route';
import type { observableApiV1 } from '../../../../common/types/api';
import { DEFAULT_CASES_ROUTE_SECURITY } from '../constants';

export const postObservableRoute = createCasesRoute({
method: 'post',
path: INTERNAL_CASE_OBSERVABLES_URL,
security: DEFAULT_CASES_ROUTE_SECURITY,
params: {
params: schema.object({
case_id: schema.string(),
Expand Down