Skip to content

Commit

Permalink
[8.x] [Logs] Manual migration for routes with access tags (#208484) (#…
Browse files Browse the repository at this point in the history
…208598)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Logs] Manual migration for routes with access tags
(#208484)](#208484)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Yngrid
Coello","email":"yngrid.coello@elastic.co"},"sourceCommit":{"committedDate":"2025-01-28T18:34:05Z","message":"[Logs]
Manual migration for routes with access tags (#208484)\n\nRelates to
https://github.com/elastic/kibana-team/issues/1235.\r\n\r\n---\r\n##
Team: `@elastic/obs-ux-logs-team`\r\n\r\n| URL | PR |\r\n| --- | ---
|\r\n| `/api/log_entries/highlights` | current PR |\r\n|
`/api/log_entries/summary` | current PR |\r\n|
`/api/log_entries/summary_highlights` | current PR |\r\n|
`/api/infra/log_views/{logViewId}`
|\r\nhttps://github.com//pull/204214 |\r\n|
`/api/infra/log_views/{logViewId}`
|\r\nhttps://github.com//pull/204214 |\r\n|
`/api/infra/log_analysis/results/log_entry_categories`
|\r\nhttps://github.com//pull/204214 |\r\n|
`/api/infra/log_analysis/results/log_entry_category_datasets`
|\r\nhttps://github.com//pull/204214
|\r\n|\r\n`/api/infra/log_analysis/results/latest_log_entry_category_datasets_stats`\r\n|
#204214 |\r\n|
`/api/infra/log_analysis/results/log_entry_category_examples`
|\r\nhttps://github.com//pull/204214 |\r\n|
`/api/infra/log_analysis/results/log_entry_anomalies`
|\r\nhttps://github.com//pull/204214 |\r\n|
`/api/infra/log_analysis/results/log_entry_anomalies_datasets`
|\r\nhttps://github.com//pull/204214 |\r\n|
`/api/infra/log_analysis/id_formats`
|\r\nhttps://github.com//pull/204214 |\r\n|
`/api/infra/log_analysis/validation/log_entry_datasets`
|\r\nhttps://github.com//pull/204214 |\r\n|
`/api/infra/log_analysis/validation/log_entry_rate_indices`
|\r\nhttps://github.com//pull/204214 |\r\n|
`/api/infra/log_analysis/results/log_entry_examples`
|\r\nhttps://github.com//pull/204214 |\r\n|
`/api/infra/log_alerts/chart_preview_data`
|\r\nhttps://github.com//pull/204214
|","sha":"013a1248a3338144799e4dc32ffc4bec9aa5b9f8","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor"],"title":"[Logs]
Manual migration for routes with access
tags","number":208484,"url":"https://github.com/elastic/kibana/pull/208484","mergeCommit":{"message":"[Logs]
Manual migration for routes with access tags (#208484)\n\nRelates to
https://github.com/elastic/kibana-team/issues/1235.\r\n\r\n---\r\n##
Team: `@elastic/obs-ux-logs-team`\r\n\r\n| URL | PR |\r\n| --- | ---
|\r\n| `/api/log_entries/highlights` | current PR |\r\n|
`/api/log_entries/summary` | current PR |\r\n|
`/api/log_entries/summary_highlights` | current PR |\r\n|
`/api/infra/log_views/{logViewId}`
|\r\nhttps://github.com//pull/204214 |\r\n|
`/api/infra/log_views/{logViewId}`
|\r\nhttps://github.com//pull/204214 |\r\n|
`/api/infra/log_analysis/results/log_entry_categories`
|\r\nhttps://github.com//pull/204214 |\r\n|
`/api/infra/log_analysis/results/log_entry_category_datasets`
|\r\nhttps://github.com//pull/204214
|\r\n|\r\n`/api/infra/log_analysis/results/latest_log_entry_category_datasets_stats`\r\n|
#204214 |\r\n|
`/api/infra/log_analysis/results/log_entry_category_examples`
|\r\nhttps://github.com//pull/204214 |\r\n|
`/api/infra/log_analysis/results/log_entry_anomalies`
|\r\nhttps://github.com//pull/204214 |\r\n|
`/api/infra/log_analysis/results/log_entry_anomalies_datasets`
|\r\nhttps://github.com//pull/204214 |\r\n|
`/api/infra/log_analysis/id_formats`
|\r\nhttps://github.com//pull/204214 |\r\n|
`/api/infra/log_analysis/validation/log_entry_datasets`
|\r\nhttps://github.com//pull/204214 |\r\n|
`/api/infra/log_analysis/validation/log_entry_rate_indices`
|\r\nhttps://github.com//pull/204214 |\r\n|
`/api/infra/log_analysis/results/log_entry_examples`
|\r\nhttps://github.com//pull/204214 |\r\n|
`/api/infra/log_alerts/chart_preview_data`
|\r\nhttps://github.com//pull/204214
|","sha":"013a1248a3338144799e4dc32ffc4bec9aa5b9f8"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/208484","number":208484,"mergeCommit":{"message":"[Logs]
Manual migration for routes with access tags (#208484)\n\nRelates to
https://github.com/elastic/kibana-team/issues/1235.\r\n\r\n---\r\n##
Team: `@elastic/obs-ux-logs-team`\r\n\r\n| URL | PR |\r\n| --- | ---
|\r\n| `/api/log_entries/highlights` | current PR |\r\n|
`/api/log_entries/summary` | current PR |\r\n|
`/api/log_entries/summary_highlights` | current PR |\r\n|
`/api/infra/log_views/{logViewId}`
|\r\nhttps://github.com//pull/204214 |\r\n|
`/api/infra/log_views/{logViewId}`
|\r\nhttps://github.com//pull/204214 |\r\n|
`/api/infra/log_analysis/results/log_entry_categories`
|\r\nhttps://github.com//pull/204214 |\r\n|
`/api/infra/log_analysis/results/log_entry_category_datasets`
|\r\nhttps://github.com//pull/204214
|\r\n|\r\n`/api/infra/log_analysis/results/latest_log_entry_category_datasets_stats`\r\n|
#204214 |\r\n|
`/api/infra/log_analysis/results/log_entry_category_examples`
|\r\nhttps://github.com//pull/204214 |\r\n|
`/api/infra/log_analysis/results/log_entry_anomalies`
|\r\nhttps://github.com//pull/204214 |\r\n|
`/api/infra/log_analysis/results/log_entry_anomalies_datasets`
|\r\nhttps://github.com//pull/204214 |\r\n|
`/api/infra/log_analysis/id_formats`
|\r\nhttps://github.com//pull/204214 |\r\n|
`/api/infra/log_analysis/validation/log_entry_datasets`
|\r\nhttps://github.com//pull/204214 |\r\n|
`/api/infra/log_analysis/validation/log_entry_rate_indices`
|\r\nhttps://github.com//pull/204214 |\r\n|
`/api/infra/log_analysis/results/log_entry_examples`
|\r\nhttps://github.com//pull/204214 |\r\n|
`/api/infra/log_alerts/chart_preview_data`
|\r\nhttps://github.com//pull/204214
|","sha":"013a1248a3338144799e4dc32ffc4bec9aa5b9f8"}}]}] BACKPORT-->

Co-authored-by: Yngrid Coello <yngrid.coello@elastic.co>
  • Loading branch information
kibanamachine and yngrdyn authored Jan 28, 2025
1 parent b7f67ea commit 18addbb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,14 @@ export class KibanaFramework {
public registerVersionedRoute<Method extends RouteMethod = any>(
config: LogsSharedVersionedRouteConfig<Method>
) {
const defaultOptions = {
tags: ['access:infra'],
};
const routeConfig = {
access: config.access,
path: config.path,
// Currently we have no use of custom options beyond tags, this can be extended
// beyond defaultOptions if it's needed.
options: defaultOptions,
security: {
authz: {
requiredPrivileges: ['infra'],
},
},
};
switch (config.method) {
case 'get':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,14 @@ export class KibanaFramework {
public registerVersionedRoute<Method extends RouteMethod = any>(
config: InfraVersionedRouteConfig<Method>
) {
const defaultOptions = {
tags: ['access:infra'],
};
const routeConfig = {
access: config.access,
path: config.path,
// Currently we have no use of custom options beyond tags, this can be extended
// beyond defaultOptions if it's needed.
options: defaultOptions,
security: {
authz: {
requiredPrivileges: ['infra'],
},
},
};
switch (config.method) {
case 'get':
Expand Down

0 comments on commit 18addbb

Please sign in to comment.