quantranhong1999 commented on code in PR #1743:
URL: https://github.com/apache/james-project/pull/1743#discussion_r1363138352
##########
protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractAuthProcessor.java:
##########
@@ -100,6 +100,7 @@ protected void doAuth(AuthenticationAttempt
authenticationAttempt, ImapSession s
session.stopDetectingCommandInjection();
} catch (BadCredentialsException e) {
authFailure = true;
+ LOGGER.info("User {} failed authentication",
authenticationAttempt.getAuthenticationId().asString());
Review Comment:
@thanhbv200585
I suggest to expose remoteIP via `ImapSession` interface:
```java
/**
* Return the {@link InetSocketAddress} of the remote peer
*/
InetSocketAddress getRemoteAddress();
```
Implement it in `NettyImapSession`:
```java
@Override
public InetSocketAddress getRemoteAddress() {
return (InetSocketAddress) channel.remoteAddress();
}
```
Then add remoteIP in `AbstractAuthProcessor`' AuditTrail (s).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]