You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "Sailaja Polavarapu (JIRA)" <ji...@apache.org> on 2016/11/30 23:01:00 UTC

[jira] [Commented] (RANGER-1235) Usersync creates logs many errors with $ in the username or groupname

    [ https://issues.apache.org/jira/browse/RANGER-1235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15710127#comment-15710127 ] 

Sailaja Polavarapu commented on RANGER-1235:
--------------------------------------------

Before sending the delete request ("/service/xusers/group/group1/user/user$Name"), usersync tries to encode the url using org.apache.commons.httpclient.util.URIUtil.encodeQuery(). Looks like this method doesn't encode the "$" sign as this is treated as special character.
In 2.5 (as part of https://issues.apache.org/jira/browse/RANGER-839), httpclient is updated to org.apache.httpcomponent.httpclient and using java.net.URLEncoder.encode() method for url encoding. In this case the "$" sign in username is encoded as expected and the issue is been resolved. Hence marking this bug as resolved.

> Usersync creates logs many errors with $ in the username or groupname
> ---------------------------------------------------------------------
>
>                 Key: RANGER-1235
>                 URL: https://issues.apache.org/jira/browse/RANGER-1235
>             Project: Ranger
>          Issue Type: Bug
>          Components: usersync
>    Affects Versions: 0.6.2
>            Reporter: David Villarreal
>            Assignee: Sailaja Polavarapu
>
> $ is causing trouble in usersync.  Will see Errors of the following:
> 31 Oct 2016 23:47:46 ERROR LdapUserGroupBuilder UnixUserSyncThread - sink.addOrUpdateUser failed with exception: POST http://localhost:6080/service/xusers/users/userinfo returned a response status of 404 Not Found, for user: qu8g$s5, groups: [test]
> 31 Oct 2016 23:47:46 WARN PolicyMgrUserGroupBuilder UnixUserSyncThread - ERROR: Unable to delete GROUP: test from USER:qu8g$s6
> java.lang.IllegalArgumentException: Illegal group reference
> at java.util.regex.Matcher.appendReplacement(Matcher.java:808)
> at java.util.regex.Matcher.replaceAll(Matcher.java:906)
> at java.lang.String.replaceAll(String.java:2162)
> at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.delXUserGroupInfo(PolicyMgrUserGroupBuilder.java:631)
> at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.delXUserGroupInfo(PolicyMgrUserGroupBuilder.java:616)
> at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.addOrUpdateUser(PolicyMgrUserGroupBuilder.java:332)
> at org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder.getUserGroups(LdapUserGroupBuilder.java:530)
> at org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder.updateSink(LdapUserGroupBuilder.java:470)
> at org.apache.ranger.usergroupsync.UserGroupSync.syncUserGroup(UserGroupSync.java:113)
> at org.apache.ranger.usergroupsync.UserGroupSync.run(UserGroupSync.java:87)
> at java.lang.Thread.run(Thread.java:745)
> 31 Oct 2016 23:47:47 WARN PolicyMgrUserGroupBuilder UnixUserSyncThread - ERROR: Unable to delete GROUP: test from USER:qu8g$s6
> java.lang.IllegalArgumentException: Illegal group reference
> at java.util.regex.Matcher.appendReplacement(Matcher.java:808)
> at java.util.regex.Matcher.replaceAll(Matcher.java:906)
> at java.lang.String.replaceAll(String.java:2162)
> at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.delXUserGroupInfo(PolicyMgrUserGroupBuilder.java:631)
> at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.delXUserGroupInfo(PolicyMgrUserGroupBuilder.java:616)
> at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.addOrUpdateUser(PolicyMgrUserGroupBuilder.java:332)
> at org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder.getUserGroups(LdapUserGroupBuilder.java:530)
> at org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder.updateSink(LdapUserGroupBuilder.java:470)
> at org.apache.ranger.usergroupsync.UserGroupSync.syncUserGroup(UserGroupSync.java:113)
> at org.apache.ranger.usergroupsync.UserGroupSync.run(UserGroupSync.java:87)
> Options



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)