29/34
Sign inSign up free

1022. A Client Certificate for Mutual TLS

medium 20 XP ~11 minHands-on lab

The internal API at https://localhost:9443/ accepts only clients that present a certificate from the client CA (/home/student/pki/client-ca.pem, key client-ca.key), and only for allowed service names. notifier has been allowed as svc-notifier. The API's own certificate is signed by /home/student/pki/server-ca.pem. Start the API with /srv/lab/bin/start-api if it isn't running.

Task

  • Create a private key /home/student/pki/client.key that only you can read,
  • and a certificate /home/student/pki/client.pem for it, signed by the client CA, with the subject CN=svc-notifier, extended key usage client authentication, valid for at most 30 days.

Then this must print hello svc-notifier:

curl --cacert /home/student/pki/server-ca.pem --cert /home/student/pki/client.pem --key /home/student/pki/client.key https://localhost:9443/

About this machine

Ubuntu 24.04 with no internet access. You are student with passwordless sudo. The grader checks the final state of the machine, not the commands you typed. Values like names and ports are generated for you.

Teaching or writing about this? Embed this lab on your page

TerminalNot started

Your machine is ready to start

A fresh, isolated Ubuntu machine boots in a few seconds with the task already set up.

No account needed: 3 of 3 free tries left. Guest machines last 30 minutes.