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

Capabilities: run the switchers in parallel #152982

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

pgayvallet
Copy link
Contributor

Summary

Related to #146881

jeramysoucy added a commit that referenced this pull request Apr 20, 2023
…ault behaviors (#154098)

Closes #153817

## Summary

This PR implements logical checks within the security plugin's
capabilities switcher to account for features that opt out of the Kibana
security model (e.g. Enterprise Search features). It also more
explicitly handles default cases (when a feature is neither a Kibana or
ES feature), exclusions (features handled exclusively by other plugins),
and the catalogue feature (we now qualify each catalogue feature
capability). In these cases (opt-out, default, exclusion, etc.), the
capabilities switcher will ignore the capability and neither enable nor
disable it (see detailed list below).

We are now effectively ignoring only these:
- `spaces` feature ID (handled by spaces plugin capabilities switcher)
- `fileUpload` feature ID (handled by file_upload plugin capabilities
switcher)
- `catalogue` capabilities that are not 'spaces' and are not referenced
by at least one Kibana or ES feature
- `navLinks` that are not referenced by at least one Kibana feature
- Anything that is not a global settings, management, catalogue, nav
link, Kibana, or ES feature

On the flip side we always affect everything under the `management`
feature.

This PR _should_ unblock the ability to implement parallel execution of
capabilities switchers, #152982.


### Related Tests
-
x-pack/plugins/security/server/authorization/disable_ui_capabilities.test.ts
- x-pack/test/ui_capabilities/security_and_spaces/config.ts
- x-pack/test/functional/apps/home/config.ts

---------

Co-authored-by: kibanamachine <[email protected]>
@kibana-ci
Copy link
Collaborator

kibana-ci commented Sep 19, 2023

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #27 / Home page feature controls security global all privileges shows all available solutions
  • [job] [logs] FTR Configs #27 / Home page feature controls security global all privileges shows all available solutions
  • [job] [logs] FTR Configs #13 / Machine Learning system ml_capabilities in spaces get capabilities should get viewer capabilities - space without ML
  • [job] [logs] FTR Configs #13 / Machine Learning system ml_capabilities in spaces get capabilities should get viewer capabilities - space without ML
  • [job] [logs] FTR Configs #54 / ui capabilities catalogue dual_privileges_all at everything_space
  • [job] [logs] FTR Configs #54 / ui capabilities catalogue dual_privileges_all at everything_space

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants