idpProps[CommonProperties.PROP_WEB_HOST_NAME]).strip() properties[CommonProperties.PROP_WGA_HOST_NAME] = str( idpProps[CommonProperties.PROP_WGA_HOST_NAME]).strip() properties[CommonProperties.PROP_SAML_FEDNAME] = str( idpProps[CommonProperties.PROP_SAML_FEDNAME]).strip() properties[CommonProperties.PROP_SAML_FED_ROLE] = "idp" properties[ CommonProperties.PROP_RUNTIME_TRACE_STRING] = "com.tivoli.am.fim.*=ALL" properties[CommonProperties.PROP_SAML_JUNCT] = "/samljct" properties[ CommonProperties.PROP_SAML_APPLIES_TO] = "http://appliesto/saml20" properties[CommonProperties.PROP_LTPA_JUNCT] = "/ltpajct" properties[CommonProperties.PROP_LTPA_APPLIES_TO] = "http://appliesto/ltpa" ipFedConfig = FederationManager(properties) ipFedConfig.createServerConnection() ipFedConfig.createAttributeSources() ipFedConfig.deployChanges() logger.debug("GET module types") stsModuleTypes = ipFedConfig.getSTSModuleTypes() jsonStsModuleTypes = json.loads(stsModuleTypes) noOfStsModuleTypes = len(jsonStsModuleTypes) stsModuleTypesList = [] for i in range(noOfStsModuleTypes): stsModuleTypesList.append(jsonStsModuleTypes[i]["id"]) logger.debug("GET module instances") stsModuleInstances = ipFedConfig.getSTSModuleInstances() jsonStsModuleInstances = json.loads(stsModuleInstances)
properties[CommonProperties.PROP_PASSWORD] = str(spProps[CommonProperties.PROP_PASSWORD]).strip() properties[CommonProperties.PROP_OLD_PASSWORD] = str(spProps[CommonProperties.PROP_OLD_PASSWORD]).strip() properties[CommonProperties.PROP_EASUSER_OLD_PASSWORD] = str(spProps[CommonProperties.PROP_EASUSER_OLD_PASSWORD]).strip() properties[CommonProperties.PROP_EASUSER_PASSWORD] = str(spProps[CommonProperties.PROP_EASUSER_PASSWORD]).strip() properties[CommonProperties.PROP_PRI_INTERFACE_IP] = str(spProps[CommonProperties.PROP_PRI_INTERFACE_IP]).strip() properties[CommonProperties.PROP_PRI_INTERFACE_MASK] = str(spProps[CommonProperties.PROP_PRI_INTERFACE_MASK]).strip() properties[CommonProperties.PROP_WEB_HOST_NAME] = str(spProps[CommonProperties.PROP_WEB_HOST_NAME]).strip() properties[CommonProperties.PROP_WGA_HOST_NAME] = str(spProps[CommonProperties.PROP_WGA_HOST_NAME]).strip() properties[CommonProperties.PROP_SAML_FEDNAME] = str(spProps[CommonProperties.PROP_SAML_FEDNAME]).strip() properties[CommonProperties.PROP_SAML_FED_ROLE] = "sp" properties[CommonProperties.PROP_RUNTIME_TRACE_STRING] = "com.tivoli.am.fim.*=ALL" properties[CommonProperties.PROP_SAML_JUNCT] = "/samljct" properties[CommonProperties.PROP_SAML_APPLIES_TO] = "http://appliesto/saml20" properties[CommonProperties.PROP_LTPA_JUNCT] = "/ltpajct" properties[CommonProperties.PROP_LTPA_APPLIES_TO] = "http://appliesto/ltpa" spFedName = properties[CommonProperties.PROP_SAML_FEDNAME] baseApplianceClient = BaseManager(properties) baseApplianceClient.doBaseConfig() wgaConfigIP = WGAManager(properties) wgaConfigIP.configureWga() spFedConfig = FederationManager(properties) spFedConfig.configureFedAndPartners() logger.debug("End SAML SP Configuration")
properties[CommonProperties.PROP_WGA_HOST_NAME] = str( idpProps[CommonProperties.PROP_WGA_HOST_NAME]).strip() properties[CommonProperties.PROP_SAML_FEDNAME] = str( idpProps[CommonProperties.PROP_SAML_FEDNAME]).strip() properties[CommonProperties.PROP_SAML_FED_ROLE] = "idp" properties[ CommonProperties.PROP_RUNTIME_TRACE_STRING] = "com.tivoli.am.fim.*=ALL" properties[CommonProperties.PROP_SAML_JUNCT] = "/samljct" properties[ CommonProperties.PROP_SAML_APPLIES_TO] = "http://appliesto/saml20" properties[CommonProperties.PROP_LTPA_JUNCT] = "/ltpajct" properties[CommonProperties.PROP_LTPA_APPLIES_TO] = "http://appliesto/ltpa" #Find IdP based on name ipFedConfig = FederationManager(properties) ipFedUrl = ipFedConfig.getIdpFedUrl( properties[CommonProperties.PROP_SAML_FEDNAME]) fedJson = ipFedConfig.getFederationJson(ipFedUrl) if MappingRule == "HttpClientMappingRule": modfedJson = ipFedConfig.modifyIdPFederationJson( fedJson, 'ip_saml20_httpclient_wstrust.js') ipFedConfig.putFederation(ipFedUrl, modfedJson) ipFedConfig.deployChanges() logger.info("Successfully configured the " + MappingRule) elif MappingRule == "ExternalHttpCallout": modfedJson = ipFedConfig.modifyIdPFederationJsonWSTrust(fedJson) ipFedConfig.putFederation(ipFedUrl, modfedJson) ipFedConfig.deployChanges() logger.info("Successfully configured the " + MappingRule)
idpProps[CommonProperties.PROP_WEB_HOST_NAME]).strip() properties[CommonProperties.PROP_WGA_HOST_NAME] = str( idpProps[CommonProperties.PROP_WGA_HOST_NAME]).strip() properties[CommonProperties.PROP_SAML_FEDNAME] = str( idpProps[CommonProperties.PROP_SAML_FEDNAME]).strip() properties[CommonProperties.PROP_SAML_FED_ROLE] = "idp" properties[ CommonProperties.PROP_RUNTIME_TRACE_STRING] = "com.tivoli.am.fim.*=ALL" properties[CommonProperties.PROP_SAML_JUNCT] = "/samljct" properties[ CommonProperties.PROP_SAML_APPLIES_TO] = "http://appliesto/saml20" properties[CommonProperties.PROP_LTPA_JUNCT] = "/ltpajct" properties[CommonProperties.PROP_LTPA_APPLIES_TO] = "http://appliesto/ltpa" ipFedConfig = FederationManager(properties) wgaClient = WGAManager(properties) wgaClient.doPDADMINCommandsSTS("isam.myidp.ibm.com", "default") wgaClient.uploadLTPAKeys("ltpasso.keys", "idp_files/LTPA/ltpasso.keys") ipFedConfig.changeEasuserPassword() ipFedConfig.deployChanges() logger.debug("GET module types") stsModuleTypes = ipFedConfig.getSTSModuleTypes() jsonStsModuleTypes = json.loads(stsModuleTypes) noOfStsModuleTypes = len(jsonStsModuleTypes) stsModuleTypesList = [] for i in range(noOfStsModuleTypes): stsModuleTypesList.append(jsonStsModuleTypes[i]["id"])
properties[CommonProperties.PROP_SAML_FEDNAME] = str( idpProps[CommonProperties.PROP_SAML_FEDNAME]).strip() properties[CommonProperties.PROP_SAML_FED_ROLE] = "idp" properties[ CommonProperties.PROP_RUNTIME_TRACE_STRING] = "com.tivoli.am.fim.*=ALL" properties[CommonProperties.PROP_SAML_JUNCT] = "/samljct" properties[ CommonProperties.PROP_SAML_APPLIES_TO] = "http://appliesto/saml20" properties[CommonProperties.PROP_LTPA_JUNCT] = "/ltpajct" properties[CommonProperties.PROP_LTPA_APPLIES_TO] = "http://appliesto/ltpa" wgaClient = WGAManager(properties) wgaClient.doPDADMINCommandsSTS("isam.myidp.ibm.com", "default") ipFedConfig = FederationManager(properties) ipFedConfig.changeEasuserPassword() ipFedConfig.deployChanges() logger.debug("GET module types") stsModuleTypes = ipFedConfig.getSTSModuleTypes() jsonStsModuleTypes = json.loads(stsModuleTypes) noOfStsModuleTypes = len(jsonStsModuleTypes) stsModuleTypesList = [] for i in range(noOfStsModuleTypes): stsModuleTypesList.append(jsonStsModuleTypes[i]["id"]) logger.debug("GET module instances") stsModuleInstances = ipFedConfig.getSTSModuleInstances() jsonStsModuleInstances = json.loads(stsModuleInstances) noOfStsModuleInstances = len(jsonStsModuleInstances) stsModuleInstancesList = []
properties[CommonProperties.PROP_PRI_INTERFACE_MASK] = str( spProps[CommonProperties.PROP_PRI_INTERFACE_MASK]).strip() properties[CommonProperties.PROP_WEB_HOST_NAME] = str( spProps[CommonProperties.PROP_WEB_HOST_NAME]).strip() properties[CommonProperties.PROP_WGA_HOST_NAME] = str( spProps[CommonProperties.PROP_WGA_HOST_NAME]).strip() properties[CommonProperties.PROP_SAML_FEDNAME] = str( spProps[CommonProperties.PROP_SAML_FEDNAME]).strip() properties[CommonProperties.PROP_SAML_FED_ROLE] = "sp" properties[ CommonProperties.PROP_RUNTIME_TRACE_STRING] = "com.tivoli.am.fim.*=ALL" #Find SP based on name spFedConfig = FederationManager(properties) spFedUrl = spFedConfig.getIdpFedUrl( properties[CommonProperties.PROP_SAML_FEDNAME]) fedJson = spFedConfig.getFederationJson(spFedUrl) if MappingRule == "dynamicGroupMapping": modfedJson = spFedConfig.modifySPFederationJson( fedJson, 'sp_saml20_dynamic_group.js') spFedConfig.putFederation(spFedUrl, modfedJson) spFedConfig.createTestGroups() spFedConfig.deployChanges() logger.info("Successfully configured Dynamic Group Mapping") else: modfedJson = spFedConfig.modifySPFederationJson(fedJson, MappingRule) spFedConfig.putFederation(spFedUrl, modfedJson) spFedConfig.deployChanges()
properties[CommonProperties.PROP_PRI_INTERFACE_MASK] = str(idpProps[CommonProperties.PROP_PRI_INTERFACE_MASK]).strip() properties[CommonProperties.PROP_WEB_HOST_NAME] = str(idpProps[CommonProperties.PROP_WEB_HOST_NAME]).strip() properties[CommonProperties.PROP_WGA_HOST_NAME] = str(idpProps[CommonProperties.PROP_WGA_HOST_NAME]).strip() properties[CommonProperties.PROP_SAML_FEDNAME] = str(idpProps[CommonProperties.PROP_SAML_FEDNAME]).strip() properties[CommonProperties.PROP_SAML_FED_ROLE] = "idp" properties[CommonProperties.PROP_RUNTIME_TRACE_STRING] = "com.tivoli.am.fim.*=ALL" properties[CommonProperties.PROP_SAML_JUNCT] = "/samljct" properties[CommonProperties.PROP_SAML_APPLIES_TO] = "http://appliesto/saml20" properties[CommonProperties.PROP_LTPA_JUNCT] = "/ltpajct" properties[CommonProperties.PROP_LTPA_APPLIES_TO] = "http://appliesto/ltpa" wgaClient = WGAManager(properties) wgaClient.doPDADMINCommandsSTS("isam.myidp.ibm.com", "default") ipFedConfig = FederationManager(properties) ipFedConfig.changeEasuserPassword() ipFedConfig.createServerConnection() ipFedConfig.deployChanges() logger.debug("GET module types") stsModuleTypes = ipFedConfig.getSTSModuleTypes() jsonStsModuleTypes = json.loads(stsModuleTypes) noOfStsModuleTypes = len(jsonStsModuleTypes) stsModuleTypesList = [] for i in range(noOfStsModuleTypes): stsModuleTypesList.append(jsonStsModuleTypes[i]["id"]) logger.debug("GET module instances") stsModuleInstances = ipFedConfig.getSTSModuleInstances() jsonStsModuleInstances = json.loads(stsModuleInstances)
properties[CommonProperties.PROP_USERNAME] = str(idpProps[CommonProperties.PROP_USERNAME]).strip() properties[CommonProperties.PROP_PASSWORD] = str(idpProps[CommonProperties.PROP_PASSWORD]).strip() properties[CommonProperties.PROP_OLD_PASSWORD] = str(idpProps[CommonProperties.PROP_OLD_PASSWORD]).strip() properties[CommonProperties.PROP_EASUSER_OLD_PASSWORD] = str(idpProps[CommonProperties.PROP_EASUSER_OLD_PASSWORD]).strip() properties[CommonProperties.PROP_EASUSER_PASSWORD] = str(idpProps[CommonProperties.PROP_EASUSER_PASSWORD]).strip() properties[CommonProperties.PROP_PRI_INTERFACE_IP] = str(idpProps[CommonProperties.PROP_PRI_INTERFACE_IP]).strip() properties[CommonProperties.PROP_PRI_INTERFACE_MASK] = str(idpProps[CommonProperties.PROP_PRI_INTERFACE_MASK]).strip() properties[CommonProperties.PROP_WEB_HOST_NAME] = str(idpProps[CommonProperties.PROP_WEB_HOST_NAME]).strip() properties[CommonProperties.PROP_WGA_HOST_NAME] = str(idpProps[CommonProperties.PROP_WGA_HOST_NAME]).strip() properties[CommonProperties.PROP_SAML_FEDNAME] = str(idpProps[CommonProperties.PROP_SAML_FEDNAME]).strip() properties[CommonProperties.PROP_SAML_FED_ROLE] = "idp" properties[CommonProperties.PROP_RUNTIME_TRACE_STRING] = "com.tivoli.am.fim.*=ALL" #Find IdP based on name ipFedConfig = FederationManager(properties) ipFedName = properties[CommonProperties.PROP_SAML_FEDNAME] ipFedUrl = ipFedConfig.getIdpFedUrl(ipFedName) properties = {} properties[CommonProperties.PROP_PLATFORM_ACTIVATE_CODE] = str(commonProps[CommonProperties.PROP_PLATFORM_ACTIVATE_CODE]).strip() properties[CommonProperties.PROP_FEDERATION_ACTIVATE_CODE] = str(commonProps[CommonProperties.PROP_FEDERATION_ACTIVATE_CODE]).strip() properties[CommonProperties.PROP_DNS] = str(commonProps[CommonProperties.PROP_DNS]).strip() properties[CommonProperties.PROP_NTP_SERVER] = str(commonProps[CommonProperties.PROP_NTP_SERVER]).strip() properties[CommonProperties.PROP_HOSTS] = str(commonProps[CommonProperties.PROP_HOSTS]).strip() properties[CommonProperties.PROP_BASEURL] = str(spProps[CommonProperties.PROP_BASEURL]).strip() properties[CommonProperties.PROP_USERNAME] = str(spProps[CommonProperties.PROP_USERNAME]).strip() properties[CommonProperties.PROP_PASSWORD] = str(spProps[CommonProperties.PROP_PASSWORD]).strip() properties[CommonProperties.PROP_OLD_PASSWORD] = str(spProps[CommonProperties.PROP_OLD_PASSWORD]).strip() properties[CommonProperties.PROP_EASUSER_OLD_PASSWORD] = str(spProps[CommonProperties.PROP_EASUSER_OLD_PASSWORD]).strip()
properties[CommonProperties.PROP_WGA_HOST_NAME] = str( idpProps[CommonProperties.PROP_WGA_HOST_NAME]).strip() properties[CommonProperties.PROP_SAML_FEDNAME] = str( idpProps[CommonProperties.PROP_SAML_FEDNAME]).strip() properties[CommonProperties.PROP_SAML_FED_ROLE] = "idp" properties[CommonProperties.PROP_RUNTIME_TRACE_STRING] = "com.am.fim.*=ALL" properties[CommonProperties.PROP_SAML_JUNCT] = "/samljct" properties[ CommonProperties.PROP_SAML_APPLIES_TO] = "http://appliesto/saml20" properties[CommonProperties.PROP_LTPA_JUNCT] = "/ltpajct" properties[CommonProperties.PROP_LTPA_APPLIES_TO] = "http://appliesto/ltpa" ipFedConfig = FederationManager(properties) ipFedConfig.changeEasuserPassword() ipFedConfig.deployChanges() logger.debug("GET module types") stsModuleTypes = ipFedConfig.getSTSModuleTypes() jsonStsModuleTypes = json.loads(stsModuleTypes) noOfStsModuleTypes = len(jsonStsModuleTypes) stsModuleTypesList = [] for i in range(noOfStsModuleTypes): stsModuleTypesList.append(jsonStsModuleTypes[i]["id"]) logger.debug("GET module instances") stsModuleInstances = ipFedConfig.getSTSModuleInstances() jsonStsModuleInstances = json.loads(stsModuleInstances) noOfStsModuleInstances = len(jsonStsModuleInstances)