1# See: https://wiki.strongswan.org/projects/strongswan/wiki/Swanctlconf
2#
3# When strongSwan is upgraded please update the parameters in this file. You can
4# see which parameters should be deleted, changed or added by diffing
5# swanctl.opt:
6#
7# git clone https://github.com/strongswan/strongswan.git
8# cd strongswan
9# git diff 5.7.2..5.8.0 src/swanctl/swanctl.opt
10
11lib: with (import ./param-constructors.nix lib);
12
13let
14 certParams = {
15 file = mkOptionalStrParam ''
16 Absolute path to the certificate to load. Passed as-is to the daemon, so
17 it must be readable by it.
18
19 Configure either this or {option}`handle`, but not both, in one section.
20 '';
21
22 handle = mkOptionalHexParam ''
23 Hex-encoded CKA_ID or handle of the certificate on a token or TPM,
24 respectively.
25
26 Configure either this or {option}`file`, but not both, in one section.
27 '';
28
29 slot = mkOptionalIntParam ''
30 Optional slot number of the token that stores the certificate.
31 '';
32
33 module = mkOptionalStrParam ''
34 Optional PKCS#11 module name.
35 '';
36 };
37in {
38 authorities = mkAttrsOfParams ({
39
40 cacert = mkOptionalStrParam ''
41 The certificates may use a relative path from the swanctl
42 `x509ca` directory or an absolute path.
43
44 Configure one of {option}`cacert`,
45 {option}`file`, or
46 {option}`handle` per section.
47 '';
48
49 cert_uri_base = mkOptionalStrParam ''
50 Defines the base URI for the Hash and URL feature supported by
51 IKEv2. Instead of exchanging complete certificates, IKEv2 allows one to
52 send an URI that resolves to the DER encoded certificate. The certificate
53 URIs are built by appending the SHA1 hash of the DER encoded certificates
54 to this base URI.
55 '';
56
57 crl_uris = mkCommaSepListParam [] ''
58 List of CRL distribution points (ldap, http, or file URI).
59 '';
60
61 ocsp_uris = mkCommaSepListParam [] ''
62 List of OCSP URIs.
63 '';
64
65 } // certParams) ''
66 Section defining complementary attributes of certification authorities, each
67 in its own subsection with an arbitrary yet unique name
68 '';
69
70 connections = mkAttrsOfParams {
71
72 version = mkIntParam 0 ''
73 IKE major version to use for connection.
74
75 - 1 uses IKEv1 aka ISAKMP,
76 - 2 uses IKEv2.
77 - A connection using the default of 0 accepts both IKEv1 and IKEv2 as
78 responder, and initiates the connection actively with IKEv2.
79 '';
80
81 local_addrs = mkCommaSepListParam [] ''
82 Local address(es) to use for IKE communication. Takes
83 single IPv4/IPv6 addresses, DNS names, CIDR subnets or IP address ranges.
84
85 As initiator, the first non-range/non-subnet is used to initiate the
86 connection from. As responder, the local destination address must match at
87 least to one of the specified addresses, subnets or ranges.
88
89 If FQDNs are assigned they are resolved every time a configuration lookup
90 is done. If DNS resolution times out, the lookup is delayed for that time.
91 '';
92
93 remote_addrs = mkCommaSepListParam [] ''
94 Remote address(es) to use for IKE communication. Takes
95 single IPv4/IPv6 addresses, DNS names, CIDR subnets or IP address ranges.
96
97 As initiator, the first non-range/non-subnet is used to initiate the
98 connection to. As responder, the initiator source address must match at
99 least to one of the specified addresses, subnets or ranges.
100
101 If FQDNs are assigned they are resolved every time a configuration lookup
102 is done. If DNS resolution times out, the lookup is delayed for that time.
103 To initiate a connection, at least one specific address or DNS name must
104 be specified.
105 '';
106
107 local_port = mkIntParam 500 ''
108 Local UDP port for IKE communication. By default the port of the socket
109 backend is used, which is usually `500`. If port
110 `500` is used, automatic IKE port floating to port
111 `4500` is used to work around NAT issues.
112
113 Using a non-default local IKE port requires support from the socket
114 backend in use (socket-dynamic).
115 '';
116
117 remote_port = mkIntParam 500 ''
118 Remote UDP port for IKE communication. If the default of port
119 `500` is used, automatic IKE port floating to port
120 `4500` is used to work around NAT issues.
121 '';
122
123 proposals = mkCommaSepListParam ["default"] ''
124 A proposal is a set of algorithms. For non-AEAD algorithms, this includes
125 for IKE an encryption algorithm, an integrity algorithm, a pseudo random
126 function and a Diffie-Hellman group. For AEAD algorithms, instead of
127 encryption and integrity algorithms, a combined algorithm is used.
128
129 In IKEv2, multiple algorithms of the same kind can be specified in a
130 single proposal, from which one gets selected. In IKEv1, only one
131 algorithm per kind is allowed per proposal, more algorithms get implicitly
132 stripped. Use multiple proposals to offer different algorithms
133 combinations in IKEv1.
134
135 Algorithm keywords get separated using dashes. Multiple proposals may be
136 specified in a list. The special value `default` forms a
137 default proposal of supported algorithms considered safe, and is usually a
138 good choice for interoperability.
139 '';
140
141 vips = mkCommaSepListParam [] ''
142 List of virtual IPs to request in IKEv2 configuration payloads or IKEv1
143 Mode Config. The wildcard addresses `0.0.0.0` and
144 `::` request an arbitrary address, specific addresses may
145 be defined. The responder may return a different address, though, or none
146 at all.
147 '';
148
149 aggressive = mkYesNoParam no ''
150 Enables Aggressive Mode instead of Main Mode with Identity
151 Protection. Aggressive Mode is considered less secure, because the ID and
152 HASH payloads are exchanged unprotected. This allows a passive attacker to
153 snoop peer identities, and even worse, start dictionary attacks on the
154 Preshared Key.
155 '';
156
157 pull = mkYesNoParam yes ''
158 If the default of yes is used, Mode Config works in pull mode, where the
159 initiator actively requests a virtual IP. With no, push mode is used,
160 where the responder pushes down a virtual IP to the initiating peer.
161
162 Push mode is currently supported for IKEv1, but not in IKEv2. It is used
163 by a few implementations only, pull mode is recommended.
164 '';
165
166 dscp = mkStrParam "000000" ''
167 Differentiated Services Field Codepoint to set on outgoing IKE packets for
168 this connection. The value is a six digit binary encoded string specifying
169 the Codepoint to set, as defined in RFC 2474.
170 '';
171
172 encap = mkYesNoParam no ''
173 To enforce UDP encapsulation of ESP packets, the IKE daemon can fake the
174 NAT detection payloads. This makes the peer believe that NAT takes place
175 on the path, forcing it to encapsulate ESP packets in UDP.
176
177 Usually this is not required, but it can help to work around connectivity
178 issues with too restrictive intermediary firewalls.
179 '';
180
181 mobike = mkYesNoParam yes ''
182 Enables MOBIKE on IKEv2 connections. MOBIKE is enabled by default on IKEv2
183 connections, and allows mobility of clients and multi-homing on servers by
184 migrating active IPsec tunnels.
185
186 Usually keeping MOBIKE enabled is unproblematic, as it is not used if the
187 peer does not indicate support for it. However, due to the design of
188 MOBIKE, IKEv2 always floats to port 4500 starting from the second
189 exchange. Some implementations don't like this behavior, hence it can be
190 disabled.
191 '';
192
193 dpd_delay = mkDurationParam "0s" ''
194 Interval to check the liveness of a peer actively using IKEv2
195 INFORMATIONAL exchanges or IKEv1 R_U_THERE messages. Active DPD checking
196 is only enforced if no IKE or ESP/AH packet has been received for the
197 configured DPD delay.
198 '';
199
200 dpd_timeout = mkDurationParam "0s" ''
201 Charon by default uses the normal retransmission mechanism and timeouts to
202 check the liveness of a peer, as all messages are used for liveness
203 checking. For compatibility reasons, with IKEv1 a custom interval may be
204 specified; this option has no effect on connections using IKEv2.
205 '';
206
207 fragmentation = mkEnumParam ["yes" "accept" "force" "no"] "yes" ''
208 Use IKE fragmentation (proprietary IKEv1 extension or RFC 7383 IKEv2
209 fragmentation). Acceptable values are `yes` (the default
210 since 5.5.1), `accept` (since versions:5.5.3),
211 `force` and `no`.
212
213 - If set to `yes`, and the peer
214 supports it, oversized IKE messages will be sent in fragments.
215 - If set to
216 `accept`, support for fragmentation is announced to the peer but the daemon
217 does not send its own messages in fragments.
218 - If set to `force` (only
219 supported for IKEv1) the initial IKE message will already be fragmented if
220 required.
221 - Finally, setting the option to `no` will disable announcing
222 support for this feature.
223
224 Note that fragmented IKE messages sent by a peer are always processed
225 irrespective of the value of this option (even when set to no).
226 '';
227
228 childless = mkEnumParam [ "allow" "prefer" "force" "never" ] "allow" ''
229 Use childless IKE_SA initiation (_allow_, _prefer_, _force_ or _never_).
230
231 Use childless IKE_SA initiation (RFC 6023) for IKEv2, with the first
232 CHILD_SA created with a separate CREATE_CHILD_SA exchange (e.g. to use an
233 independent DH exchange for all CHILD_SAs). Acceptable values are `allow`
234 (the default), `prefer`, `force` and `never`. If set to `allow`, responders
235 will accept childless IKE_SAs (as indicated via notify in the IKE_SA_INIT
236 response) while initiators continue to create regular IKE_SAs with the first
237 CHILD_SA created during IKE_AUTH, unless the IKE_SA is initiated explicitly
238 without any children (which will fail if the responder does not support or
239 has disabled this extension). The effect of `prefer` is the same as `allow`
240 on responders, but as initiator a childless IKE_SA is initiated if the
241 responder supports it. If set to `force`, only childless initiation is
242 accepted in either role. Finally, setting the option to `never` disables
243 support for childless IKE_SAs as responder.
244 '';
245
246 send_certreq = mkYesNoParam yes ''
247 Send certificate request payloads to offer trusted root CA certificates to
248 the peer. Certificate requests help the peer to choose an appropriate
249 certificate/private key for authentication and are enabled by default.
250 Disabling certificate requests can be useful if too many trusted root CA
251 certificates are installed, as each certificate request increases the size
252 of the initial IKE packets.
253 '';
254
255 send_cert = mkEnumParam ["always" "never" "ifasked" ] "ifasked" ''
256 Send certificate payloads when using certificate authentication.
257
258 - With the default of `ifasked` the daemon sends
259 certificate payloads only if certificate requests have been received.
260 - `never` disables sending of certificate payloads
261 altogether,
262 - `always` causes certificate payloads to be sent
263 unconditionally whenever certificate authentication is used.
264 '';
265
266 ppk_id = mkOptionalStrParam ''
267 String identifying the Postquantum Preshared Key (PPK) to be used.
268 '';
269
270 ppk_required = mkYesNoParam no ''
271 Whether a Postquantum Preshared Key (PPK) is required for this connection.
272 '';
273
274 keyingtries = mkIntParam 1 ''
275 Number of retransmission sequences to perform during initial
276 connect. Instead of giving up initiation after the first retransmission
277 sequence with the default value of `1`, additional
278 sequences may be started according to the configured value. A value of
279 `0` initiates a new sequence until the connection
280 establishes or fails with a permanent error.
281 '';
282
283 unique = mkEnumParam ["no" "never" "keep" "replace"] "no" ''
284 Connection uniqueness policy to enforce. To avoid multiple connections
285 from the same user, a uniqueness policy can be enforced.
286
287 - The value `never` does never enforce such a policy, even
288 if a peer included INITIAL_CONTACT notification messages,
289 - whereas `no` replaces existing connections for the same
290 identity if a new one has the INITIAL_CONTACT notify.
291 - `keep` rejects new connection attempts if the same user
292 already has an active connection,
293 - `replace` deletes any existing connection if a new one
294 for the same user gets established.
295
296 To compare connections for uniqueness, the remote IKE identity is used. If
297 EAP or XAuth authentication is involved, the EAP-Identity or XAuth
298 username is used to enforce the uniqueness policy instead.
299
300 On initiators this setting specifies whether an INITIAL_CONTACT notify is
301 sent during IKE_AUTH if no existing connection is found with the remote
302 peer (determined by the identities of the first authentication
303 round). Unless set to `never` the client will send a notify.
304 '';
305
306 reauth_time = mkDurationParam "0s" ''
307 Time to schedule IKE reauthentication. IKE reauthentication recreates the
308 IKE/ISAKMP SA from scratch and re-evaluates the credentials. In asymmetric
309 configurations (with EAP or configuration payloads) it might not be
310 possible to actively reauthenticate as responder. The IKEv2
311 reauthentication lifetime negotiation can instruct the client to perform
312 reauthentication.
313
314 Reauthentication is disabled by default. Enabling it usually may lead to
315 small connection interruptions, as strongSwan uses a break-before-make
316 policy with IKEv2 to avoid any conflicts with associated tunnel resources.
317 '';
318
319 rekey_time = mkDurationParam "4h" ''
320 IKE rekeying refreshes key material using a Diffie-Hellman exchange, but
321 does not re-check associated credentials. It is supported in IKEv2 only,
322 IKEv1 performs a reauthentication procedure instead.
323
324 With the default value IKE rekeying is scheduled every 4 hours, minus the
325 configured rand_time. If a reauth_time is configured, rekey_time defaults
326 to zero, disabling rekeying; explicitly set both to enforce rekeying and
327 reauthentication.
328 '';
329
330 over_time = mkOptionalDurationParam ''
331 Hard IKE_SA lifetime if rekey/reauth does not complete, as time. To avoid
332 having an IKE/ISAKMP kept alive if IKE reauthentication or rekeying fails
333 perpetually, a maximum hard lifetime may be specified. If the IKE_SA fails
334 to rekey or reauthenticate within the specified time, the IKE_SA gets
335 closed.
336
337 In contrast to CHILD_SA rekeying, over_time is relative in time to the
338 rekey_time and reauth_time values, as it applies to both.
339
340 The default is 10% of the longer of {option}`rekey_time` and
341 {option}`reauth_time`.
342 '';
343
344 rand_time = mkOptionalDurationParam ''
345 Time range from which to choose a random value to subtract from
346 rekey/reauth times. To avoid having both peers initiating the rekey/reauth
347 procedure simultaneously, a random time gets subtracted from the
348 rekey/reauth times.
349
350 The default is equal to the configured {option}`over_time`.
351 '';
352
353 pools = mkCommaSepListParam [] ''
354 List of named IP pools to allocate virtual IP addresses
355 and other configuration attributes from. Each name references a pool by
356 name from either the pools section or an external pool.
357 '';
358
359 if_id_in = mkStrParam "0" ''
360 XFRM interface ID set on inbound policies/SA, can be overridden by child
361 config, see there for details.
362
363 The special value `%unique` allocates a unique interface ID per IKE_SA,
364 which is inherited by all its CHILD_SAs (unless overridden there), beyond
365 that the value `%unique-dir` assigns a different unique interface ID for
366 each direction (in/out).
367
368 '';
369
370 if_id_out = mkStrParam "0" ''
371 XFRM interface ID set on outbound policies/SA, can be overridden by child
372 config, see there for details.
373
374 The special value `%unique` allocates a unique interface ID per IKE_SA,
375 which is inherited by all its CHILD_SAs (unless overridden there), beyond
376 that the value `%unique-dir` assigns a different unique interface ID for
377 each direction (in/out).
378 '';
379
380 mediation = mkYesNoParam no ''
381 Whether this connection is a mediation connection, that is, whether this
382 connection is used to mediate other connections using the IKEv2 Mediation
383 Extension. Mediation connections create no CHILD_SA.
384 '';
385
386 mediated_by = mkOptionalStrParam ''
387 The name of the connection to mediate this connection through. If given,
388 the connection will be mediated through the named mediation
389 connection. The mediation connection must have mediation enabled.
390 '';
391
392 mediation_peer = mkOptionalStrParam ''
393 Identity under which the peer is registered at the mediation server, that
394 is, the IKE identity the other end of this connection uses as its local
395 identity on its connection to the mediation server. This is the identity
396 we request the mediation server to mediate us with. Only relevant on
397 connections that set mediated_by. If it is not given, the remote IKE
398 identity of the first authentication round of this connection will be
399 used.
400 '';
401
402 local = mkPrefixedAttrsOfParams {
403
404 round = mkIntParam 0 ''
405 Optional numeric identifier by which authentication rounds are
406 sorted. If not specified rounds are ordered by their position in the
407 config file/vici message.
408 '';
409
410 certs = mkCommaSepListParam [] ''
411 List of certificate candidates to use for
412 authentication. The certificates may use a relative path from the
413 swanctl `x509` directory or an absolute path.
414
415 The certificate used for authentication is selected based on the
416 received certificate request payloads. If no appropriate CA can be
417 located, the first certificate is used.
418 '';
419
420 cert = mkPostfixedAttrsOfParams certParams ''
421 Section for a certificate candidate to use for
422 authentication. Certificates in certs are transmitted as binary blobs,
423 these sections offer more flexibility.
424 '';
425
426 pubkeys = mkCommaSepListParam [] ''
427 List of raw public key candidates to use for
428 authentication. The public keys may use a relative path from the swanctl
429 `pubkey` directory or an absolute path.
430
431 Even though multiple local public keys could be defined in principle,
432 only the first public key in the list is used for authentication.
433 '';
434
435 auth = mkStrParam "pubkey" ''
436 Authentication to perform locally.
437
438 - The default `pubkey` uses public key authentication
439 using a private key associated to a usable certificate.
440 - `psk` uses pre-shared key authentication.
441 - The IKEv1 specific `xauth` is used for XAuth or Hybrid
442 authentication,
443 - while the IKEv2 specific `eap` keyword defines EAP
444 authentication.
445 - For `xauth`, a specific backend name may be appended,
446 separated by a dash. The appropriate `xauth` backend is
447 selected to perform the XAuth exchange. For traditional XAuth, the
448 `xauth` method is usually defined in the second
449 authentication round following an initial `pubkey` (or
450 `psk`) round. Using `xauth` in the
451 first round performs Hybrid Mode client authentication.
452 - For `eap`, a specific EAP method name may be appended, separated by a
453 dash. An EAP module implementing the appropriate method is selected to
454 perform the EAP conversation.
455 - Since 5.4.0, if both peers support RFC 7427 ("Signature Authentication
456 in IKEv2") specific hash algorithms to be used during IKEv2
457 authentication may be configured. To do so use `ike:`
458 followed by a trust chain signature scheme constraint (see description
459 of the {option}`remote` section's {option}`auth`
460 keyword). For example, with `ike:pubkey-sha384-sha256`
461 a public key signature scheme with either SHA-384 or SHA-256 would get
462 used for authentication, in that order and depending on the hash
463 algorithms supported by the peer. If no specific hash algorithms are
464 configured, the default is to prefer an algorithm that matches or
465 exceeds the strength of the signature key. If no constraints with
466 `ike:` prefix are configured any signature scheme
467 constraint (without `ike:` prefix) will also apply to
468 IKEv2 authentication, unless this is disabled in
469 `strongswan.conf`. To use RSASSA-PSS signatures use
470 `rsa/pss` instead of `pubkey` or
471 `rsa` as in e.g.
472 `ike:rsa/pss-sha256`. If `pubkey` or
473 `rsa` constraints are configured RSASSA-PSS signatures
474 will only be used if enabled in `strongswan.conf`(5).
475 '';
476
477 id = mkOptionalStrParam ''
478 IKE identity to use for authentication round. When using certificate
479 authentication, the IKE identity must be contained in the certificate,
480 either as subject or as subjectAltName.
481 '';
482
483 eap_id = mkOptionalStrParam ''
484 Client EAP-Identity to use in EAP-Identity exchange and the EAP method.
485 '';
486
487 aaa_id = mkOptionalStrParam ''
488 Server side EAP-Identity to expect in the EAP method. Some EAP methods,
489 such as EAP-TLS, use an identity for the server to perform mutual
490 authentication. This identity may differ from the IKE identity,
491 especially when EAP authentication is delegated from the IKE responder
492 to an AAA backend.
493
494 For EAP-(T)TLS, this defines the identity for which the server must
495 provide a certificate in the TLS exchange.
496 '';
497
498 xauth_id = mkOptionalStrParam ''
499 Client XAuth username used in the XAuth exchange.
500 '';
501
502 } ''
503 Section for a local authentication round. A local authentication round
504 defines the rules how authentication is performed for the local
505 peer. Multiple rounds may be defined to use IKEv2 RFC 4739 Multiple
506 Authentication or IKEv1 XAuth.
507
508 Each round is defined in a section having `local` as
509 prefix, and an optional unique suffix. To define a single authentication
510 round, the suffix may be omitted.
511 '';
512
513 remote = mkPrefixedAttrsOfParams {
514
515 round = mkIntParam 0 ''
516 Optional numeric identifier by which authentication rounds are
517 sorted. If not specified rounds are ordered by their position in the
518 config file/vici message.
519 '';
520
521 id = mkStrParam "%any" ''
522 IKE identity to expect for authentication round. When using certificate
523 authentication, the IKE identity must be contained in the certificate,
524 either as subject or as subjectAltName.
525 '';
526
527 eap_id = mkOptionalStrParam ''
528 Identity to use as peer identity during EAP authentication. If set to
529 `%any` the EAP-Identity method will be used to ask the
530 client for an EAP identity.
531 '';
532
533 groups = mkCommaSepListParam [] ''
534 Authorization group memberships to require. The peer
535 must prove membership to at least one of the specified groups. Group
536 membership can be certified by different means, for example by
537 appropriate Attribute Certificates or by an AAA backend involved in the
538 authentication.
539 '';
540
541 cert_policy = mkCommaSepListParam [] ''
542 List of certificate policy OIDs the peer's certificate
543 must have. OIDs are specified using the numerical dotted representation.
544 '';
545
546 certs = mkCommaSepListParam [] ''
547 List of certificates to accept for authentication. The certificates may
548 use a relative path from the swanctl `x509` directory
549 or an absolute path.
550 '';
551
552 cert = mkPostfixedAttrsOfParams certParams ''
553 Section for a certificate candidate to use for
554 authentication. Certificates in certs are transmitted as binary blobs,
555 these sections offer more flexibility.
556 '';
557
558 ca_id = mkOptionalStrParam ''
559 Identity in CA certificate to accept for authentication. The specified
560 identity must be contained in one (intermediate) CA of the remote peer
561 trustchain, either as subject or as subjectAltName. This has the same
562 effect as specifying `cacerts` to force clients under
563 a CA to specific connections; it does not require the CA certificate
564 to be available locally, and can be received from the peer during the
565 IKE exchange.
566 '';
567
568 cacerts = mkCommaSepListParam [] ''
569 List of CA certificates to accept for
570 authentication. The certificates may use a relative path from the
571 swanctl `x509ca` directory or an absolute path.
572 '';
573
574 cacert = mkPostfixedAttrsOfParams certParams ''
575 Section for a CA certificate to accept for authentication. Certificates
576 in cacerts are transmitted as binary blobs, these sections offer more
577 flexibility.
578 '';
579
580 pubkeys = mkCommaSepListParam [] ''
581 List of raw public keys to accept for
582 authentication. The public keys may use a relative path from the swanctl
583 `pubkey` directory or an absolute path.
584 '';
585
586 revocation = mkEnumParam ["strict" "ifuri" "relaxed"] "relaxed" ''
587 Certificate revocation policy for CRL or OCSP revocation.
588
589 - A `strict` revocation policy fails if no revocation information is
590 available, i.e. the certificate is not known to be unrevoked.
591 - `ifuri` fails only if a CRL/OCSP URI is available, but certificate
592 revocation checking fails, i.e. there should be revocation information
593 available, but it could not be obtained.
594 - The default revocation policy `relaxed` fails only if a certificate is
595 revoked, i.e. it is explicitly known that it is bad.
596 '';
597
598 auth = mkStrParam "pubkey" ''
599 Authentication to expect from remote. See the {option}`local`
600 section's {option}`auth` keyword description about the details of
601 supported mechanisms.
602
603 Since 5.4.0, to require a trustchain public key strength for the remote
604 side, specify the key type followed by the minimum strength in bits (for
605 example `ecdsa-384` or
606 `rsa-2048-ecdsa-256`). To limit the acceptable set of
607 hashing algorithms for trustchain validation, append hash algorithms to
608 pubkey or a key strength definition (for example
609 `pubkey-sha256-sha512`,
610 `rsa-2048-sha256-sha384-sha512` or
611 `rsa-2048-sha256-ecdsa-256-sha256-sha384`).
612 Unless disabled in `strongswan.conf`, or explicit IKEv2
613 signature constraints are configured (refer to the description of the
614 {option}`local` section's {option}`auth` keyword for
615 details), such key types and hash algorithms are also applied as
616 constraints against IKEv2 signature authentication schemes used by the
617 remote side. To require RSASSA-PSS signatures use
618 `rsa/pss` instead of `pubkey` or
619 `rsa` as in e.g. `rsa/pss-sha256`. If
620 `pubkey` or `rsa` constraints are
621 configured RSASSA-PSS signatures will only be accepted if enabled in
622 `strongswan.conf`(5).
623
624 To specify trust chain constraints for EAP-(T)TLS, append a colon to the
625 EAP method, followed by the key type/size and hash algorithm as
626 discussed above (e.g. `eap-tls:ecdsa-384-sha384`).
627 '';
628
629 } ''
630 Section for a remote authentication round. A remote authentication round
631 defines the constraints how the peers must authenticate to use this
632 connection. Multiple rounds may be defined to use IKEv2 RFC 4739 Multiple
633 Authentication or IKEv1 XAuth.
634
635 Each round is defined in a section having `remote` as
636 prefix, and an optional unique suffix. To define a single authentication
637 round, the suffix may be omitted.
638 '';
639
640 children = mkAttrsOfParams {
641 ah_proposals = mkCommaSepListParam [] ''
642 AH proposals to offer for the CHILD_SA. A proposal is a set of
643 algorithms. For AH, this includes an integrity algorithm and an optional
644 Diffie-Hellman group. If a DH group is specified, CHILD_SA/Quick Mode
645 rekeying and initial negotiation uses a separate Diffie-Hellman exchange
646 using the specified group (refer to esp_proposals for details).
647
648 In IKEv2, multiple algorithms of the same kind can be specified in a
649 single proposal, from which one gets selected. In IKEv1, only one
650 algorithm per kind is allowed per proposal, more algorithms get
651 implicitly stripped. Use multiple proposals to offer different algorithms
652 combinations in IKEv1.
653
654 Algorithm keywords get separated using dashes. Multiple proposals may be
655 specified in a list. The special value `default` forms
656 a default proposal of supported algorithms considered safe, and is
657 usually a good choice for interoperability. By default no AH proposals
658 are included, instead ESP is proposed.
659 '';
660
661 esp_proposals = mkCommaSepListParam ["default"] ''
662 ESP proposals to offer for the CHILD_SA. A proposal is a set of
663 algorithms. For ESP non-AEAD proposals, this includes an integrity
664 algorithm, an encryption algorithm, an optional Diffie-Hellman group and
665 an optional Extended Sequence Number Mode indicator. For AEAD proposals,
666 a combined mode algorithm is used instead of the separate
667 encryption/integrity algorithms.
668
669 If a DH group is specified, CHILD_SA/Quick Mode rekeying and initial
670 negotiation use a separate Diffie-Hellman exchange using the specified
671 group. However, for IKEv2, the keys of the CHILD_SA created implicitly
672 with the IKE_SA will always be derived from the IKE_SA's key material. So
673 any DH group specified here will only apply when the CHILD_SA is later
674 rekeyed or is created with a separate CREATE_CHILD_SA exchange. A
675 proposal mismatch might, therefore, not immediately be noticed when the
676 SA is established, but may later cause rekeying to fail.
677
678 Extended Sequence Number support may be indicated with the
679 `esn` and `noesn` values, both may be
680 included to indicate support for both modes. If omitted,
681 `noesn` is assumed.
682
683 In IKEv2, multiple algorithms of the same kind can be specified in a
684 single proposal, from which one gets selected. In IKEv1, only one
685 algorithm per kind is allowed per proposal, more algorithms get
686 implicitly stripped. Use multiple proposals to offer different algorithms
687 combinations in IKEv1.
688
689 Algorithm keywords get separated using dashes. Multiple proposals may be
690 specified as a list. The special value `default` forms
691 a default proposal of supported algorithms considered safe, and is
692 usually a good choice for interoperability. If no algorithms are
693 specified for AH nor ESP, the default set of algorithms for ESP is
694 included.
695 '';
696
697 sha256_96 = mkYesNoParam no ''
698 HMAC-SHA-256 is used with 128-bit truncation with IPsec. For
699 compatibility with implementations that incorrectly use 96-bit truncation
700 this option may be enabled to configure the shorter truncation length in
701 the kernel. This is not negotiated, so this only works with peers that
702 use the incorrect truncation length (or have this option enabled).
703 '';
704
705 local_ts = mkCommaSepListParam ["dynamic"] ''
706 List of local traffic selectors to include in CHILD_SA. Each selector is
707 a CIDR subnet definition, followed by an optional proto/port
708 selector. The special value `dynamic` may be used
709 instead of a subnet definition, which gets replaced by the tunnel outer
710 address or the virtual IP, if negotiated. This is the default.
711
712 A protocol/port selector is surrounded by opening and closing square
713 brackets. Between these brackets, a numeric or getservent(3) protocol
714 name may be specified. After the optional protocol restriction, an
715 optional port restriction may be specified, separated by a slash. The
716 port restriction may be numeric, a getservent(3) service name, or the
717 special value `opaque` for RFC 4301 OPAQUE
718 selectors. Port ranges may be specified as well, none of the kernel
719 backends currently support port ranges, though.
720
721 When IKEv1 is used only the first selector is interpreted, except if the
722 Cisco Unity extension plugin is used. This is due to a limitation of the
723 IKEv1 protocol, which only allows a single pair of selectors per
724 CHILD_SA. So to tunnel traffic matched by several pairs of selectors when
725 using IKEv1 several children (CHILD_SAs) have to be defined that cover
726 the selectors. The IKE daemon uses traffic selector narrowing for IKEv1,
727 the same way it is standardized and implemented for IKEv2. However, this
728 may lead to problems with other implementations. To avoid that, configure
729 identical selectors in such scenarios.
730 '';
731
732 remote_ts = mkCommaSepListParam ["dynamic"] ''
733 List of remote selectors to include in CHILD_SA. See
734 {option}`local_ts` for a description of the selector syntax.
735 '';
736
737 rekey_time = mkDurationParam "1h" ''
738 Time to schedule CHILD_SA rekeying. CHILD_SA rekeying refreshes key
739 material, optionally using a Diffie-Hellman exchange if a group is
740 specified in the proposal. To avoid rekey collisions initiated by both
741 ends simultaneously, a value in the range of {option}`rand_time`
742 gets subtracted to form the effective soft lifetime.
743
744 By default CHILD_SA rekeying is scheduled every hour, minus
745 {option}`rand_time`.
746 '';
747
748 life_time = mkOptionalDurationParam ''
749 Maximum lifetime before CHILD_SA gets closed. Usually this hard lifetime
750 is never reached, because the CHILD_SA gets rekeyed before. If that fails
751 for whatever reason, this limit closes the CHILD_SA. The default is 10%
752 more than the {option}`rekey_time`.
753 '';
754
755 rand_time = mkOptionalDurationParam ''
756 Time range from which to choose a random value to subtract from
757 {option}`rekey_time`. The default is the difference between
758 {option}`life_time` and {option}`rekey_time`.
759 '';
760
761 rekey_bytes = mkIntParam 0 ''
762 Number of bytes processed before initiating CHILD_SA rekeying. CHILD_SA
763 rekeying refreshes key material, optionally using a Diffie-Hellman
764 exchange if a group is specified in the proposal.
765
766 To avoid rekey collisions initiated by both ends simultaneously, a value
767 in the range of {option}`rand_bytes` gets subtracted to form the
768 effective soft volume limit.
769
770 Volume based CHILD_SA rekeying is disabled by default.
771 '';
772
773 life_bytes = mkOptionalIntParam ''
774 Maximum bytes processed before CHILD_SA gets closed. Usually this hard
775 volume limit is never reached, because the CHILD_SA gets rekeyed
776 before. If that fails for whatever reason, this limit closes the
777 CHILD_SA. The default is 10% more than {option}`rekey_bytes`.
778 '';
779
780 rand_bytes = mkOptionalIntParam ''
781 Byte range from which to choose a random value to subtract from
782 {option}`rekey_bytes`. The default is the difference between
783 {option}`life_bytes` and {option}`rekey_bytes`.
784 '';
785
786 rekey_packets = mkIntParam 0 ''
787 Number of packets processed before initiating CHILD_SA rekeying. CHILD_SA
788 rekeying refreshes key material, optionally using a Diffie-Hellman
789 exchange if a group is specified in the proposal.
790
791 To avoid rekey collisions initiated by both ends simultaneously, a value
792 in the range of {option}`rand_packets` gets subtracted to form
793 the effective soft packet count limit.
794
795 Packet count based CHILD_SA rekeying is disabled by default.
796 '';
797
798 life_packets = mkOptionalIntParam ''
799 Maximum number of packets processed before CHILD_SA gets closed. Usually
800 this hard packets limit is never reached, because the CHILD_SA gets
801 rekeyed before. If that fails for whatever reason, this limit closes the
802 CHILD_SA.
803
804 The default is 10% more than {option}`rekey_bytes`.
805 '';
806
807 rand_packets = mkOptionalIntParam ''
808 Packet range from which to choose a random value to subtract from
809 {option}`rekey_packets`. The default is the difference between
810 {option}`life_packets` and {option}`rekey_packets`.
811 '';
812
813 updown = mkOptionalStrParam ''
814 Updown script to invoke on CHILD_SA up and down events.
815 '';
816
817 hostaccess = mkYesNoParam no ''
818 Hostaccess variable to pass to `updown` script.
819 '';
820
821 mode = mkEnumParam [ "tunnel"
822 "transport"
823 "transport_proxy"
824 "beet"
825 "pass"
826 "drop"
827 ] "tunnel" ''
828 IPsec Mode to establish CHILD_SA with.
829
830 - `tunnel` negotiates the CHILD_SA in IPsec Tunnel Mode,
831 - whereas `transport` uses IPsec Transport Mode.
832 - `transport_proxy` signifying the special Mobile IPv6
833 Transport Proxy Mode.
834 - `beet` is the Bound End to End Tunnel mixture mode,
835 working with fixed inner addresses without the need to include them in
836 each packet.
837 - Both `transport` and `beet` modes are
838 subject to mode negotiation; `tunnel` mode is
839 negotiated if the preferred mode is not available.
840 - `pass` and `drop` are used to install
841 shunt policies which explicitly bypass the defined traffic from IPsec
842 processing or drop it, respectively.
843 '';
844
845 policies = mkYesNoParam yes ''
846 Whether to install IPsec policies or not. Disabling this can be useful in
847 some scenarios e.g. MIPv6, where policies are not managed by the IKE
848 daemon. Since 5.3.3.
849 '';
850
851 policies_fwd_out = mkYesNoParam no ''
852 Whether to install outbound FWD IPsec policies or not. Enabling this is
853 required in case there is a drop policy that would match and block
854 forwarded traffic for this CHILD_SA. Since 5.5.1.
855 '';
856
857 dpd_action = mkEnumParam ["clear" "trap" "restart"] "clear" ''
858 Action to perform for this CHILD_SA on DPD timeout. The default clear
859 closes the CHILD_SA and does not take further action. trap installs a
860 trap policy, which will catch matching traffic and tries to re-negotiate
861 the tunnel on-demand. restart immediately tries to re-negotiate the
862 CHILD_SA under a fresh IKE_SA.
863 '';
864
865 ipcomp = mkYesNoParam no ''
866 Enable IPComp compression before encryption. If enabled, IKE tries to
867 negotiate IPComp compression to compress ESP payload data prior to
868 encryption.
869 '';
870
871 inactivity = mkDurationParam "0s" ''
872 Timeout before closing CHILD_SA after inactivity. If no traffic has been
873 processed in either direction for the configured timeout, the CHILD_SA
874 gets closed due to inactivity. The default value of 0 disables inactivity
875 checks.
876 '';
877
878 reqid = mkIntParam 0 ''
879 Fixed reqid to use for this CHILD_SA. This might be helpful in some
880 scenarios, but works only if each CHILD_SA configuration is instantiated
881 not more than once. The default of 0 uses dynamic reqids, allocated
882 incrementally.
883 '';
884
885 priority = mkIntParam 0 ''
886 Optional fixed priority for IPsec policies. This could be useful to
887 install high-priority drop policies. The default of 0 uses dynamically
888 calculated priorities based on the size of the traffic selectors.
889 '';
890
891 interface = mkOptionalStrParam ''
892 Optional interface name to restrict outbound IPsec policies.
893 '';
894
895 mark_in = mkStrParam "0/0x00000000" ''
896 Netfilter mark and mask for input traffic. On Linux, Netfilter may
897 require marks on each packet to match an SA/policy having that option
898 set. This allows installing duplicate policies and enables Netfilter
899 rules to select specific SAs/policies for incoming traffic. Note that
900 inbound marks are only set on policies, by default, unless
901 {option}`mark_in_sa` is enabled. The special value
902 `%unique` sets a unique mark on each CHILD_SA instance,
903 beyond that the value `%unique-dir` assigns a different
904 unique mark for each
905
906 An additional mask may be appended to the mark, separated by
907 `/`. The default mask if omitted is
908 `0xffffffff`.
909 '';
910
911 mark_in_sa = mkYesNoParam no ''
912 Whether to set {option}`mark_in` on the inbound SA. By default,
913 the inbound mark is only set on the inbound policy. The tuple destination
914 address, protocol and SPI is unique and the mark is not required to find
915 the correct SA, allowing to mark traffic after decryption instead (where
916 more specific selectors may be used) to match different policies. Marking
917 packets before decryption is still possible, even if no mark is set on
918 the SA.
919 '';
920
921 mark_out = mkStrParam "0/0x00000000" ''
922 Netfilter mark and mask for output traffic. On Linux, Netfilter may
923 require marks on each packet to match a policy/SA having that option
924 set. This allows installing duplicate policies and enables Netfilter
925 rules to select specific policies/SAs for outgoing traffic. The special
926 value `%unique` sets a unique mark on each CHILD_SA
927 instance, beyond that the value `%unique-dir` assigns a
928 different unique mark for each CHILD_SA direction (in/out).
929
930 An additional mask may be appended to the mark, separated by
931 `/`. The default mask if omitted is
932 `0xffffffff`.
933 '';
934
935 set_mark_in = mkStrParam "0/0x00000000" ''
936 Netfilter mark applied to packets after the inbound IPsec SA processed
937 them. This way it's not necessary to mark packets via Netfilter before
938 decryption or right afterwards to match policies or process them
939 differently (e.g. via policy routing).
940
941 An additional mask may be appended to the mark, separated by
942 `/`. The default mask if omitted is 0xffffffff. The
943 special value `%same` uses the value (but not the mask)
944 from {option}`mark_in` as mark value, which can be fixed,
945 `%unique` or `%unique-dir`.
946
947 Setting marks in XFRM input requires Linux 4.19 or higher.
948 '';
949
950 set_mark_out = mkStrParam "0/0x00000000" ''
951 Netfilter mark applied to packets after the outbound IPsec SA processed
952 them. This allows processing ESP packets differently than the original
953 traffic (e.g. via policy routing).
954
955 An additional mask may be appended to the mark, separated by
956 `/`. The default mask if omitted is 0xffffffff. The
957 special value `%same` uses the value (but not the mask)
958 from {option}`mark_out` as mark value, which can be fixed,
959 `%unique_` or `%unique-dir`.
960
961 Setting marks in XFRM output is supported since Linux 4.14. Setting a
962 mask requires at least Linux 4.19.
963 '';
964
965 if_id_in = mkStrParam "0" ''
966 XFRM interface ID set on inbound policies/SA. This allows installing
967 duplicate policies/SAs and associates them with an interface with the
968 same ID. The special value `%unique` sets a unique
969 interface ID on each CHILD_SA instance, beyond that the value
970 `%unique-dir` assigns a different unique interface ID
971 for each CHILD_SA direction (in/out).
972 '';
973
974 if_id_out = mkStrParam "0" ''
975 XFRM interface ID set on outbound policies/SA. This allows installing
976 duplicate policies/SAs and associates them with an interface with the
977 same ID. The special value `%unique` sets a unique
978 interface ID on each CHILD_SA instance, beyond that the value
979 `%unique-dir` assigns a different unique interface ID
980 for each CHILD_SA direction (in/out).
981
982 The daemon will not install routes for CHILD_SAs that have this option set.
983 '';
984
985 tfc_padding = mkParamOfType (with lib.types; either int (enum ["mtu"])) 0 ''
986 Pads ESP packets with additional data to have a consistent ESP packet
987 size for improved Traffic Flow Confidentiality. The padding defines the
988 minimum size of all ESP packets sent. The default value of
989 `0` disables TFC padding, the special value
990 `mtu` adds TFC padding to create a packet size equal to
991 the Path Maximum Transfer Unit.
992 '';
993
994 replay_window = mkIntParam 32 ''
995 IPsec replay window to configure for this CHILD_SA. Larger values than
996 the default of `32` are supported using the Netlink
997 backend only, a value of `0` disables IPsec replay
998 protection.
999 '';
1000
1001 hw_offload = mkEnumParam ["yes" "no" "auto" "crypto" "packet"] "no" ''
1002 Enable hardware offload for this CHILD_SA, if supported by the IPsec
1003 implementation. The values `crypto` or `packet` enforce crypto or full
1004 packet offloading and the installation will fail if the selected mode is not
1005 supported by either kernel or device. On Linux, `packet` also offloads
1006 policies, including trap policies. The value `auto` enables full packet
1007 or crypto offloading, if either is supported, but the installation does not
1008 fail otherwise.
1009 '';
1010
1011 copy_df = mkYesNoParam yes ''
1012 Whether to copy the DF bit to the outer IPv4 header in tunnel mode. This
1013 effectively disables Path MTU discovery (PMTUD). Controlling this
1014 behavior is not supported by all kernel interfaces.
1015 '';
1016
1017 copy_ecn = mkYesNoParam yes ''
1018 Whether to copy the ECN (Explicit Congestion Notification) header field
1019 to/from the outer IP header in tunnel mode. Controlling this behavior is
1020 not supported by all kernel interfaces.
1021 '';
1022
1023 copy_dscp = mkEnumParam [ "out" "in" "yes" "no" ] "out" ''
1024 Whether to copy the DSCP (Differentiated Services Field Codepoint)
1025 header field to/from the outer IP header in tunnel mode. The value
1026 `out` only copies the field from the inner to the outer
1027 header, the value `in` does the opposite and only
1028 copies the field from the outer to the inner header when decapsulating,
1029 the value `yes` copies the field in both directions,
1030 and the value `no` disables copying the field
1031 altogether. Setting this to `yes` or
1032 `in` could allow an attacker to adversely affect other
1033 traffic at the receiver, which is why the default is
1034 `out`. Controlling this behavior is not supported by
1035 all kernel interfaces.
1036 '';
1037
1038 start_action = mkEnumParam ["none" "trap" "start"] "none" ''
1039 Action to perform after loading the configuration.
1040
1041 - The default of `none` loads the connection only, which
1042 then can be manually initiated or used as a responder configuration.
1043 - The value `trap` installs a trap policy, which triggers
1044 the tunnel as soon as matching traffic has been detected.
1045 - The value `start` initiates the connection actively.
1046
1047 When unloading or replacing a CHILD_SA configuration having a
1048 {option}`start_action` different from `none`,
1049 the inverse action is performed. Configurations with
1050 `start` get closed, while such with
1051 `trap` get uninstalled.
1052 '';
1053
1054 close_action = mkEnumParam ["none" "trap" "start"] "none" ''
1055 Action to perform after a CHILD_SA gets closed by the peer.
1056
1057 - The default of `none` does not take any action,
1058 - `trap` installs a trap policy for the CHILD_SA.
1059 - `start` tries to re-create the CHILD_SA.
1060
1061 {option}`close_action` does not provide any guarantee that the
1062 CHILD_SA is kept alive. It acts on explicit close messages only, but not
1063 on negotiation failures. Use trap policies to reliably re-create failed
1064 CHILD_SAs.
1065 '';
1066
1067 } ''
1068 CHILD_SA configuration sub-section. Each connection definition may have
1069 one or more sections in its {option}`children` subsection. The
1070 section name defines the name of the CHILD_SA configuration, which must be
1071 unique within the connection (denoted \<child\> below).
1072 '';
1073 } ''
1074 Section defining IKE connection configurations, each in its own subsection
1075 with an arbitrary yet unique name
1076 '';
1077
1078 secrets = let
1079 mkEapXauthParams = mkPrefixedAttrsOfParams {
1080 secret = mkOptionalStrParam ''
1081 Value of the EAP/XAuth secret. It may either be an ASCII string, a hex
1082 encoded string if it has a 0x prefix or a Base64 encoded string if it
1083 has a 0s prefix in its value.
1084 '';
1085
1086 id = mkPrefixedAttrsOfParam (mkOptionalStrParam "") ''
1087 Identity the EAP/XAuth secret belongs to. Multiple unique identities may
1088 be specified, each having an `id` prefix, if a secret
1089 is shared between multiple users.
1090 '';
1091
1092 } ''
1093 EAP secret section for a specific secret. Each EAP secret is defined in a
1094 unique section having the `eap` prefix. EAP secrets are
1095 used for XAuth authentication as well.
1096 '';
1097
1098 in {
1099
1100 eap = mkEapXauthParams;
1101 xauth = mkEapXauthParams;
1102
1103 ntlm = mkPrefixedAttrsOfParams {
1104 secret = mkOptionalStrParam ''
1105 Value of the NTLM secret, which is the NT Hash of the actual secret,
1106 that is, MD4(UTF-16LE(secret)). The resulting 16-byte value may either
1107 be given as a hex encoded string with a 0x prefix or as a Base64 encoded
1108 string with a 0s prefix.
1109 '';
1110
1111 id = mkPrefixedAttrsOfParam (mkOptionalStrParam "") ''
1112 Identity the NTLM secret belongs to. Multiple unique identities may be
1113 specified, each having an id prefix, if a secret is shared between
1114 multiple users.
1115 '';
1116 } ''
1117 NTLM secret section for a specific secret. Each NTLM secret is defined in
1118 a unique section having the `ntlm` prefix. NTLM secrets
1119 may only be used for EAP-MSCHAPv2 authentication.
1120 '';
1121
1122 ike = mkPrefixedAttrsOfParams {
1123 secret = mkOptionalStrParam ''
1124 Value of the IKE preshared secret. It may either be an ASCII string, a
1125 hex encoded string if it has a 0x prefix or a Base64 encoded string if
1126 it has a 0s prefix in its value.
1127 '';
1128
1129 id = mkPrefixedAttrsOfParam (mkOptionalStrParam "") ''
1130 IKE identity the IKE preshared secret belongs to. Multiple unique
1131 identities may be specified, each having an `id`
1132 prefix, if a secret is shared between multiple peers.
1133 '';
1134 } ''
1135 IKE preshared secret section for a specific secret. Each IKE PSK is
1136 defined in a unique section having the `ike` prefix.
1137 '';
1138
1139 ppk = mkPrefixedAttrsOfParams {
1140 secret = mkOptionalStrParam ''
1141 Value of the PPK. It may either be an ASCII string, a hex encoded string
1142 if it has a `0x` prefix or a Base64 encoded string if
1143 it has a `0s` prefix in its value. Should have at least
1144 256 bits of entropy for 128-bit security.
1145 '';
1146
1147 id = mkPrefixedAttrsOfParam (mkOptionalStrParam "") ''
1148 PPK identity the PPK belongs to. Multiple unique identities may be
1149 specified, each having an `id` prefix, if a secret is
1150 shared between multiple peers.
1151 '';
1152 } ''
1153 Postquantum Preshared Key (PPK) section for a specific secret. Each PPK is
1154 defined in a unique section having the `ppk` prefix.
1155 '';
1156
1157 private = mkPrefixedAttrsOfParams {
1158 file = mkOptionalStrParam ''
1159 File name in the private folder for which this passphrase should be used.
1160 '';
1161
1162 secret = mkOptionalStrParam ''
1163 Value of decryption passphrase for private key.
1164 '';
1165 } ''
1166 Private key decryption passphrase for a key in the
1167 `private` folder.
1168 '';
1169
1170 rsa = mkPrefixedAttrsOfParams {
1171 file = mkOptionalStrParam ''
1172 File name in the `rsa` folder for which this passphrase
1173 should be used.
1174 '';
1175 secret = mkOptionalStrParam ''
1176 Value of decryption passphrase for RSA key.
1177 '';
1178 } ''
1179 Private key decryption passphrase for a key in the `rsa`
1180 folder.
1181 '';
1182
1183 ecdsa = mkPrefixedAttrsOfParams {
1184 file = mkOptionalStrParam ''
1185 File name in the `ecdsa` folder for which this
1186 passphrase should be used.
1187 '';
1188 secret = mkOptionalStrParam ''
1189 Value of decryption passphrase for ECDSA key.
1190 '';
1191 } ''
1192 Private key decryption passphrase for a key in the
1193 `ecdsa` folder.
1194 '';
1195
1196 pkcs8 = mkPrefixedAttrsOfParams {
1197 file = mkOptionalStrParam ''
1198 File name in the `pkcs8` folder for which this
1199 passphrase should be used.
1200 '';
1201 secret = mkOptionalStrParam ''
1202 Value of decryption passphrase for PKCS#8 key.
1203 '';
1204 } ''
1205 Private key decryption passphrase for a key in the
1206 `pkcs8` folder.
1207 '';
1208
1209 pkcs12 = mkPrefixedAttrsOfParams {
1210 file = mkOptionalStrParam ''
1211 File name in the `pkcs12` folder for which this
1212 passphrase should be used.
1213 '';
1214 secret = mkOptionalStrParam ''
1215 Value of decryption passphrase for PKCS#12 container.
1216 '';
1217 } ''
1218 PKCS#12 decryption passphrase for a container in the
1219 `pkcs12` folder.
1220 '';
1221
1222 token = mkPrefixedAttrsOfParams {
1223 handle = mkOptionalHexParam ''
1224 Hex-encoded CKA_ID or handle of the private key on the token or TPM,
1225 respectively.
1226 '';
1227
1228 slot = mkOptionalIntParam ''
1229 Optional slot number to access the token.
1230 '';
1231
1232 module = mkOptionalStrParam ''
1233 Optional PKCS#11 module name to access the token.
1234 '';
1235
1236 pin = mkOptionalStrParam ''
1237 Optional PIN required to access the key on the token. If none is
1238 provided the user is prompted during an interactive
1239 `--load-creds` call.
1240 '';
1241 } "Definition for a private key that's stored on a token/smartcard/TPM.";
1242
1243 };
1244
1245 pools = mkAttrsOfParams {
1246 addrs = mkOptionalStrParam ''
1247 Subnet or range defining addresses allocated in pool. Accepts a single
1248 CIDR subnet defining the pool to allocate addresses from or an address
1249 range (\<from\>-\<to\>). Pools must be unique and non-overlapping.
1250 '';
1251
1252 dns = mkCommaSepListParam [] "Address or CIDR subnets";
1253 nbns = mkCommaSepListParam [] "Address or CIDR subnets";
1254 dhcp = mkCommaSepListParam [] "Address or CIDR subnets";
1255 netmask = mkCommaSepListParam [] "Address or CIDR subnets";
1256 server = mkCommaSepListParam [] "Address or CIDR subnets";
1257 subnet = mkCommaSepListParam [] "Address or CIDR subnets";
1258 split_include = mkCommaSepListParam [] "Address or CIDR subnets";
1259 split_exclude = mkCommaSepListParam [] "Address or CIDR subnets";
1260 } ''
1261 Section defining named pools. Named pools may be referenced by connections
1262 with the pools option to assign virtual IPs and other configuration
1263 attributes. Each pool must have a unique name (denoted \<name\> below).
1264 '';
1265}