summaryrefslogtreecommitdiffstats
path: root/src/pybind
diff options
context:
space:
mode:
authorRedouane Kachach <rkachach@redhat.com>2024-09-06 12:44:45 +0200
committerRedouane Kachach <rkachach@redhat.com>2024-09-06 12:44:45 +0200
commitaf84f6d512a21245319c27b0a65f14b72e5aec2a (patch)
tree4c45162a3b8b6aba1c8a049875725630d1d7db66 /src/pybind
parentMerge pull request #56597 from liangmingyuanneo/optimize-reshard (diff)
downloadceph-af84f6d512a21245319c27b0a65f14b72e5aec2a.tar.xz
ceph-af84f6d512a21245319c27b0a65f14b72e5aec2a.zip
mgr/cephadm: adding spec fields for oauth2-proxy whitelist_domains
this field is needed in order to configure which domains are allowed for redirection during login and/or logout Fixes: https://tracker.ceph.com/issues/67934 Signed-off-by: Redouane Kachach <rkachach@redhat.com>
Diffstat (limited to '')
-rw-r--r--src/pybind/mgr/cephadm/services/oauth2_proxy.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pybind/mgr/cephadm/services/oauth2_proxy.py b/src/pybind/mgr/cephadm/services/oauth2_proxy.py
index a84f44817ee..c19005c95f3 100644
--- a/src/pybind/mgr/cephadm/services/oauth2_proxy.py
+++ b/src/pybind/mgr/cephadm/services/oauth2_proxy.py
@@ -67,10 +67,12 @@ class OAuth2ProxyService(CephadmService):
def generate_config(self, daemon_spec: CephadmDaemonDeploySpec) -> Tuple[Dict[str, Any], List[str]]:
assert self.TYPE == daemon_spec.daemon_type
svc_spec = cast(OAuth2ProxySpec, self.mgr.spec_store[daemon_spec.service_name].spec)
+ whitelist_domains = svc_spec.whitelist_domains or []
+ whitelist_domains += self.get_service_ips_and_hosts('mgmt-gateway')
context = {
'spec': svc_spec,
'cookie_secret': svc_spec.cookie_secret or self.generate_random_secret(),
- 'whitelist_domains': self.get_service_ips_and_hosts('mgmt-gateway'),
+ 'whitelist_domains': whitelist_domains,
'redirect_url': svc_spec.redirect_url or self.get_redirect_url()
}