Skip to Content
author's profile photo Former Member
Former Member

SSO login for custom BO SDK Application

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Aug 29, 2011 at 06:41 AM

    Hi,

    SSO Login Problem solved .......

    Regards,

    Asraf Shaikh

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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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>

      HODC.AD.abc.COM

      </init-param>

      <init-param>

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

      BOSSO/ SYSBODEV.hodc.ad.abc.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>

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

      / logon.do

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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.