예제 #1
0
        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)
    else:
        modfedJson = ipFedConfig.modifyIdPFederationJson(fedJson, MappingRule)
        ipFedConfig.putFederation(ipFedUrl, modfedJson)
예제 #2
0
        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()