elastic / kibana

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

Making `security` a first class citizen of Kibana Core examples #186574

Open TinaHeiligers opened 2 weeks ago

TinaHeiligers commented 2 weeks ago

Related to https://github.com/elastic/kibana/issues/174578 Create example migrations from security plugin APIs to core.security APIs.

Find and migrate a plugin's getCurrentUser a) on the server side via start contract, b) on the server side close to a HTTP handler where using it from the request context would have been better, c) on the client side, and d) If getCurrentUser is the only dependency on the security plugin, remove the dependency.

TinaHeiligers commented 2 weeks ago

Reporting uses getCurrentUser and licensing from the Security Plugin. I'll migrate getCurrentUser as part of On-Week (June 2024). We have to wait for licensing to be exposed from Core before completely migrating off of (and removing) the security Plugin.

@tsullivan will search for a client-side use case as part of On-Week June 2024.

elasticmachine commented 2 weeks ago

Pinging @elastic/kibana-core (Team:Core)

elasticmachine commented 2 weeks ago

Pinging @elastic/kibana-security (Team:Security)

tsullivan commented 1 week ago

I have found a few plugins throughout Kibana that call security.authc.getCurrentUser from browser-side code.

Some additional areas that security.authc is used in browser-side code:

I'd like to focus on an area or areas where updating the code to use core.security APIs will allow me to remove the security dependency from a plugin.