[9.0] fix: credDict does not necessarly have a VO#7492
[9.0] fix: credDict does not necessarly have a VO#7492fstagni wants to merge 1 commit intoDIRACGrid:integrationfrom
Conversation
| credDict["group"], | ||
| credDict["VO"], | ||
| credDict.get("VO", "unknown"), | ||
| self.__localSEName, |
There was a problem hiding this comment.
I think there should always be a VO. If not, there's something fishy.
Or are we sometimes not calling this method with a proxy ?
DIRAC/src/DIRAC/Core/Security/m2crypto/X509Chain.py
Lines 957 to 965 in 3856af9
There was a problem hiding this comment.
We can certainly call this without a proxy, this is actually what we do from the Web.
There was a problem hiding this comment.
Actually, when we call this from the WebApp, we are using the user certificate, not the proxy nor a server certificate, and this is what we get in the credDict the end:
{'subject': '/DC=ch/DC=cern/OU=computers/CN=lbcertifdirac70.cern.ch', 'issuer': '/DC=ch/DC=cern/CN=CERN Grid Certification Authority', 'secondsLeft': 17751500, 'isProxy': False, 'isLimitedProxy': False, 'validDN': False, 'validGroup': False, 'DN': '/DC=ch/DC=cern/OU=Organic Units/OU=Users/CN=fstagni/CN=693025/CN=Federico Stagni', 'x509Chain': <X509Chain 3 certs [/DC=ch/DC=cern/OU=computers/CN=lbcertifdirac70.cern.ch][/DC=ch/DC=cern/CN=CERN Grid Certification Authority][/C=ch/O=CERN/CN=CERN Root Certification Authority 2]>, 'properties': ['NormalUser'], 'group': 'dteam_user', 'username': 'fstagni'}
So, I can close this PR and get the VO also for this case.
There was a problem hiding this comment.
Though please keep it under the withRegistryInfo flag (it should be indented)
There was a problem hiding this comment.
Why? This part does not seem reachable:
(introduced back in https://github.com/DIRACGrid/DIRAC/pull/4584/files#diff-dd84180c08082195283af10ef43ad09b451e4e401fb7e4fbecd050ccc178e42c)
| credDict["username"], | ||
| credDict["group"], | ||
| credDict["VO"], | ||
| credDict.get("VO", "unknown"), |
There was a problem hiding this comment.
| credDict.get("VO", "unknown"), | |
| vo, |
No description provided.