Coder Social home page Coder Social logo

philipptrenz / covidpass.eu Goto Github PK

View Code? Open in Web Editor NEW
137.0 7.0 11.0 4.36 MB

Scan your vaccination, test and recovery certificates in QR code representation and save them to your Apple Wallet

Home Page: https://covidpass.eu

License: GNU Affero General Public License v3.0

Dockerfile 0.33% Vue 55.43% JavaScript 42.52% CSS 0.90% TypeScript 0.82%
covid covid-19 covid19 vaccination dgc qrcode qr-code covid-testing vaccination-passport vaccination-pass

covidpass.eu's Introduction

COVID Pass og image

This web application offers the possibility to scan the EU-wide vaccination, test and recovery certificates (namely EU Digital COVID Certificate) as QR code and generate an Apple Wallet pass from it, so they are easily accessible for validation on iPhone, and Apple Watch.

Discussion

Since the QR codes store sensitive personal information as well as health data, processing of the data is done entirely within the users browser. Only a hash over the data is sent to the server to sign it with a certificate issued by Apple, for which a Apple Developer Program Membership is required.

Providing Apple Wallet passes from the official COVID apps, like Corona-Warn, has already been discussed and seems to have been discarded due to security concerns and lack of specification of this requirement to developers (see here or here).

While we very much understand these decisions for the official COVID apps, we believe that with proper education, users can assess these risks for themselves. As furthermore named here, there are countless apps which can be utilized to generate Apple Wallet passes. However, they also use external servers and it is intransparent how data, this case very sensitive data, is handled.

Therefore, this project offers a transparent and secure way to create passes. If you disagree, feel free to open an issue and let's discuss it.

Principles

This project attempts a compromise to enable the user experience of Apple Wallet passes while protecting sensitive information in the best possible way. For this it follows the following principles:

  • Data economy
    • The sensitive data is only used within the users browser
    • The data itself is never transmitted or stored
    • No website analytics or ad tracking
  • Transparency
    • The authors strive to be as transparent as possible
    • Within the process the user gets educated and his or her consent is required
  • Open Source
    • Full source code is available
    • Code can be reviewed by third parties
    • Easy to deploy yourself (but Apple® Developer membership required)
  • No commercial interests
    • Creating Apple Wallet passes is and will always be free of charge
    • Health data should never be used for profit!

Getting started

Add and convert certificate

Add your Pass Type ID certificate (with extension .cer) from the iOS Provisioning Portal to your Keychain and export as .p12 to the ./keys folder, named by your Pass ID (e.g. com.example.myNewPass.p12).

Then run the following command to convert to .pem as well as to automatically load the needed wwdr.pem certificate:

./node_modules/passbook/bin/node-passbook prepare-keys -p keys

Alternatively you can directly convert the certificates using openssl:

openssl pkcs12 -legacy -in "./keys/<PASS_ID>.p12" -out "./keys/<PASS_ID>.pem" -passout "pass:<PASS_CERT_SECRET>" -nocerts
curl https://developer.apple.com/certificationauthority/AppleWWDRCA.cer | openssl x509 -inform der -out ./keys/wwdr.pem

Check if expired with openssl x509 -enddate -noout -in ./keys/<PASS_ID>.pem.

Set environment variables

The following environment variables have to be set for Apple Wallet® pass generation. This can be done by an .env file within the project root or by adding the variables to the environment.

NODE_ENV=production
ALLOWED_ORIGINS=         # Comma separated list of origins
PASS_TYPE_IDENTIFIER=    # The Wallet Pass ID
PASS_TEAM_IDENTIFIER=    # The Developer Team identifier
PASS_CERT_SECRET=        # The .pem secret set while converting from .p12 to .pem

Development Setup

# install dependencies
$ yarn install

# serve with hot reload at localhost:3000
$ yarn dev

For detailed explanation on how things work, check out Nuxt.js docs.

For testing, the QR codes from the EU DGC test data set can be used.

Deploy with Docker Compose

# build container
$ docker-compose build  

# run container
$ docker-compose up -d  

Except when accessed from localhost, the container must be run behind a reverse proxy (e.g. nginx), which provides SSL and redirects all traffic to HTTPS!

Trademark notice

Apple, Apple Wallet, iPhone and Apple Watch are trademarks of Apple Inc., registered in the U.S. and other countries and regions.

covidpass.eu's People

Contributors

linuswillner avatar philipptrenz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

covidpass.eu's Issues

Cannot remove outdated pass

On iPhone 12 Pro, iOS 15.1 and iOS 15.2 one cannot remove the old outdates covid-pass from the wallet.

Hitting "the three dots" on wallet pass, displays only the pass and application information, but no any
options - including the missing "Remove pass" option.

Only way to remove the pass and replace it with a new one is to completely erase the phone which removes
everything from the wallet too.

Cannot scan vaccination qr code

I was able to add the qr code into CWA and Covpass.

Your Browser app (on iPhone / Safari) does not recognize the qr code and cannot be added.
There is no error message.

It's the qr code I got to testify my 2nd and final vaccination

Usability improvement

Is your feature request related to a problem? Please describe.
I have no printed version of my QR codes by hand. So I can't use your app to make a foto of it.

Describe the solution you'd like
Upload a screenshot of my vaccinated WR code from the Corona Warn app.

Payload does not include the hash

When creating the zip file to sign with the server, the full pass json is included instead of only the hash, which contradicts with what is written in the README.

Since the QR codes store sensitive personal information as well as health data, processing of the data is done entirely within the users browser. Only a hash over the data is sent to the server to sign it with a certificate issued by Apple, for which a Apple Developer Program Membership is required.

The hash is being created but never used, https://github.com/philipptrenz/covidpass/blob/90c90fbf82ef606eb4992a01fcf9180321daafec/plugins/src/pass.js#L41

Camera activation on Iphone

Hi,
While this works in IPad, it seems not possible to give camera access on the iPhone for scanning..... ist this normal?
Thanks

scroll camera

after clicking on the “scan” button, the screen should scroll down, so the camera is in center

Funktioniert nicht

Code lässt sich scannen, Button für Wallet funktioniert aber nicht.
Gefühlt 100x probiert!!!

more pass colors

offer a color selection for pride colors or typical vaccination certificate yellow

Bootsrennen wird nicht gescannt

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

improve disclaimer/instructions for iOS users

improve instructions for iOS users, that Safari shall be used for scanning QR-code.
using Chrome does not let the integration happen between Wallet => pass will not be installed there.

Cannot scan

“QR Code is not correct” although this QR code works with corona warn app.

QR code too small

Ran into several cases where people had problem scanning the code on my iPhone 11. Compared with the QR code on third party apps, the Wallet one is less then half the size.

I am happy to help if you give me a pointer to where to start.

Bug/Feature Request: Making the QR code larger

Is your feature request related to a problem? Please describe.
Today I had my first attempt at getting the passport scanned. Done at a reception desk via a smartphone. Several attempts failed, however, as the QR was too small, including all glares etc. it turned out to be unreadable. I feel like this may be a common problem in places where they scan your codes via a relatively cheap/old smartphone.

Describe the solution you'd like
Larger QR code

Describe alternatives you've considered
I used the screenshot of my certificate that I had for backup

Educate the user about device privacy settings

Since the pass contains sensitive information, the user might want to improve their personal privacy by preventing the access to Apple wallet from a locked screen.

At least with Face ID equipped devices it can be done from "Settings -> Face ID & Passcode -> Allow access when locked: Wallet"

Logging of confidential data in case of an error

Even though sending the whole QR code to the server which contains sensitive personal data is not the best idea, you should definitely not log this data on your server.

https://github.com/philipptrenz/covidpass/blob/6dbffaf1b517f22429c5a9952638bd8f7b4714ed/server-middleware/rest.js#L57

https://github.com/philipptrenz/covidpass/blob/6dbffaf1b517f22429c5a9952638bd8f7b4714ed/server-middleware/rest.js#L66

If you log errors you should exclude everything that is related to the user or considered sensitive data

scan bug on iOS 12.5

Sehr geehrtes Team von Covidpass.eu

meine ersten beiden QR codes konnte ich ohne Probleme in meine wallet laden beim dritten nun scheint es problematisch zu sein. In Safari erscheint das Scannfeld nach der Aktivierung der Kamera, aber dann passiert nichts. Wenn ich auf den oberen Bereich "mein Pass" drücke geht es zurück und wenn ich wieder auf scann QR code gehe versucht er das vorherig Bild zu laden, um dann wieder in den Kameramodus zu wechseln.

Was könnte das Problem sein?

Vielen Dank und viele Grüße

Hallo Donatus,

danke für die schnelle Antwort!
I am afraid, dass ist eher nicht dar Grund, ich habe es mit vier verschiedenen iphones probiert und mein normalerweise genutztes iPhone hat iOS 12.5. Das mit dem schieben habe ich schon versucht, ging aber auch nicht. Besonders eigenartig finde ich, dass ich vorher ohne Probleme die anderen codes scannen konnte. Leider ist keines der Geräte ist neu und in der Nähe von iOS15.

Gibt es noch andere Möglichkeiten die ich ausprobieren könnte? Übrigens passiert das gleiche wenn ich nun versuche die alten codes einzuscannen, scheint also irgendwas anderes zu sein. Die Einstellungen habe ich nicht geändert.

Vielen Dank und viele Grüße

–––

Moin,
er scannt nicht, obwohl Kamera zugelassen und Datenschutz Erklärung bestätigt.
Mit freundlichen Grüssen,

Geht bei mir nicht, habe ein altes iPhone 6 und Software 12.5.5. Vielleicht liegt es daran.
Danke und schöne Grüße.

Only the standardized name spelling is internationally recognized

Bulgarian and Greek certificates contain the name spelled in cyrillic and greek respectively as shown below:

690A88D1-2C3D-439F-8D09-51A6111F0EBB

It might be really useful if besides the main spelling the pass also contains the standardized spelling (described in the OpenAPI spec) so it matches the way it's written in a passport or an id card to aid folks who are traveling internationally

Problem with the size of QR code

While people have different sized mobile phones I would highly recommend to make that QR code area/box much bigger as it is hard for people to read these codes from hands with other QR reading phone/device if they are so small. Just use the entire width, it would make much easier to check the CovidPass QR code (main purpose of the covid pass would be to check and validate).

Warn when the user is not using Safari

First of all, thanks for your project, having the pass in the wallet is so handy.
Atm there's just a texture saying to use Safari, but I haven't seen it in my first try and was wondering why your site wasn't adding the pass to the wallet since no warning was being shown.
I'd suggest a browser detection and a browser warning should appear when using it in another browser, so that the user is aware of it.

Date of birth off-by-one

Was thinking of making this. Thank you for the work, very appreciated.

Importing my Danish certificate results in my wallet pass showing my date of birth of-by-one (-1).

spacing in arabic

Spacing between icons/checkmarks and text and the alignment between the three USPs is not correct

IMG_0931

Trying to scan EU Digital covid certificate

While trying to scan my EU Digital covid certificate qr code. There is a red square on the qr code and nothing happens. So i can not have the pass. Am i doing something wrong?

Appreciate it your work and your great initiative. Thank you!

Problems with covidpass scan for wallet creation

Describe the bug

Problems with corvidpass scan for wallet creation

To Reproduce
Steps to reproduce the behavior:

It wasn’t possible to scan the CovPass

Expected behavior
Full functionality like shown in demo video to create a wallet CovPass

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: [iPhone13]
  • OS: [iOS15.11]
  • Browser [iPhone safari]
  • Version [??]

Date error

I just scan my Belgian EU Digital COVID Certificate’s QR code.
In the wallet certificate, the date of birth and date of vaccination are 1 day earlier than they should be.

Kamera

Kamera Zugriff erlauben? Wie?

Cannot validate the QR code

I have two devices (iPhone 12 Mini and XR)
I added the COVID Pass to my Wallet (not relevant to this issue, but it for some reason doesn't work with Chrome and only allows to add it to Wallet using Safari (iPhone XR didn't try with 12M.)

My certificate is Estonian and for vaccination. The actual issue for me for both phones is that I cannot scan the QR code because of low resolution maybe? Thanks to https://kontroll.digilugu.ee/ we can check for validity of the QR code and I cannot get it to read the QR code.

Off-by-one error in dates if west of UTC

I noticed that my COVID pass had an off-by-one error on all of the dates (both my birthdate and my vaccination dates). I think this is because new Date("datestring") interprets the argument in UTC, but returns a Date object in local time. This is problematic if, say, you live in the western hemisphere, and midnight in UTC is the day before in local time:

> const d = new Date("1980-01-01")
Mon Dec 31 1979 16:00:00 GMT-0800 (Pacific Standard Time)
> const locale = window.$nuxt.$i18n.locale
'en'
> const localeDateString = d.toLocaleDateString(locale, {
  year: 'numeric', month: 'numeric', day: 'numeric'
});
'12/31/1979'

This causes formatDateString in payload.js to return the wrong date.

Somewhat annoyingly, MDN calls out this failure mode but doesn't have any alternative recommendation, so I'm not really clear what the right way to do this is.

Small QR core

Hello I have used your website to add my covid cert to apple walet. I’m using iphone11 and certificate is generated by polish e-zdrowie.
I see an issue that QR code in wallet page is to small and scanner which is installed on another phone can’t read it. Have you tested that it is ok?

GDPR and ePrivacy compliance

Please add cookie consent for GDPR and ePrivacy compliance

Reason is the language selection cookie that is being set i18n_redirected

mobile width in Russian

The USP labels make the Russian version wider than the screen width, they should break into two lines.

IMG_51A258297A72-1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.