如何在wso2is 5.7版中更新服务提供者-saml2sso配置详细信息

问题描述

当前在我们的组织中从事wos2IS 5.7版的身份服务。我们正在使用wso2进行所有与wso2相关的服务,例如租户创建,用户存储,使用Spring Boot使用soap请求的服务提供商。我在这里面临一个问题,要使用soap请求更新服务提供商saml2sso配置详细信息。我已经阅读了wso2的文档,并看到了使用SoapUI工具的Soap Request的wso2的ServiceProviderServices,但是没有找到合适的Soap Request。有人能帮助我吗?

解决方法

您可以为此使用 IdentitySAMLSSOConfigService 。 WSDL合同可从https://localhost:9443/services/IdentitySAMLSSOConfigService?wsdl URL获得。 (确保<HideAdminServiceWSDLs>false</HideAdminServiceWSDLs>文件中有carbon.xml,才能访问WSDL文件)

这些SAML配置作为注册表集合和属性存储在注册表中。因此,也可以使用注册表管理服务来更改这些设置。

但是,这是一个两步过程,您首先要使用 IdentityApplicationManagementService 服务创建应用程序。然后使用下面的 IdentitySAMLSSOConfigService 方法来更改SAML配置。 (下面的示例仅用于后续步骤。)

样品申请

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://org.apache.axis2/xsd"
               xmlns:xsd1="http://dto.saml.sso.identity.carbon.wso2.org/xsd">
<soap:Header/>
<soap:Body>
    <xsd:addRPServiceProvider>
        <xsd:spDto>
            <xsd1:assertionConsumerUrls>https://localhost:9443/assertionURL</xsd1:assertionConsumerUrls>
            <xsd1:attributeConsumingServiceIndex></xsd1:attributeConsumingServiceIndex>
            <xsd1:certAlias></xsd1:certAlias>
            <xsd1:defaultAssertionConsumerUrl>https://localhost:9443/assertionURL</xsd1:defaultAssertionConsumerUrl>
            <xsd1:digestAlgorithmURI>http://www.w3.org/2001/04/xmlenc#sha512</xsd1:digestAlgorithmURI>
            <xsd1:doEnableEncryptedAssertion>false</xsd1:doEnableEncryptedAssertion>
            <xsd1:doSignAssertions>true</xsd1:doSignAssertions>
            <xsd1:doSignResponse>true</xsd1:doSignResponse>
            <xsd1:doSingleLogout>true</xsd1:doSingleLogout>
            <xsd1:doValidateSignatureInRequests>true</xsd1:doValidateSignatureInRequests>
            <xsd1:enableAttributeProfile>true</xsd1:enableAttributeProfile>
            <xsd1:enableAttributesByDefault>true</xsd1:enableAttributesByDefault>
            <xsd1:idPInitSLOEnabled>false</xsd1:idPInitSLOEnabled>
            <xsd1:idPInitSSOEnabled>false</xsd1:idPInitSSOEnabled>
            <xsd1:idpInitSLOReturnToURLs></xsd1:idpInitSLOReturnToURLs>
            <xsd1:issuer>testissuer</xsd1:issuer>
            <xsd1:loginPageURL></xsd1:loginPageURL>
            <xsd1:nameIDFormat>urn/oasis/names/tc/SAML/1.1/nameid-format/emailAddress</xsd1:nameIDFormat>
            <xsd1:nameIdClaimUri></xsd1:nameIdClaimUri>
            <xsd1:requestedAudiences>https://localhost:9443/audiences</xsd1:requestedAudiences>
            <xsd1:requestedRecipients>https://localhost:9443/recipients</xsd1:requestedRecipients>
            <xsd1:signingAlgorithmURI>http://www.w3.org/2001/04/xmldsig-more#rsa-sha256</xsd1:signingAlgorithmURI>
            <xsd1:sloRequestURL>https://localhost:9443/singleLoguoutRequest</xsd1:sloRequestURL>
            <xsd1:sloResponseURL>https://localhost:9443/singleLoguoutResponse</xsd1:sloResponseURL>
        </xsd:spDto>
    </xsd:addRPServiceProvider>
</soap:Body>
</soap:Envelope>