[kbn-es] Security updates (#36288) (#36299)

* In kbn-test, provide password to cluster.start()
* Security enabled by default, overwrite by passing `-E "xpack.security.enabled=false"`

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
This commit is contained in:
Tyler Smalley 2019-05-08 14:17:53 -07:00 committed by GitHub
parent c8a849f588
commit 0fd0245b87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -151,6 +151,7 @@ exports.Cluster = class Cluster {
* @param {String} installPath
* @param {Object} options
* @property {Array} options.esArgs
* @property {String} options.password - super user password used to bootstrap
* @returns {Promise}
*/
async start(installPath, options = {}) {

View file

@ -62,13 +62,11 @@ exports.installArchive = async function installArchive(archive, options = {}) {
await decompress(dest, installPath);
log.info('extracted to %s', chalk.bold(installPath));
if (license === 'trial') {
if (license !== 'oss') {
// starting in 6.3, security is disabled by default. Since we bootstrap
// the keystore, we can enable security ourselves.
await appendToConfig(installPath, 'xpack.security.enabled', 'true');
}
if (license !== 'oss') {
await appendToConfig(installPath, 'xpack.license.self_generated.type', license);
await configureKeystore(installPath, password, log);
}

View file

@ -80,6 +80,7 @@ export function createEsTestCluster(options = {}) {
}
await cluster.start(installPath, {
password: config.password,
esArgs: [
`cluster.name=${clusterName}`,
`http.port=${port}`,