2016-08-03 13 views
0

サービスプロバイダを作成し、インバウンド認証設定 - > SAML2 Web SSO設定をIdentity Server管理パネルのWeb UI経由で追加するとすべてが機能し、SAMLSSOプロバイダが表示されます後でタブを展開します。SOAP APIを使用してサービスプロバイダにSAMLSSOプロバイダ設定を追加

サービスプロバイダーの作成とAPIを使用したSAMLSSOプロバイダーの追加に悩まされています。 ? - サービスプロバイダを作成するための

IdentityApplicationManagementServiceのwsdl

私は仕事をするために、以下のサービスを使用しています。

IdentitySAMLSSOConfigService?wsdl - SAMLSSOプロバイダを作成します。

私は順番に次のリクエストを送信します。

は、まずSAMLSSOプロバイダを作成します。

POST /services/IdentitySAMLSSOConfigService.IdentitySAMLSSOConfigServiceHttpsSoap11Endpoint/ HTTP/1.1 
    Host: test.com 
    Connection: Keep-Alive 
    User-Agent: PHP-SOAP/5.6.11-1ubuntu3.4 
    Content-Type: text/xml; charset=utf-8 
    SOAPAction: "urn:addRPServiceProvider" 
    Content-Length: 1228 
    Authorization: Basic ***** 

    <?xml version="1.0" encoding="UTF-8"?> 
    <SOAP-ENV:Envelope 
     xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xmlns:ns1="http://dto.saml.sso.identity.carbon.wso2.org/xsd" 
     xmlns:ns2="http://org.apache.axis2/xsd"> 
     <SOAP-ENV:Body> 
      <ns2:addRPServiceProvider> 
       <ns2:spDto> 
        <ns1:assertionConsumerUrl xsi:nil="true"/> 
        <ns1:assertionConsumerUrls>https://test.shib/Shibboleth.sso/SAML2/POST</ns1:assertionConsumerUrls> 
        <ns1:attributeConsumingServiceIndex xsi:nil="true"/> 
        <ns1:certAlias xsi:nil="true"/> 
        <ns1:defaultAssertionConsumerUrl>https://test.shib/Shibboleth.sso/SAML2/POST</ns1:defaultAssertionConsumerUrl> 
        <ns1:digestAlgorithmURI xsi:nil="true"/> 
        <ns1:idpInitSLOReturnToURLs xsi:nil="true"/> 
        <ns1:issuer>https://tesh.shib/shibboleth</ns1:issuer> 
        <ns1:loginPageURL xsi:nil="true"/> 
        <ns1:nameIDFormat xsi:nil="true"/> 
        <ns1:nameIdClaimUri xsi:nil="true"/> 
        <ns1:requestedAudiences xsi:nil="true"/> 
        <ns1:requestedClaims xsi:nil="true"/> 
        <ns1:requestedRecipients xsi:nil="true"/> 
        <ns1:signingAlgorithmURI xsi:nil="true"/> 
        <ns1:sloRequestURL xsi:nil="true"/> 
        <ns1:sloResponseURL xsi:nil="true"/> 
       </ns2:spDto> 
      </ns2:addRPServiceProvider> 
     </SOAP-ENV:Body> 
    </SOAP-ENV:Envelope> 

その後、私が述べたhereとしてSAMLSSOプロバイダで設定インバウンド認証の設定とサービスプロバイダを作成します。

POST /services/IdentityApplicationManagementService.IdentityApplicationManagementServiceHttpsSoap11Endpoint/ HTTP/1.1 
    Host: test.com 
    Connection: Keep-Alive 
    User-Agent: PHP-SOAP/5.6.11-1ubuntu3.4 
    Content-Type: text/xml; charset=utf-8 
    SOAPAction: "urn:createApplication" 
    Content-Length: 1934 
    Authorization: Basic **** 


    <?xml version="1.0" encoding="UTF-8"?> 
    <SOAP-ENV:Envelope 
     xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
     xmlns:ns1="http://model.common.application.identity.carbon.wso2.org/xsd" 
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xmlns:ns2="http://org.apache.axis2/xsd"> 
     <SOAP-ENV:Body> 
      <ns2:createApplication> 
       <ns2:serviceProvider> 
        <ns1:applicationName>tect_com</ns1:applicationName> 
        <ns1:claimConfig xsi:nil="true"/> 
        <ns1:description>Test SP</ns1:description> 
        <ns1:inboundAuthenticationConfig> 
         <ns1:inboundAuthenticationRequestConfigs> 
          <ns1:friendlyName xsi:nil="true"/> 
          <ns1:inboundAuthKey>https://test.shib/shibboleth</ns1:inboundAuthKey> 
          <ns1:inboundAuthType>samlsso</ns1:inboundAuthType> 
          <ns1:properties xsi:nil="true"/> 
         </ns1:inboundAuthenticationRequestConfigs> 
         <ns1:inboundAuthenticationRequestConfigs> 
          <ns1:friendlyName xsi:nil="true"/> 
          <ns1:inboundAuthKey></ns1:inboundAuthKey> 
         <ns1:inboundAuthType>openid</ns1:inboundAuthType> 
          <ns1:properties xsi:nil="true"/> 
         </ns1:inboundAuthenticationRequestConfigs> 
         <ns1:inboundAuthenticationRequestConfigs> 
          <ns1:friendlyName xsi:nil="true"/> 
          <ns1:inboundAuthKey></ns1:inboundAuthKey> 
          <ns1:inboundAuthType>passivests</ns1:inboundAuthType> 
          <ns1:properties xsi:nil="true"/> 
         </ns1:inboundAuthenticationRequestConfigs> 
        </ns1:inboundAuthenticationConfig> 
        <ns1:inboundProvisioningConfig xsi:nil="true"/> 
        <ns1:localAndOutBoundAuthenticationConfig xsi:nil="true"/> 
        <ns1:outboundProvisioningConfig xsi:nil="true"/> 
        <ns1:owner> 
         <ns1:tenantDomain>user.com</ns1:tenantDomain> 
         <ns1:userName>user</ns1:userName> 
         <ns1:userStoreDomain xsi:nil="true"/> 
        </ns1:owner> 
        <ns1:permissionAndRoleConfig xsi:nil="true"/> 
        <ns1:requestPathAuthenticatorConfigs xsi:nil="true"/> 
        <ns1:saasApp>true</ns1:saasApp> 
        <ns1:spProperties xsi:nil="true"/> 
       </ns2:serviceProvider> 
      </ns2:createApplication> 
     </SOAP-ENV:Body> 
    </SOAP-ENV:Envelope> 

両方のリクエストが受け入れられます。 Web UIでサービスプロバイダが表示されますが、SAML Web SSO設定のセクションは空です。

新しいSPで認証しようとすると、すべてが機能します。

Web UIで同じSAML SSO設定を追加しようとすると、すでに存在するというエラーが表示されます。

APIを使用してSAMLSSO構成を作成するときに、テーブルSP_INBOUND_AUTHが空です。しかし、Web UIを使用してSAML構成を作成すると、そのレコードがSP_INBOUND_AUTHテーブルに表示されます。

私には何が欠けていますか?

+0

など

、てupdateApplication操作を起動し、そのインバウンド認証を設定する必要が使用しているアイデンティティ・サーバーのバージョンは何ですか? – pulasthi7

答えて

3

サービスプロバイダを作成する場合は、2つの手順で行う必要があります。

  1. 指定されたアプリケーション名と説明(createApplication)のサービスプロバイダを作成します。
  2. 他の設定(updateApplication)で更新してください。

したがって、あなたのケースでは、createApplicationはアプリケーション名と説明のみで呼び出す必要があります。そして、あなたは[1] https://docs.wso2.com/display/IS510/Using+the+Service+Provider+API#UsingtheServiceProviderAPI-createApplication

+0

ありがとうございます。それは今想定されているように動作します。 – nn4n4s

関連する問題