Skip to content

Commit 28ea921

Browse files
committed
feat: Move auth from thr code to ConfigTemplate.cfg
1 parent 3aa5f20 commit 28ea921

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/DIRAC/WorkloadManagementSystem/ConfigTemplate.cfg

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ Services
2525
Authorization
2626
{
2727
Default = authenticated
28+
sendMessage = "Operator"
29+
sendMessage += "Pilot"
30+
sendMessage += "GenericPilot"
31+
getMetadata = "Operator"
32+
getMetadata += "TrustedHost"
33+
finaliseLogs = "Operator"
34+
finaliseLogs += "Pilot"
35+
finaliseLogs += "GenericPilot"
2836
}
2937
}
3038
JobMonitoring

src/DIRAC/WorkloadManagementSystem/Service/TornadoPilotLoggingHandler.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ def initializeRequest(self):
5353

5454
self.log.info("Request initialised.. ")
5555

56-
auth_sendMessage = ["Operator", "Pilot", "GenericPilot"]
57-
5856
def export_sendMessage(self, message, pilotUUID):
5957
# def export_sendMessage(self, message, pilotUUID):
6058
"""
@@ -77,8 +75,6 @@ def export_sendMessage(self, message, pilotUUID):
7775
result = self.loggingPlugin.sendMessage(message, pilotUUID, vo)
7876
return result
7977

80-
auth_getMetadata = ["Operator", "TrustedHost"]
81-
8278
def export_getMetadata(self):
8379
"""
8480
Get PilotLoggingHandler metadata. Intended to be used by a client or an agent.
@@ -87,8 +83,6 @@ def export_getMetadata(self):
8783
"""
8884
return self.loggingPlugin.getMeta()
8985

90-
auth_finaliseLogs = ["Operator", "Pilot", "GenericPilot"]
91-
9286
def export_finaliseLogs(self, payload, pilotUUID):
9387
"""
9488
Finalise a log file. Finalised logfile can be copied to a secure location, if a file cache is used.

0 commit comments

Comments
 (0)