Changeset 2628e5d for fedd/federation
- Timestamp:
- Sep 22, 2010 5:54:11 PM (14 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master
- Children:
- dc3a11e
- Parents:
- d39809f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/authorizer.py
rd39809f r2628e5d 185 185 clean_attr_re = re.compile('[^A-Za-z_]+') 186 186 cred_file_re = re.compile('.*\.der$') 187 188 def __init__(self, certs=None, me=None, key=None): 187 ABAC.libabac_init() 188 189 def __init__(self, certs=None, me=None, key=None, loadfile=None): 189 190 self.bad_name = authorizer_base.bad_name 190 191 self.attribute_error = authorizer_base.attribute_error 192 self.creddy = '/usr/local/bin/creddy' 191 193 self.globals = set() 192 self. creddy = '/usr/local/bin/creddy'194 self.lock = Lock() 193 195 self.me = me 194 196 self.key = key 195 197 self.context = ABAC.Context() 196 self.lock = Lock()197 198 198 if me: 199 199 self.fedid = fedid(file=self.me) 200 200 self.context.load_id_file(self.me) 201 201 202 if isinstance(certs, basestring): 203 certs = [ certs ] 204 202 205 for dir in certs or []: 203 206 self.context.load_directory(dir) 207 208 if loadfile: 209 self.load(loadfile) 204 210 205 211 @staticmethod 206 212 def clean_attr(attr): 207 213 return abac_authorizer.clean_attr_re.sub('_', attr) 208 209 214 210 215 def set_attribute(self, name=None, attr=None, cert=None):
Note: See TracChangeset
for help on using the changeset viewer.