source: fedd/fedd/fedd_deter_impl.py @ ec4fb42

axis_examplecompt_changesinfo-opsversion-1.30version-2.00version-3.01version-3.02
Last change on this file since ec4fb42 was ec4fb42, checked in by Ted Faber <faber@…>, 15 years ago

Clean up some names that start with fedd_ that are ugly with the new package
structure. A couple other bugs cleaned up, too.

  • Property mode set to 100644
File size: 1.6 KB
Line 
1#!/usr/local/bin/python
2
3from access import access
4from experiment_control import experiment_control_local
5from split import split_local
6
7from authorizer import authorizer
8
9class fedd_deter_impl:
10    """
11    The implementation of access control based on mapping users to projects.
12
13    Users can be mapped to existing projects or have projects created
14    dynamically.  This implements both direct requests and proxies.
15    """
16    # Used by the SOAP caller
17    soap_namespaces = ('http://www.isi.edu/faber/fedd.wsdl',
18            'http://www.isi.edu/faber/fedd_internal.wsdl')
19
20    def __init__(self, config=None):
21        """
22        Initializer.  Uses the parsed configuration to create appropriate
23        components.
24        """
25        self.soap_services = { }
26        self.xmlrpc_services = { }
27        self.auth = authorizer()
28
29        if config:
30            self.cert_file = config.get("globals", "cert_file");
31            self.cert_pwd = config.get("globals", "cert_pwd");
32            self.trusted_certs = config.get("globals", "trusted_certs");
33
34            if config.has_section("access"):
35                self.access = access(config, self.auth)
36                self.soap_services.update(self.access.soap_services) 
37                self.xmlrpc_services.update(self.access.xmlrpc_services) 
38
39            if config.has_section("experiment_control"):
40                self.experiment = \
41                        experiment_control_local(config, self.auth)
42                self.soap_services.update(self.experiment.soap_services) 
43                self.xmlrpc_services.update(self.experiment.xmlrpc_services) 
44
45            if config.has_section("splitter"):
46                self.splitter = split_local(config, self.auth)
47                self.soap_services.update(self.splitter.soap_services) 
48                self.xmlrpc_services.update(self.splitter.xmlrpc_services) 
49
50def new_feddservice(config):
51    return fedd_deter_impl(config)
Note: See TracBrowser for help on using the repository browser.