Skip to content

Commit

Permalink
[Authz] Migrated authorized routes owned by security-detection-engine
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine committed Oct 30, 2024
1 parent c4301d0 commit e38715b
Show file tree
Hide file tree
Showing 16 changed files with 66 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ export const createIndexRoute = (router: SecuritySolutionPluginRouter) => {
.post({
path: DETECTION_ENGINE_INDEX_URL,
access: 'public',
options: {
tags: ['access:securitySolution'],
security: {
authz: {
requiredPrivileges: ['securitySolution'],
},
},
})
.addVersion(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ export const deleteIndexRoute = (router: SecuritySolutionPluginRouter) => {
.delete({
path: DETECTION_ENGINE_INDEX_URL,
access: 'public',
options: {
tags: ['access:securitySolution'],
security: {
authz: {
requiredPrivileges: ['securitySolution'],
},
},
})
.addVersion(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ export const readAlertsIndexExistsRoute = (router: SecuritySolutionPluginRouter)
.get({
path: DETECTION_ENGINE_ALERTS_INDEX_URL,
access: 'internal',
options: {
tags: ['access:securitySolution'],
security: {
authz: {
requiredPrivileges: ['securitySolution'],
},
},
})
.addVersion(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ export const readIndexRoute = (
.get({
path: DETECTION_ENGINE_INDEX_URL,
access: 'public',
options: {
tags: ['access:securitySolution'],
security: {
authz: {
requiredPrivileges: ['securitySolution'],
},
},
})
.addVersion(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ export const createSignalsMigrationRoute = (router: SecuritySolutionPluginRouter
.post({
path: DETECTION_ENGINE_SIGNALS_MIGRATION_URL,
access: 'public',
options: {
tags: ['access:securitySolution'],
security: {
authz: {
requiredPrivileges: ['securitySolution'],
},
},
})
.addVersion(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ export const deleteSignalsMigrationRoute = (router: SecuritySolutionPluginRouter
.delete({
path: DETECTION_ENGINE_SIGNALS_MIGRATION_URL,
access: 'public',
options: {
tags: ['access:securitySolution'],
security: {
authz: {
requiredPrivileges: ['securitySolution'],
},
},
})
.addVersion(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ export const finalizeSignalsMigrationRoute = (
.post({
path: DETECTION_ENGINE_SIGNALS_FINALIZE_MIGRATION_URL,
access: 'public',
options: {
tags: ['access:securitySolution'],
security: {
authz: {
requiredPrivileges: ['securitySolution'],
},
},
})
.addVersion(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ export const getSignalsMigrationStatusRoute = (router: SecuritySolutionPluginRou
.get({
path: DETECTION_ENGINE_SIGNALS_MIGRATION_STATUS_URL,
access: 'public',
options: {
tags: ['access:securitySolution'],
security: {
authz: {
requiredPrivileges: ['securitySolution'],
},
},
})
.addVersion(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ export const setSignalsStatusRoute = (
.post({
path: DETECTION_ENGINE_SIGNALS_STATUS_URL,
access: 'public',
options: {
tags: ['access:securitySolution'],
security: {
authz: {
requiredPrivileges: ['securitySolution'],
},
},
})
.addVersion(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ export const querySignalsRoute = (
.post({
path: DETECTION_ENGINE_QUERY_SIGNALS_URL,
access: 'public',
options: {
tags: ['access:securitySolution'],
security: {
authz: {
requiredPrivileges: ['securitySolution'],
},
},
})
.addVersion(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ export const setAlertAssigneesRoute = (router: SecuritySolutionPluginRouter) =>
.post({
path: DETECTION_ENGINE_ALERT_ASSIGNEES_URL,
access: 'public',
options: {
tags: ['access:securitySolution'],
security: {
authz: {
requiredPrivileges: ['securitySolution'],
},
},
})
.addVersion(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ export const setAlertTagsRoute = (router: SecuritySolutionPluginRouter) => {
.post({
path: DETECTION_ENGINE_ALERT_TAGS_URL,
access: 'public',
options: {
tags: ['access:securitySolution'],
security: {
authz: {
requiredPrivileges: ['securitySolution'],
},
},
})
.addVersion(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ export const legacyCreateLegacyNotificationRoute = (
.post({
path: UPDATE_OR_CREATE_LEGACY_ACTIONS,
access: 'internal',
options: {
tags: ['access:securitySolution'],
security: {
authz: {
requiredPrivileges: ['securitySolution'],
},
},
})
.addVersion(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ export const createRuleExceptionsRoute = (router: SecuritySolutionPluginRouter)
.post({
path: CREATE_RULE_EXCEPTIONS_URL,
access: 'public',
options: {
tags: ['access:securitySolution'],
security: {
authz: {
requiredPrivileges: ['securitySolution'],
},
},
})
.addVersion(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ export const findRuleExceptionReferencesRoute = (router: SecuritySolutionPluginR
.get({
path: DETECTION_ENGINE_RULES_EXCEPTIONS_REFERENCE_URL,
access: 'internal',
options: {
tags: ['access:securitySolution'],
security: {
authz: {
requiredPrivileges: ['securitySolution'],
},
},
})
.addVersion(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,13 @@ export const previewRulesRoute = (
.post({
path: DETECTION_ENGINE_RULES_PREVIEW,
access: 'public',
security: {
authz: {
requiredPrivileges: ['securitySolution'],
},
},
options: {
tags: ['access:securitySolution', routeLimitedConcurrencyTag(MAX_ROUTE_CONCURRENCY)],
tags: [routeLimitedConcurrencyTag(MAX_ROUTE_CONCURRENCY)],
},
})
.addVersion(
Expand Down

0 comments on commit e38715b

Please sign in to comment.