Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
AuditSuccess.cs
2using System.Threading.Tasks;
3using System.Xml;
7
9{
14 {
18 public AuditSuccess()
19 : base()
20 {
21 }
22
29 public AuditSuccess(XmlElement Xml, WafAction Parent, WebApplicationFirewall Document)
30 : base(Xml, Parent, Document)
31 {
32 }
33
37 public override string LocalName => nameof(AuditSuccess);
38
46 public override WafAction Create(XmlElement Xml, WafAction Parent, WebApplicationFirewall Document) => new AuditSuccess(Xml, Parent, Document);
47
53 public override async Task<WafResult?> Review(ProcessingState State)
54 {
55 string Message = await this.message.EvaluateAsync(State.Variables, string.Empty);
56 string UserName = await this.userName.EvaluateAsync(State.Variables, string.Empty);
57 string Protocol = await this.protocol.EvaluateAsync(State.Variables, "HTTP");
58 KeyValuePair<string, object>[] Tags = await this.EvaluateTags(State);
59
60 LoginAuditor.Success(Message, UserName,
61 State.Request.RemoteEndPoint.RemovePortNumber(),
62 Protocol, Tags);
63
64 return null;
65 }
66 }
67}
Class that monitors login events, and help applications determine malicious intent....
Definition: LoginAuditor.cs:26
static async void Success(string Message, string UserName, string RemoteEndPoint, string Protocol, params KeyValuePair< string, object >[] Tags)
Handles a successful login attempt.
Registers an audit success for an endpoint.
Definition: AuditSuccess.cs:14
override async Task< WafResult?> Review(ProcessingState State)
Reviews the processing state, and returns a WAF result, if any.
Definition: AuditSuccess.cs:53
AuditSuccess()
Registers an audit success for an endpoint.
Definition: AuditSuccess.cs:18
override string LocalName
XML Local Name for the XML element defining the action.
Definition: AuditSuccess.cs:37
override WafAction Create(XmlElement Xml, WafAction Parent, WebApplicationFirewall Document)
Creates a WAF action from its XML definition.
AuditSuccess(XmlElement Xml, WafAction Parent, WebApplicationFirewall Document)
Registers an audit success for an endpoint.
Definition: AuditSuccess.cs:29
async Task< KeyValuePair< string, object >[]> EvaluateTags(ProcessingState State)
Evaluates available tags.
Abstract base class for audit actions.
readonly StringAttribute message
Message attribute
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.