-
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
[Actions Plugin] Use server-side authc.getCurrentUser from core.security #186924
[Actions Plugin] Use server-side authc.getCurrentUser from core.security #186924
Conversation
@@ -645,7 +645,6 @@ export class ActionsPlugin implements Plugin<PluginSetupContract, PluginStartCon | |||
request, | |||
authorizationMode, | |||
authorization: this.security?.authz, | |||
authentication: this.security?.authc, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The authentication
property was unused and used the deprecated access method to the APIs
91a9e28
to
5c4d2c8
Compare
Pinging @elastic/response-ops (Team:ResponseOps) |
authentication.getCurrentUser.mockReturnValueOnce({ | ||
username: 'some-user', | ||
} as unknown as AuthenticatedUser); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This piece of code appears to have been unused boilerplate.
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]History
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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.