Failed Login Notifications

<< Click to Display Table of Contents >>

EQuIS 7  >>  Enterprise > Installation and Configuration > Configuration > Login >

Failed Login Notifications

EQuIS Enterprise logs failed login attempts to the default log files. In some situations, an administrator may want to be notified of failed login attempts. Using the SmtpAppender functionality in log4net, you can configure EQuIS Enterprise to automatically send failed login notifications via email. In

.\Enterprise7\bin\log4net.config, the <root> element applies to all loggers. However, you can configure specific loggers to use specific appenders.

 

To receive email alerts of failed login attempts:

1.On the application server, open .\EarthSoft\Enterprise7\bin\log4net.config (open as Administrator so you can save modifications to the file).

2.Using the values appropriate to your environment, add the SmtpAppender:

 

<appender name="MySmtpAppender" type="log4net.Appender.SmtpAppender">

   <to value="to@domain.com" />

   <from value="from@domain.com" />

   <subject value="EQuIS Enterprise - Failed Login Alert" />

   <smtpHost value="SMTPServer.domain.com" />

   <bufferSize value="1" />

   <lossy value="true" />

   <evaluator type="log4net.Core.LevelEvaluator">

       <threshold value="WARN"/>

   </evaluator>

   <layout type="log4net.Layout.PatternLayout">

       <conversionPattern value="%newline%date [%thread] %-5level %logger [%property{NDC}] - %message%newline%newline%newline" />

   </layout>

</appender>

 

3.Below <root>, add the following logger-specific configuration:

 

   <!-- Print only messages of level WARN or above in the package Com.Foo -->

   <logger name="EarthSoft.Common.log4net.SecurityLogger">

       <level value="WARN" />

       <appender-ref ref="MySmtpAppender" />

   </logger>

 

4.Save and close log4net.config.

5.Restart the Application Pool.

 

Note: The same process can be used to receive email alerts about errors in specific reports or other parts of the application. You can configure multiple SmtpAppenders within the same log4net.config file by giving each SmtpAppender a unique name (see Steps 2 and 3 above). For example, you may configure login failures to be sent to the administrator, and errors generated by a specific report to be sent to a developer.