kibana/test/utils/base_auth.js
Court Ewing eccb3d6f97 Basic support for running server tests with shield
These changes will make sure the kibana server in tests is using shield
credentials, as are any requests made through the kbn_server test
helper.

The current credentials are hardcoded based on our internal best
practices, but they should be made configurable in the future.

This will pass credentials to ES regardless of whether shield is
actually enabled, but that will have no negative effect if shield
happens to be disabled.
2016-01-12 17:16:10 -05:00

4 lines
136 B
JavaScript

export function header(user, pass) {
const encoded = new Buffer(`${user}:${pass}`).toString('base64');
return `Basic ${encoded}`;
}