| shantanu.yelwande@kpitcummins.com 2007-12-19, 1:43 am |
| Hi,<br />
We have a servlet application that is protected by siteminder which in the same single sign on domain as the portal server, but on a different websphere application server. We need to connect to this servlet application through portlet using the credentia
l vault as it is the preferred way to single sign on to backend applications in portal. We are using the SiteMinderTokenCredential object for authenticating with the backend application. We have tried to execute the following code.<br />
<br />
// Get the subject from the VaultService<br />
Subject subject = vaultService.getUserSubject(portletRequest); <br />
<br />
// Get the SiteMinderTokenCredential. . .<br />
Object[] creds =<br />
subject. getPrivateCredentials(SiteMinderTokenCre
dential.class).toArray();<br />
<br />
SiteMinderTokenCredential credential = (SiteMinderTokenCredential) creds[0];<br />
<br />
// This is the protected servlet URL<br />
String protectedURL = "Protected servlet URL";<br />
<br />
HttpURLConnection conn = credential. getAuthenticatedConnection(protectedURL)
;<br />
<br />
The issue is subject.getPrivateCredentials() always return an empty array. We tried replacing the "SiteMinderTokenCredential.class" with LtpaTokenCredential, WebSealTokenCredential, but it still returns an empty array.<br />
<br />
Please can anyone suggest what is the issue and whether we need to make any configuration changes on the portal server?
|