我重写了WSO2 IS中类classActiveDirectoryUserStoreManager的方法doGetExternalRoleListOfUser。我这样做是为了让IS返回用户的Active Directory嵌套组,因为IS只是将用户的“直接”组作为OOB功能返回。
代码非常简单,但是当我们使用IS服务getUserClaimValues来检查用户的信息时,我收到以下soapFault错误:
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>Error occurred while accessing Java Security Manager Privilege Block</faultstring>
<detail>
<ns:RemoteUserStoreManagerServiceUserStoreException xmlns:ns="http://service.ws.um.carbon.wso2.org">
<UserStoreException xsi:type="ax2656:UserStoreException" xmlns="http://service.ws.um.carbon.wso2.org" xmlns:ax2657="http://api.user.carbon.wso2.org/xsd" xmlns:ax2656="http://core.user.carbon.wso2.org/xsd" xmlns:ax2664="http://tenant.core.user.carbon.wso2.org/xsd" xmlns:ax2660="http://dao.service.ws.um.carbon.wso2.org/xsd" xmlns:ax2662="http://common.mgt.user.carbon.wso2.org/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</ns:RemoteUserStoreManagerServiceUserStoreException>
</detail>
</soapenv:Fault>
以下日志出现在IS日志中:
ERROR {org.wso2.carbon.user.core.common.AbstractUserStoreManager} - Error occurred while accessing Java Security Manager Privilege Block
ERROR {org.wso2.carbon.identity.user.profile.ui.client.UserProfileCient} - org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement {http://base.identity.carbon.wso2.org/xsd}code
代码非常简单,只需访问Active Directory即可检索用户每组的嵌套组,并将其返回给String []
这是调试日志:
[2016-06-30 11:15:03,736] DEBUG {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} - Searching for user 00269097C
[2016-06-30 11:15:03,737] DEBUG {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} - value after escaping special characters in 00269097C : 00269097C
[2016-06-30 11:15:03,784] DEBUG {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} - Searching for user with SearchFilter: (&(objectClass=person)(cn=00269097C)) in SearchBase:
[2016-06-30 11:15:03,810] DEBUG {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} - Name in space for 00269097C is CN=00269097C,OU=Usuarios,DC=dc1,DC=dc2,DC=and
[2016-06-30 11:15:03,811] DEBUG {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} - User: 00269097C exist: true
[2016-06-30 11:15:03,859] DEBUG {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} - Searching for user with SearchFilter: (&(objectClass=person)(cn=00269097C)) in SearchBase:
[2016-06-30 11:15:03,860] DEBUG {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} - Requesting attribute :streetAddress
[2016-06-30 11:15:03,861] DEBUG {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} - Requesting attribute :mail
[2016-06-30 11:15:03,861] DEBUG {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} - Requesting attribute :sn
[2016-06-30 11:15:03,862] DEBUG {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} - Requesting attribute :organizationName
[2016-06-30 11:15:03,863] DEBUG {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} - Requesting attribute :telephoneNumber
[2016-06-30 11:15:03,863] DEBUG {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} - Requesting attribute :role
[2016-06-30 11:15:03,863] DEBUG {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} - Requesting attribute :profileConfiguration
[2016-06-30 11:15:03,864] DEBUG {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} - Requesting attribute :givenName
[2016-06-30 11:15:03,864] DEBUG {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} - Requesting attribute :im
[2016-06-30 11:15:03,865] DEBUG {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} - Requesting attribute :url
[2016-06-30 11:15:03,865] DEBUG {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} - Requesting attribute :country
[2016-06-30 11:15:03,866] DEBUG {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} - Requesting attribute :mobile
[2016-06-30 11:15:03,891] DEBUG {org.wso2.carbon.user.core.common.AbstractUserStoreManager} - Retrieving internal roles for user name : 00269097C and search filter *
[2016-06-30 11:15:03,893] DEBUG {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} - Searching for user 00269097C
[2016-06-30 11:15:03,893] DEBUG {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} - value after escaping special characters in 00269097C : 00269097C
[2016-06-30 11:15:03,942] DEBUG {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} - Searching for user with SearchFilter: (&(objectClass=person)(cn=00269097C)) in SearchBase:
[2016-06-30 11:15:03,968] DEBUG {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} - Name in space for 00269097C is CN=00269097C,OU=Usuarios,DC=dc1,DC=dc2,DC=and
[2016-06-30 11:15:03,969] DEBUG {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} - User: 00269097C exist: true
[2016-06-30 11:15:04,088] ERROR {org.wso2.carbon.user.core.common.AbstractUserStoreManager} - Error occurred while accessing Java Security Manager Privilege Block
[2016-06-30 11:15:04,095] ERROR {org.wso2.carbon.identity.user.profile.ui.client.UserProfileCient} - org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement {http://base.identity.carbon.wso2.org/xsd}code
任何帮助?
我发现可能是IS Web服务客户端不是最新的并且导致显示验证错误。有可能吗?我怎样才能找到该客户端和版本?