elastic / kibana

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

[Fleet] Expose Fleet services used by Osquery with authorization check #131240

Open juliaElastic opened 2 years ago

juliaElastic commented 2 years ago

When Osquery introduced RBAC, they have used a fleet wrapper and added authorization check on their side. Fleet should control the access to its services, instead of letting each plugin implement their authz check.

Goal:

Follow the pattern done here: https://github.com/elastic/kibana/pull/119017

Similar work is being done for Security plugin here: https://github.com/elastic/kibana/pull/131233

elasticmachine commented 2 years ago

Pinging @elastic/fleet (Team:Fleet)

juliaElastic commented 2 years ago

@melissaburpo This is the issue about refactoring the Osquery usages. Can we get a confirmation on which Fleet services/APIs are being used from Osquery to include in the scope of this work? cc @joshdover

melissaburpo commented 2 years ago

Hi @juliaElastic, thanks for the ping. @patrykkopycinski or @tomsonpl - can either of you help answer this one? I'm not sure specifically.

Can we get a confirmation on which Fleet services/APIs are being used from Osquery to include in the scope of this work?

patrykkopycinski commented 2 years ago

@juliaElastic we're relying currently on

https://github.com/elastic/kibana/blob/main/x-pack/plugins/osquery/server/lib/osquery_app_context_services.ts#L51-L65

Please let me know if that helps

juliaElastic commented 2 years ago

@patrykkopycinski yes, thanks!