Error logs when clients connect over HTTP instead of HTTPS #77391
Labels
bug
Fixes for quality problems that affect the customer experience
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Team:Security
Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!
Kibana version:
7.9 (tested, this likely affects many older versions)
Describe the bug:
When Kibana has HTTPS enabled, but a client tries to connect over HTTP, the client gets
redirected to HTTPS as expectedan empty response as expected*. However, ugly error messages show up in the logs:We have code that is supposed to downgrade these error messages to the debug log level:
kibana/src/legacy/server/logging/log_interceptor.js
Lines 126 to 128 in 003fcb1
However, that code is broken. It was originally introduced in Kibana 6.0 (#11209), back when we were using Node 6.10.2 and Hapi 14.2.0. Now, we are using Node 10.22.0 (which includes bundled OpenSSL 1.1.1) and Hapi 17.6.0.
Steps to reproduce:
server.ssl.enabled: true
)Expected behavior:
These error messages should be downgraded to the debug log level. The error message has simply changed at some point since this log interceptor was originally added.
Any additional context:
I added some additional logging to the log interceptor to verify:
Resulting logs show this:
So, it looks like this is an easy fix, but unfortunately we'll still have to resort to error message matching.
Note: tagging Platform as they are technically the code owner, but also Security because I'm about to submit a PR to fix it 🙂
*Update: redirect does not happen / has nothing to do with it, that was just my browser being helpful.
The text was updated successfully, but these errors were encountered: