From 5e46d3acbca8a58c5dfdcb091a2cacffcc64fb15 Mon Sep 17 00:00:00 2001 From: Swann Croiset Date: Tue, 21 Jun 2016 17:50:31 +0200 Subject: [PATCH] Use basic HTTP authentication to access Kibana Change-Id: I483530b7c8048e00e62a8afab60c5aecf2c41b89 --- stacklight_tests/elasticsearch_kibana/api.py | 6 +++++- stacklight_tests/elasticsearch_kibana/plugin_settings.py | 9 +++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/stacklight_tests/elasticsearch_kibana/api.py b/stacklight_tests/elasticsearch_kibana/api.py index a168b6b..672feda 100644 --- a/stacklight_tests/elasticsearch_kibana/api.py +++ b/stacklight_tests/elasticsearch_kibana/api.py @@ -61,7 +61,11 @@ class ElasticsearchPluginApi(base_test.PluginApi): logger.info("Check that Kibana is running") msg = "Kibana responded with {0}, expected {1}" - self.checkers.check_http_get_response(self.get_kibana_url(), msg=msg) + self.checkers.check_http_get_response( + self.get_kibana_url(), msg=msg, + auth=(self.settings.kibana_username, + self.settings.kibana_password) + ) def check_elasticsearch_nodes_count(self, expected_count): logger.debug("Get information about Elasticsearch nodes") diff --git a/stacklight_tests/elasticsearch_kibana/plugin_settings.py b/stacklight_tests/elasticsearch_kibana/plugin_settings.py index bee9662..ff63b9a 100644 --- a/stacklight_tests/elasticsearch_kibana/plugin_settings.py +++ b/stacklight_tests/elasticsearch_kibana/plugin_settings.py @@ -21,6 +21,11 @@ role_name = ['elasticsearch_kibana'] vip_name = 'es_vip_mgmt' plugin_path = settings.ELASTICSEARCH_KIBANA_PLUGIN_PATH version = helpers.get_plugin_version(plugin_path) +kibana_username = 'kibanauser' +kibana_password = 'kibanapassword' -default_options = {} -toolchain_options = {} +default_options = { + 'kibana_username/value': kibana_username, + 'kibana_password/value': kibana_password, +} +toolchain_options = default_options