Skip to content

Commit

Permalink
[8.x] chore(o11y): add missing access options to routes (#197511) (#1…
Browse files Browse the repository at this point in the history
…97637)

# Backport

This will backport the following commits from `main` to `8.x`:
- [chore(o11y): add missing access options to routes
(#197511)](#197511)

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

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

<!--BACKPORT [{"author":{"name":"Kevin
Delemme","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-24T13:15:05Z","message":"chore(o11y):
add missing access options to routes
(#197511)","sha":"b3d5c4b46e2f9df7a28bcc3b5b61a132ffdcc0f1","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-management","v8.17.0"],"title":"chore(o11y):
add missing access options to
routes","number":197511,"url":"https://github.com/elastic/kibana/pull/197511","mergeCommit":{"message":"chore(o11y):
add missing access options to routes
(#197511)","sha":"b3d5c4b46e2f9df7a28bcc3b5b61a132ffdcc0f1"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197511","number":197511,"mergeCommit":{"message":"chore(o11y):
add missing access options to routes
(#197511)","sha":"b3d5c4b46e2f9df7a28bcc3b5b61a132ffdcc0f1"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Kevin Delemme <[email protected]>
  • Loading branch information
kibanamachine and kdelemme authored Oct 24, 2024
1 parent 4bb5cd0 commit 18a08a6
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ export function registerAnnotationAPIs({
validate: {
body: unknowns,
},
options: {
access: 'public',
},
},
wrapRouteHandler(t.type({ body: createAnnotationRt }), ({ data, client }) => {
return client.create(data.body);
Expand All @@ -110,6 +113,9 @@ export function registerAnnotationAPIs({
validate: {
body: unknowns,
},
options: {
access: 'public',
},
},
wrapRouteHandler(t.type({ body: updateAnnotationRt }), ({ data, client }) => {
return client.update(data.body);
Expand All @@ -122,6 +128,9 @@ export function registerAnnotationAPIs({
validate: {
params: unknowns,
},
options: {
access: 'public',
},
},
wrapRouteHandler(t.type({ params: deleteAnnotationRt }), ({ data, client }) => {
return client.delete(data.params);
Expand All @@ -134,6 +143,9 @@ export function registerAnnotationAPIs({
validate: {
params: unknowns,
},
options: {
access: 'public',
},
},
wrapRouteHandler(t.type({ params: getAnnotationByIdRt }), ({ data, client }) => {
return client.getById(data.params);
Expand All @@ -146,6 +158,9 @@ export function registerAnnotationAPIs({
validate: {
query: unknowns,
},
options: {
access: 'public',
},
},
wrapRouteHandler(t.type({ query: findAnnotationRt }), ({ data, client }) => {
return client.find(data.query);
Expand All @@ -158,6 +173,9 @@ export function registerAnnotationAPIs({
validate: {
query: unknowns,
},
options: {
access: 'public',
},
},
wrapRouteHandler(t.type({}), ({ client }) => {
return client.permissions();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const getObservabilityAlertDetailsContextRoute = createObservabilityServerRoute(
endpoint: 'GET /internal/observability/assistant/alert_details_contextual_insights',
options: {
tags: [],
access: 'internal',
},
params: t.type({
query: alertDetailsContextRt,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const alertsDynamicIndexPatternRoute = createObservabilityServerRoute({
endpoint: 'GET /api/observability/rules/alerts/dynamic_index_pattern 2023-10-31',
options: {
tags: [],
access: 'public',
},
params: t.type({
query: t.type({
Expand Down

0 comments on commit 18a08a6

Please sign in to comment.