Ignore:
Timestamp:
Jan 10, 2012 5:28:15 PM (12 years ago)
Author:
Ted Faber <faber@…>
Branches:
compt_changes, info-ops, master
Children:
f77a256
Parents:
d2e86f6
Message:

Deactivate legacy authorization and dynamic projects

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/dragon_access.py

    rd2e86f6 ree950c2  
    1212from subprocess import Popen, call, PIPE, STDOUT
    1313from access import access_base
    14 from legacy_access import legacy_access
    1514
    1615from util import *
    17 from allocate_project import allocate_project_local, allocate_project_remote
    1816from fedid import fedid, generate_fedid
    1917from authorizer import authorizer, abac_authorizer
     
    3634fl.addHandler(nullHandler())
    3735
    38 class access(access_base, legacy_access):
     36class access(access_base):
    3937    """
    4038    The implementation of access control based on mapping users to projects.
     
    6361        # authorization information
    6462        self.auth_type = config.get('access', 'auth_type') \
    65                 or 'legacy'
     63                or 'abac'
    6664        self.auth_dir = config.get('access', 'auth_dir')
    6765        accessdb = config.get("access", "accessdb")
    6866        # initialize the authorization system
    69         if self.auth_type == 'legacy':
    70             self.access = { }
    71             if accessdb:
    72                 self.legacy_read_access(accessdb, self.make_repo)
    73             # Add the ownership attributes to the authorizer.  Note that the
    74             # indices of the allocation dict are strings, but the attributes are
    75             # fedids, so there is a conversion.
    76             self.state_lock.acquire()
    77             for k in self.state.keys():
    78                 for o in self.state[k].get('owners', []):
    79                     self.auth.set_attribute(o, fedid(hexstr=k))
    80                 self.auth.set_attribute(fedid(hexstr=k),fedid(hexstr=k))
    81             self.state_lock.release()
    82             self.lookup_access = self.legacy_lookup_access_base
    83         elif self.auth_type == 'abac':
     67        if self.auth_type == 'abac':
    8468            self.auth = abac_authorizer(load=self.auth_dir)
    8569            self.access = [ ]
Note: See TracChangeset for help on using the changeset viewer.