From 52ae7bedb28d6738f475496a5bd2c01d7a7dafa2 Mon Sep 17 00:00:00 2001 From: Patrick Yang Date: Tue, 5 Jan 2021 11:47:54 -0800 Subject: [PATCH] Secret handling for Yandex, TreasureData, & Postgres/CockroachDB SSL (#5312) --- redash/query_runner/pg.py | 2 +- redash/query_runner/treasuredata.py | 1 + redash/query_runner/yandex_metrica.py | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/redash/query_runner/pg.py b/redash/query_runner/pg.py index d1427ade..6af812fa 100644 --- a/redash/query_runner/pg.py +++ b/redash/query_runner/pg.py @@ -169,7 +169,7 @@ class PostgreSQL(BaseSQLQueryRunner): }, "order": ["host", "port", "user", "password"], "required": ["dbname"], - "secret": ["password"], + "secret": ["password", "sslrootcertFile", "sslcertFile", "sslkeyFile"], "extra_options": [ "sslmode", "sslrootcertFile", diff --git a/redash/query_runner/treasuredata.py b/redash/query_runner/treasuredata.py index 763b3e3c..3e53b136 100644 --- a/redash/query_runner/treasuredata.py +++ b/redash/query_runner/treasuredata.py @@ -53,6 +53,7 @@ class TreasureData(BaseQueryRunner): "default": False, }, }, + "secret": ["apikey"], "required": ["apikey", "db"], } diff --git a/redash/query_runner/yandex_metrica.py b/redash/query_runner/yandex_metrica.py index b263c5e3..1802525e 100644 --- a/redash/query_runner/yandex_metrica.py +++ b/redash/query_runner/yandex_metrica.py @@ -89,6 +89,7 @@ class YandexMetrica(BaseSQLQueryRunner): return { "type": "object", "properties": {"token": {"type": "string", "title": "OAuth Token"}}, + "secret": ["token"], "required": ["token"], }