1/15
Looks like no tags are added yet.
If your partner's S1 is compromised, what does the attacker now have?
the PSK, and with it the ability to impersonate you to anyone using it
How does a CA work?
(1) The endpoint (S1) generates its own key
(2) It builds a certificate signing request (a public key plus the names it wants, signed by that key)
(3) It sends only the request to the CA
(4) The CA signs it and sends a certificate back
What does the strongswan-pki package provide?
pki:
pki --gen (a key)
pki --self --ca (a self-signed CA certificate)
pki --req (a request from a key)
pki --issue (sign a request with the CA key)
pki --print (read a certificate)
pki --verify (check a certificate against a CA
Where does swanctl reads files from?
fixed directories under /etc/swanctl/:
private/ (your keys, mode 600)
x509/ (your certificate)
x509ca/ (CA certificates you trust)
What does swanctl --list-certs do?
shows what was loaded
How is trust exchanged?
Trust is exchanged by swapping the public CA certificates only: your S1 holds your CA and your partner's CA in x509ca/, so it accepts a certificate signed by either
What does remote { cacerts = partnerCA.pem } do?
Make it so a certificate from your own CA is not accepted from the far end
What is the operational half of PKI?
expiry, revocation (CRL, OCSP) and key rotation
What does your S1 hold, and what does your partner hold, that lets each verify the other?
each other's public CA certificate and their own certificate and key
What did trusting the CA once do for the Nginx warning from Week 4?
S2 now verifies every certificate the CA signed, with no --cacert and no copying of leaf certificates.
What is the likely cause and fix for the following issue: pki command not found
strongswan-pki is not installed
Install it on S2 (and on S1 if you create requests there)
What is the likely cause and fix for the following issue: The issued certificate has no SAN
The SAN was not in the request, or not carried over
Recreate the request with the SAN, or add it at issue time; check with pki --print
What is the likely cause and fix for the following issue: "no trusted CA certificate found" / authentication fails
The partner's CA is missing from x509ca/, or not loaded
Place it, run swanctl --load-all, check swanctl --list-certs
What is the likely cause and fix for the following issue: "no matching peer config" or an id mismatch
The id differs from the certificate's SAN
Use the exact FQDN that is in the certificate
What is the likely cause and fix for the following issue: The key file is ignored
Wrong directory or permissions
Keys go in /etc/swanctl/private/ with mode 600
What is the likely cause and fix for the following issue: Nginx will not reload
Wrong path in the snippet
nginx -t names the file; correct the path