[8.x] [UII] Restrict non-local ES output types for agentless integrations and policies (#207296)#208131
Merged
jen-huang merged 3 commits intoelastic:8.xfrom Jan 24, 2025
Merged
Conversation
…nd policies (elastic#207296) ## Summary Resolves elastic#202090. Incidentally also fixes and unskips the failing test reported in elastic#203346. This PR makes it so that: - Agentless agent policies and package policies (those with `supports_agentless: true` set) cannot be directly set to use a non-local ES output for integration data - This restriction applies to UI and API level - When a non-local ES output would be updated to be the global Fleet default integration data output, existing agentless policies without an explicit output set will have their output directly set to the current default output ID - This is the same mechanism used today to ensure that Fleet Server and Synthetics integrations do not accidentally have their output set to non-ES as well ## Testing 1. Apply [patch](https://gist.github.com/jen-huang/dfc3e02ceb63976ad54bd1f50c524cb4) to skip actual agentless creation 2. Create different types of outputs in addition to default local ES 3. Enable beta integrations 4. Add an agentless integration, for example Box Connector, observe that outputs list only shows ES outputs: <img width="1422" alt="image" src="https://github.com/user-attachments/assets/72e43220-702f-4bb7-8e37-8be69aa4e6ea" /> 5. Switch to agent-based setup technology, observe that outputs list now shows all outputs 6. Create the agentless integration, go to its agent policy 7. Observe that outputs list only enables ES outputs: <img width="1425" alt="image" src="https://github.com/user-attachments/assets/3bc5985f-07bf-407a-8b62-4248b28904a5" /> 8. Play around with setting global default outputs, it should be not possible to get into a state where an agentless policy is using a non-local ES output ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [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) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit d4cc532) # Conflicts: # oas_docs/bundle.json # oas_docs/bundle.serverless.json # oas_docs/output/kibana.yaml # x-pack/platform/plugins/shared/fleet/server/services/agent_policy.ts # x-pack/platform/plugins/shared/fleet/server/services/output.test.ts # x-pack/platform/plugins/shared/fleet/server/types/models/agent_policy.ts # x-pack/test/fleet_api_integration/apis/agent_policy/agent_policy.ts
3 tasks
Contributor
|
Pinging @elastic/fleet (Team:Fleet) |
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/dashboards --update --no-serverless'
Contributor
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
|
jlind23
approved these changes
Jan 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
mainto8.x:Questions ?
Please refer to the Backport tool documentation