Skip to content

Commit 334f4e1

Browse files
committed
mgr/cephadm: Disable external snapshots in grafana
This PR intends to disable the external snapshots in grafana to reduce security threats Signed-off-by: Aashish Sharma <[email protected]>
1 parent 42b969b commit 334f4e1

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/pybind/mgr/cephadm/templates/services/grafana/grafana.ini.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
cert_key = /etc/grafana/certs/cert_key
1313
http_port = {{ http_port }}
1414
http_addr = {{ http_addr }}
15+
[snapshots]
16+
external_enabled = false
1517
[security]
1618
{% if not initial_admin_password %}
1719
disable_initial_admin_creation = true

src/pybind/mgr/cephadm/tests/test_services.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,8 @@ def test_grafana_config(self, _run_cephadm, cephadm_module: CephadmOrchestrator)
453453
cert_key = /etc/grafana/certs/cert_key
454454
http_port = 3000
455455
http_addr =
456+
[snapshots]
457+
external_enabled = false
456458
[security]
457459
disable_initial_admin_creation = true
458460
cookie_secure = true
@@ -531,6 +533,8 @@ def test_grafana_initial_admin_pw(self, cephadm_module: CephadmOrchestrator):
531533
' cert_key = /etc/grafana/certs/cert_key\n'
532534
' http_port = 3000\n'
533535
' http_addr = \n'
536+
'[snapshots]\n'
537+
' external_enabled = false\n'
534538
'[security]\n'
535539
' admin_user = admin\n'
536540
' admin_password = secure\n'

0 commit comments

Comments
 (0)