#!/usr/local/bin/python from access import access from experiment_control import experiment_control_local from split import split_local from authorizer import authorizer class fedd_deter_impl: """ The implementation of access control based on mapping users to projects. Users can be mapped to existing projects or have projects created dynamically. This implements both direct requests and proxies. """ # Used by the SOAP caller soap_namespaces = ('http://www.isi.edu/faber/fedd.wsdl', 'http://www.isi.edu/faber/fedd_internal.wsdl') def __init__(self, config=None): """ Initializer. Uses the parsed configuration to create appropriate components. """ self.soap_services = { } self.xmlrpc_services = { } self.auth = authorizer() if config: self.cert_file = config.get("globals", "cert_file"); self.cert_pwd = config.get("globals", "cert_pwd"); self.trusted_certs = config.get("globals", "trusted_certs"); if config.has_section("access"): self.access = access(config, self.auth) self.soap_services.update(self.access.soap_services) self.xmlrpc_services.update(self.access.xmlrpc_services) if config.has_section("experiment_control"): self.experiment = \ experiment_control_local(config, self.auth) self.soap_services.update(self.experiment.soap_services) self.xmlrpc_services.update(self.experiment.xmlrpc_services) if config.has_section("splitter"): self.splitter = split_local(config, self.auth) self.soap_services.update(self.splitter.soap_services) self.xmlrpc_services.update(self.splitter.xmlrpc_services) def new_feddservice(config): return fedd_deter_impl(config)