Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fleet] Improve support for Agentless in Fleet UI (elastic#183045)
Closes elastic#180375 ## Summary Expand support for Agentless in Fleet UI. Implemented on this PR: - Agent policies created with `supports_agentless` (added in elastic#182709) are now marked as `is_managed` - Added support for `deployment_modes.agentless.enabled` and `hide_in_deployment_modes` introduced with elastic/package-spec#684: - `hide_in_deployment_modes` shows/hides variables in agentless/default UI - `deployment_modes.agentless.enabled: true` determines an integration as enabled for agentless ## Notes - In this PR, an integration enabled for serverless is still added to the default `agentless` policy. - Integrations enabled for agentless don't display any specific "agentless" form yet. That part is TBD ### Testing - Run local env for [agentless](https://docs.elastic.dev/security-solution/cloud-security/agentless) ### Verify that new settings are honoured in integration policy - Use the compiled package with new properties defined in elastic/package-spec#738 `agentless_test_package-1.0.1-rc1.zip` (Packages in this [comment](elastic#183045 (comment))) - Upload it to Kibana: ```sh curl -k -XPOST -H 'content-type: application/zip' -H 'kbn-xsrf: true' https://localhost:5601/api/fleet/epm/packages -u elastic_serverless:changeme --data-binary @agentless_test_package-0.0.1.zip ``` - Check that the variable marked with `hide_in_deployment_modes: "agentless"` are not visible - Check that the agent policies selector is not visible ![Screenshot 2024-05-22 at 10 37 42](https://github.com/elastic/kibana/assets/16084106/02f12ebf-f448-4cfa-b9e7-8cb1a1226e5e) ### Verify that agent policies with `supports_agentless` are marked as managed - Create a new policy with `supports_agentless` ``` POST kbn:/api/fleet/agent_policies { "name": "Test - Agentless policy", "namespace": "default", "supports_agentless": true } ``` - Check that the created policy has `is_managed = true` - Try to change the value to false - an error is thrown ``` PUT kbn:/api/fleet/agent_policies/<policy_id> { "name": "Test - Agentless policy", "namespace": "default", "supports_agentless": false } ``` ### Checklist - [ ] 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/packages/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [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 --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
- Loading branch information