我想知道是否有人成功将ESB连接到使用LDAP进行身份验证的BAM,以及如何使用。换句话说:在BAM服务器中发布事件的必要权限是什么?
我们已经安装了ESB 4.6.0和BAM 2.2.0,并且它们都配置为使用LDAP(它是一个Active Directory)进行用户管理。
我们尽可能地遵循了这个文档(尽管有一些过时/错误的指示)http://docs.wso2.org/wiki/display/ESB450/Configuring+External+User+Stores
由于ESB向BAM发送事件,因此创建了BAM配置文件,需要有效的用户和密码才能连接到BAM服务器。因此,我们为此创建了特定用户。通过将这些用户添加到默认管理员角色(在下面显示的user-mgt.xml文件中指定的角色)但配置为属于admin组的用户,但ESB和BAM之间的连接失败:
TID: [0] [BAM] [2013-05-07 12:50:58,802] INFO {org.wso2.carbon.databridge.core.DataBridge} - wso2_dev_server connected {org.wso2.carbon.databridge.core.DataBridge}
TID: [0] [BAM] [2013-05-07 12:50:58,847] ERROR {org.wso2.carbon.databridge.core.internal.authentication.Authenticator} - wrong userName or password {org.wso2.carbon.databridge.core.internal.authentication.Authenticator}
直接登录管理控制台(相同凭据)时:
TID: [0] [BAM] [2013-05-07 14:10:48,570] INFO {org.wso2.carbon.core.services.util.CarbonAuthenticationUtil} - 'wso2_dev_server@carbon.super [-1234]' logged in at [2013-05-07 14:10:48,570+1200] from IP address 172.26.34.38 {org.wso2.carbon.core.services.util.CarbonAuthenticationUtil}
为了让它更有趣,如果我使用 MY 凭据,ESB和BAM之间的通信就会起作用。
提前致谢。
这是我们的user-mgt.xml文件:
<UserManager>
<Realm>
<Configuration>
<AdminRole>wso2_admin</AdminRole>
<AdminUser>
<UserName>gherrera</UserName>
<Password></Password>
</AdminUser>
<EveryOneRoleName></EveryOneRoleName> <!-- By default users in this role sees the registry root -->
<Property name="dataSource">jdbc/WSO2CarbonDB</Property>
<Property name="MultiTenantRealmConfigBuilder">org.wso2.carbon.user.core.config.multitenancy.SimpleRealmConfigBuilder</Property>
</Configuration>
<UserStoreManager class="org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager">
<Property name="ReadOnly">true</Property>
<Property name="MaxUserNameListLength">100</Property>
<Property name="ConnectionURL">ldap://activedirectoryserver:389</Property>
<Property name="ConnectionName">CN=someadminuser,OU=Service Accounts,OU=mycompany Users,DC=mycompany,DC=co,DC=nz</Property>
<Property name="ConnectionPassword">someadminuserpassword</Property>
<Property name="passwordHashMethod">PLAIN_TEXT</Property>
<Property name="UserSearchBase">DC=mycompany,DC=co,DC=nz</Property>
<Property name="UserNameListFilter">(objectClass=person)</Property>
<Property name="UserNameAttribute">sAMAccountName</Property>
<Property name="ReadLDAPGroups">true</Property>
<Property name="GroupSearchBase">OU=mycompany Groups,DC=mycompany,DC=co,DC=nz</Property>
<Property name="GroupNameListFilter">(objectClass=group)</Property>
<Property name="GroupNameAttribute">cn</Property>
<Property name="MembershipAttribute">member</Property>
<Property name="UserRolesCacheEnabled">true</Property>
<Property name="ReplaceEscapeCharactersAtUserLogin">true</Property>
<Property name="maxFailedLoginAttempt">3</Property>
</UserStoreManager>
<AuthorizationManager
class="org.wso2.carbon.user.core.authorization.JDBCAuthorizationManager">
<Property name="AdminRoleManagementPermissions">/permission</Property>
<Property name="AuthorizationCacheEnabled">true</Property>
</AuthorizationManager>
</Realm>
</UserManager>