Linux Labs

Web stack / Stage 4 of 9 · step 7 of 8

The portal fails over HTTPS

medium ~25 min
Not running Starting usually ~20 s
Report a problem

Situation

Since this morning users have been reporting that their browsers won't open the company portal at https://portal.lab.test, also known as https://www.portal.lab.test: "Your connection is not private". The portal is served by nginx on this machine.

Certificates for the company's sites are issued by an internal training certificate authority (CA). Its certificate and key are in /srv/lab-ca, and every company machine trusts the CA certificate, this one included. The portal's key and certificate are in /etc/ssl/portal, along with portal.cnf, the portal's certificate request settings for openssl req -config.

Don't change the portal's key: the company's mobile app knows the public part of this key and will not connect to the portal with a different one.

Task

  1. curl without -k opens https://portal.lab.test/ and https://www.portal.lab.test/ and gets the portal page.
  2. nginx presents a new certificate issued by the training CA.
  3. The new certificate is issued for the portal's existing key.
  4. The new certificate stays valid for at least 30 more days.

The machine has no internet access; everything you need is already installed.

Visible only to you. Saved as you type.

All notes

Lab goals

0 of 4
  • curl without -k opens https://portal.lab.test/ and https://www.portal.lab.test/ and gets the portal page — not checked yet
  • nginx presents a new certificate issued by the training CA — not checked yet
  • The new certificate is issued for the portal's existing key — not checked yet
  • The new certificate stays valid for at least 30 more days — not checked yet

Hints

0 of 3 open · they open one at a time
Hint 1
Show the solution after 3 failed checks

Leave the lab?

The machine keeps running for 10 more minutes, then it is removed. Files are lost; completed goals stay.

Loading…