mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
(cherry picked from commit f2e2add9ae
)
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
This commit is contained in:
parent
90787644a5
commit
ffbdb427bc
2 changed files with 7 additions and 9 deletions
|
@ -18,7 +18,7 @@ const { createCliError } = require('./errors');
|
|||
const { promisify } = require('util');
|
||||
const treeKillAsync = promisify(require('tree-kill'));
|
||||
const { parseSettings, SettingsFilter } = require('./settings');
|
||||
const { CA_CERT_PATH, ES_P12_PATH, ES_P12_PASSWORD, extract } = require('@kbn/dev-utils');
|
||||
const { CA_CERT_PATH, ES_NOPASSWORD_P12_PATH, extract } = require('@kbn/dev-utils');
|
||||
const readFile = util.promisify(fs.readFile);
|
||||
|
||||
// listen to data on stream until map returns anything but undefined
|
||||
|
@ -260,9 +260,10 @@ exports.Cluster = class Cluster {
|
|||
|
||||
// Include default keystore settings only if keystore isn't configured.
|
||||
if (!esArgs.some((arg) => arg.startsWith('xpack.security.http.ssl.keystore'))) {
|
||||
esArgs.push(`xpack.security.http.ssl.keystore.path=${ES_P12_PATH}`);
|
||||
esArgs.push(`xpack.security.http.ssl.keystore.path=${ES_NOPASSWORD_P12_PATH}`);
|
||||
esArgs.push(`xpack.security.http.ssl.keystore.type=PKCS12`);
|
||||
esArgs.push(`xpack.security.http.ssl.keystore.password=${ES_P12_PASSWORD}`);
|
||||
// We are explicitly using ES_NOPASSWORD_P12_PATH instead of ES_P12_PATH + ES_P12_PASSWORD. The reasoning for this is that setting
|
||||
// the keystore password using environment variables causes Elasticsearch to emit deprecation warnings.
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,8 +9,7 @@
|
|||
const {
|
||||
ToolingLog,
|
||||
ToolingLogCollectingWriter,
|
||||
ES_P12_PATH,
|
||||
ES_P12_PASSWORD,
|
||||
ES_NOPASSWORD_P12_PATH,
|
||||
createAnyInstanceSerializer,
|
||||
createStripAnsiSerializer,
|
||||
} = require('@kbn/dev-utils');
|
||||
|
@ -292,9 +291,8 @@ describe('#start(installPath)', () => {
|
|||
|
||||
const config = extractConfigFiles.mock.calls[0][0];
|
||||
expect(config).toContain('xpack.security.http.ssl.enabled=true');
|
||||
expect(config).toContain(`xpack.security.http.ssl.keystore.path=${ES_P12_PATH}`);
|
||||
expect(config).toContain(`xpack.security.http.ssl.keystore.path=${ES_NOPASSWORD_P12_PATH}`);
|
||||
expect(config).toContain(`xpack.security.http.ssl.keystore.type=PKCS12`);
|
||||
expect(config).toContain(`xpack.security.http.ssl.keystore.password=${ES_P12_PASSWORD}`);
|
||||
});
|
||||
|
||||
it(`doesn't setup SSL when disabled`, async () => {
|
||||
|
@ -371,9 +369,8 @@ describe('#run()', () => {
|
|||
|
||||
const config = extractConfigFiles.mock.calls[0][0];
|
||||
expect(config).toContain('xpack.security.http.ssl.enabled=true');
|
||||
expect(config).toContain(`xpack.security.http.ssl.keystore.path=${ES_P12_PATH}`);
|
||||
expect(config).toContain(`xpack.security.http.ssl.keystore.path=${ES_NOPASSWORD_P12_PATH}`);
|
||||
expect(config).toContain(`xpack.security.http.ssl.keystore.type=PKCS12`);
|
||||
expect(config).toContain(`xpack.security.http.ssl.keystore.password=${ES_P12_PASSWORD}`);
|
||||
});
|
||||
|
||||
it(`doesn't setup SSL when disabled`, async () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue