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

Use savedObjects provided by the platform instead of legacy shim. #53679

Merged
merged 1 commit into from
Dec 20, 2019

Conversation

azasypkin
Copy link
Member

Use savedObjects provided by the platform instead of legacy shim in Security plugin.

@azasypkin azasypkin added chore Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! release_note:skip Skip the PR/issue when compiling release notes Feature:NP Migration v7.6.0 labels Dec 20, 2019
@azasypkin azasypkin requested a review from a team as a code owner December 20, 2019 09:07
@elasticmachine
Copy link
Contributor

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

@@ -7,7 +7,7 @@
import { LegacyAPI } from '../plugin';

export class SecurityAuditLogger {
constructor(private readonly auditLogger: LegacyAPI['auditLogger']) {}
constructor(private readonly getAuditLogger: () => LegacyAPI['auditLogger']) {}
Copy link
Member Author

@azasypkin azasypkin Dec 20, 2019

Choose a reason for hiding this comment

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

note: made this to be similar to I've done in ESO plugin and also be able to instantiate this logger (and hence initialize Saved Objects wrappers) outside of registerLegacyAPI method.

@azasypkin azasypkin force-pushed the issue-xxx-np-security branch from 0ca05ef to 0393fa7 Compare December 20, 2019 10:03
authz,
legacyAPI: { savedObjects },
}: SetupSavedObjectsParams) {
export function setupSavedObjects({ auditLogger, authz, savedObjects }: SetupSavedObjectsParams) {
const getKibanaRequest = (request: KibanaRequest | LegacyRequest) =>
Copy link
Member Author

@azasypkin azasypkin Dec 20, 2019

Choose a reason for hiding this comment

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

note: according to Rudolf we still need to keep this conversion code here as core doesn't do that for us even though typings for setClientFactory and addClientWrapper say opposite. It should be fixed soon and we can git rid of this function as well.

@azasypkin azasypkin requested a review from legrego December 20, 2019 10:47
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

History

  • 💚 Build #16861 succeeded 0ca05ef0c42b23562b5c9009446c2a2549220b04

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

Copy link
Member

@legrego legrego left a comment

Choose a reason for hiding this comment

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

LGTM! It's always nice when we can delete more code than we add 😄

@azasypkin
Copy link
Member Author

7.x/7.6.0: 78d2362

jkelastic pushed a commit to jkelastic/kibana that referenced this pull request Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported chore Feature:NP Migration release_note:skip Skip the PR/issue when compiling release notes Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! v7.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants