From f0a7bfc2bdb0a7980021dbc4cc87176c6405a017 Mon Sep 17 00:00:00 2001 From: Simon Fayer Date: Sat, 25 Jul 2026 20:50:21 +0100 Subject: [PATCH] fix: Tidy up CS auth --- src/DIRAC/ConfigurationSystem/ConfigTemplate.cfg | 8 ++++++-- .../ConfigurationSystem/Service/ConfigurationHandler.py | 1 + .../Service/TornadoConfigurationHandler.py | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/DIRAC/ConfigurationSystem/ConfigTemplate.cfg b/src/DIRAC/ConfigurationSystem/ConfigTemplate.cfg index b0d1135b6bc..2d3a3233a60 100644 --- a/src/DIRAC/ConfigurationSystem/ConfigTemplate.cfg +++ b/src/DIRAC/ConfigurationSystem/ConfigTemplate.cfg @@ -14,7 +14,9 @@ Services { # Default authorization Default = authenticated - #Define who can commit new configuration + # Define who can register other services + publishSlaveServer = TrustedHost + # Define who can commit new configuration commitNewData = CSAdministrator # Define who can roll back the configuration to a previous version rollbackToVersion = CSAdministrator @@ -35,7 +37,9 @@ Services { # Default authorization Default = authenticated - #Define who can commit new configuration + # Define who can register other services + publishSlaveServer = TrustedHost + # Define who can commit new configuration commitNewData = CSAdministrator # Define who can roll back the configuration to a previous version rollbackToVersion = CSAdministrator diff --git a/src/DIRAC/ConfigurationSystem/Service/ConfigurationHandler.py b/src/DIRAC/ConfigurationSystem/Service/ConfigurationHandler.py index 398123a402a..b1e3b640bb1 100755 --- a/src/DIRAC/ConfigurationSystem/Service/ConfigurationHandler.py +++ b/src/DIRAC/ConfigurationSystem/Service/ConfigurationHandler.py @@ -52,6 +52,7 @@ def export_getCompressedDataIfNewer(cls, sClientVersion): return S_OK(retDict) types_publishSlaveServer = [str] + auth_publishSlaveServer = ["TrustedHost"] @classmethod def export_publishSlaveServer(cls, sURL): diff --git a/src/DIRAC/ConfigurationSystem/Service/TornadoConfigurationHandler.py b/src/DIRAC/ConfigurationSystem/Service/TornadoConfigurationHandler.py index 970f2526bda..4a242d67413 100644 --- a/src/DIRAC/ConfigurationSystem/Service/TornadoConfigurationHandler.py +++ b/src/DIRAC/ConfigurationSystem/Service/TornadoConfigurationHandler.py @@ -57,6 +57,8 @@ def export_getCompressedDataIfNewer(self, sClientVersion): retDict["data"] = b64encode(self.ServiceInterface.getCompressedConfigurationData()).decode() return S_OK(retDict) + auth_publishSlaveServer = ["TrustedHost"] + def export_publishSlaveServer(self, sURL): """ Used by worker server to register as a worker server.