[Authz] Added reason for authorization opt-out for logstash routes (#213891)

## Summary

Added reason for authorization opt-out for logstash routes.


### Checklist

- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
This commit is contained in:
Elena Shostak 2025-03-13 16:55:22 +01:00 committed by GitHub
parent 13906cbb76
commit 5d9fd46b2a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 36 additions and 0 deletions

View file

@ -14,6 +14,12 @@ export function registerClusterLoadRoute(router: LogstashPluginRouter) {
router.get(
{
path: '/api/logstash/cluster',
security: {
authz: {
enabled: false,
reason: 'This route delegates authorization to the scoped ES client',
},
},
validate: false,
},
wrapRouteWithLicenseCheck(checkLicense, async (context, request, response) => {

View file

@ -14,6 +14,12 @@ export function registerPipelineDeleteRoute(router: LogstashPluginRouter) {
router.delete(
{
path: '/api/logstash/pipeline/{id}',
security: {
authz: {
enabled: false,
reason: 'This route delegates authorization to the scoped ES client',
},
},
options: {
access: 'public',
summary: `Delete a managed Logstash pipeline`,

View file

@ -16,6 +16,12 @@ export function registerPipelineLoadRoute(router: LogstashPluginRouter) {
router.get(
{
path: '/api/logstash/pipeline/{id}',
security: {
authz: {
enabled: false,
reason: 'This route delegates authorization to the scoped ES client',
},
},
options: {
access: 'public',
summary: `Get a managed Logstash pipeline`,

View file

@ -17,6 +17,12 @@ export function registerPipelineSaveRoute(router: LogstashPluginRouter) {
router.put(
{
path: '/api/logstash/pipeline/{id}',
security: {
authz: {
enabled: false,
reason: 'This route delegates authorization to the scoped ES client',
},
},
options: {
access: 'public',
summary: `Create a managed Logstash pipeline`,

View file

@ -36,6 +36,12 @@ export function registerPipelinesDeleteRoute(router: LogstashPluginRouter) {
router.post(
{
path: '/api/logstash/pipelines/delete',
security: {
authz: {
enabled: false,
reason: 'This route delegates authorization to the scoped ES client',
},
},
options: {
access: 'public',
summary: `Delete managed Logstash pipelines`,

View file

@ -27,6 +27,12 @@ export function registerPipelinesListRoute(router: LogstashPluginRouter) {
router.get(
{
path: '/api/logstash/pipelines',
security: {
authz: {
enabled: false,
reason: 'This route delegates authorization to the scoped ES client',
},
},
options: {
access: 'public',
summary: `Get all managed Logstash pipelines`,