Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Saved Queries] Rework saved query privileges #202863

Open
wants to merge 83 commits into
base: main
Choose a base branch
from

Conversation

davismcphee
Copy link
Contributor

@davismcphee davismcphee commented Dec 4, 2024

Summary

This PR reworks saved query privileges to rely solely on a single global savedQueryManagement privilege, and eliminates app-specific overrides. This change simplifies the security model for users, fixes bugginess in the saved query management UI, and reduces code complexity associated with maintaining two separate security mechanisms (app-specific overrides and global saved query management privileges).

Background

Saved queries allow users to store a combination of KQL or Lucene queries, filters, and time filters to use across various applications in Kibana. Access to saved query saved objects are currently granted by the following feature privileges:

[
  "feature_discover.all",
  "feature_dashboard.all",
  "feature_savedQueryManagement.all",
  "feature_maps.all",
  "feature_savedObjectsManagement.all",
  "feature_visualize.all"
]

There is also a saved query management UI within the Unified Search bar shared by applications across Kibana:

The way access to this UI is managed in Kibana is currently confusing and buggy:

  • If a user has feature_discover.all and feature_dashboard.all they will be able to load and save queries in Discover and Dashboard.
  • If a user has feature_discover.all and feature_dashboard.read they will be able to load queries in both Discover and Dashboard, but only save queries in Discover (even though they have write access to the SO, and API access). Instead they have to navigate to Discover to save a query before navigating back to Dashboard to load it, making for a confusing and frustrating UX.
  • Access to the UI is even more confusing in apps not listed in the above feature privileges (e.g. alerting, SLOs). Some of them chose to check one of the above feature privileges, meaning users who otherwise should have saved query access won't see the management UI if they don't also have the exact feature privilege being checked. Other apps just always show the management UI, leading to bugs and failures when users without one of the above feature privileges attempt to save queries.

Existing improvements

In v8.11.0, we introduced a new "Saved Query Management" privilege, allowing users to access saved queries across all of Kibana with a single global privilege:

When this privilege is added to a role, it solves the feature_discover.all and feature_dashboard.read issue mentioned above. However, it does not fix any of the mentioned issues for roles without the new privilege. We have so far postponed further improvements to avoid a breaking change.

Approach

To fully resolve these issues and migrate to a single global privilege, these changes have been made:

  • Remove saved query SO access from all application feature privileges and instead only allow access through the global saved query management privilege.
  • Stop relying on application feature privileges for toggling the saved query management UI, and instead rely on the global privilege.

To implement this with minimal breaking changes, we've used the Kibana privilege migration framework. This allows us to seamlessly migrate existing roles containing feature privileges that currently provide access to saved queries, ensuring they are assigned the global saved query management privilege on upgrade.

As a result, we had to deprecate the following feature privileges, replacing them with V2 privileges without saved query SO access:

[
  "feature_discover.all",
  "feature_dashboard.all",
  "feature_maps.all",
  "feature_visualize.all"
]

Each area of code that currently relies on any of these feature privileges had to be updated to instead access feature_X_V2 instead (as well as future code).

This PR still introduces a minor breaking change, since users who have feature_discover.all and feature_dashboard.read are now able to save queries in Dashboard after upgrade, but we believe this is a better UX (and likely the expected one) and worth a small breaking change.

Testing

  • All existing privileges should continue to work as they do now, including deprecated V1 feature privileges and customized serverless privileges. There should be no changes for existing user roles apart from the minor breaking change outlined above.
  • Check that code changes in your area don't introduce breaking changes to existing behaviour. Many of the changes are just updating client UI capabilities code from feature.privilege to feature_v2.privilege, which is backward compatible.
  • The savedQueryManagement feature should now globally control access to saved query management in Unified Search for all new user roles. Regardless of privileges for Discover, Dashboard, Maps, or Visualize, new user roles should follow this behaviour:
    • If savedQueryManagement is none, the user cannot see or access the saved query management UI or APIs.
    • If savedQueryManagement is read, the user can load queries from the UI and access read APIs, but cannot save queries from the UI or make changes to queries through APIs.
    • If savedQueryManagement is all, the user can both load and save queries from the UI and through APIs.

Checklist

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • 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.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines

Identify risks

This PR risks introducing unintended breaking changes to user privileges related to saved queries if the deprecated features have not been properly migrated, and users could gain or lose access to saved query management on upgrade. This would be bad if it happened, but not overly severe since it wouldn't grant them access to any ES data they couldn't previously access (only query saved objects). We have automated testing in place to help ensure features have been migrated correctly, but the scope of these changes are broad and touch many places in the codebase.

Additionally, the UI capabilities types are not very strict, and are referenced with string paths in many places, which makes changing them riskier than changing strictly typed code. A combination of regex searches and temporarily modifying the Capabilities type to cause type errors for deprecated privileges was used to identify references in code. Reviewers should consider if there are any other ways that UI capabilities can be referenced which were not addressed in this PR.

Our automated tests already help mitigate the risk, but it's important that code owners thoroughly review the changes in their area and consider if they could have unintended consequences. The Platform Security team should also review this PR thoroughly, especially since some changes were made to platform code around privilege handling. The Data Discovery team will also manually test the behaviour when upgrading existing user roles with deprecated feature privileges as part of 9.0 upgrade testing.

@davismcphee davismcphee added release_note:breaking backport:skip This commit does not require backporting Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. labels Dec 4, 2024
@davismcphee davismcphee self-assigned this Dec 4, 2024
kibanamachine added a commit that referenced this pull request Jan 16, 2025
…t explicit feature replacements (#206660) (#206925)

# Backport

This will backport the following commits from `main` to `8.x`:
- [feat(security): extend `Feature` definition to support
explicit feature replacements
(#206660)](#206660)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Aleh
Zasypkin","email":"aleh.zasypkin@elastic.co"},"sourceCommit":{"committedDate":"2025-01-16T11:35:32Z","message":"feat(security):
extend `Feature` definition to support explicit feature replacements
(#206660)\n\n## Summary\n\nToday, when a developer deprecates a feature
and replaces its privileges\nwith those of another feature, we
reasonably assume that the new feature\nfully replaces the old one in
all possible contexts - whether in role\nmanagement UIs or in the Spaces
feature toggles visibility UI. However,\nwhen deprecated privileges are
replaced by the privileges of multiple\nfeatures, such as in
[this\ncase](https://github.com/elastic/kibana/pull/202863#discussion_r1892672114)\nwhere
the Discover/Dashboard/Maps feature privileges are replaced by
the\nprivileges of Discover_v2/Dashboard_v2/Maps_v2, respectively,
**and**\nthe privileges of the Saved Query Management feature, the
choice is\nambiguous.\n\nWhich of these features should be treated as
the replacement for the\ndeprecated feature in contexts that deal with
entire features (like the\nSpaces feature toggles visibility UI) rather
than individual privileges\n(like in role management UIs)? Should all
referenced features be\nconsidered replacements? Or just a subset - or
even a single feature? If\nso, which one? Currently, we treat all
referenced features as\nreplacements for the deprecated feature, which
creates problems, as\ndescribed in detail in
[this\ndiscussion](https://github.com/elastic/kibana/pull/202863#discussion_r1892672114).\n\nThis
PR allows developers to customize this behavior by specifying
which\nfeatures Kibana should treat as direct successors to deprecated
features\nin contexts that deal with whole features rather than
individual\nprivileges:\n\n```ts\ndeps.features.registerKibanaFeature({\n
deprecated: {\n notice: 'The feature is deprecated because … well,
there’s a reason.',\n --> replacedBy: ['feature_id_v2'], <--\n },\n id:
'feature_id'\n name: `Case #4 feature ${suffix} (DEPRECATED)`,\n
…\n});\n```\n\n## How to test\n\n1. Run test server\n```bash\nnode
scripts/functional_tests_server.js --config
x-pack/test/security_api_integration/features.config.ts\n```\n\n2.
Execute the following request from the Dev Tools (`case_4_feature_a`\nis
a deprecated feature that is replaced by multiple features
and\n**doesn't use** `deprecated.replacedBy`)\n```http\nPUT
kbn:/api/spaces/space/default?overwrite=true\n{\n \"id\":\"default\",\n
\"name\":\"Default\",\n \"description\":\"This is your default
space!\",\n \"color\":\"#00bfb3\",\n
\"disabledFeatures\":[\"case_4_feature_a\"],\n \"_reserved\":true,\n
\"imageUrl\":\"\",\n \"initials\":\"D\"\n}\n```\n\n3. Observe that in
response deprecated `case_4_feature_a` is replaced by\ntwo features (you
can also
check\nhttp://localhost:5620/app/management/kibana/spaces/edit/default
to see\nhow it's reflected in UI)\n```http\n{\n \"id\": \"default\",\n
\"name\": \"Default\",\n \"description\": \"This is your default
space!\",\n \"color\": \"#00bfb3\",\n \"initials\": \"D\",\n
\"imageUrl\": \"\",\n \"disabledFeatures\": [\n
\"case_4_feature_a_v2\",\n \"case_4_feature_c\"\n ],\n \"_reserved\":
true\n}\n```\n\n4. Execute the following request from the Dev Tools
(`case_4_feature_b`\nis a deprecated feature that is replaced by
multiple features, but\n**uses** `deprecated.replacedBy` to set the
conceptual\nfeature-successor)\n```http\nPUT
kbn:/api/spaces/space/default?overwrite=true\n{\n \"id\":\"default\",\n
\"name\":\"Default\",\n \"description\":\"This is your default
space!\",\n \"color\":\"#00bfb3\",\n
\"disabledFeatures\":[\"case_4_feature_b\"],\n \"_reserved\":true,\n
\"imageUrl\":\"\",\n \"initials\":\"D\"\n}\n```\n\n5. Observe that in
response deprecated `case_4_feature_b` is replaced by\na single feature
(you can also
check\nhttp://localhost:5620/app/management/kibana/spaces/edit/default
to see\nhow it's reflected in UI)\n```http\n{\n \"id\": \"default\",\n
\"name\": \"Default\",\n \"description\": \"This is your default
space!\",\n \"color\": \"#00bfb3\",\n \"initials\": \"D\",\n
\"imageUrl\": \"\",\n \"disabledFeatures\": [\n
\"case_4_feature_b_v2\"\n ],\n \"_reserved\": true\n}\n```\n\n__Required
by:__\nhttps://github.com//pull/202863#discussion_r1892672114\n\n//cc
@davismcphee","sha":"dd3ce0e7f534279f48be8c125853c89aa92969e2","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Security/Spaces","release_note:skip","Feature:Security/Authorization","v9.0.0","backport:prev-minor"],"title":"feat(security):
extend `Feature` definition to support explicit feature
replacements","number":206660,"url":"https://github.com/elastic/kibana/pull/206660","mergeCommit":{"message":"feat(security):
extend `Feature` definition to support explicit feature replacements
(#206660)\n\n## Summary\n\nToday, when a developer deprecates a feature
and replaces its privileges\nwith those of another feature, we
reasonably assume that the new feature\nfully replaces the old one in
all possible contexts - whether in role\nmanagement UIs or in the Spaces
feature toggles visibility UI. However,\nwhen deprecated privileges are
replaced by the privileges of multiple\nfeatures, such as in
[this\ncase](https://github.com/elastic/kibana/pull/202863#discussion_r1892672114)\nwhere
the Discover/Dashboard/Maps feature privileges are replaced by
the\nprivileges of Discover_v2/Dashboard_v2/Maps_v2, respectively,
**and**\nthe privileges of the Saved Query Management feature, the
choice is\nambiguous.\n\nWhich of these features should be treated as
the replacement for the\ndeprecated feature in contexts that deal with
entire features (like the\nSpaces feature toggles visibility UI) rather
than individual privileges\n(like in role management UIs)? Should all
referenced features be\nconsidered replacements? Or just a subset - or
even a single feature? If\nso, which one? Currently, we treat all
referenced features as\nreplacements for the deprecated feature, which
creates problems, as\ndescribed in detail in
[this\ndiscussion](https://github.com/elastic/kibana/pull/202863#discussion_r1892672114).\n\nThis
PR allows developers to customize this behavior by specifying
which\nfeatures Kibana should treat as direct successors to deprecated
features\nin contexts that deal with whole features rather than
individual\nprivileges:\n\n```ts\ndeps.features.registerKibanaFeature({\n
deprecated: {\n notice: 'The feature is deprecated because … well,
there’s a reason.',\n --> replacedBy: ['feature_id_v2'], <--\n },\n id:
'feature_id'\n name: `Case #4 feature ${suffix} (DEPRECATED)`,\n
…\n});\n```\n\n## How to test\n\n1. Run test server\n```bash\nnode
scripts/functional_tests_server.js --config
x-pack/test/security_api_integration/features.config.ts\n```\n\n2.
Execute the following request from the Dev Tools (`case_4_feature_a`\nis
a deprecated feature that is replaced by multiple features
and\n**doesn't use** `deprecated.replacedBy`)\n```http\nPUT
kbn:/api/spaces/space/default?overwrite=true\n{\n \"id\":\"default\",\n
\"name\":\"Default\",\n \"description\":\"This is your default
space!\",\n \"color\":\"#00bfb3\",\n
\"disabledFeatures\":[\"case_4_feature_a\"],\n \"_reserved\":true,\n
\"imageUrl\":\"\",\n \"initials\":\"D\"\n}\n```\n\n3. Observe that in
response deprecated `case_4_feature_a` is replaced by\ntwo features (you
can also
check\nhttp://localhost:5620/app/management/kibana/spaces/edit/default
to see\nhow it's reflected in UI)\n```http\n{\n \"id\": \"default\",\n
\"name\": \"Default\",\n \"description\": \"This is your default
space!\",\n \"color\": \"#00bfb3\",\n \"initials\": \"D\",\n
\"imageUrl\": \"\",\n \"disabledFeatures\": [\n
\"case_4_feature_a_v2\",\n \"case_4_feature_c\"\n ],\n \"_reserved\":
true\n}\n```\n\n4. Execute the following request from the Dev Tools
(`case_4_feature_b`\nis a deprecated feature that is replaced by
multiple features, but\n**uses** `deprecated.replacedBy` to set the
conceptual\nfeature-successor)\n```http\nPUT
kbn:/api/spaces/space/default?overwrite=true\n{\n \"id\":\"default\",\n
\"name\":\"Default\",\n \"description\":\"This is your default
space!\",\n \"color\":\"#00bfb3\",\n
\"disabledFeatures\":[\"case_4_feature_b\"],\n \"_reserved\":true,\n
\"imageUrl\":\"\",\n \"initials\":\"D\"\n}\n```\n\n5. Observe that in
response deprecated `case_4_feature_b` is replaced by\na single feature
(you can also
check\nhttp://localhost:5620/app/management/kibana/spaces/edit/default
to see\nhow it's reflected in UI)\n```http\n{\n \"id\": \"default\",\n
\"name\": \"Default\",\n \"description\": \"This is your default
space!\",\n \"color\": \"#00bfb3\",\n \"initials\": \"D\",\n
\"imageUrl\": \"\",\n \"disabledFeatures\": [\n
\"case_4_feature_b_v2\"\n ],\n \"_reserved\": true\n}\n```\n\n__Required
by:__\nhttps://github.com//pull/202863#discussion_r1892672114\n\n//cc
@davismcphee","sha":"dd3ce0e7f534279f48be8c125853c89aa92969e2"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/206660","number":206660,"mergeCommit":{"message":"feat(security):
extend `Feature` definition to support explicit feature replacements
(#206660)\n\n## Summary\n\nToday, when a developer deprecates a feature
and replaces its privileges\nwith those of another feature, we
reasonably assume that the new feature\nfully replaces the old one in
all possible contexts - whether in role\nmanagement UIs or in the Spaces
feature toggles visibility UI. However,\nwhen deprecated privileges are
replaced by the privileges of multiple\nfeatures, such as in
[this\ncase](https://github.com/elastic/kibana/pull/202863#discussion_r1892672114)\nwhere
the Discover/Dashboard/Maps feature privileges are replaced by
the\nprivileges of Discover_v2/Dashboard_v2/Maps_v2, respectively,
**and**\nthe privileges of the Saved Query Management feature, the
choice is\nambiguous.\n\nWhich of these features should be treated as
the replacement for the\ndeprecated feature in contexts that deal with
entire features (like the\nSpaces feature toggles visibility UI) rather
than individual privileges\n(like in role management UIs)? Should all
referenced features be\nconsidered replacements? Or just a subset - or
even a single feature? If\nso, which one? Currently, we treat all
referenced features as\nreplacements for the deprecated feature, which
creates problems, as\ndescribed in detail in
[this\ndiscussion](https://github.com/elastic/kibana/pull/202863#discussion_r1892672114).\n\nThis
PR allows developers to customize this behavior by specifying
which\nfeatures Kibana should treat as direct successors to deprecated
features\nin contexts that deal with whole features rather than
individual\nprivileges:\n\n```ts\ndeps.features.registerKibanaFeature({\n
deprecated: {\n notice: 'The feature is deprecated because … well,
there’s a reason.',\n --> replacedBy: ['feature_id_v2'], <--\n },\n id:
'feature_id'\n name: `Case #4 feature ${suffix} (DEPRECATED)`,\n
…\n});\n```\n\n## How to test\n\n1. Run test server\n```bash\nnode
scripts/functional_tests_server.js --config
x-pack/test/security_api_integration/features.config.ts\n```\n\n2.
Execute the following request from the Dev Tools (`case_4_feature_a`\nis
a deprecated feature that is replaced by multiple features
and\n**doesn't use** `deprecated.replacedBy`)\n```http\nPUT
kbn:/api/spaces/space/default?overwrite=true\n{\n \"id\":\"default\",\n
\"name\":\"Default\",\n \"description\":\"This is your default
space!\",\n \"color\":\"#00bfb3\",\n
\"disabledFeatures\":[\"case_4_feature_a\"],\n \"_reserved\":true,\n
\"imageUrl\":\"\",\n \"initials\":\"D\"\n}\n```\n\n3. Observe that in
response deprecated `case_4_feature_a` is replaced by\ntwo features (you
can also
check\nhttp://localhost:5620/app/management/kibana/spaces/edit/default
to see\nhow it's reflected in UI)\n```http\n{\n \"id\": \"default\",\n
\"name\": \"Default\",\n \"description\": \"This is your default
space!\",\n \"color\": \"#00bfb3\",\n \"initials\": \"D\",\n
\"imageUrl\": \"\",\n \"disabledFeatures\": [\n
\"case_4_feature_a_v2\",\n \"case_4_feature_c\"\n ],\n \"_reserved\":
true\n}\n```\n\n4. Execute the following request from the Dev Tools
(`case_4_feature_b`\nis a deprecated feature that is replaced by
multiple features, but\n**uses** `deprecated.replacedBy` to set the
conceptual\nfeature-successor)\n```http\nPUT
kbn:/api/spaces/space/default?overwrite=true\n{\n \"id\":\"default\",\n
\"name\":\"Default\",\n \"description\":\"This is your default
space!\",\n \"color\":\"#00bfb3\",\n
\"disabledFeatures\":[\"case_4_feature_b\"],\n \"_reserved\":true,\n
\"imageUrl\":\"\",\n \"initials\":\"D\"\n}\n```\n\n5. Observe that in
response deprecated `case_4_feature_b` is replaced by\na single feature
(you can also
check\nhttp://localhost:5620/app/management/kibana/spaces/edit/default
to see\nhow it's reflected in UI)\n```http\n{\n \"id\": \"default\",\n
\"name\": \"Default\",\n \"description\": \"This is your default
space!\",\n \"color\": \"#00bfb3\",\n \"initials\": \"D\",\n
\"imageUrl\": \"\",\n \"disabledFeatures\": [\n
\"case_4_feature_b_v2\"\n ],\n \"_reserved\": true\n}\n```\n\n__Required
by:__\nhttps://github.com//pull/202863#discussion_r1892672114\n\n//cc
@davismcphee","sha":"dd3ce0e7f534279f48be8c125853c89aa92969e2"}}]}]
BACKPORT-->

Co-authored-by: Aleh Zasypkin <aleh.zasypkin@elastic.co>
@davismcphee davismcphee requested a review from a team as a code owner January 17, 2025 03:29
@davismcphee
Copy link
Contributor Author

@jeramysoucy That makes sense, thanks for the explanation. I updated the suite in x-pack/test/functional/apps/saved_query_management/feature_controls/security.ts (which covers all of the impacted apps) to run the existing tests for the replacement features too, and account for the differences in behaviour. I also added some new tests to make sure we're covering all expected scenarios, and validate that deprecated features disabled in a Space are correctly replaced: 587233d.

@davismcphee
Copy link
Contributor Author

It likely should be updated so the deprecated hidden override can be removed.

@jeramysoucy I also re-added the changes that were reverted here: 034c5db. I'll see what fails in CI tomorrow, might just be some snapshots to update.

@jeramysoucy
Copy link
Contributor

jeramysoucy commented Jan 17, 2025

@davismcphee

It likely should be updated so the deprecated hidden override can be removed.

@jeramysoucy I also re-added the changes that were reverted here: 034c5db. I'll see what fails in CI tomorrow, might just be some snapshots to update.

I did some digging on this, and discovered why the test was failing. The deprecated privileges, not being explicitly hidden, means that they will be included when querying for all registered privileges. I believe we actually want this to happen, so that we can confirm that the deprecated composite features look as expected, because they will still be used by legacy roles.

So you're right, we just need to update the snapshots to include the deprecated features. I tried this out locally, and it works as expected. I can push the updated snapshot for the security solution if you'd like.
I pushed the updated snapshot for security solution in b137d34

cc @azasypkin

@davismcphee
Copy link
Contributor Author

@jeramysoucy Thanks for looking into it and pushing the updated snapshots! Seems like that fixed the CI failures other than some unrelated Cypress ones (running CI again now).

Copy link
Contributor

@mattkime mattkime left a comment

Choose a reason for hiding this comment

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

Approval for codeowner changes BUT I think @elastic/kibana-data-discovery should probably own test/functional/services/saved_query_management_component.ts

Copy link
Contributor

@janmonschke janmonschke left a comment

Choose a reason for hiding this comment

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

Security THI changes lgtm

Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we keep the old roles in this file to ensure that the tests are working as expected with the old roles?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes that makes sense, I've reverted these changes here: 547744d.

Copy link
Contributor

@jeramysoucy jeramysoucy left a comment

Choose a reason for hiding this comment

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

Thanks for your patience on this one! I just had one last question re: the deprecated feature overrides being updated to V2 privileges. We don't think it should have any implications in this specific case, but overrides for deprecated features should remain as they were.

@@ -16,16 +16,40 @@ xpack.features.overrides:
privileges:
### Dashboard's `All` feature privilege should implicitly grant `All` access to Maps and Visualize features.
all.composedOf:
- feature: "maps"
- feature: "maps_v2"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason the original override was changed to reference the new V2 privileges? We'd typically expect the previous overrides to stay as they were.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I may have done this when troubleshooting some YML config issues I was running into originally, but I don't think there's a good reason for it. I reverted those changes here: 3469d55.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like some snapshots failed after this, updated them here: 82727a4.

@banderror banderror requested review from a team and rylnd January 20, 2025 12:06
Copy link
Member

@jgowdyelastic jgowdyelastic left a comment

Choose a reason for hiding this comment

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

ML changes LGTM

@elasticmachine
Copy link
Contributor

elasticmachine commented Jan 21, 2025

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
dashboard 106 105 -1

Async chunks

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

id before after diff
aiops 611.9KB 611.9KB +15.0B
alerting 98.7KB 98.7KB -29.0B
apm 4.0MB 4.0MB +6.0B
cloudSecurityPosture 521.6KB 521.6KB -33.0B
dashboard 624.1KB 624.0KB -123.0B
dataVisualizer 598.8KB 598.8KB +12.0B
discover 844.0KB 843.9KB -82.0B
eventAnnotationListing 252.4KB 252.5KB +3.0B
infra 1.2MB 1.2MB -163.0B
inventory 228.0KB 228.0KB +6.0B
lens 1.6MB 1.6MB -26.0B
maps 3.1MB 3.1MB -69.0B
ml 4.8MB 4.8MB +30.0B
monitoring 515.2KB 515.2KB +6.0B
osquery 1.0MB 1.0MB +6.0B
presentationUtil 77.3KB 77.3KB +12.0B
securitySolution 21.2MB 21.2MB -80.0B
slo 885.8KB 885.7KB -42.0B
stackAlerts 75.1KB 75.0KB -29.0B
transform 472.1KB 472.1KB +6.0B
triggersActionsUi 1.7MB 1.7MB -91.0B
unifiedHistogram 71.0KB 71.0KB +3.0B
unifiedSearch 383.3KB 383.4KB +108.0B
visualizations 354.2KB 354.1KB -91.0B
total -645.0B

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
unifiedSearch 21 20 -1

Page load bundle

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

id before after diff
cases 162.2KB 162.2KB +24.0B
discover 45.2KB 45.2KB +9.0B
discoverEnhanced 7.1KB 7.1KB +6.0B
lens 50.3KB 50.3KB +15.0B
maps 51.8KB 51.8KB +12.0B
reporting 47.7KB 47.8KB +12.0B
triggersActionsUi 130.2KB 130.2KB -29.0B
unifiedSearch 44.7KB 44.6KB -95.0B
visualizations 62.6KB 62.6KB +9.0B
total -37.0B
Unknown metric groups

API count

id before after diff
@kbn/core-capabilities-common 5 1 -4
dashboard 110 109 -1
total -5

History

cc @kertal @davismcphee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting ci:project-deploy-observability Create an Observability project release_note:breaking Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team Team:obs-ux-management Observability Management User Experience Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.