Skip to content

Commit

Permalink
Merge branch '7.9' into backport/7.9/pr-77389
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine committed Sep 15, 2020
2 parents 8379c5c + 94985ed commit 8863983
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
6 changes: 0 additions & 6 deletions src/dev/ci_setup/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ echo " -- TEST_ES_SNAPSHOT_VERSION='$TEST_ES_SNAPSHOT_VERSION'"
echo " -- installing node.js dependencies"
yarn kbn bootstrap --prefer-offline

###
### ensure Chromedriver install hook is triggered
### when modules are up-to-date
###
node node_modules/chromedriver/install.js

###
### Download es snapshots
###
Expand Down
14 changes: 7 additions & 7 deletions src/dev/ci_setup/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,13 @@ export CYPRESS_DOWNLOAD_MIRROR="https://us-central1-elastic-kibana-184716.cloudf
export CHECKS_REPORTER_ACTIVE=false

# This is mainly for release-manager builds, which run in an environment that doesn't have Chrome installed
# if [[ "$(which google-chrome-stable)" || "$(which google-chrome)" ]]; then
# echo "Chrome detected, setting DETECT_CHROMEDRIVER_VERSION=true"
# export DETECT_CHROMEDRIVER_VERSION=true
# export CHROMEDRIVER_FORCE_DOWNLOAD=true
# else
# echo "Chrome not detected, installing default chromedriver binary for the package version"
# fi
if [[ "$(which google-chrome-stable)" || "$(which google-chrome)" ]]; then
echo "Chrome detected, setting DETECT_CHROMEDRIVER_VERSION=true"
export DETECT_CHROMEDRIVER_VERSION=true
export CHROMEDRIVER_FORCE_DOWNLOAD=true
else
echo "Chrome not detected, installing default chromedriver binary for the package version"
fi

### only run on pr jobs for elastic/kibana, checks-reporter doesn't work for other repos
if [[ "$ghprbPullId" && "$ghprbGhRepository" == 'elastic/kibana' ]] ; then
Expand Down
8 changes: 6 additions & 2 deletions src/legacy/server/logging/log_interceptor.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
import Stream from 'stream';
import { get, isEqual } from 'lodash';

const GET_CLIENT_HELLO = /GET_CLIENT_HELLO:http/;
/**
* Matches error messages when clients connect via HTTP instead of HTTPS; see unit test for full message. Warning: this can change when Node
* and its bundled OpenSSL binary are upgraded.
*/
const OPENSSL_GET_RECORD_REGEX = /ssl3_get_record:http/;

function doTagsMatch(event, tags) {
return isEqual(get(event, 'tags'), tags);
Expand Down Expand Up @@ -124,7 +128,7 @@ export class LogInterceptor extends Stream.Transform {
}

downgradeIfHTTPWhenHTTPS(event) {
return downgradeIfErrorMessage(GET_CLIENT_HELLO, event);
return downgradeIfErrorMessage(OPENSSL_GET_RECORD_REGEX, event);
}

_transform(event, enc, next) {
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/server/logging/log_interceptor.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ describe('server logging LogInterceptor', () => {
describe('#downgradeIfHTTPWhenHTTPS', () => {
it('transforms http requests when serving https errors', () => {
const message =
'40735139278848:error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request:../deps/openssl/openssl/ssl/s23_srvr.c:394';
'4584650176:error:1408F09C:SSL routines:ssl3_get_record:http request:../deps/openssl/openssl/ssl/record/ssl3_record.c:322:\n';
const interceptor = new LogInterceptor();
const event = stubClientErrorEvent({ message });
assertDowngraded(interceptor.downgradeIfHTTPWhenHTTPS(event));
Expand Down

0 comments on commit 8863983

Please sign in to comment.