diff --git a/redash/query_runner/clickhouse.py b/redash/query_runner/clickhouse.py index ae905589c17..56a91d1f7e4 100644 --- a/redash/query_runner/clickhouse.py +++ b/redash/query_runner/clickhouse.py @@ -26,9 +26,15 @@ def configuration_schema(cls): "title": "Request Timeout", "default": 30, }, + "verify": { + "type": "boolean", + "title": "Verify SSL certificate", + "default": True, + }, }, + "order": ["url", "user", "password", "dbname"], "required": ["dbname"], - "extra_options": ["timeout"], + "extra_options": ["timeout", "verify"], "secret": ["password"], } @@ -59,6 +65,7 @@ def _get_tables(self, schema): def _send_query(self, data, stream=False): url = self.configuration.get("url", "http://127.0.0.1:8123") try: + verify = self.configuration.get("verify", True) r = requests.post( url, data=data.encode("utf-8"), @@ -69,6 +76,7 @@ def _send_query(self, data, stream=False): "password": self.configuration.get("password", ""), "database": self.configuration["dbname"], }, + verify=verify, ) if r.status_code != 200: raise Exception(r.text)