mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[APM] Update non auth endpoints with authz info (#206289)
## Summary Closes https://github.com/elastic/kibana/issues/206252 As part of the Authz migration, we updated the endpoints that didn’t have any authorization restrictions to match the [documentation](https://docs.elastic.dev/kibana-dev-docs/key-concepts/security-api-authorization#opting-out-of-authorization-for-specific-routes) requirements.
This commit is contained in:
parent
f77dc3d043
commit
b328fe89c9
1 changed files with 21 additions and 3 deletions
|
@ -36,7 +36,13 @@ function throwNotFoundIfFleetMigrationNotAvailable(featureFlags: ApmFeatureFlags
|
|||
|
||||
const hasFleetDataRoute = createApmServerRoute({
|
||||
endpoint: 'GET /internal/apm/fleet/has_apm_policies',
|
||||
options: { tags: [] },
|
||||
security: {
|
||||
authz: {
|
||||
enabled: false,
|
||||
reason:
|
||||
"It's being used in the tutorial page, so it needs to be available for users even if they don't have APM permissions.",
|
||||
},
|
||||
},
|
||||
handler: async ({ core, plugins }): Promise<{ hasApmPolicies: boolean }> => {
|
||||
const fleetPluginStart = await plugins.fleet?.start();
|
||||
if (!fleetPluginStart) {
|
||||
|
@ -53,7 +59,13 @@ const hasFleetDataRoute = createApmServerRoute({
|
|||
|
||||
const fleetAgentsRoute = createApmServerRoute({
|
||||
endpoint: 'GET /internal/apm/fleet/agents',
|
||||
options: { tags: [] },
|
||||
security: {
|
||||
authz: {
|
||||
enabled: false,
|
||||
reason:
|
||||
"It's being used in the tutorial page, so it needs to be available for users even if they don't have APM permissions.",
|
||||
},
|
||||
},
|
||||
handler: async ({ core, plugins }): Promise<FleetAgentResponse> => {
|
||||
return getFleetAgents({
|
||||
coreStart: await core.start(),
|
||||
|
@ -182,7 +194,13 @@ const createCloudApmPackagePolicyRoute = createApmServerRoute({
|
|||
|
||||
const javaAgentVersions = createApmServerRoute({
|
||||
endpoint: 'GET /internal/apm/fleet/java_agent_versions',
|
||||
options: { tags: [] },
|
||||
security: {
|
||||
authz: {
|
||||
enabled: false,
|
||||
reason:
|
||||
'It returns static information stored in a public file in https://repo1.maven.org/maven2/co/elastic/apm/elastic-apm-agent/maven-metadata.xml',
|
||||
},
|
||||
},
|
||||
handler: async (): Promise<{ versions: string[] | undefined }> => {
|
||||
const versions = await getJavaAgentVersionsFromRegistry();
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue