source: fedd/fedd_deter_impl.py @ 0ea5050

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

Initial move to general authorization framework. Currently integrated with Access stuff fully.

  • Property mode set to 100644
File size: 1.7 KB
Line 
1#!/usr/local/bin/python
2
3from fedd_access import fedd_access
4from fedd_experiment_control import fedd_experiment_control_local
5from fedd_split import fedd_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.  Parses a configuration if one is given.
23        """
24        self.soap_services = { }
25        self.xmlrpc_services = { }
26        self.auth = authorizer()
27
28        if config:
29            self.cert_file = config.get("globals", "cert_file");
30            self.cert_pwd = config.get("globals", "cert_pwd");
31            self.trusted_certs = config.get("globals", "trusted_certs");
32
33            if config.has_section("access"):
34                self.access = fedd_access(config, self.auth)
35                self.soap_services.update(self.access.soap_services) 
36                self.xmlrpc_services.update(self.access.xmlrpc_services) 
37
38            if config.has_section("experiment_control"):
39                self.experiment = \
40                        fedd_experiment_control_local(config, self.auth)
41                self.soap_services.update(self.experiment.soap_services) 
42                self.xmlrpc_services.update(self.experiment.xmlrpc_services) 
43
44            if config.has_section("splitter"):
45                self.splitter = fedd_split_local(config, self.auth)
46                self.soap_services.update(self.splitter.soap_services) 
47                self.xmlrpc_services.update(self.splitter.xmlrpc_services) 
48
49def new_feddservice(config):
50    return fedd_deter_impl(config)
Note: See TracBrowser for help on using the repository browser.