Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
WafAuditAction.cs
2using System.Threading.Tasks;
3using System.Xml;
7
9{
13 public abstract class WafAuditAction : WafActionWithTags
14 {
18 protected readonly StringAttribute message;
19
23 protected readonly StringAttribute userName;
24
28 protected readonly StringAttribute protocol;
29
34 : base()
35 {
36 }
37
45 : base(Xml, Parent, Document)
46 {
47 this.message = new StringAttribute(Xml, "message");
48 this.protocol = new StringAttribute(Xml, "protocol");
49 this.userName = new StringAttribute(Xml, "userName");
50 }
51
57 public override async Task<WafResult?> Review(ProcessingState State)
58 {
59 string Message = await this.message.EvaluateAsync(State.Variables, string.Empty);
60 string Protocol = await this.protocol.EvaluateAsync(State.Variables, "HTTP");
61 string UserName = await this.userName.EvaluateAsync(State.Variables, string.Empty);
62 KeyValuePair<string, object>[] Tags = await this.EvaluateTags(State);
63
64 LoginAuditor.Fail(Message, UserName, State.Request.RemoteEndPoint, Protocol, Tags);
65
66 return null;
67 }
68 }
69}
Class that monitors login events, and help applications determine malicious intent....
Definition: LoginAuditor.cs:26
static void Fail(string Message, string UserName, string RemoteEndPoint, string Protocol)
Handles a failed login attempt.
Abstract base class for WAF actions that has tags.
async Task< KeyValuePair< string, object >[]> EvaluateTags(ProcessingState State)
Evaluates available tags.
Abstract base class for audit actions.
override async Task< WafResult?> Review(ProcessingState State)
Reviews the processing state, and returns a WAF result, if any.
readonly StringAttribute message
Message attribute
WafAuditAction(XmlElement Xml, WafAction Parent, WebApplicationFirewall Document)
Abstract base class for audit actions.
WafAuditAction()
Abstract base class for audit actions.
readonly StringAttribute protocol
Protocol attribute
readonly StringAttribute userName
User Name attribute
Contains the current state of a review process.
Variables Variables
Set of variables.
HttpRequest Request
Current HTTP Request
Abstract base class for Web Application Firewall actions.
Definition: WafAction.cs:17
WebApplicationFirewall Document
Web Application Firewall document.
Definition: WafAction.cs:60
Web Application Firewall for HttpServer.