BC Vaccine Passport Data Format
BC’s COVID-19 vaccine passport is being distributed primarily via QR code. I love QR codes and wanted to see what was encoded in there.
Regardless of the ethics of everything that is going on, from a technical point of view I was pleased to see that the data are narrowly scoped and that the whole system works without provided data back to a central authority.
BC COVID-19 Vaccine Passport Data Format
The QR code payload is encoded as a JSON web token following the SMART Health Card open spec. When you scan it you get a string starting with shc:/
. (This is the same format used in Quebec.)
There is a handy JS project called obrassard/shc-extractor where you can decode that string and inspect it yourself. The code to decode the payload is pretty straightforward.
The payload is signed and can be decoded using the public keys provided by the passport issuer. In the case of BC it’s the Provincial Health Services Authority. You can get the keys from https://smarthealthcard.phsa.ca/v1/issuer/.well-known/jwks.json
The payload contains the person’s
- first name
- last name
- birth date
- date, location and type of COVID-19 vaccine
There isn’t any other data included in the payload.
Caching the public keys means you can verify vax passport QR codes entirely offline.
Vaccine codes
Each dose of administered vaccine has a specific code. You can inspect the http://snomed.info/sct
coding key to see which type of vaccines were administered (source):
28581000087106
– PFIZER-BIONTECH COVID-19 messenger ribonucleic acid 30 micrograms per 0.3 milliliter suspension for dilution for injection Pfizer Canada ULC-BioNTech Manufacturing GmbH (real clinical drug)28571000087109
– MODERNA COVID-19 messenger ribonucleic acid-1273 100 micrograms per 0.5 milliliter liquid for injection Moderna Therapeutics Inc. (real clinical drug)28531000087107
– Vaccine product against disease caused by Severe acute respiratory syndrome coronavirus 2 (medicinal product)1119349007
– Vaccine product containing only Severe acute respiratory syndrome coronavirus 2 messenger ribonucleic acid (medicinal product)
Sample BC Vaccine Passport Contents
You can also download the sample vaccine passport via a gist.
I'd love to hear any feedback you might have about this post. Tweet me up at @mrmrbug or email me at code@dunae.ca.
You can also grab a little bit of RSS or check out the rest of the blog.