Skip to content

[UII] Make output and fleet server non-editable for agentless policies#218905

Merged
jen-huang merged 8 commits intoelastic:mainfrom
jen-huang:fix/agentless-managed-output
Apr 24, 2025
Merged

[UII] Make output and fleet server non-editable for agentless policies#218905
jen-huang merged 8 commits intoelastic:mainfrom
jen-huang:fix/agentless-managed-output

Conversation

@jen-huang
Copy link
Contributor

@jen-huang jen-huang commented Apr 23, 2025

Summary

Resolves https://github.com/elastic/ingest-dev/issues/5459.

This PR makes it so that on Cloud, agentless policies cannot move off of the default managed Fleet Server host and ES output. This is done by:

  • Explicitly writing fleet_server_host_id and data_output_id fields to the agentless policy that is created when adding an agentless integration
    • On ECH, these are fleet-default-fleet-server-host and fleet-default-output respectively
    • On Serverless, these are default-fleet-server and es-default-output
  • During Fleet setup, agentless policies without these fields set up correctly will be backfilled to the correct values

Checklist

  • Unit or functional tests were updated or added to match the most common scenarios
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
…hen creating agentless policies. Correct them on Fleet setup if necessary
@jen-huang jen-huang self-assigned this Apr 23, 2025
@jen-huang jen-huang added release_note:fix backport:skip This PR does not require backporting Team:Fleet Team label for Observability Data Collection Fleet team v9.1.0 labels Apr 23, 2025
@jen-huang jen-huang marked this pull request as ready for review April 23, 2025 18:29
@jen-huang jen-huang requested review from a team as code owners April 23, 2025 18:29
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@jen-huang jen-huang added ci:cloud-deploy Create or update a Cloud deployment ci:project-deploy-security Create a Security Serverless Project labels Apr 23, 2025
Copy link
Contributor

@juliaElastic juliaElastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM

Copy link
Contributor

@Omolola-Akinleye Omolola-Akinleye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@elasticmachine
Copy link
Contributor

elasticmachine commented Apr 24, 2025

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
fleet 1.7MB 1.7MB +513.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
fleet 163.6KB 164.0KB +350.0B

History

cc @jen-huang

@jen-huang jen-huang merged commit cad38d6 into elastic:main Apr 24, 2025
9 checks passed
@jen-huang jen-huang deleted the fix/agentless-managed-output branch April 24, 2025 23:21
akowalska622 pushed a commit to akowalska622/kibana that referenced this pull request May 29, 2025
elastic#218905)

## Summary

Resolves https://github.com/elastic/security-team/issues/10971.

This PR makes it so that on Cloud, agentless policies cannot move off of
the default managed Fleet Server host and ES output. This is done by:

- Explicitly writing `fleet_server_host_id` and `data_output_id` fields
to the agentless policy that is created when adding an agentless
integration
- On ECH, these are `fleet-default-fleet-server-host` and
`fleet-default-output` respectively
- On Serverless, these are `default-fleet-server` and
`es-default-output`
- During Fleet setup, agentless policies without these fields set up
correctly will be backfilled to the correct values

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting ci:cloud-deploy Create or update a Cloud deployment ci:project-deploy-security Create a Security Serverless Project release_note:fix Team:Fleet Team label for Observability Data Collection Fleet team v9.1.0

4 participants