cancel
Showing results for 
Search instead for 
Did you mean: 

SSO login for custom BO SDK Application

Former Member
0 Kudos

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>

<param-value>abcd.AD.some.COM</param-value>

</init-param>

<init-param>

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

<param-value>abso/SYSBODEV.abcd.ad.some.com</param-value>

</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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

SSO Login Problem solved .......

Regards,

Asraf Shaikh

Edited by: Asraf_Shaikh on Aug 29, 2011 8:43 AM

Former Member
0 Kudos

How did it solved can you tell the solution please.

Former Member
0 Kudos

Hi Amit,

Can you tell me first , like what you are doing and where you are facing problem and what approach you are taking then only i may be in good position to help you out.

By the way if you have your server SSO configured, then for sure above code works.

Thanks & Regards

Asraf Shaikh

Former Member
0 Kudos

Hi Asraf,

I'm facing the same issue you described above. The exception: "vsj authentication was not performed for this request" is thrown when I try to authenticate with SSO on my custom web application. I know that SSO is correctly configured because it works for InfoView and desktop clients.

Could you describe how did you solve this problem hoping that can work for me as well?

Thanks

Ivan Aguilar

Edited by: Ivan Aguilar on Nov 9, 2011 9:46 AM

Former Member
0 Kudos

Hi ivan,

since i was busy with something else, so i could not logging to the forum and reply on time, anyways if your problem is still not solved.

then follow the approach ( this is for java only)

1. see if you can access infoview application , if yes then check web.xml file and try to uncomment the comment elements in web.xml file.

2. check the jar file needed for sso , like credential.jar. you can take all the jar file from infoview application

below is my code for sso login( only the important things i am putting rest you can manage)

imports

-


import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;

import org.apache.struts.action.Action;

import org.apache.struts.action.ActionForm;

import org.apache.struts.action.ActionForward;

import org.apache.struts.action.ActionMapping;

import org.ietf.jgss.GSSCredential;

import org.ietf.jgss.GSSManager;

import com.businessobjects.sdk.credential.CredExtractor;

import com.crystaldecisions.sdk.framework.CrystalEnterprise;

import com.crystaldecisions.sdk.framework.IEnterpriseSession;

import com.crystaldecisions.sdk.occa.infostore.IInfoStore;

code

-


GSSCredential myCredential = null;

GSSManager myManager = null;

CredExtractor myCredExtractor = new CredExtractor(request);

myCredential = myCredExtractor.GetCredential();

myManager = myCredExtractor.GetManager();

String myCmsName = getServlet().getServletContext().getInitParameter("cms.default");

IEnterpriseSession myIEnterpriseSession = CrystalEnterprise.getSessionMgr().logon(myCredential,myManager, myCmsName, SEC_WINAD);

IInfoStore myIInfoStore = (IInfoStore) myIEnterpriseSession.getService(PortalConstants.EMPTYSTRING, PortalConstants.INFOSTORE);

you can put try catch block -


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>

<param-value>HODC.AD.abc.COM</param-value>

</init-param>

<init-param>

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

<param-value>BOSSO/SYSBODEV.hodc.ad.abc.com</param-value>

</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>

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

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

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

</init-param>

<init-param>

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

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

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

</init-param>

<init-param>

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

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

<param-value>/JSP/failure.jsp</param-value>

</init-param>

</filter>

<filter-mapping>

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

<url-pattern>/logon.do</url-pattern>

</filter-mapping>

above code is working , so if you can follow the same,it should work for you also.and it for secWinad and sso is vintela

let me know the status