-
Notifications
You must be signed in to change notification settings - Fork 71
Troubleshooting Issues with the SocialSDK
First step to diagnose issues with the SDK is to enable full logging on the server side. This applies both to the Java SDK, which originates requests within the server, and the JavaScript SDK, that forward all requests to the proxy within the server.
These are the properties to be set on the server environment to enable logs:
org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog org.apache.commons.logging.simplelog.showdatetime=true org.apache.commons.logging.simplelog.log.httpclient.wire=debug org.apache.commons.logging.simplelog.log.org.apache.commons.httpclient=debug org.apache.commons.logging.simplelog.defaultlog=debug
If launched from the script files, add the property to the environment variable CATALINA_OPTS as system property ( -Dname=value) If launched as window service, add them to the java tab of the configuration application.
Follow the steps here: http://www-01.ibm.com/support/docview.wss?uid=swg21417365
- check that the requests log on the server include the authorization header
- check the authorization header content (it's base64 encoded) and ensure the credential are as put by the user
- check that the login page is generated correctly: parameter endpoint must match the service endpoint as configured in the managed beans on the login URL:
- Open a developer tool like Firebug or the chrome developer console
- Navigate trough the application until you meet basic auth login page: sbt/js/sdk/sbt/authenticator/templates/login.html
- Check the login page actionURL parameter: /service/basicAuth/smartcloudBasic/JSApp - The URL part after /basicAuth/ represent your endpoint, ensure it is the one configured for the application
- Check the endpoint in use by the service, at any request made from the SDK: sbt.sample.web/service/proxy/smartcloudBasic/ - The URL part after /proxy/ represent the endpoint in use
- Open the connections/smartcloud homepage and authenticate.
- Remove all cookies with the exception of the LTPA cookies
- Reload the homepage. If you are still authenticated, the LTPA configuration is correct. Otherwise look here for more information about setting up and configuring SSO: about key management: http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=%2Fcom.ibm.websphere.soafep.multiplatform.doc%2Finfo%2Fae%2Fae%2Ftsec_ltpa_and_keys_step1.html about connections configuration: http://publib.boulder.ibm.com/infocenter/ltscnnct/v2r0/index.jsp?topic=/com.ibm.connections.25.help/c_sec_config_sso.html
- Open a developer tool like Firebug or the chrome developer console
- Open a page to your connections/smartcloud server and authenticate
- Check the LTPA tokens and note down values and domain.
- Assure that the SDK requests are made toward a domain matching the domain of the LTPA token according to the cookie matching rules (this usually means having the app deployed in a subdomain, see http://stackoverflow.com/questions/1062963/how-do-browser-cookie-domains-work ).
- Open your application and check at any request made from the SDK that the LTPA cookie is sent by the browser. The browser will forward the token only if the application reside in a valid domain - the same or a subdomain of the cookie domain noted in 3
- Check in the server log the presence of the LTPA token in the request's header made to connection/smartcloud.
An exception No Method Found: org/apache/http/client/methods/HttpUriRequest might happen in a Websphere Application server deployment; this is a known issue with non recent WebSphere versions.
Check this PM for update level required to run the SBT: http://www-01.ibm.com/support/docview.wss?uid=swg1PM74259
As a temporary workaround, set the class loader as parent last for both the ear and the single modules
Applications > Websphere Enterprise Applications > YourApplication > Class loading and update detection
Applications > Websphere Enterprise Applications > YourApplication > Manage Modules > YourModule