Skip to content

[9.5](backport #7468) Remove service_token from secret_path for remote ES - #7636

Open
mergify[bot] wants to merge 1 commit into
9.5from
mergify/bp/9.5/pr-7468
Open

[9.5](backport #7468) Remove service_token from secret_path for remote ES#7636
mergify[bot] wants to merge 1 commit into
9.5from
mergify/bp/9.5/pr-7468

Conversation

@mergify

@mergify mergify Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

What is the problem this PR solves?

We delete the service_token from the parsed policy when output is of remoteES type. See. But we do not remove the reference for it from secret_path.output.[OuputID].service_token which causes constant stream of errors on elastic-agent side when attempting to read the nil service_token

The error logged is

failed to add secret markers: secret path outputs.OUTPUT_ID.service_token does not exist

How does this PR solve the problem?

This PR removes the corresponding service_token from secret_path before sending the policy to elastic-agent.

How to test this PR locally

Design Checklist

  • I have ensured my design is stateless and will work when multiple fleet-server instances are behind a load balancer.
  • I have or intend to scale test my changes, ensuring it will work reliably with 100K+ agents connected.
  • I have included fail safe mechanisms to limit the load on fleet-server: rate limiting, circuit breakers, caching, load shedding, etc.

Checklist

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in ./changelog/fragments using the changelog tool

Related issues


This is an automatic backport of pull request #7468 done by [Mergify](https://mergify.com).

* Remove service token from secret_path for remote ES

(cherry picked from commit ac1b0d5)
@mergify mergify Bot added the backport label Aug 13, 2026
@mergify
mergify Bot requested a review from a team as a code owner August 13, 2026 05:06
@mergify
mergify Bot requested review from blakerouse and lorienhu August 13, 2026 05:06
@mergify mergify Bot added the backport label Aug 13, 2026
@github-actions github-actions Bot added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant