Changeset 73ded03
- Timestamp:
- Oct 28, 2009 6:38:39 PM (15 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-2.00, version-3.01, version-3.02
- Children:
- a31b94d
- Parents:
- bda8351
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/deter_impl.py
rbda8351 r73ded03 6 6 from split import split_local 7 7 from util import read_simple_accessdb 8 from fedid import fedid 8 9 9 from authorizer import authorizer 10 from authorizer import authorizer, abac_authorizer 10 11 11 12 class deter_impl: … … 27 28 self.soap_services = { } 28 29 self.xmlrpc_services = { } 29 self.auth = authorizer()30 self.auth = None 30 31 31 32 if config: … … 34 35 self.trusted_certs = config.get("globals", "trusted_certs"); 35 36 self.access_type = config.get("globals", "access_type", "emulab") 37 self.auth_type = config.get("globals", "auth_type", "legacy") 38 39 if self.auth_type == 'legacy': 40 self.auth = authorizer() 41 elif self.auth_type == 'abac': 42 auth_url = config.get('globals', 'auth_url') 43 if not auth_url: 44 raise RuntimeError("auth_url required for ABAC " + \ 45 "authorization") 46 if self.cert_file: 47 me = fedid(file=self.cert_file) 48 else: 49 raise RuntimeError("ABAC authorization needs a " +\ 50 "certificate file") 51 self.auth= abac_authorizer(url=auth_url, 52 cert_file=self.cert_file, cert_pwd=self.cert_pwd, 53 trusted_certs=self.trusted_certs, me=me) 54 else: 55 raise RuntimeError("Unknown authorizer type %s" % \ 56 self.auth_type) 36 57 37 58 access_db = config.get("globals", "accessdb")
Note: See TracChangeset
for help on using the changeset viewer.