def update_client(self, config): ss_api_conf_tuple = list(zip(config["security_server"], map(lambda ss: self.create_api_config(ss, config), config["security_server"]))) for security_server in config["security_server"]: ss_api_config = self.create_api_config(security_server, config) BaseController.log_debug('Starting client registrations for security server: ' + security_server['name']) if "clients" in security_server: for client in security_server["clients"]: self.remote_update_client(ss_api_config, security_server, client) BaseController.log_keyless_servers(ss_api_conf_tuple)
def add_client(self, config): ss_api_conf_tuple = list(zip(config["security_server"], map(lambda ss: self.create_api_config(ss, config), config["security_server"]))) for security_server in config["security_server"]: ss_api_config = self.create_api_config(security_server, config) BaseController.log_debug('Starting client add process for security server: ' + security_server['name']) if "clients" in security_server: # Guards both against empty section (->None) & complete lack of section for client in security_server["clients"]: self.remote_add_client(ss_api_config, client) BaseController.log_keyless_servers(ss_api_conf_tuple)
def enable_service_description(self, config): ss_api_conf_tuple = list(zip(config["security_server"], map(lambda ss: self.create_api_config(ss, config), config["security_server"]))) for security_server in config["security_server"]: ss_api_config = self.create_api_config(security_server, config) BaseController.log_debug('Starting service description enabling process for security server: ' + security_server['name']) if "clients" in security_server: for client in security_server["clients"]: if client.get("service_descriptions"): for service_description in client["service_descriptions"]: self.remote_enable_service_description(ss_api_config, security_server, client, service_description) BaseController.log_keyless_servers(ss_api_conf_tuple)
def token_login(self, config): ss_api_conf_tuple = list( zip( config["security_server"], map(lambda ss: self.create_api_config(ss, config), config["security_server"]))) for security_server in config["security_server"]: ss_api_config = self.create_api_config(security_server, config) BaseController.log_debug( 'Starting token login process for security server: ' + security_server['name']) self.remote_token_login(ss_api_config, security_server) BaseController.log_keyless_servers(ss_api_conf_tuple)
def activate_certificate(self, config): ss_api_conf_tuple = list( zip( config["security_server"], map(lambda ss: self.create_api_config(ss, config), config["security_server"]))) for security_server in config["security_server"]: ss_api_config = self.create_api_config(security_server, config) BaseController.log_debug( 'Starting certificate activation for security server: ' + security_server['name']) self.remote_activate_certificate(ss_api_config, security_server) BaseController.log_keyless_servers(ss_api_conf_tuple)
def get_services_description(self, config): for security_server in config["security_server"]: ss_api_config = self.create_api_config(security_server, config) BaseController.log_debug( 'Starting service description access adding process for security server: ' + security_server['name']) if "clients" in security_server: for client in security_server["clients"]: if "service_descriptions" in client: for service_description in client[ "service_descriptions"]: yield { 'service_description': service_description, 'client': client, 'security_server': security_server, 'ss_api_config': ss_api_config }
def token_add_keys_with_csrs(self, config): ss_api_conf_tuple = list( zip( config["security_server"], map(lambda ss: self.create_api_config(ss, config), config["security_server"]))) for security_server in config["security_server"]: ss_api_config = self.create_api_config(security_server, config) BaseController.log_debug( 'Starting token key creation process for security server: ' + security_server['name']) self.remote_token_add_keys_with_csrs(ss_api_config, security_server) if "clients" in security_server: for client in security_server["clients"]: if client["member_class"] != security_server[ "owner_member_class"] or client[ "member_code"] != security_server[ "owner_member_code"]: self.remote_token_add_signing_key_new_member( ss_api_config, security_server, client) BaseController.log_keyless_servers(ss_api_conf_tuple)