From ee962f4b3d1b45812f65e5573db8b8b2e7db6469 Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Fri, 26 Nov 2021 11:15:51 +0100 Subject: [PATCH] mgr/cephadm: grafana.ini: Set `cookie_secure = true` Signed-off-by: Sebastian Wagner (cherry picked from commit e90433b8f9bb4d60b5a6da636d880ce0b7b8b243) --- .../mgr/cephadm/templates/services/grafana/grafana.ini.j2 | 2 ++ src/pybind/mgr/cephadm/tests/test_services.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/pybind/mgr/cephadm/templates/services/grafana/grafana.ini.j2 b/src/pybind/mgr/cephadm/templates/services/grafana/grafana.ini.j2 index 642d0647f3fcd..cf23802d71b78 100644 --- a/src/pybind/mgr/cephadm/templates/services/grafana/grafana.ini.j2 +++ b/src/pybind/mgr/cephadm/templates/services/grafana/grafana.ini.j2 @@ -19,4 +19,6 @@ admin_user = admin admin_password = {{ initial_admin_password }} {% endif %} + cookie_secure = true + cookie_samesite = none allow_embedding = true diff --git a/src/pybind/mgr/cephadm/tests/test_services.py b/src/pybind/mgr/cephadm/tests/test_services.py index c4f1e5b1c024b..b244a9317826a 100644 --- a/src/pybind/mgr/cephadm/tests/test_services.py +++ b/src/pybind/mgr/cephadm/tests/test_services.py @@ -354,6 +354,8 @@ class TestMonitoring: http_addr = [security] disable_initial_admin_creation = true + cookie_secure = true + cookie_samesite = none allow_embedding = true""").lstrip(), # noqa: W291 'provisioning/datasources/ceph-dashboard.yml': dedent(""" # This file is generated by cephadm. @@ -421,6 +423,8 @@ class TestMonitoring: '[security]\n' ' admin_user = admin\n' ' admin_password = secure\n' + ' cookie_secure = true\n' + ' cookie_samesite = none\n' ' allow_embedding = true', 'provisioning/datasources/ceph-dashboard.yml': '# This file is generated by cephadm.\n' -- 2.39.5