简体   繁体   English

WSO2身份服务器外部JDBC存储

[英]WSO2 identity server external JDBC store

I want to use a external JDBC store as default store instead of the default LDAP store. 我想使用外部JDBC存储作为默认存储,而不是默认LDAP存储。 Followed the documentation in this link. 遵循此链接中的文档。

http://docs.wso2.org/wiki/display/IS400/Configuring+an+External+JDBC+User+Store http://docs.wso2.org/wiki/display/IS400/Configuring+an+External+JDBC+User+Store

Getting the following exception Appreciate any help. 获得以下异常感激任何帮助。

An unknown exception occurred while starting LDAP server.java.lang.NullPointerException: Name is null 启动LDAP server.java.lang.NullPointerException时发生未知异常:名称为null

You can configure WSO2 IS 4.0.0 with an external JDBC users store.The problem is due to an issue with the instructions in the documentation(1) as some configuration steps are missing there.I have created the jira [DOCUMENTATION-17] to track this doc issue. 您可以使用外部JDBC用户存储来配置WSO2 IS 4.0.0。问题是由于文档(1)中的说明存在问题,因为那里缺少一些配置步骤。我创建了jira [DOCUMENTATION-17]跟踪此文档问题。 Please follow below steps to connect IS 4.0.0 with external jdbc users-store. 请按照以下步骤将IS 4.0.0与外部jdbc users-store连接。

1) Change the UserStoreManager class to JDBCUserStoreManager from user-mgt.xml [IS_Home/repository/conf] and add the related database connection property to it as mentioned in (1) 1)将UserStoreManager类从user-mgt.xml [IS_Home / repository / conf]更改为JDBCUserStoreManager,并如(1)中所述向其添加相关的数据库连接属性

2) Add 'passwordHashMethod' propert within JDBCUserStoreManager and set the value to 'SHA' or 'PLAIN_TEXT' in {IS_HOME}/repository/conf/user-mgt.xml. 2)在JDBCUserStoreManager中添加“ passwordHashMethod”属性,并将{IS_HOME} /repository/conf/user-mgt.xml中的值设置为“ SHA”或“ PLAIN_TEXT”。 Eg: <Property name="passwordHashMethod">SHA</Property> 例如:<Property name =“ passwordHashMethod”> SHA </ Property>

3) Set value of the 'MultiTenantRealmConfigBuilder' property to 'org.wso2.carbon.user.core.config.multitenancy.SimpleRealmConfigBuilder' in {IS_HOME}/repository/conf/user-mgt.xml. 3)在{IS_HOME} /repository/conf/user-mgt.xml中,将“ MultiTenantRealmConfigBuilder”属性的值设置为“ org.wso2.carbon.user.core.config.multitenancy.SimpleRealmConfigBuilder”。

Eg: <Property name="MultiTenantRealmConfigBuilder">org.wso2.carbon.user.core.config.multitenancy.SimpleRealmConfigBuilder</Property> 例如:<Property name =“ MultiTenantRealmConfigBuilder”> org.wso2.carbon.user.core.config.multitenancy.SimpleRealmConfigBuilder </ Property>

4) Enable JDBCTenantManager in tenant-mgt.xml and comment out the config section for CommonHybridLDAPTenantManager. 4)在tenant-mgt.xml中启用JDBCTenantManager,并注释掉CommonHybridLDAPTenantManager的config部分。

Once you did above configurations,you'll able to configure WSO2 Identity Server to an external jdbc user store successfully. 完成上述配置后,您将能够成功将WSO2 Identity Server配置为外部jdbc用户存储。

(1) http://docs.wso2.org/wiki/display/IS400/Configuring+an+External+JDBC+User+Store (1) http://docs.wso2.org/wiki/display/IS400/Configuring+an+External+JDBC+User+Store

I was able to resolve this. 我能够解决这个问题。

Start with a clean install of WSO2 IS 4.0.0 if possible. 如果可能,请从全新安装WSO2 IS 4.0.0开始。

Apart from following the directions given in the documentation to setup a JDBC datastore; 除了按照文档中给出的指示来设置JDBC数据存储区外; you need to do the following : 您需要执行以下操作:

  1. Enable JDBCTenantManager in tenant-mgt.xml and comment out CommonHybridLDAPTenantManager2 tenant-mgt.xml启用JDBCTenantManager并注释掉CommonHybridLDAPTenantManager2
  2. Set the enable property to false for EmbeddedLDAP in embedded-ldap.xml embedded-ldap.xml中将EmbeddedLDAP的enable属性设置为false

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM