[ https://issues.apache.org/jira/browse/RANGER-3382?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
strong updated RANGER-3382: --------------------------- Affects Version/s: 2.0.0 > Ranger usersync 401 duration for sync > ------------------------------------- > > Key: RANGER-3382 > URL: https://issues.apache.org/jira/browse/RANGER-3382 > Project: Ranger > Issue Type: Bug > Components: usersync > Affects Versions: 2.0.0, 2.1.0 > Reporter: strong > Priority: Major > > 1:When I use ugsync for LDAP data synchronization, I find that the API has > errors for some reason. At this time, the API will return 404, and then the > client side will clear the sessionid, resulting in 401 errors in subsequent > synchronization cycles. > 2:the first use cookie call api,then will cookieClient.removeAllFilters(); > The code is as follows: > {color:#24292e}protected WebResource createWebResourceForCookieAuth(int > currentIndex, String relativeURL) { {color}{color:#24292e}Client cookieClient > = getClient();{color}{color:#24292e} > cookieClient.removeAllFilters();{color}{color:#24292e} WebResource ret = > cookieClient.resource(configuredURLs.get(currentIndex) + > relativeURL);{color}{color:#24292e} return ret;{color}{color:#24292e} > }{color} > 3:then the next time have some error ,then the next time there not have > cookie ,then connect will response 401 ,because cookieClient have not any > filter ,contain httpBasicAuthFilter(username,password). > 4:Then I load httpbasicauthfilter every time before using it. > > -- This message was sent by Atlassian Jira (v8.3.4#803005)