We are running 8.1MR2 and this is a major problem in our environment. Everytime a user schedules a report, and then changes their AD password, all of their past scheduled objects will now fail, with the following error:
CNC-SEC-3403 The user account information is invalid, or it is missing in Content Manager. CAM-AAA-0194 Authentication to the namespace 'ADS' failed. The provided credentials are invalid. Logon failure: unknown user name or bad password.
You can manually work around this by going into My Preferences and renewing, but as one of the past post's said....its a real pain in the a$$, and users always forget.
After working with Cognos for almost a year now, to try and resolve this issue, it was determined that a jsp page had to be added to your front end, so that when users logged in, this JSP page would automatically renew their credentials in the background, and then redirect them to Cognos Connection. In order to do this you need SDK installed. I have not gotten it to work yet, but that is because of lack of time to test. If you do, please let me know.
Here are the instructions from Cognos:
The page can be run from any application server (that has access to the c8 sdk). Typically, it would be run from tomcat, but that is up to you.
For tomcat, copy the page to <c8 install>\webapps\samples
To run it, simply copy the jsp page to the app server. Modify the following code at the top of the page:
String C8 = "
http://servername/C8MR2/cgi-bin/cognos.cgi";
String endPoint = "
http://servername:9305/p2pd/servlet/dispatch";
String namespaceID = "ntlm"; // NOTE: this is the namespace id, not the namespace name.
Open a browser, and type in the url to the jsp page
For tomcat it would be:
http://servername:9300/samples/C8Logon.jsp (note the jsp page name is case sensitive).
You will be prompted for a username and password.
Enter the username and password and click submit.
The jsp page will logon to c8, renew the credentials and then redirect the browser to cognos connection.
Here is teh JSP page from Cognos:
<%@ page import="com.cognos.developer.schemas.bibus._3.*"%>
<%@ page import="org.apache.axis.client.Stub"%>
<%
// connection to the ReportNet service
//----------------------------------------------------
//NOTE: IMPORTANT:
// Change the next 3 variables to suit your environment.
//----------------------------------------------------
String C8 = "
http://wottcs-loehrdlp/C8MR2/cgi-bin/cognos.cgi";
String endPoint = "
http://wottcs-loehrdlp:9305/p2pd/servlet/dispatch";
String namespaceID = "ntlm"; // NOTE: this is the namespace id, not the namespace name.
String userID = request.getParameter("userID");
String password = request.getParameter("password");
if ( userID != null)
{
// if this is the first time into the page, the username will be null, after the user submits the form,
// userid and password will have values.
// System.out.println("UserID: " + userID + " Password: " + password );
// step 1 is to logon on to c8.
ContentManagerService_ServiceLocator cmServiceLocator = new ContentManagerService_ServiceLocator();
ContentManagerService_Port cmService = cmServiceLocator.getcontentManagerService(new java.net.URL(endPoint));
StringBuffer credentialXML = new StringBuffer();
credentialXML.append("<credential>");
credentialXML.append("<namespace>").append(namespaceID).append("</namespace>");
credentialXML.append("<username>").append(userID).append("</username>");
credentialXML.append("<password>").append(password).append("</password>");
credentialXML.append("</credential>");
String encodedCredentials = credentialXML.toString();
cmService.logon(new XmlEncodedXML(encodedCredentials), new SearchPathSingleObject[]{});
// get the cam_passport from the biBusHeader
// the cam_passport is used later to assume this session when we redirect to cognos connection.
BiBusHeader bibus = (BiBusHeader)((ContentManagerServiceStub)cmService).getHeaderObject("", "biBusHeader");
String passport = bibus.getCAM().getCAMPassport().getId();
// now renew the credentials:
// credentials are renewed by changing the action in the bibusheader to "generateTC", and executing
// a query of the content store.
try
{
String search = "~/*";
PropEnum[] props = {PropEnum.searchPath};
// the bibus was retrieved from the cmService earlier.
if(bibus != null)
{
CAM newCam = bibus.getCAM();
if(newCam != null)
{
newCam.setAction("generateTC");
bibus.setCAM(newCam);
BiBusHeader bibus2 = (BiBusHeader)((Stub)cmService).getHeaderObject("","biBusHeader");
CAM c = bibus.getCAM();
}
((Stub)cmService).setHeader("","biBusHeader", bibus);
}
BaseClass[] objects2 = cmService.query(new SearchPathMultipleObject(search), props,
new Sort[] {}, new QueryOptions());
System.out.println("Credentials generated for :" + objects2[0].getSearchPath().getValue());
}
catch(Exception e)
{
System.out.println("Login exception message: " + e.getMessage() );
}
// set the cam_passport cookie: if this jsp page is on another server, use fully qualified machine
// names in all urls above. or set the domain property of the cookie.
Cookie camPassport = new Cookie("cam_passport", passport);
camPassport.setMaxAge(-1);
camPassport.setPath("/");
response.addCookie(camPassport);
String reportURL = C8 ;
//m_tab = p or m or w or id for new page
System.out.println("Re-direct sent.");
%>
<SCRIPT type="text/javascript" >
this.location.href = "<%=response.encodeRedirectURL(reportURL)%>";
</SCRIPT>
<%
}
else
{
%>
<html>
<body>
<form action="\samples\C8Logon.jsp" method=post><table>
<tr><td>User Name</td><td><input type=text name=userID></input></td></tr>
<tr><td>Password</td><td><input type=password name=password></input></td></tr>
<tr><td></td><td><input type=submit value=submit></input></td></tr>
</table>
</form>
</body></html>
<%
}
%>