Enable Asset Inventory page via Kibana Advanced Settings#211884
Enable Asset Inventory page via Kibana Advanced Settings#211884albertoblaz merged 8 commits intoelastic:mainfrom
Conversation
63b9fd1 to
9aa0ed0
Compare
|
Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security) |
opauloh
left a comment
There was a problem hiding this comment.
Looks good to me, just some text changes
x-pack/solutions/security/plugins/security_solution/server/ui_settings.ts
Outdated
Show resolved
Hide resolved
x-pack/solutions/security/plugins/security_solution/server/ui_settings.ts
Outdated
Show resolved
Hide resolved
67ccfe2 to
30933ca
Compare
|
@opauloh Updated copy as per suggested :) |
There was a problem hiding this comment.
As this is now an advanced setting, instead of forcing the environment to have the value by default is better to enable it first in the before hook, you can check how to do it in: x-pack/test/security_solution_cypress/cypress/tasks/api_calls/kibana_advanced_settings.ts
Is this functionality going to be available in serverless as well?
There was a problem hiding this comment.
Is this functionality going to be available in serverless as well?
Hi @MadameSheema, yes the idea of shifting from Kibana Feature Flag to Advanced Settings is to have Asset Inventory available on serverless as well, it does seem that enabling the advanced settings from API would be better in that case as it would allow us to test both environments by removing the @ess tag .
There was a problem hiding this comment.
@opauloh @MadameSheema I replaced the setting override with the API calls, which is indeed much better :)
However, removing { tags: ['@ess'] } from the describe block did not work and tests were skipped, so I kept it and added '@serverless' to the list. With that, tests seem to run and pass
There was a problem hiding this comment.
Hey @opauloh @albertoblaz lots of thanks for the clarification and the changes :)
You can learn more about how tags work for Cypress Security Solution tests here.
sabarasaba
left a comment
There was a problem hiding this comment.
kbn management changes lgtm
eokoneyo
left a comment
There was a problem hiding this comment.
Code review only. Shared UX changes LGTM
Bamieh
left a comment
There was a problem hiding this comment.
code changes LGTM (telemetry, and overall file changes)
75211c3 to
5d4ecfd
Compare
5d4ecfd to
1d1e2da
Compare
PhilippeOberti
left a comment
There was a problem hiding this comment.
LGTM for the Threat Hunting Investigations team
MadameSheema
left a comment
There was a problem hiding this comment.
Security Engineering Productivity changes LGTM!
rylnd
left a comment
There was a problem hiding this comment.
Detection Engine changes LGTM
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Async chunks
Page load bundle
History
cc @albertoblaz |
) ## Summary Closes elastic/security-team#11683. Adds an advanced setting to enable/disable the Asset Inventory page. Replaces the old `assetInventoryUXEnabled` feature flag. The placement of the setting is right below "Enable graph visualization", within the Security Solution group. ### Screenshots <details><summary>Setting off</summary> <img width="943" alt="Screenshot 2025-02-21 at 09 38 43" src="https://github.com/user-attachments/assets/c3b561cd-7dfa-4218-9004-cc89c5768551" /> </details> <details><summary>Setting on</summary> <img width="735" alt="Screenshot 2025-02-21 at 09 38 55" src="https://github.com/user-attachments/assets/7a9ebf17-9339-49f2-820e-e26087f1c17c" /> </details> <details><summary>Overriden setting - activated via kibana.dev.yml</summary> <img width="943" alt="Screenshot 2025-02-21 at 09 38 14" src="https://github.com/user-attachments/assets/6ebb1e73-cffb-4bfd-ab21-631955574ce1" /> </details> ### How to test Follow the instructions provided in the *README.md* file committed in this PR. ### Definition of Done - **Advanced Settings Integration** - [x] Add a new setting under **Kibana Advanced Settings** for enabling the Asset Inventory feature: - **Setting Name**: `Enable Asset Inventory` - **Setting Key**: `securitySolution:enableAssetInventory` - **Description**: "Enable the Asset Inventory feature to view and manage assets in the Security Solution plugin." - **Type**: Toggle (On/Off). - **Default Value**: Off. - [x] Ensure the setting reflects the current status of the Asset Inventory feature (On/Off). - [x] Group the setting logically under the **Security Solution** in the Kibana Advanced Settings page. - [x] Ensure the toggle is discoverable and adheres to Kibana’s design guidelines. - **Implementation** - [ ] ~~Update the `Asset Inventory` initialization logic to check the new Kibana setting (`securitySolution:enableAssetInventory`) instead of relying on the `assetInventoryUXEnabled` feature flag in `kibana.dev.yml`.~~ For now we don't need to worry about initialization - [ ] ~~Provide backward compatibility by allowing the `kibana.dev.yml` flag (`xpack.securitySolution.assetInventoryUXEnabled`) to override the setting in development environments.~~ - [x] The toggle should dynamically enable or disable the Asset Inventory feature without requiring a Kibana restart. - **Testing** - [x] Add unit tests to verify: - The toggle updates the setting value correctly. - The Asset Inventory feature respects the toggle status (enabled/disabled). - [x] Add functional tests to validate the toggle’s behavior in the Advanced Settings page. - **Documentation** - [x] Update the documentation to explain how to enable/disable the Asset Inventory feature using Kibana Advanced Settings. - [ ] ~~Provide details about the fallback behavior when using the `kibana.dev.yml` flag.~~ ### 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] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [x] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [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) ### Identify risks Feature will get exposed to end users if combination of setting and feature flag is not set up correctly.
Summary
Closes https://github.com/elastic/security-team/issues/11683.
Adds an advanced setting to enable/disable the Asset Inventory page. Replaces the old
assetInventoryUXEnabledfeature flag. The placement of the setting is right below "Enable graph visualization", within the Security Solution group.Screenshots
Setting off
Setting on
Overriden setting - activated via kibana.dev.yml
How to test
Follow the instructions provided in the README.md file committed in this PR.
Definition of Done
Advanced Settings Integration
Enable Asset InventorysecuritySolution:enableAssetInventoryImplementation
Update theFor now we don't need to worry about initializationAsset Inventoryinitialization logic to check the new Kibana setting (securitySolution:enableAssetInventory) instead of relying on theassetInventoryUXEnabledfeature flag inkibana.dev.yml.Provide backward compatibility by allowing thekibana.dev.ymlflag (xpack.securitySolution.assetInventoryUXEnabled) to override the setting in development environments.Testing
Documentation
Provide details about the fallback behavior when using thekibana.dev.ymlflag.Checklist
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelinesIdentify risks
Feature will get exposed to end users if combination of setting and feature flag is not set up correctly.