diff --git a/x-pack/plugins/fleet/server/routes/app/index.ts b/x-pack/plugins/fleet/server/routes/app/index.ts index ccf0c334e417c..6c65190a0089c 100644 --- a/x-pack/plugins/fleet/server/routes/app/index.ts +++ b/x-pack/plugins/fleet/server/routes/app/index.ts @@ -9,6 +9,7 @@ import type { RequestHandler, RouteValidationResultFactory } from '@kbn/core/ser import type { TypeOf } from '@kbn/config-schema'; import { schema } from '@kbn/config-schema'; + import { parseExperimentalConfigValue } from '../../../common/experimental_features'; import type { FleetAuthzRouter } from '../../services/security'; import { APP_API_ROUTES } from '../../constants'; @@ -135,7 +136,7 @@ export const generateServiceTokenHandler: RequestHandler< token?: GenerateServiceTokenResponse; }>({ method: 'POST', - path: `_security/service/elastic/${serviceAccount}/credential/token/token-${Date.now()}`, + path: `_security/service/elastic/${serviceAccount}/credential/token/token-${uuidv4()}`, }); if (tokenResponse.created && tokenResponse.token) {