summaryrefslogtreecommitdiff
path: root/usr.sbin/rpki-client/rpki-client.8
blob: 4f738fb9025fc7b9bbba0e344a4be293d27a8bfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
.\"	$OpenBSD: rpki-client.8,v 1.65 2022/05/31 18:42:26 tb Exp $
.\"
.\" Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: May 31 2022 $
.Dt RPKI-CLIENT 8
.Os
.Sh NAME
.Nm rpki-client
.Nd RPKI validator to support BGP Origin Validation
.Sh SYNOPSIS
.Nm
.Op Fl BcjnoRrVv
.Op Fl b Ar sourceaddr
.Op Fl d Ar cachedir
.Op Fl e Ar rsync_prog
.Op Fl s Ar timeout
.Op Fl T Ar table
.Op Fl t Ar tal
.Op Ar outputdir
.Nm
.Op Fl Vv
.Op Fl d Ar cachedir
.Op Fl t Ar tal
.Fl f
.Ar
.Sh DESCRIPTION
The
.Nm
utility queries the RPKI repository system with
a built-in HTTP client and
.Xr openrsync 1
to fetch all X.509 certificates, manifests, and revocation lists under a given
.Em Trust Anchor .
.Nm
subsequently validates each
.Em Signed Object
by constructing and verifying a certification path for the certificate
associated with the Object (including checking relevant CRLs).
.Nm
produces lists of the
.Em Validated ROA Payloads Pq VRPs
and
.Em BGPsec Router Keys Pq BRKs
in various formats.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl B
Create output in the files
.Pa bird1v4 ,
.Pa bird1v6 ,
and
.Pa bird
(for bird2)
in the output directory which is suitable for the BIRD internet routing daemon.
.It Fl b Ar sourceaddr
Tell the HTTP and rsync clients to use
.Ar sourceaddr
as the source address for connections, which is useful on machines
with multiple interfaces.
.It Fl c
Create output in the file
.Pa csv
in the output directory as comma-separated values of the
.Em Autonomous System ,
the prefix in slash notation, the maximum prefix length, an abbreviation for
the
.Em Trust Anchor
the entry is derived from, and the moment the VRP will expire derived from
the chain of X.509 certificates and CRLs in seconds since the Epoch, UTC.
.It Fl d Ar cachedir
The directory where
.Nm
will store the cached repository data.
Defaults to
.Pa /var/cache/rpki-client .
.It Fl e Ar rsync_prog
Use
.Ar rsync_prog
instead of
.Xr openrsync 1
to fetch repositories.
It must accept the
.Fl rt
and
.Fl -address
flags and connect with rsync-protocol locations.
.It Fl f Ar
Decode the
.Em TAL
or validate the
.Em Signed Object
in
.Ar file
against the RPKI cache stored in
.Ar cachedir
and print human-readable information about the object.
If
.Ar file
is an rsync:// URI, the corresponding file from the cache will be used.
This option implies
.Fl n ,
and can be combined with
.Fl j
to emit a stream of
.Em Concatenated JSON .
.It Fl j
Create output in the file
.Pa json
in the output directory as JSON object.
See
.Fl c
for a description of the fields.
.It Fl n
Offline mode.
Validate the contents of
.Ar cachedir
and write to
.Ar outputdir
without synchronizing via RRDP or RSYNC.
.It Fl o
Create output in the file
.Pa openbgpd
in the output directory as
.Xr bgpd 8
compatible input.
If the
.Fl B ,
.Fl c ,
and
.Fl j
options are not specified this is the default.
.It Fl R
Synchronize via RSYNC only.
.It Fl r
Synchronize via RRDP.
If RRDP fails, RSYNC will be used.
This is the default.
Mutually exclusive with
.Fl n .
.It Fl s Ar timeout
Terminate after
.Ar timeout
seconds of runtime, because normal practice will restart from
.Xr cron 8 .
Disable by specifying 0.
Defaults to 1 hour.
Individual Publication Points are timed out after one fourth of
.Em timeout .
.It Fl T Ar table
For BIRD output generated with the
.Fl B
option use
.Ar table
as roa table name instead of the default 'ROAS'.
.It Fl t Ar tal
Specify a
.Em Trust Anchor Location Pq TAL
file to be used.
This option can be used multiple times to load multiple TALs.
By default
.Nm
will load all TAL files in
.Pa /etc/rpki .
.It Fl V
Show the version and exit.
.It Fl v
Specified once, prints information about status.
Twice, prints each filename as it's processed.
.It Ar outputdir
The directory where
.Nm
will write the output files.
Defaults to
.Pa /var/db/rpki-client/ .
.El
.Pp
By default
.Nm
produces a list of unique
.Li roa-set
statements in
.Fl o
(OpenBGPD compatible) output.
.Pp
.Nm
should be run hourly by
.Xr cron 8 :
use
.Xr crontab 1
to uncomment the entry in root's crontab.
.Sh ENVIRONMENT
.Nm
utilizes the following environment variables:
.Bl -tag -width "http_proxy"
.It Ev http_proxy
URL of HTTP proxy to use.
.El
.Sh FILES
.Bl -tag -width "/var/db/rpki-client/openbgpd" -compact
.It Pa /etc/rpki/*.tal
default TAL files used unless
.Fl t Ar tal
is specified.
.It Pa /var/cache/rpki-client
cached repository data.
.It Pa /var/db/rpki-client/openbgpd
default roa-set output file.
.El
.Sh EXIT STATUS
.Ex -std
.Sh SEE ALSO
.Xr openrsync 1 ,
.Xr bgpd.conf 5
.Sh STANDARDS
The following standards are used or referenced in
.Nm :
.Bl -tag -width -Ds
.It RFC 3370
Cryptographic Message Syntax (CMS) Algorithms.
.It RFC 3779
X.509 Extensions for IP Addresses and AS Identifiers.
.It RFC 4291
IP Version 6 Addressing Architecture.
.It RFC 4631
Classless Inter-domain Routing (CIDR): The Internet Address Assignment
and Aggregation Plan.
.It RFC 5280
Internet X.509 Public Key Infrastructure Certificate and Certificate
Revocation List (CRL) Profile.
.It RFC 5652
Cryptographic Message Syntax (CMS).
.It RFC 5781
The rsync URI Scheme.
.It RFC 5952
A Recommendation for IPv6 Address Text Representation.
.It RFC 6480
An Infrastructure to Support Secure Internet Routing.
.It RFC 6482
A Profile for Route Origin Authorizations (ROAs).
.It RFC 6485
The Profile for Algorithms and Key Sizes for Use in the Resource Public Key
Infrastructure (RPKI).
.It RFC 6486
Manifests for the Resource Public Key Infrastructure (RPKI).
.It RFC 6487
A Profile for X.509 PKIX Resource Certificates.
.It RFC 6488
Signed Object Template for the Resource Public Key Infrastructure (RPKI).
.It RFC 6493
The Resource Public Key Infrastructure (RPKI) Ghostbusters Record.
.It RFC 7318
Policy Qualifiers in Resource Public Key Infrastructure (RPKI) Certificates.
.It RFC 8182
The RPKI Repository Delta Protocol (RRDP).
.It RFC 8209
A Profile for BGPsec Router Certificates, Certificate Revocation Lists, and
Certification Requests.
.It RFC 8630
Resource Public Key Infrastructure (RPKI) Trust Anchor Locator.
.It draft-ietf-sidrops-rpki-rsc-08
A profile for Resource Public Key Infrastructure (RPKI) Signed Checklists (RSC).
.El
.Sh HISTORY
.Nm
first appeared in
.Ox 6.7 .
.Sh AUTHORS
The
.Nm
utility was written by
.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv .
.\" .Sh CAVEATS
.\" .Sh BUGS