Linux Labs

Web stack / Stage 5 of 9 · step 6 of 7

The shop after a certificate renewal

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

Situation

The company's online shop store.lab.test runs over HTTPS on this machine's nginx. This month the training certificate authority (CA) renewed the shop's certificate, and the new file replaced the old one. Since then two people have written in.

A developer: "The shop opens in my browser, but curl and our payment service get a certificate error". A marketer: "Links from an old newsletter, like http://store.lab.test/catalog?page=2, open the home page instead of the catalog".

Every company machine trusts the training CA's root certificate, this one included. The certificates the CA signs sites with are published in /srv/lab-ca. The shop's files are in /etc/ssl/store.

Task

  1. curl without -k opens https://store.lab.test/ and gets the shop page.
  2. The shop certificate passes verification on a client that knows only the training CA's root certificate (/srv/lab-ca/root.crt), with no changes on the client side.
  3. http://store.lab.test/ answers with code 301 and redirects to https://store.lab.test/.
  4. The redirect to HTTPS keeps the path and parameters: http://store.lab.test/catalog?page=2 redirects to https://store.lab.test/catalog?page=2.

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://store.lab.test/ and gets the shop page — not checked yet
  • The shop certificate passes verification on a client that knows only the training CA's root certificate — not checked yet
  • http://store.lab.test/ answers with code 301 and redirects to https://store.lab.test/ — not checked yet
  • http://store.lab.test/catalog?page=2 redirects to https://store.lab.test/catalog?page=2 — 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…