Get started
Docs menu

Access control

Impossible travel

On this page

Introduction

Somebody signs in from London, and eleven minutes later from São Paulo. No one can travel that fast, so either the credential is shared, or one of the two sessions is not who it claims to be.

Signari can refuse the second sign-in. It compares a person's last sign-in with this one: where each came from, and when. It refuses a journey no aircraft could make.

You turn it on with a condition in an access policy. Positions come from SIGNARI_GEOIP_STATIC or SIGNARI_GEOIP_DB, described under where positions come from.

Turn it on

This policy refuses impossible travel for the bank application:

YAMLpolicies:  - name: refuse-impossible-travel    when: {client: bank}    require: {no_impossible_travel: true}    message: This sign-in came from an unexpected place. Contact support.

With this policy, Signari refuses the first of these two sign-ins and allows the second:

Textprevious: London, 11 minutes ago  ->  400    "This sign-in came from an unexpected place. Contact support."    detector: 9497 km in 12m0s implies 45642 km/h, which is not travelprevious: London, 13 hours ago    ->  allowed (a real flight)

Avoiding false alarms

Most of the choices below avoid false alarms, because a detector that fires on ordinary behaviour tends to be switched off.

The threshold is aircraft cruise speed (900 km/h), not something lower. Setting it lower flags every long-haul flight, which is an alert for each business traveller on each trip. A speed above it means the person cannot have travelled between the two places.

Sign-ins less than a minute apart are not checked. Take two authentications seconds apart, from the same building. A kilometre of coordinate rounding can compute an absurd speed out of them. Below the floor, the answer is "not checked" rather than a wrong one.

The distance is great-circle, not flat. A flat approximation is wrong by roughly the cosine of the latitude. That is close enough near the equator, and far off in northern Europe.

"Not checked" is reported as such. No position, no history, or out-of-order timestamps each return Checked: false with a reason, and the policy condition is satisfied.

A condition that failed whenever it could not be evaluated would lock out every person signing in for the first time, and every deployment without a location source.

(0,0) is not a position. It is a real place in the Atlantic. A nil-handling bug that leaves coordinates at their zero value will put somebody there. It will then flag their next sign-in as impossible travel from the Gulf of Guinea. Positions carry an explicit Known flag, rather than relying on the zero value.

What is stored, and what deliberately is not

Not the IP address. This schema has hashed addresses from the beginning, so that a breach does not reveal a movement log for every person.

What the check needs is a coarse position and a time, so that is what is kept. It keeps the country, the region, and coordinates rounded to two decimal places, about a kilometre. That is enough to compute a plausible speed over hundreds of kilometres, and too coarse to find where somebody lives.

Every sign-in records its position and time once its session is made. The check compares the next sign-in with the most recent position that is known.

The rounding happens at the write. A value rounded only for display would still be stored precisely, and a database breach would expose it.

Where positions come from

SIGNARI_GEOIP_STATIC maps CIDR (Classless Inter-Domain Routing) ranges of addresses to fixed positions:

ShellSIGNARI_GEOIP_STATIC="10.0.0.0/8=GB,51.51,-0.13;198.51.100.0/24=BR,-23.55,-46.63"

Many deployments know exactly where their networks are, such as an office range, a VPN concentrator or a data centre. For those, a licensed database is not needed.

Addresses outside every range are unknown, not defaulted. Putting unrecognised addresses at a fixed point would make every one of them look like impossible travel from the office.

SIGNARI_GEOIP_DB names a MaxMind-format database, such as a GeoIP2 or GeoLite2 City file. Signari opens it once, at startup, and reads three fields for each address: the country, the latitude and the longitude.

A path that cannot be read, or a file that is not a usable database, does not stop anybody signing in. Every check then reports that it did not run, and the reason is logged at startup. SIGNARI_GEOIP_STATIC is read first: when it is set and every range in it parses, SIGNARI_GEOIP_DB is not used.

The database is also not bundled and not downloaded. It is licensed, and it changes weekly. Fetching a binary file from the internet at startup would add a supply chain to the authentication path.

Changed Signari v0.2