From 1be9683d9aaf788c3697f7ce075b8a7e85a5efbe Mon Sep 17 00:00:00 2001 From: Simon Fayer Date: Fri, 4 Dec 2026 14:47:34 +0000 Subject: [PATCH] feat: Allow for multiple IdP client configs per VO --- src/DIRAC/Core/Security/IAMService.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/DIRAC/Core/Security/IAMService.py b/src/DIRAC/Core/Security/IAMService.py index 0748aa81ad6..c38a71a3de3 100644 --- a/src/DIRAC/Core/Security/IAMService.py +++ b/src/DIRAC/Core/Security/IAMService.py @@ -16,7 +16,7 @@ def convert_dn(inStr): class IAMService: - def __init__(self, access_token, vo=None, forceNickname=False): + def __init__(self, access_token, vo=None, forceNickname=False, idProviderKeyname="IdProvider"): """c'tor :param str access_token: the token used to talk to IAM, with the scim:read property @@ -40,9 +40,9 @@ def __init__(self, access_token, vo=None, forceNickname=False): self.iam_url = None - id_provider = gConfig.getValue(f"/Registry/VO/{self.vo}/IdProvider") + id_provider = gConfig.getValue(f"/Registry/VO/{self.vo}/{idProviderKeyname}") if not id_provider: - raise ValueError(f"/Registry/VO/{self.vo}/IdProvider not found") + raise ValueError(f"/Registry/VO/{self.vo}/{idProviderKeyname} not found") result = gConfig.getOptionsDict(f"/Resources/IdProviders/{id_provider}") if result["OK"]: self.iam_url = result["Value"]["issuer"]