cancel
Showing results for 
Search instead for 
Did you mean: 

Hybris HMC error logging

0 Kudos

We are using hybris 6.0 version.. There is a requirement to capture the logs whenever there is a invalid access happened to hmc/backoffice... Now we are getting the error only in hmc/backoffice login page. We need that to be logged in the console log.. Can you please tell us how to do this one?

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi Ranjithraja,

We would have to customize the spring security form by adding a AuthenticationFaliureHandler.

Implement a new loginAuthenticationFaliureHandler by extending SimpleUrlAuthenticationFailureHandler, and overriding method onAuthenticationFailure(), to log what ever you want to log, in case you want to just log what spring security logs, I think you should be able to get it done just by enabling the logs for org.springframework.security.web.authentication package

<form-login
      always-use-default-target="false"
      login-page="/login.jsp"
      authentication-failure-handler-ref="loginAuthenticationFailureHandler"
      authentication-failure-url="/login.jsp?login_error=1"
      username-parameter="j_username"
      password-parameter="j_password"
      login-processing-url="/j_spring_security_check"
/>

<bean id="loginAuthenticationFailureHandler" class="com.apple.ist.sap.asb2b.storefront.security.LoginAuthenticationFailureHandler" />

0 Kudos

Hey Himanshu,

Thanks for your response... Yes we need to log only the invalid login attempts .. is this same for HAC as well? we need to capture in log about the invalid log-in attempts in HAC?