-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Making security
a first class citizen of Kibana Core examples
#186574
Comments
Reporting uses @tsullivan will search for a client-side use case as part of On-Week June 2024. |
Pinging @elastic/kibana-core (Team:Core) |
Pinging @elastic/kibana-security (Team:Security) |
I have found a few plugins throughout Kibana that call
Some additional areas that
I'd like to focus on an area or areas where updating the code to use |
Part of #186574 Background: This PR serves as an example of a plugin migrating away from depending on the Security plugin, which is a high priority effort for the last release before 9.0. The Maps plugin uses the `authc.getCurrentUser` in the `es_search_source` utility. ### Checklist Delete any items that are not applicable to this PR. - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
…rity (#186918) Part of #186574 Background: This PR serves as an example of a plugin migrating away from depending on the Security plugin, which is a high priority effort for the last release before 9.0. The Data Visualizer plugin uses the `authc.getCurrentUser` method as a means to use create FileBeat configuration example content. ### Checklist Delete any items that are not applicable to this PR. - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
) Part of #186574 Background: This PR serves as an example of a plugin migrating away from depending on the Security plugin, which is a high priority effort for the last release before 9.0. The Files plugin uses the `authc.getCurrentUser` method to attribute the current user to files that are created in the system. ### Checklist Delete any items that are not applicable to this PR. - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
…urity (#186917) Part of #186574 Background: This PR serves as an example of a plugin migrating away from depending on the Security plugin, which is a high priority effort for the last release before 9.0. The Image Embeddable plugin uses the `authc.getCurrentUser` method as a means to allow the user to delete image files that are attributed to them. ### Checklist Delete any items that are not applicable to this PR. - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
…curity (#186928) Part of #186574 Background: This PR serves as an example of a plugin migrating away from depending on the Security plugin, which is a high priority effort for the last release before 9.0. The Elastic Assistant plugin uses the `authc.getCurrentUser` indirectly in several data clients in `x-pack/plugins/elastic_assistant/server/routes/request_context_factory.ts`. ### Checklist Delete any items that are not applicable to this PR. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
…7121) ## Summary Part of #186574 Updates imports for types available from the core-security packages. Co-authored-by: Kibana Machine <[email protected]>
…186913) ## Summary Part of #186574 Background: This PR is an example of a plugin migrating away from depending on the Security plugin, which is a high-priority effort for the last release before 9.0. The Reporting plugin uses `authc.getCurrentUser` from the security plugin's start contract on the server side. This PR migrates `authc.getCurrentUser` from the security plugin start contract to the core security service. ### Checklist - [X] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Tim Sullivan <[email protected]>
#187124) ## Summary Part of #186574 Background: This PR is an example of a plugin migrating away from depending on the Security plugin, which is a high-priority effort for the last release before 9.0. The Cases plugin uses authc.getCurrentUser from the security plugin's start contract on the server side. This PR migrates authc.getCurrentUser from the security plugin start contract to the core security service. Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: Kibana Machine <[email protected]>
…#187020) Part of #186574 ## Summary This PR migrates the Alerting Plugin's server-side code that consumes `authc.getCurrentUser` to use coreContext.security. Background: This PR serves as an example of a plugin migrating away from depending on the Security plugin, which is a high priority effort for the last release before 9.0. ### Checklist Delete any items that are not applicable to this PR. - [X] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
…rity (#187023) Part of #186574 ## Summary This PR migrates the Cloud Defend Plugin's route handler that consumes `authc.getCurrentUser` to use `coreContext.security`. Background: This PR serves as an example of a plugin migrating away from depending on the Security plugin, which is a high priority effort for the last release before 9.0. ### Checklist Delete any items that are not applicable to this PR. - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: kibanamachine <[email protected]>
#187179) Part of #186574 ## Summary This PR migrates the Lists Plugin's `ListsRequestHandlerContext`, which consumes `authc.getCurrentUser`, to use `coreStart.security`. Background: This PR serves as an example of a plugin migrating away from depending on the Security plugin, which is a high priority effort for the last release before 9.0. ### Checklist Delete any items that are not applicable to this PR. - [X] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: kibanamachine <[email protected]>
…ity (#186924) Part of #186574 Background: This PR serves as an example of a plugin migrating away from depending on the Security plugin, which is a high priority effort for the last release before 9.0. The Actions plugin uses the `authc.getCurrentUser` method to attribute the current user to persisted actions that are created in the system. ### Checklist Delete any items that are not applicable to this PR. - [X] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
Needed for #187306 and [probably more to come](#186574). Expose authenticated user mock and type from core-security server & browser mocks. Exposing the mock from Core avoids dependencies on the Security Plugin remaining just for mocks. It also helps avoid creating duplicates specifically for tests. --------- Co-authored-by: Elastic Machine <[email protected]>
…usage to coreStart.security (#187189) Part of #186574 ## Summary This PR migrates the method to access a Serverless Search view model field, which consumes `authc.getCurrentUser`, to use `coreStart.security`. Background: This PR serves as an example of a plugin migrating away from depending on the Security plugin, which is a high priority effort for the last release before 9.0. ### Checklist Delete any items that are not applicable to this PR. - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
…t.security (#187192) Part of #186574 ## Summary This PR migrates the method to access an APM Plugin view model field, which consumes `authc.getCurrentUser`, to use `coreStart.security`. Background: This PR serves as an example of a plugin migrating away from depending on the Security plugin, which is a high priority effort for the last release before 9.0. ### Checklist Delete any items that are not applicable to this PR. - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
…ecurity (#187180) Part of #186574 ## Summary This PR migrates the Logstash Plugin's route handler for saving a pipeline, which consumes `authc.getCurrentUser`, to use `coreContext.security`. Background: This PR serves as an example of a plugin migrating away from depending on the Security plugin, which is a high priority effort for the last release before 9.0. ### Checklist Delete any items that are not applicable to this PR. - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: kibanamachine <[email protected]>
…#187024) Part of #186574 ## Summary This PR migrates the Encrypted Saved Object Plugin's route handler that consumes `authc.getCurrentUser` to use `coreStart.security`. Background: This PR serves as an example of a plugin migrating away from depending on the Security plugin, which is a high priority effort for the last release before 9.0. ### Checklist Delete any items that are not applicable to this PR. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: kibanamachine <[email protected]>
) Part of #186574 Background: This PR serves as an example of a plugin migrating away from depending on the Security plugin, which is a high priority effort for the last release before 9.0. ### Checklist Delete any items that are not applicable to this PR. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
…gin to core security service (#189713) ## Summary Part of #186574 Closes #189714 Background: This PR is an example of a plugin migrating away from depending on the Security plugin, which is a high-priority effort for the last release before 9.0. The Enterprise search plugin uses authc.apiKeys.create from the security plugin's start contract on the server side. For more context, the PR which exposes the API keys service from core is here: #186910 This PR migrates the usage from the security plugin start contract to the core security service. --------- Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: kibanamachine <[email protected]>
Closing as an ongoing issue to be handled during the implementations |
Related to #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.The text was updated successfully, but these errors were encountered: