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

[8.x] Authorized route migration for routes owned by @elastic/obs-ux-infra_services-team (#198196) #200752

Merged
merged 1 commit into from
Nov 19, 2024
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 @@ -34,8 +34,12 @@ export function registerTopNFunctionsAPMTransactionsRoute({
router.get(
{
path: paths.APMTransactions,
security: {
authz: {
requiredPrivileges: ['profiling', 'apm'],
},
},
options: {
tags: ['access:profiling', 'access:apm'],
timeout: { idleSocket: IDLE_SOCKET_TIMEOUT },
},
validate: { query: querySchema },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ export function registerFlameChartSearchRoute({
router.get(
{
path: paths.Flamechart,
options: { tags: ['access:profiling'], timeout: { idleSocket: IDLE_SOCKET_TIMEOUT } },
security: {
authz: {
requiredPrivileges: ['profiling'],
},
},
options: { timeout: { idleSocket: IDLE_SOCKET_TIMEOUT } },
validate: {
query: schema.object({
timeFrom: schema.number(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ export function registerTopNFunctionsSearchRoute({
router.get(
{
path: paths.TopNFunctions,
options: { tags: ['access:profiling'], timeout: { idleSocket: IDLE_SOCKET_TIMEOUT } },
security: {
authz: {
requiredPrivileges: ['profiling'],
},
},
options: { timeout: { idleSocket: IDLE_SOCKET_TIMEOUT } },
validate: { query: querySchema },
},
async (context, request, response) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ export function registerSetupRoute({
router.get(
{
path: paths.HasSetupESResources,
options: { tags: ['access:profiling'] },
security: {
authz: {
requiredPrivileges: ['profiling'],
},
},
validate: false,
},
async (context, request, response) => {
Expand Down Expand Up @@ -62,7 +66,11 @@ export function registerSetupRoute({
router.post(
{
path: paths.HasSetupESResources,
options: { tags: ['access:profiling'] },
security: {
authz: {
requiredPrivileges: ['profiling'],
},
},
validate: false,
},
async (context, request, response) => {
Expand Down Expand Up @@ -166,7 +174,11 @@ export function registerSetupRoute({
router.get(
{
path: paths.SetupDataCollectionInstructions,
options: { tags: ['access:profiling'] },
security: {
authz: {
requiredPrivileges: ['profiling'],
},
},
validate: false,
},
async (context, request, response) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ export function registerStorageExplorerRoute({
router.get(
{
path: paths.StorageExplorerSummary,
options: { tags: ['access:profiling'] },
security: {
authz: {
requiredPrivileges: ['profiling'],
},
},
validate: {
query: schema.object({
indexLifecyclePhase: schema.oneOf([
Expand Down Expand Up @@ -112,7 +116,11 @@ export function registerStorageExplorerRoute({
router.get(
{
path: paths.StorageExplorerHostStorageDetails,
options: { tags: ['access:profiling'] },
security: {
authz: {
requiredPrivileges: ['profiling'],
},
},
validate: {
query: schema.object({
indexLifecyclePhase: schema.oneOf([
Expand Down Expand Up @@ -156,7 +164,11 @@ export function registerStorageExplorerRoute({
router.get(
{
path: paths.StorageExplorerIndicesStorageDetails,
options: { tags: ['access:profiling'] },
security: {
authz: {
requiredPrivileges: ['profiling'],
},
},
validate: {
query: schema.object({
indexLifecyclePhase: schema.oneOf([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,12 @@ export function queryTopNCommon({
router.get(
{
path: pathName,
options: { tags: ['access:profiling'], timeout: { idleSocket: IDLE_SOCKET_TIMEOUT } },
security: {
authz: {
requiredPrivileges: ['profiling'],
},
},
options: { timeout: { idleSocket: IDLE_SOCKET_TIMEOUT } },
validate: {
query: schema.object({
timeFrom: schema.number(),
Expand Down