【问题标题】:WSO2 API Manager(wso2am-4.1.0) - Unprocessed Continuation Reference(s) Error when creating APIsWSO2 API 管理器(wso2am-4.1.0) - 创建 API 时出现未处理的继续引用错误
【发布时间】:2022-06-13 12:45:18
【问题描述】:

我已经设置了最新的 API 管理器并将 deployment.toml 配置为指向一个只读 ldap 作为主用户存储。 API Manager 与 ldap 连接成功,可以使用指定为 admin 的 ldap 用户登录。

[user_store]
class="org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager"
type = "read_only_ldap"

[user_store.properties]
TenantManager="org.wso2.carbon.user.core.tenant.CommonHybridLDAPTenantManager"
ConnectionURL="ldap://<IP>:<PORT>"
ConnectionName="cn=<CN>,ou=<OU>,dc=ABC,dc=com"
ConnectionPassword="<password>"
AnonymousBind="false"
UserNameAttribute="<uname_atrribute>"
UserNameSearchFilter="(&amp;(objectClass=user)(uname_atrribute=?))"
ReadGroups="true"
GroupSearchBase="DC=ABC,DC=com"
GroupNameAttribute="cn"
GroupNameSearchFilter="(&amp;(objectClass=groupOfNames)(cn=?))"
GroupNameListFilter="(objectClass=groupOfNames)"
MembershipAttribute="member"
BackLinksEnabled="false"
UsernameJavaRegEx="[a-zA-Z0-9._\\-|//]{3,30}$"
PasswordJavaRegEx="^[\\S]{5,30}$"
SCIMEnabled="true"
PasswordHashMethod="PLAIN_TEXT"
MultiAttributeSeparator=","
MaxUserNameListLength="100"
MaxRoleNameListLength="100"
UserRolesCacheEnabled="true"
LDAPConnectionTimeout=5000
ReplaceEscapeCharactersAtUserLogin="true"
ConnectionRetryDelay="120000"
GroupSearchFilter="(objectClass=groupOfNames)"
UserEntryObjectClass="identityPerson"
IsBulkImportSupported="true"
EmptyRolesAllowed="true"
UserSearchBase="DC=ABC,DC=com"
ConnectionPoolingEnabled="false"
StartTLSEnabled="false"
WriteGroups="true"
RolenameJavaRegEx="[a-zA-Z0-9._\\-|//]{3,30}$"
GroupEntryObjectClass="groupOfNames"
EnableMaxUserLimitForSCIM="false"
PasswordJavaRegExViolationErrorMsg="Password length should be within 5 to 30 characters"
PasswordJavaScriptRegEx="^[\\S]{5,30}$"
UsernameJavaRegExViolationErrorMsg="Username pattern policy violated"
UserNameListFilter="(objectClass=person)"
UsernameJavaScriptRegEx="^[\\S]{3,30}$"
kdcEnabled="false"

但是,以下异常会阻止 API 发布。

Caused by: org.wso2.carbon.user.core.UserStoreException: Error occurred while search user for filter : (&(objectClass=user)(uname_atrribute=wso2.system.user))
        at org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager.getUserPropertyValues(ReadOnlyLDAPUserStoreManager.java:766)
        at org.wso2.carbon.user.core.common.AbstractUserStoreManager.doGetUserClaimValues(AbstractUserStoreManager.java:7838)
        at org.wso2.carbon.user.core.common.AbstractUserStoreManager.getUserIDFromUserName(AbstractUserStoreManager.java:12299)
        at org.wso2.carbon.identity.mgt.listener.IdentityUserIdResolverListener.doPostGetRoleListOfUser(IdentityUserIdResolverListener.java:1221)
        at org.wso2.carbon.user.core.common.AbstractUserStoreManager.getUserRoles(AbstractUserStoreManager.java:8608)
        at org.wso2.carbon.user.core.common.AbstractUserStoreManager.doGetRoleListOfUser(AbstractUserStoreManager.java:8575)
        at org.wso2.carbon.user.core.common.AbstractUserStoreManager.getRoleListOfUser(AbstractUserStoreManager.java:6701)
        ... 75 more
Caused by: javax.naming.PartialResultException: Unprocessed Continuation Reference(s); remaining name 'DC=ABC,DC=com'
        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2917)
        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2891)
        at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1846)
        at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1769)
        at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(ComponentDirContext.java:392)
        at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:358)
        at javax.naming.directory.InitialDirContext.search(InitialDirContext.java:276)
        at org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager.searchUserForASearchBase(ReadOnlyLDAPUserStoreManager.java:1550)
        at org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager.getUserPropertyValues(ReadOnlyLDAPUserStoreManager.java:674)
        ... 81 more

高度赞赏任何可行的解决方案。提前致谢。

【问题讨论】:

    标签: ldap wso2 wso2-apim


    【解决方案1】:

    WSO2 似乎正在尝试搜索名为 wso2.system.user 的用户。您可以尝试在 RO LDAP 中创建一个名为 wso2.system.user 的用户。解决这些问题的最简单方法是将 RO LDAP 添加为辅助用户存储。

    【讨论】:

      【解决方案2】:

      在创建 AD/LDAP 服务器连接/上下文时抛出异常“javax.naming.PartialResultException: Unprocessed Continuation Reference(s)”的根本原因忽略或根本不设置引用属性(默认引用对于此 Java 文档 [1],值为“忽略”。

      您应该能够通过在配置中设置 REFERRAL 来解决此问题,如下所示 关注

      [1]https://docs.oracle.com/javase/jndi/tutorial/ldap/referral/jndi.html

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多