source: fedd/fedd_deter_impl.py @ 0a20ef8

axis_examplecompt_changesinfo-opsversion-1.30version-2.00version-3.01version-3.02
Last change on this file since 0a20ef8 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
RevLine 
[19cc408]1#!/usr/local/bin/python
2
[f4f4117]3from fedd_access import fedd_access
4from fedd_experiment_control import fedd_experiment_control_local
5from fedd_split import fedd_split_local
[19cc408]6
[3f6bc5f]7from authorizer import authorizer
8
[19cc408]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
[72ed6e4]20    def __init__(self, config=None):
[19cc408]21        """
22        Initializer.  Parses a configuration if one is given.
23        """
[72ed6e4]24        self.soap_services = { }
25        self.xmlrpc_services = { }
[3f6bc5f]26        self.auth = authorizer()
[72ed6e4]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"):
[3f6bc5f]34                self.access = fedd_access(config, self.auth)
[72ed6e4]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"):
[3f6bc5f]39                self.experiment = \
40                        fedd_experiment_control_local(config, self.auth)
[72ed6e4]41                self.soap_services.update(self.experiment.soap_services) 
42                self.xmlrpc_services.update(self.experiment.xmlrpc_services) 
43
[f4f4117]44            if config.has_section("splitter"):
[3f6bc5f]45                self.splitter = fedd_split_local(config, self.auth)
[f4f4117]46                self.soap_services.update(self.splitter.soap_services) 
47                self.xmlrpc_services.update(self.splitter.xmlrpc_services) 
48
[72ed6e4]49def new_feddservice(config):
50    return fedd_deter_impl(config)
Note: See TracBrowser for help on using the repository browser.