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

Migrate Enterprise search plugin authc dependencies from security plugin to core security service #189713

Conversation

SiddharthMantri
Copy link
Contributor

@SiddharthMantri SiddharthMantri commented Aug 1, 2024

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.

@SiddharthMantri
Copy link
Contributor Author

@elasticmachine merge upstream

@SiddharthMantri SiddharthMantri added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting Team:EnterpriseSearch labels Aug 1, 2024
@SiddharthMantri SiddharthMantri marked this pull request as ready for review August 1, 2024 11:58
@SiddharthMantri SiddharthMantri requested a review from a team as a code owner August 1, 2024 11:58
@elasticmachine
Copy link
Contributor

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


const createResponse = await createApiKey(request, security, indexName, keyName);
const createResponse = await coreSecurity.authc.apiKeys.create({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather do the same changes in the createApiKey function as we have some tests there. Where if you change the place what is called rest should be same anyways.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@efegurkan Sorry for the delayed response. Addressed in 883ea86

Copy link
Member

@efegurkan efegurkan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, one CI is fixed we can merge.

Thank you for handling this <3

@SiddharthMantri
Copy link
Contributor Author

@elasticmachine merge upstream

@TinaHeiligers
Copy link
Contributor

@SiddharthMantri are you going to merge or abandon this PR?

@SiddharthMantri
Copy link
Contributor Author

@TinaHeiligers I haven't had the chance to get back to fixing the test imports. I'll get to it asap and merge it in

@SiddharthMantri
Copy link
Contributor Author

@elasticmachine merge upstream

@SiddharthMantri SiddharthMantri enabled auto-merge (squash) August 30, 2024 09:39
@SiddharthMantri SiddharthMantri merged commit 74a551e into elastic:main Aug 30, 2024
19 checks passed
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

References to deprecated APIs

id before after diff
enterpriseSearch 21 17 -4

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
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team:EnterpriseSearch v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Enterprise search plugin to use API keys from core.security
6 participants