在WSO2 IS和ESB之间共享LDAP时出错

时间:2015-01-16 09:20:53

标签: wso2esb wso2is

我是使用WSO2 IS 5.0.0和ESB 4.8.1的新手,尝试此示例@ http://hasini-gunasinghe.blogspot.sg/2011/08/fine-grained-authorization-to-restful.html(已将xacml 2.0更改为3.0策略,已发布策略到PDP) 还提到https://malalanayake.wordpress.com/2013/02/13/authentication-and-authorization-with-wso2esb-and-wso2is/

在ESB的user-mgmt.xml中,将AddAdmin设置为false, 注释org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager部分并取消注释ISUserStoreManager class =“org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager”部分并重新启动ESB

然而,它正在抛出[Start Level Event Dispatcher] ERROR Activator无法启动User Manager Core捆绑包 显示java.lang.NullPointerException     在org.wso2.carbon.user.core.common.DefaultRealmService。(DefaultRealmService.java:87)     在org.wso2.carbon.user.core.common.DefaultRealmService。(DefaultRealmService.java:114)     在org.wso2.carbon.user.core.internal.Activator.startDeploy(Activator.java:69)     在org.wso2.carbon.user.core.internal.BundleCheckActivator.start(BundleCheckActivator.java:61)     在org.eclipse.osgi.framework.internal.core.BundleContextImpl $ 1.run(BundleContextImpl.java:711)     at java.security.AccessController.doPrivileged(Native Method)     在org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)     在org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)     在org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)     在org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)     在org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176)     在org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)     在org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)     在org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)     在org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)     在org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)     在org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)     在org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)     在org.eclipse.osgi.framework.eventmgr.EventManager $ EventThread.run(EventManager.java:340)

请帮助。感谢

1 个答案:

答案 0 :(得分:1)

因此,您希望将ESB配置为连接到WSO2IS的LDAP用户存储。然后你想要通过以下。 (请注意,ESB不包含嵌入式LDAP服务器。)

  1. 评论org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager
  2. 取消注释ISUserStoreManager
  3. ISUserStoreManager标记重命名为UserStoreManager
  4. 将LDAP网址配置为WSO2IS服务器的LDAP网址。您可以通过在UserStoreManager元素下配置以下属性来完成此操作。默认情况下,WSO2IS的LDAP端口为10389(端口偏移为0)

    <Property name="ConnectionURL">ldap://localhost:10389</Property>

  5. 此外,如果您使用WSO2IS进行XACML授权,我建议您浏览this博客,因为它包含了在WSO2IS中使用XACML的所有基本知识。