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

BlockBotsFilter Class

Block Bots filter will reject all requests where the user was identified as being a BOT

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

Syntax


[CLSCompliantAttribute]
public sealed class BlockBotsFilter : UserBasedFilter

Remarks


This filter does not allow endpoint configurations, to configure user based filtering and by allowing exceptions use the User attribute annotation.

Depending on the license you can use events to manually control if a request is blocked

Examples


Register the firewall for always on configuration using only service settings and reject all cross site requests
C#
services.AddFireWall("License Token", "Domain key"
       , domainName: new Uri("https://www.mydomain.dll", UriKind.Absolute)
       , options =>
       {
           options.Cypher.ApplicationPassword = "123456$even";
           options.ApplicationName = "Test domain";
           options.ApplicationTag = "ITIL-9981771";
           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);
   });

   services.AddMvc(options =>
       options.Filters.Add<Walter.Web.FireWall.Filters.FireWallFilter>()
       options.Filters.Add<Walter.Web.FireWall.Filters.CrossSiteFilter>()
       options.Filters.Add<Walter.Web.FireWall.Filters.BlockBotsFilter>()
       options.Filters.Add<Walter.Web.FireWall.Filters.BlockMaliciouseUserFilter>()
   );

Inheritance Hierarchy


Object
  ReportingFilter
    UserBasedFilter
      Walter.Web.FireWall.Filters..::..BlockBotsFilter

Thread Safety


Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.