elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.63k stars 8.23k forks source link

[Fleet] Decouple integration installation from fleet privilege #183020

Open flash1293 opened 6 months ago

flash1293 commented 6 months ago

Currently, it's only possible to install package assets if the current user has fleet permissions: https://github.com/elastic/kibana/blob/b913e3f143a7e69400f99fc76cb0ebf0174f8e82/x-pack/plugins/fleet/common/authz.ts#L156

This is done because the installPackages key is used for installing ES/Kibana assets as well as adding integrations to specific agent policies.

To make it possible to allow clients to only install package assets without fleet permissions, installPackages should be split up into separate keys.

elasticmachine commented 6 months ago

Pinging @elastic/fleet (Team:Fleet)

flash1293 commented 6 months ago

cc @kpollich as discussed via chat.

thomheymann commented 5 months ago

Discussed this further and decided to:

  1. add the new key installPackagesAssets
  2. use it for the server side stuff (methods and REST apis) that don't touch fleet things
  3. on the client side to guard the UI, still use installPackages (as this implies both integrations and fleet permissions)
thomheymann commented 5 months ago

Permissions changes have been reverted from https://github.com/elastic/kibana/pull/184167 so reopening issue

kpollich commented 5 months ago

Adding the approach we discussed offline here:

flash1293 commented 4 months ago

@kpollich just to make sure it doesn't fall through the cracks - you got this on the fleet team list right?

kpollich commented 4 months ago

just to make sure it doesn't fall through the cracks - you got this on the fleet team list right?

Yes this is scheduled and prioritized on the Fleet side.

flash1293 commented 4 months ago

Thanks, I'll remove from our board then 👍