HomeLearnASPA Explained: Validating the BGP AS-Path

ASPA Explained: Validating the BGP AS-Path

Last updated

ASPA - Autonomous System Provider Authorization - extends RPKI beyond route origins to help validate the BGP AS-path itself. In an ASPA object, a network cryptographically declares the set of provider ASNs it buys transit from. Routers can then check whether a route's AS-path is consistent with those declared customer-to-provider relationships, catching route leaks and some forms of path manipulation that Route Origin Validation cannot see. Where RPKI ROV answers "is this the right origin?", ASPA helps answer "is this a plausible path?".

ASPA Check

The gap ASPA fills

RPKI Route Origin Validation checks only the last ASN of a route's path - the origin. It cannot tell whether the networks in between are legitimate. Two kinds of incidents slip through:

  • Route leaks: a network re-announces routes it should have kept to itself, for example passing routes learned from one transit provider on to another. The origin is still correct, so the leaked route is RPKI-valid. See route leak vs hijack.
  • Forged paths: an attacker announces someone else's prefix with the real origin AS appended to the path, so the route passes ROV while traffic flows to the attacker.

Both are detectable if you know which networks are allowed to carry whose routes upward. That is exactly what ASPA publishes.

What an ASPA object contains

An ASPA is a signed object in the RPKI, issued by the holder of an ASN under the same certificate hierarchy that is used for ROAs. Its format is specified in the IETF SIDROPS working group's ASPA profile document, which at the time of writing is still an Internet-Draft, not an RFC. It has two parts:

Documentation ASNs.
FieldExampleMeaning
Customer ASAS64500The network publishing the object (only the holder of this ASN can sign it).
Provider setAS64501, AS64502Every AS that is authorized to appear directly above the customer in an AS-path - in practice, its transit providers, plus any IXP route server that inserts its own ASN into the path (a non-transparent route server).

A customer should have a single ASPA that lists all of its providers, not one object per provider. The special provider set containing only AS0 means "I have no providers": the network is transit-free (and is not a client of a non-transparent route server), so no AS may ever appear above it in a path. AS0 may not be combined with other providers in the same object.

Peers are not listed. ASPA only describes customer-to-provider relationships; settlement-free peering links are inferred by the verification procedure, not declared.

How ASPA verification works

Path verification is specified in the companion ASPA verification document of the same working group, also still an Internet-Draft at the time of writing. Its building block is a hop check between two adjacent ASes in the path, read from the origin outward. For a pair (A, B), where B appears directly after A on the way from the origin to the receiver:

Hop check resultCondition
Provider+A has an ASPA and B is in its provider set: B may carry A's routes upward.
Not Provider+A has an ASPA and B is not in it: B is not A's provider.
No AttestationA has not published an ASPA, so nothing is known.

The receiving router then applies one of two procedures, depending on where the route came from:

  • Upstream verification - for routes received from a customer or a lateral peer (and in some route-server setups). Such a route should have travelled only upward: every hop from the origin to the neighbor must be customer-to-provider. If any hop is Not Provider+, the path is Invalid; if all are Provider+, it is Valid; otherwise it is Unknown.
  • Downstream verification - for routes received from a provider. The path may go up, cross at most one peering link at the top, and then come down. It is Invalid only if no valley-free reading of the path is possible with the published ASPAs; Unknown if missing ASPAs leave the question open; Valid if the attestations confirm it.

The result is one of three states: Valid, Invalid or Unknown. The intended policy mirrors ROV: reject Invalid, accept the rest. Unknown is common while adoption is partial and does not make a route suspicious on its own.

Worked example: catching a route leak

AS64496 originates a prefix and buys transit from AS64501. AS64500 is multihomed: it is a customer of both AS64501 and AS64503. AS64501 buys transit from AS64505. All four publish ASPAs:

Customer ASASPA provider set
AS64496AS64501
AS64500AS64501, AS64503
AS64501AS64505
AS64503AS64505

AS64500 learns the route to AS64496's prefix from its provider AS64501 and, because of a missing export filter, announces it to its other provider AS64503. AS64503 receives it from a customer with the path:

64500 64501 64496

AS64503 runs upstream verification, reading from the origin:

  1. AS64496 to AS64501: AS64501 is in AS64496's provider set. Provider+.
  2. AS64501 to AS64500: AS64500 is not in AS64501's provider set. Not Provider+.

One Not Provider+ hop in a route from a customer makes the path Invalid, and AS64503 drops it. The leak is caught by AS64501's ASPA - the provider the leaker learned the route from - not by the leaker's. That is why publishing an ASPA protects more than your own prefixes: it also lets verifying networks catch your customers leaking the routes you send them to their other providers.

If AS64501 had not published an ASPA, the second hop would be No Attestation and the result Unknown: the route would be accepted. Coverage grows with every network that publishes.

What ASPA does not do

ASPA has limits worth knowing:

  • It does not replace ROV. ASPA says nothing about who may originate a prefix; ROAs still do that.
  • It cannot validate peering links, because peers are not declared. A leak between two peers can only be detected through the ASPAs of the networks around them.
  • A determined attacker can still forge a path made only of real, authorized customer-provider links. ASPA narrows the space of believable fake paths; it does not sign the path hop by hop the way BGPsec does.
  • Its value depends on adoption, both of published ASPAs and of routers that verify them.

Deployment status and publishing your own ASPA

ASPA is a newer IETF development: at the time of writing, both the profile and the verification procedure are still Internet-Drafts in the SIDROPS working group. Publication support in the RIRs' hosted RPKI services, in validators, and in router software (which receives ASPA data through version 2 of the RPKI-to-Router protocol, itself still a draft) has been arriving step by step, so check what your RIR and your vendors support today. The number of networks with a published ASPA is still small but growing; the BGP statistics page shows current adoption.

Publishing is low-risk as long as the object is complete:

  1. List every network you buy transit from, including backup, standby (for example a DDoS mitigation provider) and soon-to-be-connected providers, and any non-transparent route server you are a client of. A missing provider makes your legitimate routes through it invalid to verifying routers.
  2. If you have no providers at all, publish an ASPA with AS0 as the only provider.
  3. Create the object in your RIR's hosted RPKI where ASPA is supported, or in your delegated RPKI setup.
  4. Verify the result with an ASPA check of your own ASN, and update the object before every change of transit provider.
See it live
AS24940 (Hetzner) - A network with a published ASPA - the transit providers it has authorized.
AS1299 (Arelion) - A transit-free backbone: at the time of writing its ASPA lists provider AS0.
ASPA adoption - How many networks publish ASPA, and which providers they list most.

Frequently Asked Questions

What does ASPA stand for?

Autonomous System Provider Authorization. It is a signed RPKI object in which an ASN declares its authorized upstream transit providers.

How is ASPA different from RPKI ROAs?

A ROA authorizes the origin of a prefix. ASPA describes customer-to-provider relationships, which lets routers check whether the AS-path is plausible. ROAs catch wrong origins; ASPA catches leaks and many forged paths that keep the right origin.

What is provider AS0 in ASPA?

It means the network has no transit providers. Any path in which an AS appears directly above it as a provider is therefore invalid.

Should I list my peers in my ASPA?

No. ASPA lists providers only. Peering links are handled by the verification procedure, and listing a peer as a provider would weaken leak detection for your routes.

What happens if my ASPA is missing a provider?

Routers that verify ASPA will in most cases evaluate your routes that pass through the missing provider as invalid and may drop them. Always list all current and backup transit providers.

Is ASPA widely deployed yet?

Not yet. It is still an IETF Internet-Draft, not an RFC, at the time of writing, with growing adoption of published objects and of verification in routers. Publishing now gives verifying networks coverage as deployment spreads.