From: Tony Mack Date: Sat, 26 Sep 2009 01:55:48 +0000 (+0000) Subject: added verify_cred_is_me() X-Git-Tag: sfa-0.9-3~37 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=915064dd744ac4d5378a741316f1cd52df93a5cc;p=sfa.git added verify_cred_is_me() --- diff --git a/sfa/trust/auth.py b/sfa/trust/auth.py index 298d0329..f0574d93 100644 --- a/sfa/trust/auth.py +++ b/sfa/trust/auth.py @@ -64,6 +64,16 @@ class Auth: return True + + def verify_cred_is_me(self, credential): + is_me = False + cred = Credential(string=credential) + caller_gid = cred.get_gid_caller() + caller_hrn = caller_gid.get_hrn() + if caller_hrn != self.config.SFA_INTERFACE_HRN: + raise GeniPermissionError(self.config.SFA_INTEFACE_HRN) + + return def get_auth_info(self, auth_hrn): """