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 getCurrentUser calls in reporting to core security service #186913

Merged

Conversation

TinaHeiligers
Copy link
Contributor

@TinaHeiligers TinaHeiligers commented Jun 25, 2024

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

@TinaHeiligers
Copy link
Contributor Author

@elasticmachine merge upstream

@tsullivan
Copy link
Member

/ci

@TinaHeiligers TinaHeiligers marked this pull request as ready for review June 25, 2024 20:28
@TinaHeiligers TinaHeiligers requested a review from a team as a code owner June 25, 2024 20:28
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-reporting-services (Team:Reporting Services)

@tsullivan tsullivan added release_note:skip Skip the PR/issue when compiling release notes Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) labels Jun 25, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

Copy link
Member

@tsullivan tsullivan left a comment

Choose a reason for hiding this comment

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

Left a minor comment

@TinaHeiligers
Copy link
Contributor Author

@elasticmachine merge upstream

@TinaHeiligers TinaHeiligers marked this pull request as draft June 25, 2024 23:29
@TinaHeiligers TinaHeiligers force-pushed the kbn-186574-reporting-authc-migration branch from 9d35eb4 to ad2787c Compare June 25, 2024 23:31
@TinaHeiligers
Copy link
Contributor Author

@elasticmachine merge upstream

@TinaHeiligers TinaHeiligers force-pushed the kbn-186574-reporting-authc-migration branch from 8eb8170 to 4aa7799 Compare June 27, 2024 01:01
@TinaHeiligers
Copy link
Contributor Author

/ci

@TinaHeiligers TinaHeiligers force-pushed the kbn-186574-reporting-authc-migration branch from 8b419dd to 75e6e9e Compare June 27, 2024 01:26
@TinaHeiligers
Copy link
Contributor Author

/ci

@TinaHeiligers

This comment was marked as outdated.

@TinaHeiligers
Copy link
Contributor Author

/ci

@TinaHeiligers
Copy link
Contributor Author

@elasticmachine merge upstream

@TinaHeiligers
Copy link
Contributor Author

/ci

@TinaHeiligers TinaHeiligers marked this pull request as ready for review June 27, 2024 22:13
@TinaHeiligers TinaHeiligers requested a review from tsullivan June 27, 2024 22:14
Copy link
Member

@tsullivan tsullivan left a comment

Choose a reason for hiding this comment

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

Requesting some changes, mostly regarding the naming from security to securityService on the ReportingInternalStart interface. I have found that using securityService in the naming helps avoid confusion in another similar PR: https://github.com/elastic/kibana/pull/187042/files#diff-5588369e40efa592434c68980e8988088d1977962cf5601f24827d69dd34b97a

x-pack/plugins/reporting/server/core.ts Outdated Show resolved Hide resolved
x-pack/plugins/reporting/server/core.ts Outdated Show resolved Hide resolved
x-pack/plugins/reporting/server/routes/common/get_user.ts Outdated Show resolved Hide resolved
x-pack/plugins/reporting/server/types.ts Outdated Show resolved Hide resolved
x-pack/plugins/reporting/server/plugin.ts Outdated Show resolved Hide resolved
x-pack/plugins/reporting/server/types.ts Outdated Show resolved Hide resolved
@TinaHeiligers
Copy link
Contributor Author

Requesting some changes, mostly regarding the naming from security to securityService on the ReportingInternalStart interface. I have found that using securityService in the naming helps avoid confusion in another similar PR: #187042 (files)

@tsullivan I renamed security to securityService in 36755b3.

92ba1ff and 4ef31f0 handles updating the tests accordingly.

Please take another look.

@TinaHeiligers TinaHeiligers requested a review from tsullivan June 28, 2024 18:14
Copy link
Member

@tsullivan tsullivan left a comment

Choose a reason for hiding this comment

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

LGTM

@TinaHeiligers TinaHeiligers enabled auto-merge (squash) June 28, 2024 18:37
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

References to deprecated APIs

id before after diff
reporting 19 17 -2

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@TinaHeiligers TinaHeiligers merged commit bebb273 into elastic:main Jun 28, 2024
16 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jun 28, 2024
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:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants