编辑:将“或 LDAP”附加到问题标题,表明我希望有一个解决方案可以让我使用 LDAP 凭据进行身份验证。
我的问题:如何验证 BusinessObjects session在 Active Directory 中使用凭据?
示例:(我认为)我有一个来自 SAP 的示例,说明如何在 .NET
中执行此操作,但我似乎找不到类似的解决方案 Java
。 (参见 this pdf 并搜索“修改 .NET Web 应用程序以启用 Kerberos”)。
目前:我有一个使用企业帐户进行身份验证的解决方案:
/**
* 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
...
}
上面的代码效果很好。
现在:我希望能够允许用户提供他们的 Active Directory 凭据并使用这些凭据进行身份验证。但是,我似乎找不到办法做到这一点。关于上述代码的文档可以在 that same pdf 中找到。搜索“登录服务器”。
注意:我可能做错了。我的组织对 Active Directory 和 LDAP 身份验证使用相同的凭据。如果有一种方法可以使用 LDAP 来执行此操作,那可能就足够了。谢谢。
最佳答案
答案假定您已经为用户设置了 Active Directory 和/或 LDAP 身份验证,并且用户具有该身份验证方法的别名。这应该可以通过登录 InfoView 来验证。
您应该可以使用 credential.setAuthType(authType) 来完成。
authType 在哪里
- “secEnterprise”默认值
- “secLDAP”
- “secWinAD”
默认情况下,AuthType 设置为 secEnterprise 似乎也有道理。
注意:我仍在使用 R3,它的身份验证机制略有不同,我还没有专门尝试过此解决方案。
重要编辑:文档(这对 BusinessObjects 来说很糟糕,阅读本文的任何人可能已经知道)说对于 Activity 目录,您使用“secAD”。但是,在我的测试中,我能够使用“secWinAD”成功进行身份验证,而它根本没有出现在他们的文档中的任何地方:-/(我能找到)。
关于java - 如何使用 Active Directory 或 LDAP 登录到 Business Objects,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11251727/