Artica Wiki

EdgeGuard — Learned Rules

How EdgeGuard learns the shape of each endpoint's traffic, proposes it as a rule, measures it against live traffic, and only then blocks — with configuration and verification examples.

EdgeGuard watches the normal traffic to each endpoint of a protected site, learns the shape every parameter has held over weeks, and proposes that shape as a rule in plain language. 
An administrator accepts it, watches it measure itself against live traffic, and only afterwards allows it to block.

Conventional WAF rules are a negative model: they block what is known to be bad, which means they cannot see an attack for which nobody has written a signature. 
Learned Rules is the opposite — a per-endpoint description of what this application's own traffic has proved to be normal, generated automatically rather than written by hand. 
Automatic generation is the part that matters: positive security models have existed for twenty years and are almost never deployed, because maintaining them by hand is more work than any team has.

Nothing in this feature blocks anything without a person deciding twice.

The concept

On a login endpoint, user_id has been a whole number of one to six digits across every request for the last six weeks. 
That is not a rule anybody wrote; it is a fact about the application. 
EdgeGuard notices it, says so in a sentence, and offers to enforce it:

A learned rule proposal

Four things in that card are worth pointing out.

What is proposed is not everything that was measured

The measurement records the exact length range a parameter has held. The proposal deliberately does not ask for it.

A rule saying "user_id is always a whole number of one to six digits" is true of every request ever measured, and it will start refusing real customers on the day an identifier reaches seven digits. 
No amount of monitoring can warn about that: the seventh digit does not exist yet, so there is nothing for the rule to be measured against. The rule would pass every test and then fail in production, once, permanently, at a moment nobody chose.

So the proposal keeps what belongs to the format and drops what belongs to this month's traffic:

Always numeric kept — "is always a whole number", with no digit count
Character classes kept — quotes, angle brackets, spaces and non-ASCII stay refused if they have never appeared
A constant length kept — a value that is always exactly 40 characters is a token, a checksum or a timestamp, and those do not grow
A length range dropped — 6 to 64 characters describes the customers who have signed up so far, not the field

This is why a claim reads "customerEmail never contains quotes or angle brackets" rather than "is 6 to 64 characters and never contains quotes or angle brackets". The second one is a stronger rule and a worse one.

How it works

1. Measurement, at the edge

2. Aggregation and proposal, on the management plane

At least 5,000 requests through that one parameter
At least 14 days of observation
Seen in the last 3 days an endpoint that stopped receiving traffic does not produce a rule
Complete sample if any agent hit its memory ceiling while measuring, the baseline is disqualified
Worth proposing a shape that would refuse nothing is not offered
At most 10 open proposals per site a queue nobody can empty is the same as no queue

The generator runs hourly.

3. Accept — monitoring only

A rule being monitored

4. Turn on blocking — a second decision, gated by evidence

The confirmation before blocking

A rule blocking

5. Every decision can be undone

6. Drift — when the application changes

A drift warning

Performance

This feature was designed around a constraint stated at the outset: it must not need machine learning, a GPU, or a second database.

Two things are worth watching after enabling it on a busy site: the security_request_duration_seconds histogram exposed by each agent, and the slow_requests list in the agent's status endpoint, which names the slowest decisions rather than merely counting them.

Where it improves security

Learned Rules catches what signatures cannot, because it describes the application rather than the attack.

Equally important is what it does not do. 
It does not inspect bodies that are not form-encoded, it makes no claim about endpoints it has not observed, and it will not propose a rule for an endpoint whose traffic has been inconsistent. 
A shape that is not stable is not offered at all.

Configuration

Learned Rules is switched off by default. 
Enable it under Global Settings → General → Learned rules, or at group or site level — the setting inherits down the hierarchy like every other, and a site that leaves it unset follows its group, which follows the global default.

The Learned Rules settings

What the first fortnight looks like

Nothing. 
A shape must hold across 5,000 requests and 14 days before it is offered, so an empty page is the correct state after enabling the feature — and the page says so rather than looking broken.

The Learned Rules page

The notification

The block in Security Events

The block appears in Security Events as an attack of type Learned Rule, attributed to the proposal it came from:

Troubleshooting