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

Set HTTP2 as default if SSL is enabled and add deprecation log if SSL is not enabled or protocol is set to HTTP1 #204384

Merged
merged 16 commits into from
Jan 3, 2025

Conversation

jesuswr
Copy link
Contributor

@jesuswr jesuswr commented Dec 16, 2024

Summary

resolves #194067

Set HTTP2 as default if ssl is enabled.

resolves #194065

Add deprecation log if ssl is not enabled or if protocol is set to http1

Screenshot 2024-12-17 at 17 06 50 Screenshot 2024-12-17 at 17 06 22

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

Identify risks

Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.

@jesuswr jesuswr requested a review from a team as a code owner December 16, 2024 12:52
@jesuswr jesuswr self-assigned this Dec 16, 2024
@jesuswr jesuswr added Feature:http 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 labels Dec 16, 2024
@elasticmachine
Copy link
Contributor

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

@jesuswr jesuswr marked this pull request as draft December 16, 2024 16:26
@jesuswr jesuswr marked this pull request as ready for review December 17, 2024 09:58
@jesuswr jesuswr requested a review from a team December 17, 2024 09:58
@jesuswr jesuswr added the docs label Dec 17, 2024
@@ -26,14 +26,15 @@ describe('configuration deprecations', () => {
});

if (getFips() === 0) {
it('should not log deprecation warnings for default configuration', async () => {
it('should log one warning for default configuration, the http/tls deprecation warning', async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is it ok to have deprecation warnings on default config? Seems ok since the issue is to log when http2 or tls are not enabled but tls can't be enabled by default

Copy link
Contributor

Choose a reason for hiding this comment

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

Generally we wouldn't want to log a deprecation right "out of the box" after installing Kibana. But given that TLS is such an important security configuration I think this is fine

addDeprecation({
level: 'warning',
title: `Consider enabling TLS and using HTTP/2 to improve security and performance.`,
configPath: `${fromPath}.protocol,${fromPath}.ssl.enabled`,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added one deprecation for both config values since they are related

@@ -26,14 +26,15 @@ describe('configuration deprecations', () => {
});

if (getFips() === 0) {
it('should not log deprecation warnings for default configuration', async () => {
it('should log one warning for default configuration, the http/tls deprecation warning', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Generally we wouldn't want to log a deprecation right "out of the box" after installing Kibana. But given that TLS is such an important security configuration I think this is fine

@rudolf rudolf added release_note:enhancement and removed release_note:skip Skip the PR/issue when compiling release notes labels Dec 17, 2024
@jesuswr jesuswr requested a review from a team as a code owner December 18, 2024 09:15
@rudolf
Copy link
Contributor

rudolf commented Dec 18, 2024

@lcawl Can you help us feature this in the 9 release notes (or breaking changes?). It's not a breaking change per se, but there is some risk that users with more exotic deployment configurations where Kibana is running behind a proxy could see problems. So out of caution we need to just make them aware of this so that they can test their deployment setup.

Something like:

The Kibana server will now default to using the HTTP2 protocol (when TLS is enabled) for improved browser loading times. If your Kibana server is hosted behind a load balancer or reverse proxy we recommend testing your deployment configuration before upgrading to 9.0.

Copy link
Contributor

@rudolf rudolf left a comment

Choose a reason for hiding this comment

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

Some suggestions to further nudge users away from setting http1

docs/setup/settings.asciidoc Outdated Show resolved Hide resolved
@jesuswr jesuswr requested a review from lcawl December 18, 2024 11:25
@lcawl
Copy link
Contributor

lcawl commented Dec 18, 2024

@lcawl Can you help us feature this in the 9 release notes (or breaking changes?). It's not a breaking change per se, but there is some risk that users with more exotic deployment configurations where Kibana is running behind a proxy could see problems. So out of caution we need to just make them aware of this so that they can test their deployment setup.

If it's not a breaking change, it could perhaps be included in the v9 release notes as a "known issue" like https://www.elastic.co/guide/en/kibana/current/release-notes-8.0.0.html#known-issue-8.0.0 or https://www.elastic.co/guide/en/kibana/7.17/release-notes-7.17.0.html#known-issue-7.17.0

@jesuswr
Copy link
Contributor Author

jesuswr commented Dec 19, 2024

@lcawl how can I include this as a "known issue"?

@jloleysens
Copy link
Contributor

jloleysens commented Dec 19, 2024

@lcawl how can I include this as a "known issue"?

@jesuswr I believe you can add an entry to docs/upgrade-notes.asciidoc, there is a template and sections in there. Might be missing something else @lcawl has in mind though.

@jesuswr
Copy link
Contributor Author

jesuswr commented Dec 19, 2024

Thanks! @jloleysens

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/doc-links 80 81 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
aiAssistantManagementSelection 93.2KB 93.2KB +54.0B
lists 145.6KB 145.6KB +54.0B
total +108.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
core 447.7KB 447.7KB +54.0B
Unknown metric groups

API count

id before after diff
@kbn/doc-links 80 81 +1

History

cc @jesuswr

Copy link
Contributor

@lcawl lcawl left a comment

Choose a reason for hiding this comment

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

Added a suggestion and comment about potentially dropping the extra "Known issue" section, but otherwise docs LTGM

docs/upgrade-notes.asciidoc Outdated Show resolved Hide resolved
docs/upgrade-notes.asciidoc Show resolved Hide resolved
@jesuswr jesuswr merged commit 1b1d64b into elastic:main Jan 3, 2025
8 checks passed
@jesuswr jesuswr deleted the set-http2-as-default-is-ssl-enabled branch January 3, 2025 09:21
@rudolf rudolf changed the title Set HTTP2 as default is SSL is enabled and add deprecation log if SSL is not enabled or protocol is set to HTTP1 Set HTTP2 as default if SSL is enabled and add deprecation log if SSL is not enabled or protocol is set to HTTP1 Jan 3, 2025
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Jan 13, 2025
… is not enabled or protocol is set to HTTP1 (elastic#204384)

## Summary

resolves elastic#194067

Set HTTP2 as default if ssl is enabled. 

resolves elastic#194065

Add deprecation log if ssl is not enabled or if protocol is set to http1

<img width="1665" alt="Screenshot 2024-12-17 at 17 06 50"
src="https://github.com/user-attachments/assets/3bc7ff57-1079-4a27-90d2-88f3e09093d6"
/>

<img width="1727" alt="Screenshot 2024-12-17 at 17 06 22"
src="https://github.com/user-attachments/assets/d5489705-6cd6-4e09-8327-fdd0f54292ea"
/>


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Rudolf Meijering <[email protected]>
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 docs Feature:http release_note:enhancement Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v9.0.0
Projects
None yet
6 participants