]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: renaming whitelist_domains field to allowlist_domains 59766/head
authorRedouane Kachach <rkachach@ibm.com>
Thu, 12 Sep 2024 13:57:07 +0000 (15:57 +0200)
committerRedouane Kachach <rkachach@ibm.com>
Thu, 12 Sep 2024 14:14:57 +0000 (16:14 +0200)
Fixes: https://tracker.ceph.com/issues/68052
Signed-off-by: Redouane Kachach <rkachach@ibm.com>
src/pybind/mgr/cephadm/services/oauth2_proxy.py
src/pybind/mgr/cephadm/templates/services/oauth2-proxy/oauth2-proxy.conf.j2
src/python-common/ceph/deployment/service_spec.py

index c19005c95f3ca91728a6ec52d1e1b973eb982069..cabb21bce139e0f0f20ee21875d8938731a25f3a 100644 (file)
@@ -67,12 +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')
+        allowlist_domains = svc_spec.allowlist_domains or []
+        allowlist_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': whitelist_domains,
+            'allowlist_domains': allowlist_domains,
             'redirect_url': svc_spec.redirect_url or self.get_redirect_url()
         }
 
index 20ca8cb6504c078c6dc930b5ee1b3db133e850b6..c8d9f920adf5ae16c2488889255c2388c102da87 100644 (file)
@@ -34,4 +34,4 @@ set_xauthrequest= true
 # Secret value for encrypting cookies.
 cookie_secret= "{{ cookie_secret }}"
 email_domains= "*"
-whitelist_domains= "{{ whitelist_domains | join(',') }}"
+whitelist_domains= "{{ allowlist_domains | join(',') }}"
index 2238cd01c375313f9ade125235a6fb29ffadfb37..33a6da75f0b03f5d1a24288a40256211db70763b 100644 (file)
@@ -1926,7 +1926,7 @@ class OAuth2ProxySpec(ServiceSpec):
                  cookie_secret: Optional[str] = None,
                  ssl_certificate: Optional[str] = None,
                  ssl_certificate_key: Optional[str] = None,
-                 whitelist_domains: Optional[List[str]] = None,
+                 allowlist_domains: Optional[List[str]] = None,
                  unmanaged: bool = False,
                  extra_container_args: Optional[GeneralArgList] = None,
                  extra_entrypoint_args: Optional[GeneralArgList] = None,
@@ -1964,7 +1964,7 @@ class OAuth2ProxySpec(ServiceSpec):
         self.ssl_certificate_key = ssl_certificate_key
         #: List of allowed domains for safe redirection after login or logout,
         # preventing unauthorized redirects.
-        self.whitelist_domains = whitelist_domains
+        self.allowlist_domains = allowlist_domains
         self.unmanaged = unmanaged
 
     def get_port_start(self) -> List[int]: