WSO2 Identity Server 4.1.0:用户存储以只读模式运行。无法写入用户商店

时间:2013-02-27 20:22:10

标签: wso2 readonly wso2is

启动WSO2 Identity Server 4.1.0时出现以下错误:

[2013-02-27 17:00:33,192] ERROR {org.wso2.carbon.identity.mgt.IdentityMgtEventListener} -  Error while init identity listener
org.wso2.carbon.user.core.UserStoreException: User store is operating in read only mode. Cannot write into the user store.
at org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager.doSetUserClaimValue(ReadOnlyLDAPUserStoreManager.java:1293)
at org.wso2.carbon.user.core.common.AbstractUserStoreManager.setUserClaimValue(AbstractUserStoreManager.java:823)
at org.wso2.carbon.identity.mgt.IdentityMgtEventListener.<init>(IdentityMgtEventListener.java:68)
at org.wso2.carbon.identity.mgt.internal.IdentityMgtServiceComponent.activate(IdentityMgtServiceComponent.java:89)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
...

这意味着WSO2正在尝试写入ldap,但我已将其配置为只读:

<UserStoreManager class="org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager">
    <Property name="ReadOnly">true</Property>
    <Property name="MaxUserNameListLength">100</Property>
    <Property name="ConnectionURL">ldaps://xxxx:636</Property>
    <Property name="ConnectionName">uid=xxx,ou=xx,dc=xx,dc=xx,dc=x</Property>
    <Property name="ConnectionPassword">xxxxxx</Property>
    <Property name="passwordHashMethod">SHA</Property>
    <Property name="UserSearchBase">ou=xx,dc=x,dc=xx,dc=xx</Property>
    <Property name="UserNameListFilter">(objectClass=person)</Property>
    <Property name="UserNameAttribute">uid</Property>
    <Property name="ReadLDAPGroups">true</Property>
    <Property name="GroupSearchBase">ou=xx,dc=xx,dc=xx,dc=xx</Property>
    <Property name="GroupNameListFilter">(objectClass=posixGroup)</Property>
    <Property name="GroupNameAttribute">cn</Property>
    <Property name="MembershipAttribute">memberUid</Property>
    <Property name="UserRolesCacheEnabled">true</Property>
    <Property name="ReplaceEscapeCharactersAtUserLogin">true</Property>
    <Property name="maxFailedLoginAttempt">0</Property> 
</UserStoreManager>

我错过了什么吗?

1 个答案:

答案 0 :(得分:1)

您的只读用户存储应包含'admin'用户,该用户在user-mgt.xml顶部的域配置部分中指定。

<AdminUser>
    <UserName>admin</UserName>
    <Password>admin</Password>
</AdminUser>

由于无法找到,WSO2 IS正在尝试编写它。