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

[Backport 7.x] Do not load SSLService in plugin contructor #50519

Merged

Conversation

tvernum
Copy link
Contributor

@tvernum tvernum commented Dec 30, 2019

XPackPlugin created an SSLService within the plugin contructor.
This has 2 negative consequences:

  1. The service may be constructed based on a partial view of settings.
    Other plugins are free to add setting values via the
    additionalSettings() method, but this (necessarily) happens after
    plugins have been constructed.

  2. Any exceptions thrown during the plugin construction are handled
    differently than exceptions thrown during "createComponents".
    Since SSL configurations exceptions are relatively common, it is
    far preferable for them to be thrown and handled as part of the
    createComponents flow.

This commit moves the creation of the SSLService to
XPackPlugin.createComponents, and alters the sequence of some other
steps to accommodate this change.

Backport of: #49667

XPackPlugin created an SSLService within the plugin contructor.
This has 2 negative consequences:

1. The service may be constructed based on a partial view of settings.
   Other plugins are free to add setting values via the
   additionalSettings() method, but this (necessarily) happens after
   plugins have been constructed.

2. Any exceptions thrown during the plugin construction are handled
   differently than exceptions thrown during "createComponents".
   Since SSL configurations exceptions are relatively common, it is
   far preferable for them to be thrown and handled as part of the
   createComponents flow.

This commit moves the creation of the SSLService to
XPackPlugin.createComponents, and alters the sequence of some other
steps to accommodate this change.

Relates: elastic#44536
Backport of: elastic#49667
@tvernum tvernum merged commit cad0f6b into elastic:7.x Dec 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant