0

我正在尝试将用户添加到后端 AD。但是,如果我指定密码,我总是得到'密码不符合系统要求。请再试一次。' (我可以在广告服务器上使用相同的密码将用户添加到广告)

然后我尝试了“向用户询问密码”而不是指定密码。创建失败并显示以下消息:

无法添加用户 test.com/testadd。错误是:凭据无效。凭据必须是具有以下格式的非空字符串,空

虽然我确定广告证书已添加到我能找到的所有密钥库中。

那么接下来我能做什么呢?

这是我的 user-mgt.xml

<UserManager>
<Realm>
    <Configuration>
    <AddAdmin>true</AddAdmin>
            <AdminRole>admin</AdminRole>
            <AdminUser>
                 <UserName>admin</UserName>
                 <Password>admin</Password>
            </AdminUser>
        <EveryOneRoleName>everyone</EveryOneRoleName> <!-- By default users in this role sees the registry root -->
        <Property name="dataSource">jdbc/WSO2CarbonDB</Property>
    </Configuration>

<UserStoreManager class="org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager">
        <!-- .... -->
        <!-- I didn't change this part -->
</UserStoreManager>

<UserStoreManager class="org.wso2.carbon.user.core.ldap.ActiveDirectoryUserStoreManager">
        <Property name="TenantManager">org.wso2.carbon.user.core.tenant.CommonHybridLDAPTenantManager</Property>
        <Property name="defaultRealmName">test.com</Property>
        <Property name="DomainName">test.com</Property>
        <Property name="kdcEnabled">false</Property>
        <Property name="ConnectionURL">ldaps://10.20.112.213:636</Property>
        <Property name="ConnectionName">CN=Adaccount,CN=Users,DC=test,DC=com</Property>
        <Property name="ConnectionPassword">password@123</Property>
        <Property name="UserSearchBase">CN=Users,DC=test,DC=com</Property>
        <Property name="UserEntryObjectClass">person</Property>
        <Property name="UserNameAttribute">sAMAccountName</Property>
        <Property name="UserNameListFilter">(objectClass=person)</Property>
        <Property name="UserNameSearchFilter">(&amp;(objectClass=person)(sAMAccountName=?))</Property>
        <Property name="ReadLDAPGroups">true</Property>
        <Property name="EmptyRolesAllowed">true</Property>
        <Property name="GroupSearchBase">CN=Users,DC=test,DC=com</Property>
        <Property name="GroupEntryObjectClass">group</Property>
        <Property name="GroupNameAttribute">cn</Property>
        <Property name="MembershipAttribute">memberOf</Property>
        <Property name="GroupNameListFilter">(objectClass=group)</Property>
        <Property name="GroupNameSearchFilter">(&amp;(objectClass=group)(cn=?))</Property>
        <Property name="UserRolesCacheEnabled">true</Property>
        <Property name="Referral">follow</Property>
        <Property name="isADLDSRole">false</Property>
        <Property name="BackLinksEnabled">false</Property>
        <Property name="maxFailedLoginAttempt">0</Property>
    </UserStoreManager>
    <AuthorizationManager
        class="org.wso2.carbon.user.core.authorization.JDBCAuthorizationManager">
        <Property name="AdminRoleManagementPermissions">/permission</Property>
    <Property name="AuthorizationCacheEnabled">true</Property>
    </AuthorizationManager>
</Realm>

4

1 回答 1

0

我猜密码的正则表达式模式可能存在问题。根据您的配置,正则表达式模式未在 config.xml 中定义。可能是,WSO2IS 使用了一些默认模式。请尝试配置它们并查看...我可以在默认的 user-mgt.xml 文件中看到以下内容。尝试配置它们并检查。

        <Property name="PasswordJavaScriptRegEx">^[\S]{5,30}$</Property>
    <Property name="ServicePasswordJavaRegEx">^[\\S]{5,30}$</Property>
    <Property name="ServiceNameJavaRegEx">^[\\S]{2,30}/[\\S]{2,30}$</Property>
        <Property name="UsernameJavaScriptRegEx">^[\S]{3,30}$</Property>
        <Property name="UsernameJavaRegEx">[a-zA-Z0-9._-|//]{3,30}$</Property>
        <Property name="RolenameJavaScriptRegEx">^[\S]{3,30}$</Property>
        <Property name="RolenameJavaRegEx">[a-zA-Z0-9._-|//]{3,30}$</Property>
于 2013-09-24T17:31:33.197 回答