Search code examples
single-sign-onibm-sbtibm-connections

SSO with the SBTSDK


i try to get Single Sign On working on our system. Basic Authentification already works fine. What do i need to modify when using SSO? I changed the managed-beans.xml settings like here: http://www-10.lotus.com/ldd/appdevwiki.nsf/xpDocViewer.xsp?lookupName=IBM+Social+Business+Toolkit+SDK+documentation#action=openDocument&res_title=Endpoint_reference_SDK1.0&content=pdcontent

When executing an example i still get prompted to a login-form. Observing the Object with Firebug i can see correct baseURL but authType is still on "basic". Do i only need to set the managed-bean-class to the ConnectionsSSOEndpoint?


Solution

  • Yes. You need to change Managed Bean class to com.ibm.sbt.services.endpoints.ConnectionsSSOEndpoint as shown in the documentation.

    <managed-bean>
        <managed-bean-name>connectionsSSO</managed-bean-name>
        <managed-bean-class>com.ibm.sbt.services.endpoints.ConnectionsSSOEndpoint</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
        <managed-property>
            <property-name>url</property-name>
            <value>https://yourconnectionsserver</value>
        </managed-property>
        <!-- Trust the connection -->
        <managed-property>
            <property-name>forceTrustSSLCertificate</property-name>
            <value>true</value>
        </managed-property>
    </managed-bean>
    

    First of all, check if SSO working properly. Because if it was basic authentication, it would ask the password through the browser prompt (not with a login form).

    There is a tutorial for that here: troubleshooting issues with sso

    To test it by yourself, login the server-1 and then in the same browser session (on a new tab or so), manually type in the following URL:

    http://yourconnectionsserver/communities/service/atom/communities/all

    Then you can see if the problem is related to the endpoint or not.

    To set up the endpoint, make sure the services are initialized with the right endpoint name, matching the tag managed-bean-name.

    in JavaScript:

    var communityService = new CommunityService({endpoint:'connectionsSSO'});
    

    in Java:

    CommunityService svc = new CommunityService("connectionsSSO");