From: Anil-Kumar Vengalil Date: Sat, 31 Oct 2009 22:03:38 +0000 (+0000) Subject: server.cert has subject set to registry, and in this case certificate.get_subject... X-Git-Tag: sfa-0.9-6~72 X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=commitdiff_plain;h=14fd4204ed582acc4da0541628dd910ad812926d server.cert has subject set to registry, and in this case certificate.get_subject() does not return hrn. This was happening while SM bootstraps its credential using get_self_credentail --- diff --git a/sfa/methods/get_self_credential.py b/sfa/methods/get_self_credential.py index 8859082a..21f7a129 100644 --- a/sfa/methods/get_self_credential.py +++ b/sfa/methods/get_self_credential.py @@ -78,7 +78,9 @@ class get_self_credential(Method): raise ConnectionKeyGIDMismatch(gid.get_subject()) # get the right of this record - caller_hrn = certificate.get_subject() + #caller_hrn = certificate.get_subject() + # server.cert has subject 'registry' + caller_hrn=hrn rights = self.api.auth.determine_user_rights(caller_hrn, record) if rights.is_empty(): raise PermissionError(caller_hrn + " has no rights to " + record.get_name())