Proficient UZI pass reader in php.
The UZI card is part of an authentication mechanism for medical staff and doctors working in the Netherlands. The cards are distributed by the CIBG. More information and the relevant client software can be found at www.uziregister.nl (in Dutch).
pUZI is a simple and functional module which allows you to use the UZI cards as authentication mechanism. It consists of:
- a reader that reads the data on the card and gives an UziUser object in return.
- a validator that will check the given UziUser against a set of types and roles.
- a symfony guard authenticator that allows authentication based on UZI cards (this repository).
For documentation, software and to apply for an UZI card, please check out www.uziregister.nl.
pUZI is available under the EU PL licence. It was created early 2021 during the COVID19 campaign as part of the vaccination registration project BRBA for the ‘Ministerie van Volksgezondheid, Welzijn & Sport, programma Realisatie Digitale Ondersteuning.’
Questions and contributions are welcome via GitHub.
- Symfony 4 or higher
Apache config (or NginX equivalent):
SSLEngine on
SSLProtocol -all +TLSv1.3
SSLHonorCipherOrder on
SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
SSLVerifyClient require
SSLVerifyDepth 3
SSLCACertificateFile /path/to/uziCA.crt
SSLOptions +StdEnvVars +ExportCertData
composer require minvws/puzi-auth-bundle
Step 1: install bundle with composer:
composer require minvws/puzi-auth-bundle
Step 2: create a configuration file:
# config/packages/puzi_auth.yaml
puzi_auth:
strict_ca_check: true
allowed_types:
- !php/const MinVWS\PUZI\UziConstants::UZI_TYPE_NAMED_EMPLOYEE
- !php/const MinVWS\PUZI\UziConstants::UZI_TYPE_CARE_PROVIDER
allowed_roles:
- !php/const MinVWS\PUZI\UziConstants::UZI_ROLE_DOCTOR
Step 3: add the guard to your security.yml
:
firewalls:
main:
guard:
authenticators:
- puzi_auth.security.guard.authenticator
stateless: true
At this point, an authenticated user will be of the MinVWS\PUZI\AuthBundle\Security\User\UziUser
class. You
can fetch any information about the UZI card itself with $this->getUser()->getUzi()
.
puzi-php - Proficient UZI pass reader in PHP
phpseclib - PHP Secure Communications Library
-
Fork the Project
-
Ensure you have Composer installed (see Composer Download Instructions)
-
Install Development Dependencies
composer install
-
Create a Feature Branch
-
(Recommended) Run the Test Suite
vendor/bin/phpunit
-
(Recommended) Check whether your code conforms to our Coding Standards by running
vendor/bin/phpstan analyse vendor/bin/phpcs
-
Send us a Pull Request