Skip to content

Commit

Permalink
feat: Move auth from thr code to ConfigTemplate.cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
martynia committed Oct 18, 2022
1 parent 3aa5f20 commit 28ea921
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 8 additions & 0 deletions src/DIRAC/WorkloadManagementSystem/ConfigTemplate.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ Services
Authorization
{
Default = authenticated
sendMessage = "Operator"
sendMessage += "Pilot"
sendMessage += "GenericPilot"
getMetadata = "Operator"
getMetadata += "TrustedHost"
finaliseLogs = "Operator"
finaliseLogs += "Pilot"
finaliseLogs += "GenericPilot"
}
}
JobMonitoring
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ def initializeRequest(self):

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

auth_sendMessage = ["Operator", "Pilot", "GenericPilot"]

def export_sendMessage(self, message, pilotUUID):
# def export_sendMessage(self, message, pilotUUID):
"""
Expand All @@ -77,8 +75,6 @@ def export_sendMessage(self, message, pilotUUID):
result = self.loggingPlugin.sendMessage(message, pilotUUID, vo)
return result

auth_getMetadata = ["Operator", "TrustedHost"]

def export_getMetadata(self):
"""
Get PilotLoggingHandler metadata. Intended to be used by a client or an agent.
Expand All @@ -87,8 +83,6 @@ def export_getMetadata(self):
"""
return self.loggingPlugin.getMeta()

auth_finaliseLogs = ["Operator", "Pilot", "GenericPilot"]

def export_finaliseLogs(self, payload, pilotUUID):
"""
Finalise a log file. Finalised logfile can be copied to a secure location, if a file cache is used.
Expand Down

0 comments on commit 28ea921

Please sign in to comment.