Skip to Content
0

How to bypass BI launchpad logon page in BO 4.2

Nov 21, 2016 at 06:50 PM

3k

avatar image

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>

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
avatar image
Former Member Nov 22, 2016 at 07:23 AM
1

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

Share
10 |10000 characters needed characters left characters exceeded
Mr. Jose Manuel Hernandez Nov 22, 2016 at 08:27 AM
0

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.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Above Code was tested in 4.2 SP2

0
Mr. Jose Manuel Hernandez Nov 22, 2016 at 11:23 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Mr. Jose Manuel Hernandez Dec 15, 2016 at 01:15 PM
0

Hi Rajesh,

It finally worked OK with that code.

Thank you very much.

Jose Manuel.

Share
10 |10000 characters needed characters left characters exceeded