Skip to content

feat: add RPKISPOOL data source with CCR format parsing#32

Merged
digizeph merged 2 commits intomainfrom
dev/add-rpkispools-support
Mar 21, 2026
Merged

feat: add RPKISPOOL data source with CCR format parsing#32
digizeph merged 2 commits intomainfrom
dev/add-rpkispools-support

Conversation

@digizeph
Copy link
Copy Markdown
Member

@digizeph digizeph commented Mar 21, 2026

Summary

  • Add support for loading historical RPKI data from RPKISPOOL archives
  • Parse CCR (Canonical Cache Representation) files from .tar.zst archives using bcder for DER decoding
  • Add RpkiSpoolsCollector with three mirrors: sobornost.net, attn.jp, kerfuffle.net
  • Parses a single CCR file (~72K VRPs) instead of ~942K individual .roa DER files from initstate archives
  • New dependencies: bcder (DER parsing) and zstd (decompression), both behind the rpki feature flag

Test plan

  • Unit tests pass (test_collector_urls, test_collector_from_str, test_default_collector)
  • Network integration tests work (test_from_rpkispools, test_parse_ccr_from_stream#[ignore])
  • cargo clippy --all-features -- -D warnings passes
  • All existing tests and doctests pass
  • Run example: cargo run --example rpkispools --features rpki

Add support for loading historical RPKI data from RPKISPOOL archives
(draft-snijders-rpkispool-format). Parses CCR files
(draft-ietf-sidrops-rpki-ccr) from the rpkispool .tar.zst archive,
which contains all validated ROA and ASPA payloads for one vantage
point snapshot.

- Add `bcder` and `zstd` dependencies under the `rpki` feature flag
- Implement CCR DER parser using `bcder` for VRPs and VAPs extraction
- Add `RpkiSpoolsCollector` enum with three mirrors (sobornost.net,
  attn.jp, kerfuffle.net)
- Add `RpkiSpools` variant to `HistoricalRpkiSource`
- Expose public `parse_ccr()` and `parse_rpkispools_archive()` functions
- Add example demonstrating RPKISPOOL lookup for 1.1.1.0/24
Add BgpkitCommons::rpki_lookup_aspa(customer_asn) to look up ASPA
records by customer ASN. Extend the rpkispools example to demonstrate
ASPA lookup for AS400644.
@digizeph digizeph merged commit 769bb4b into main Mar 21, 2026
1 check passed
@digizeph digizeph deleted the dev/add-rpkispools-support branch March 22, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant