Skip to Content
0
Former Member
Aug 25, 2011 at 04:38 PM

SSO login for custom BO SDK Application

138 Views

Hi,

I am trying to build custom application using BO SDK. Requirement is application should be SSO configured.

Below is my sample code of JSP

<%@ page import = "com.crystaldecisions.sdk.framework.ISessionMgr"%>

<%@ page import = "com.crystaldecisions.sdk.framework.IEnterpriseSession"%>

<%@ page import = "com.crystaldecisions.sdk.exception.SDKException"%>

<%@ page import = "com.crystaldecisions.sdk.occa.infostore.IInfoStore"%>

<%@ page import="com.crystaldecisions.sdk.framework.CrystalEnterprise" %>

<%@ page import="org.ietf.jgss.GSSCredential"%>

<%@ page import="org.ietf.jgss.GSSManager"%>

<%@ page import="com.businessobjects.sdk.credential.CredExtractor"%>

<%

GSSCredential creds = null;

GSSManager manager = null;

CredExtractor credExtractor = new CredExtractor(request);

creds = credExtractor.GetCredential();

manager = credExtractor.GetManager();

ISessionMgr sm = CrystalEnterprise.getSessionMgr();

IEnterpriseSession enterpriseSession = sm.logon(creds, manager, cms, authentication);

IInfoStore infoStore = (IInfoStore)enterpriseSession.getService("", "InfoStore");

String token=enterpriseSession.getLogonTokenMgr().getDefaultToken();

String myUserID=enterpriseSession.getUserInfo().getUserName().toString();

session.setAttribute("myUserID",myUserID);

session.setAttribute("token", token);

session.setAttribute("InfoStore", infoStore);

session.setAttribute("enterpriseSession",enterpriseSession);

response.sendRedirect("home.jsp");

%>

i am redirecting to home.jsp and on home.jsp page i am just displaying userID whish is set in above code

I am deploying my application on server which is SSO enable (Vintela)i have made the necessary changes in web.xml file also

below is my web.xml file

<filter>

<filter-name>authFilter</filter-name>

<filter-class>com.businessobjects.sdk.credential.WrappedResponseAuthFilter</filter-class>

<init-param>

<param-name>idm.realm</param-name>

abcd.AD.some.COM

</init-param>

<init-param>

<param-name>idm.princ</param-name>

abso/ SYSBODEV.abcd.ad.some.com

</init-param>

<init-param>

<param-name>idm.keytab</param-name>

<param-value>C:\winnt\sysbodev.keytab</param-value>

</init-param>

<init-param>

<param-name>idm.allowUnsecured</param-name>

<param-value>true</param-value>

</init-param>

<init-param>

<param-name>idm.allowNTLM</param-name>

<param-value>false</param-value>

</init-param>

<init-param>

<param-name>idm.logger.name</param-name>

<param-value>simple</param-value>

<description>The unique name for this logger.</description>

</init-param>

<init-param>

<param-name>idm.logger.props</param-name>

<param-value>error-log.properties</param-value>

<description> Configures logging from the specified file. </description>

</init-param>

<init-param>

<param-name>error.page</param-name>

<param-value>/frame/errorSSO.jsp</param-value>

<description>The URL of the page to show if an error occurs during authentication.</description>

</init-param>

</filter>

<filter-mapping>

<filter-name>authFilter</filter-name>

<url-pattern>/frame/frameset.jsp</url-pattern>

</filter-mapping>

but i am getting error saying VSJ authentication was not performed for this request.

can any one help me ouot where i am going wrong

Edited by: Asraf_Shaikh on Aug 25, 2011 6:39 PM