NLnetLabs / rtrtr

An RPKI Data Proxy

Home Page:https://nlnetlabs.nl/projects/routing/rtrtr/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support rpki-client JSON

AlexanderBand opened this issue · comments

The JSON emitted by rpki-client is structured differently, making RTRTR stop with this error:

Failed reading source: missing field counts at line 23 column 2.

rpki-client sample data:

{
	"metadata": {
		"buildmachine": "rpki-client",
		"buildtime": "2020-12-11T22:18:15Z",
		"elapsedtime": "218",
		"usertime": "116",
		"systemtime": "68",
		"roas": 56977,
		"failedroas": 8,
		"invalidroas": 0,
		"certificates": 22207,
		"failcertificates": 0,
		"invalidcertificates": 0,
		"tals": 5,
		"talfiles": "/etc/tals/apnic.tal /etc/tals/arin.tal /etc/tals/ripe.tal /etc/tals/lacnic.tal /etc/tals/afrinic.tal",
		"manifests": 22207,
		"failedmanifests": 10,
		"stalemanifests": 0,
		"crls": 22197,
		"repositories": 29,
		"vrps": 210413,
		"uniquevrps": 207098
	},

	"roas": [
		{ "asn": "AS13335", "prefix": "1.0.0.0/24", "maxLength": 24, "ta": "apnic" },
		{ "asn": "AS38803", "prefix": "1.0.4.0/24", "maxLength": 24, "ta": "apnic" },

Would be good to document what fields inside "metadata" are required, and how they are used...

So it seems that rtrtr will take a JSON file without "metadata"; it's just that if it is present, it requires certain fields in it. It seems that rpki-client's will be read after removing the "metadata" field altogether.

Yes, if present, the code current expects a OctoRPKI style field. Since we are not using any of the information at the moment, #8 will simple ignore the whole field.