Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ public final class SecurityHttpSettings {
private SecurityHttpSettings() {}

public static void overrideSettings(Settings.Builder settingsBuilder, Settings settings) {
// HTTP response compression over TLS risks side-channel vulnerabilities such as BREACH[1] if ES is used in very specific ways. We
// cannot be sure that ES is not being used in such a manner here, so we disable compression by default when TLS is enabled for the
// REST layer and rely on the user explicitly setting `http.compression: true` to confirm that they do not have a vulnerable
// usage pattern.
//
// [1] https://www.breachattack.com/
if (HTTP_SSL_ENABLED.get(settings) && SETTING_HTTP_COMPRESSION.exists(settings) == false) {
settingsBuilder.put(SETTING_HTTP_COMPRESSION.getKey(), false);
}
Expand Down