added verify_cred_is_me()
authorTony Mack <tmack@cs.princeton.edu>
Sat, 26 Sep 2009 01:55:48 +0000 (01:55 +0000)
committerTony Mack <tmack@cs.princeton.edu>
Sat, 26 Sep 2009 01:55:48 +0000 (01:55 +0000)
sfa/trust/auth.py

index 298d032..f0574d9 100644 (file)
@@ -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):
         """