Verify a certificate#

Every certificate carries its own UID, which is 128 random bits written as 32 hexadecimal characters. Holding the UID is what allows verification, so the UID is the only credential.

Open the verification page#

The QR code of a certificate leads to its verification page, at <site URL>/verify/<uid>. The page is part of the Volto frontend, so the frontend must serve the site.

The page shows the title Certificate verification and whether the certificate is valid. For a valid certificate, it shows the title, the issue date, the field values, and a button to download the file. For an unknown UID, it shows a message that the certificate was not found.

Anyone holding the UID can open the page, whatever the workflow state of the certificate.

Verify from a script#

The page reads the public verification service, @certificate-verification/<uid>, which returns JSON. Use the service directly when a machine verifies certificates:

curl https://example.org/plone/@certificate-verification/257e08fdcd07ff6fa3d1bc14f6aec321

The summary has the UID, the title, the issue date, the field values, the template, and the file details, including a download link. The field values come in two forms: data, a dictionary of values by token, and fields, a list of the same values with each field's token, translated title and kind.

The file is at @@certificate-file/<uid> on the same site:

curl -o certificate.pdf https://example.org/plone/@@certificate-file/257e08fdcd07ff6fa3d1bc14f6aec321

The service answers 404 for an unknown UID, a malformed UID or an extra path segment. The file view does the same.

Put the UID on the certificate#

The QR code of the sample blueprint encodes {{ verification_url }}, which is the verification page address with the UID in it. To print the UID as text, add a text element with {{ certificate_uid }}.

Set the site URL of the verification address#

The address printed on a certificate is built from the site URL, not from the template. The site URL is the value of the VOLTO_FRONTEND_DOMAIN environment variable when it is set. Otherwise it is the URL of the Plone site.

Set VOLTO_FRONTEND_DOMAIN to the public address of the frontend, such as https://example.org, before you issue certificates. A certificate created from a script or the Plone console uses the URL of the backend otherwise. The backend does not serve /verify, so a QR code with that address does not open the page.

Changing the site URL does not change certificates already issued, because their QR codes are rendered when they are created.

Revoke a certificate#

The add-on has no revocation. Anyone holding a UID can verify its certificate for as long as the certificate item exists.