admin-ch / CovidCertificate-SDK-Kotlin

CovidCertificate SDK for Kotlin
Mozilla Public License 2.0
4 stars 4 forks source link

Covid Certificate App recognizes and loads UK NHS 2D barcodes, but refuses to verify #24

Open michaelmaguire opened 3 years ago

michaelmaguire commented 3 years ago

I received a complete 2 dose course of AstraZeneca from the National Health Service (NHS) in the United Kingdom.

I am a Swiss resident. When I try to scan and store that certificate into Swiss Covid Certificate Android app, it successfully reads the certificate details of both doses, but states the certificate is invalid.

What is the trust relationship issue that's not supported? I note that Switzerland recognizes all vaccines approved by SwissMedic, the European Medicines Agency and the World Health Organization.

My 2 doses of AstraZeneca were already recognized by cantonal authorities as being valid enough to exempt me from quarantine even after travel from an area with a variant of concern.

goebelUB commented 3 years ago

Interesting, I didn't know that the UK adhered to the EU DCC format. That's great, it means that there is the potential of mutual recognition. However, looking at the amendment to Annex 5 of the "Covid-19-Verordnung Zertifikate", the UK is not yet on there. I guess there's a difference between "the certificate is recognised" and "the vaccine is recognised"?

Anyway, I'm not qualified to interpret the legal side, so let's talk tech:

The error codes in the details screen (in small and grey) show what exactly is invalid about the certificate: S|XYZ are signature errors and N|XYZ are errors in the national rules (Is the vaccine accepted? Is the PCR test not older than 72 hrs?)

Ad signature errors: It seems that the UK is currently not connected to the European Gateway. Hence we don't have the UK's verification keys/public keys, hence we cannot verify the signature. This is most likely your issue. Unfortunately, we cannot do anything about that on a technical level right now.

Ad national rules errors: I believe some AstraZeneca vaccine should be in the list of accepted vaccines. COVID Check does successfully verify the AstraZeneca cert of a German friend of mine.

Do you get an N|XYX error code? If so, which one? Or an S|XYZ?

michaelmaguire commented 3 years ago

I get both: "S|TIV, N|TMV"

So:

SIGNATURE_TYPE_INVALID

and

TOO_MANY_VACCINE_ENTRIES

The latter seems ... not quite right.

Given the recent post-Brexit mutual recognition treaties signed between Switzerland and the UK, I'm surprised about the legal and treaty aspects. I'm going to ask the UK ambassador to Switzerland.

goebelUB commented 3 years ago

As you correctly observe N|TMV indicates that there are "too many vaccination entries". S|TIV kinda says the same thing, it's somewhat duplicate/there for historical implementation reasons. So what does this mean?

The current EU DCC schema states that there must only be one entry per certificate (see also this question). This is reflected in the corresponding EU regulation (article 3, paragraph 3). This regulation may not apply to Switzerland, but if people with UK certificates want to travel to the EU this may be an issue. (Again, I never studied law, but I'm interested in these aspects, that's why I go on about them anyway :) )

The COVID Cert app should display both entries in the details screen. Does it do that for you? Nevertheless, it won't accept the certificate as valid since it violates the current EU DCC schema to which Switzerland wants to adhere.

You might also want to get in touch with BAG directly, I can only speak from a technical point of view. I do feel your problem though, as a German national vaccinated in Switzerland I was awaiting Swiss-EU acceptance.

michaelmaguire commented 3 years ago

The COVID Cert app should display both entries in the details screen. Does it do that for you?

It does display both entries in the details screen.

michaelmaguire commented 3 years ago

The current EU DCC schema states that there must only be one entry per certificate (see also this question).

Does this mean that the current EU guideline would only show the date of 2nd dose for 2-dose vaccination regimes?

michaelmaguire commented 3 years ago

I've also raised this to the NHS App team:

Thank you for contacting the customer service team at NHS App and NHS login, this is an automated email to say that we have received your message and we will be responding shortly. Your reference number is (120438)

goebelUB commented 3 years ago

Correct, each certificate only contains the date of that very vaccination (or test or recovery). Thus without the first certificate you can't tell how far apart in time the two shots were.

michaelmaguire commented 3 years ago

Correct, each certificate only contains the date of that very vaccination (or test or recovery). Thus without the first certificate you can't tell how far apart in time the two shots were.

The EU approach is proving to be a problem for some people, e.g.:

"Just arrived in YVR and although I am fully vaccinated they are making me do a hotel quarantine with my kids because my LU Euronorm vaccination pass only has vaccination information for the second vaccine on it. Fair warning. This was an extremely expensive mistake."

https://www.facebook.com/groups/2011343209196466/permalink/2820736368257142/

Please see, for example:

Providing proof of your vaccination In ArriveCAN, you must provide:

the details of your first dose (date, country and vaccine you received) the details of your second dose if one was required (i.e., for Pfizer, Moderna, and AstraZeneca vaccines)

https://travel.gc.ca/travel-covid/travel-restrictions/covid-vaccinated-travellers-entering-canada#proof

tilmantroester commented 2 years ago

To add to this, the French trustlist includes the UK public keys and the French Apps (TousAntiCovid and TousAntiCovid Verif) can verify UK QR codes (including the recently added Scottish ones). It's not clear to me if the reason for the French trustlist being the only one to include the UK public keys (going by https://github.com/section42/hcert-trustlist-mirror/) is technical or political.

michaelmaguire commented 2 years ago

The Italian Covid 19 checker app now recognizes UK NHS certs as of mid August https://play.google.com/store/apps/details?id=it.ministerodellasalute.verificaC19