Skip to content

Commit

Permalink
feat: replacing condition to submit pilots with tokens in multiVO setup
Browse files Browse the repository at this point in the history
  • Loading branch information
aldbr committed Oct 19, 2023
1 parent 077979e commit 1e683ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,10 +471,10 @@ def submitPilots(self):
def __supportToken(self, ce: ComputingElement) -> bool:
"""Check whether the SiteDirector is able to submit pilots with tokens.
* the CE is able to receive tokens. Validation: Tag = Token should be included in the CE parameters.
* the VO is able to produce tokens. Validation: IdProvider option is set in /Registry/VO/<VO name>/.
* the CE is able to receive any token. Validation: Tag = Token should be included in the CE parameters.
* the CE is able to receive VO-specifc tokens. Validation: Tag = Token:<VO> should be included in the CE parameters.
"""
return "Token" in ce.ceParameters.get("Tag", []) and Registry.getIdPForGroup(self.pilotGroup)
return "Token" in ce.ceParameters.get("Tag", []) or f"Token:{self.vo}" in ce.ceParameters.get("Tag", [])

def __getPilotToken(self, audience: str, scope: list[str] = None):
"""Get the token corresponding to the pilot user identity
Expand Down

0 comments on commit 1e683ea

Please sign in to comment.