cancel
Showing results for 
Search instead for 
Did you mean: 

How to bypass BI launchpad logon page in BO 4.2

former_member303963
Participant
0 Kudos

Hello,

I need to bypass the BI launchpad logon page to implement a SSO. I achieved it in the BO 4.1 version by using and adapting the custom.jsp page, but the same code does not work for BO4.2 (it opens a white page and nothing else). Could you please, tell me if there is something different (maybe in the way to use the logon token library) in BO4.2 that makes it not to work?

Thank you very much. I inlucde the code of custom.jsp:

<%@ page import="com.crystaldecisions.sdk.exception.SDKException" %>
<%@ page import="com.crystaldecisions.sdk.framework.*" %>
<%@ page import="com.crystaldecisions.sdk.occa.infostore.*" %>
<%@ page import="com.crystaldecisions.sdk.occa.security.*"%>
<%@ page import="java.net.*"%>
<%@ page import="com.crystaldecisions.enterprise.*"%>
<%@ page import="com.crystaldecisions.sdk.plugin.admin.*"%>
<%@ page import="java.sql.*"%>
<%@ page import="com.businessobjects.webutil.Encoder" %>


<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>


<%
//BO Session and redirect to Infoview
IEnterpriseSession enterpriseSession;

/* * Set Enterprise Logon credentials. */
final String BO_CMS_NAME = "cdt-bo:6400";
final String BO_AUTH_TYPE = "secEnterprise";
final String BO_USERNAME = "user";
final String BO_PASSWORD = "pass";
ILogonTokenMgr logonTokenMgr;
String defaultToken = "";

/*
* Log onto Enterprise
*/
boolean loggedIn = true;
try {
//Create session token
enterpriseSession = CrystalEnterprise.getSessionMgr().logon(BO_USERNAME,BO_PASSWORD, BO_CMS_NAME,BO_AUTH_TYPE);
logonTokenMgr = enterpriseSession.getLogonTokenMgr();
defaultToken = logonTokenMgr.createWCAToken("", 20, 1);

//Redirect with token attached to the ivsLogonToken parameter
response.sendRedirect("

"http://172.24.56.210:8080/BOE/BI/logon/start.do?ivsLogonToken="+Encoder.encodeURL(defaultToken));
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

</body>

</html>

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Hi Jose,

I Corrected your Code,

Try the Below Code (Explanation at the End):

<%@ page import="com.crystaldecisions.sdk.exception.SDKException" %>
<%@ page import="com.crystaldecisions.sdk.framework.*" %>
<%@ page import="com.crystaldecisions.sdk.occa.infostore.*" %>
<%@ page import="com.crystaldecisions.sdk.occa.security.*"%>
<%@ page import="java.net.*"%>
<%@ page import="com.crystaldecisions.enterprise.*"%>
<%@ page import="com.crystaldecisions.sdk.plugin.admin.*"%>
<%@ page import="java.sql.*"%>

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>

<%
//BO Session and redirect to Infoview
IEnterpriseSession enterpriseSession;
/* * Set Enterprise Logon credentials. */
final String BO_CMS_NAME = "localhost:6400";
final String BO_AUTH_TYPE = "secEnterprise";
final String BO_USERNAME = "User";
final String BO_PASSWORD = "pass";
ILogonTokenMgr logonTokenMgr;
String defaultToken = "";
/*
* Log onto Enterprise
*/
boolean loggedIn = true;
try {
//Create session token
enterpriseSession = CrystalEnterprise.getSessionMgr().logon(BO_USERNAME,BO_PASSWORD, BO_CMS_NAME,BO_AUTH_TYPE);
logonTokenMgr = enterpriseSession.getLogonTokenMgr();
defaultToken = logonTokenMgr.createWCAToken("", 20, 1);
//Redirect with token attached to the ivsLogonToken parameter
response.sendRedirect("http://172.24.56.210:8080/BOE/BI/logon/start.do?ivsLogonToken="+java.net.URLEncoder.encode(defaultToken));
}catch(Exception e){

}
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
</body> 
</html>

Corrections made

1. "<%@ page import="com.businessobjects.webutil.Encoder" %>" was causing some issues so i removed it.

2. Replaced the URL Encoder you were using from "Encoder.encodeURL()" to "java.net.URLEncoder.encode()", you can use any encoder, this is just what i use regularly.

3. You have opened the try Block but did not close it.

Regards,

Rajesh

Answers (4)

Answers (4)

0 Kudos

Can we login to CMC also using logon token?

former_member303963
Participant
0 Kudos

Hi Rajesh,

It finally worked OK with that code.

Thank you very much.

Jose Manuel.

former_member303963
Participant
0 Kudos

Thanks a lot. I will test in our platform BO 4.2 SP3.

former_member303963
Participant
0 Kudos

Hi Rajesh,

Thank you very much for your answer. The issue with the try catch was just a copy/paste error when I copied here. I will test the rest of the changes you pointed.

One question: Do you have it running it in BO4.2 or in BO4.1?

regards,

Jose.

Former Member
0 Kudos

Above Code was tested in 4.2 SP2