javaauthenticationactive-directorybusiness-objects

How to log into BusinessObjects using Active Directory or LDAP


Edit: Appended "or LDAP" to question title to indicate that I would be fine to have a solution which made it possible for me to authenticate with LDAP credentials.

My Question: How do I authenticate a BusinessObjects session using credentials with Active Directory?

Example: I have (I think) an example from SAP on how to do this in .NET but I can't seem to find a similar solution for Java. (See this pdf and search for "Modify the .NET Web Application to enable Kerberos").

Currently: I have a solution to authenticate using an Enterprise Account:

/**
* Logs into BusinessObjects. Sets the reportEngine and biPlatform
*/
public void loginToBusinessObjects() throws AxisFault, MalformedURLException, Exception {
  LogHelper.println("Server connection: " + boServer);

  URL boConURL = new URL(boServer);//set connection URL
  connection = new com.businessobjects.dsws.Connection(boConURL);

  boSession = new Session(connection); //setup new session

  EnterpriseCredential credential = EnterpriseCredential.Factory.newInstance();
  credential.setLogin(boUsername);
  credential.setPassword(boPassword);
  LogHelper.println(boUsername + ": ##password##");
  boSession.login(credential); //login to server
  ...
}

The code above works great.

Now: I want to be able allow users to give their Active Directory credentials and authenticate using those. I can't seem to find a way to do this however. Documentation on the code above can be found in that same pdf searching for "Logging in to a server."

Note: I could be going about this all wrong. My organization uses the same credentials for Active Directory and LDAP Authentication. If there's a way to do this using LDAP that may be sufficient. Thanks.


Solution

  • The answer assumes you have set up the Active Directory and/or LDAP authentication for users and the user(s) have an alias to that authentication method. This should be verifiable by logins into InfoView.

    You should be able to do it by using credential.setAuthType(authType).
    Where authType is

    Seems and makes sense that by default the AuthType is set to secEnterprise.

    Note: I'm still on R3 which has a slightly different authentication mechanism and I have not specifically tried this solution.


    Important Edit: The documentation (which is awful for BusinessObjects and anyone reading this probably already knows that) says that for active directory you use "secAD". However, in my testing I was able to successfully authenticate using "secWinAD" which does not appear anywhere in their documentation at all :-/ (that I could find).