[ 
https://issues.apache.org/jira/browse/KNOX-3431?focusedWorklogId=1039223&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1039223
 ]

ASF GitHub Bot logged work on KNOX-3431:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 02/Sep/26 14:32
            Start Date: 02/Sep/26 14:32
    Worklog Time Spent: 10m 
      Work Description: smolnar82 commented on code in PR #1372:
URL: https://github.com/apache/knox/pull/1372#discussion_r3915215529


##########
gateway-server/src/main/java/org/apache/knox/gateway/services/ldap/interceptor/UserSearchInterceptor.java:
##########
@@ -71,6 +75,7 @@ public Entry lookup(LookupOperationContext ctx) throws 
LdapException {
                     entry = backend.getUser(username, schemaManager);
                 } catch (Exception e) {
                     LOG.ldapLookupFailed(ctx.getDn().toString(),e);
+                    throw new LdapOperationException(ResultCodeEnum.OTHER, 
"Lookup request to backend " + getName() + " failed.", e);

Review Comment:
   The only comment I have is if we can somehow get the original backend result 
code and use it here other than `OTHER`. I'm not sure about this, so raising it 
as a question and would not block the merge of this PR.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 1039223)
    Time Spent: 40m  (was: 0.5h)

> LDAP Proxy search should throw exception when any backend fails
> ---------------------------------------------------------------
>
>                 Key: KNOX-3431
>                 URL: https://issues.apache.org/jira/browse/KNOX-3431
>             Project: Apache Knox
>          Issue Type: Improvement
>          Components: Server
>    Affects Versions: 3.0.0
>            Reporter: David Han
>            Assignee: David Han
>            Priority: Major
>             Fix For: 3.1.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> The UserSearchInterceptor currently logs and swallows exceptions when a 
> search request to the backend fails. This has the unfortunate effect of 
> making it very difficult to tell if there were configuration or network 
> errors connecting to the remote backend. Since the exceptions is swallowed, a 
> connection error will look like users have been deleted. It would be better 
> to raise the exception so it's obvious that there is a problem communicating 
> with the remote backend.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to