Sumit Deshmukh
Sumit Deshmukh

Reputation: 76

How to link saml service provider(addRPServiceProvider) and application in WSO2 IS?

Created an application with this soap call createApplication()

    <soapenv:Envelope 
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"         
    xmlns:xsd="http://org.apache.axis2/xsd" xmlns:xsd1="http://model.common.application.identity.carbon.wso2.org/xsd">
    <soapenv:Header/>
    <soapenv:Body>
     <xsd:createApplication>
     <xsd:serviceProvider>
        <xsd1:applicationName>travelocity.com</xsd1:applicationName>
        <xsd1:description>SaMLApp</xsd1:description>
     </xsd:serviceProvider>
  </xsd:createApplication>

Added a service provider with this soap call addRPServiceProvider()

   <soapenv:Envelope 
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
    xmlns:xsd="http://org.apache.axis2/xsd" 
    xmlns:xsd1="http://dto.saml.sso.identity.carbon.wso2.org/xsd">
   <soapenv:Header/>
   <soapenv:Body>
    <xsd:addRPServiceProvider>
     <xsd:spDto><xsd1:assertionConsumerUrl>http://localhost:8080/travelocity.com/home.jsp</xsd1:assertionConsumerUrl>
        <xsd1:doSignAssertions>true</xsd1:doSignAssertions>
        <xsd1:doSignResponse>true</xsd1:doSignResponse>
        <xsd1:doSingleLogout>true</xsd1:doSingleLogout>
        <xsd1:issuer>sophos.com</xsd1:issuer>         
        <xsd1:nameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress</xsd1:nameIDFormat>
        <xsd1:useFullyQualifiedUsername>true</xsd1:useFullyQualifiedUsername>
     </xsd:spDto>
  </xsd:addRPServiceProvider>

Now how should I link those by calling updateApplication()? What should be the attributes of update application soap call? I referred this, but could not figure out the linking part in updateApplication().

Note: I can create these on WSO2 IS management console web UI. I could not create them through API calls.

Upvotes: 0

Views: 72

Answers (1)

Jayanga Kaushalya
Jayanga Kaushalya

Reputation: 2744

SAML application will be added as an inbound authentication configuration of the Service Provider. So when you call updateApplication method, use the issuer name that you used to create the SAML application (travelocity.com in your case) as the inboundAuthKey in inboundAuthenticationConfig section. If you need a code sample please follow this.

Upvotes: 1

Related Questions