ASP-WAF Web application firewall for .Net 5, .Net Standard 2.1 and .Net Core 3.x

EmailReportData Class

The class EmailReportData will be created based on the users role as assigned in the configuration

Namespace:  Walter.Web.FireWall.Reporting
Assembly:  Walter.Web.FireWall (in Walter.Web.FireWall.dll)

Syntax


public class EmailReportData : FireWallReportingModel

Examples


Configuration of the email template for 3 mail addresses that will received the rendered razor view _EmailReport.cshtml with the populated data. The model in the page will be EmailReportData
C#
services.AddFireWall("your token", "your domain-key"
   , domainName: new Uri("https://www.YourDomain.dll", UriKind.Absolute), options =>
   {
   //Will create GDPR compliant tickets when the firewall framework has errors and
   //will email update notifications when fixes exist.
   options.JoinCustomerImprovementProgramWithEmail = "WebMaster@YourDomain.dll";
   options.Cypher.ApplicationPassword = "123456Seven";
   options.ApplicationName = "YourDomain sales";
   options.ApplicationTag = "WS3";
   //personalized view located in ~/Views/Shared
   options.Reporting.HealthReportView = "_healthReport";
   options.Reporting.EmailReportView = "_EmailReport";
   options.Rules.BlockRequest.BlockDuration.SlideExpiration = true;
   options.Rules.BlockRequest.BlockDuration.Expires = TimeSpan.FromSeconds(10);
   options.WebServices.IsUserApiUrl = new Uri(Links.IsUserEndpoint, UriKind.Relative);
   options.WebServices.RegisterLinksApiUrl = new Uri(Links.SiteMapEndPoint, UriKind.Relative);
   options.WebServices.BeaconApiUrl = new Uri(Links.BeaconPoint, UriKind.Relative);
   }).UseGeography(new System.IO.DirectoryInfo("D:\\MaxMind"))
   .UseDiskLogging(options => { options.Directory = @"D:\Firewall"; })
   .UserDatabase(Connections.FireWallState)
   .UseFireWallReportingDatabase(Connections.FireWall)
   .UseSMTPReportingDatabase(Connections.FireWallMail, options =>
   {
   options.Archive = TimeSpan.FromDays(180);
   options.Server = "mail.cosonto.com";
   options.UserName = "noreply@cosonto.com";
   options.Password = "cosonto$ki82#ksKKjsk";
   options.Port = 25;
   options.From = "noreply@YourDomain.dll";
   options.IgnoreServerCertificateErrors = true;
   options.DefaultEmail = "admin@YourDomain.dll";
   options.Archive = TimeSpan.FromDays(60);
   options.MailingList.AddRange(new[] {
   new EMailAddress("Security Admin","security@YourDomain.dll") {
   Frequency= TimeSpan.FromHours(1),
   Roles= EMailRoles.FireWallAdministrationViolations | EMailRoles.UnauthorizedPhysicalFilesViolation } ,
   new EMailAddress("Website Admin","WebMaster@YourDomain.dll"){
   Frequency= TimeSpan.FromHours(1),
   Roles= EMailRoles.ProductUpdates | EMailRoles.OwnAccountRelatedViolations } ,
   });
   });

Inheritance Hierarchy


Object
  Walter.Web.FireWall.Reporting..::..FireWallReportingModel
    Walter.Web.FireWall.Reporting..::..EmailReportData