Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
DIVOC’s certificate module has been adopted for the ongoing COVID-19 vaccination programs in multiple countries. The guide and its different sections describe the various steps that you have to follow when implementing one or more features of the certification and verification component, depending on your country’s needs.
1. Certificate Component -
Generate certificates
Update certificates
Revoke fake or incorrect certificates
Fetch certificates
Fetch QR code
Notify beneficiaries
2. Verification component
Each country will have a separate certificate template with country-specific branding, and language.
Steps:
a. The DIVOC certificate template has been designed in the HTML format. To configure the HTML-based certificate template according to your country’s requirement, open and map the dynamic fields in the certificate template.
b. Any modifications that you make (such as combining address fields as a single string) to the address value must be performed in controller.js. The dynamic values will be sent from.
Note:
To check the PDF/print version, which will be generated after an update, open the HTML file in the browser and check for the print preview.
The page size should be A4 as the HTML is developed according to A4 dimensions.
Supported key types
RSA (default)
ED25519 (recommended for performance)
Environment variable configuration
SIGNING_KEY_TYPE (possible values: RSA or ED25519)
Environment variables
CERTIFICATE_SIGNER_PRIVATE_KEY, CERTIFICATE_SIGNER_PUBLIC_KEY
The expected values for these configurations change depending on the type of key in use:
RSA -
Private key format: 2048 bit, PEM
Public key format: PEM
ED25519 -
Key | Format | Type | Encoding |
---|
RSA key generation using openssl
openssl genrsa -out privatekey.pem 2048
openssl rsa -in privatekey.pem -out publickey.pem -pubout -outform PEM
ED25519
Generation of key pair for signing an EU certificate:
Open the cert.conf file and edit it according to your requirement.
For generation of RSA key pair: ./gen-dsc.sh RSA CSR
For generation of ECDSA key pair: ./gen-dsc.sh ECDSA CSR
The script will generate the following 3 files:
private key filename - DSC01privkey.key
CSR filename - DSC01csr.pem CERTIFICATE key filename - DSC01cert.pem
Public key format: PEM
Generate the key pair required for signing the EU certificate and share the CSR file for signing with CA.
In the divoc-config
configMap, set the following environment variables:
EU_CERTIFICATE_PRIVATE_KEY
- Private key for signing the EU payload (in PKCS8 format).
EU_CERTIFICATE_PUBLIC_KEY
- The certificate provided by CA after signing the CSR.
EU_CERTIFICATE_EXPIRY
- Expiry of the certificate in months (for example, 12).
Include the beneficiary’s parent name in the certificate. The parent’s name is “Sam Mandosa.” This is a mandatory field.
Step 1: Create a certification generation request
a. Open this file:
b. Add a parameter in the function “convertToCertifyUploadFields” called RecipientParentName.
c. Add RecipientParentName in the function “createCertificate” to make the field mandatory.
Note:
As a standard practice, we recommend you to update the informative files mentioned in step 1 of this section.
Make sure the name matches exactly with the name convertToCertifyUploadFields function that you edited in step 1.
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
All content on this page by is licensed under a .
Use an external library such as to a key-pair in the required format.
Copy the certificate generation script file and put it in the desired location.
Copy the certificate configuration file and put it in the same folder where the certificate generation script was copied to.
Run the file to generate the key pair for signing the EU certificate.
All content on this page by is licensed under a .
d. If the data is uploaded via CSV, then add this column to the CSV template for this field. Open “” and update the certificate section in this file.
All content on this page by is licensed under a .
Private | DER | PKCS#8 | Base58 |
Public | DER | SPKI | Base58 |
C - Country name (2 letter code) | The two-letter country code where your company is legally located. |
ST - State or province name (full name) | The state/province where your company is legally located. |
L - Locality name (for example, city) | The city where your company is legally located. |
O - Organisation name (for example, company) | The legally registered name of your company (for example, YourCompany, Inc.). |
OU - Organisational unit name (for example, section) | The name of your department within the organisation. (You can leave this option blank; simply press *Enter*.) |
CN - Common name (for example, server FQDN) |
The template for the QR code generation is provided here under vaccination-context. The QR code structure must match the vaccination-context. Any updates made in the QR code content must reflect in the vaccination-context.js file.
Steps:
a. Open the file main.js.
b. Go to the function transformW3 and add the fields according to your requirement. This function will read the data received from the certificate generation API call and convert it into QR code Json format.
c. Add the newly-added field to the data variable
Note:
Certain constant values are also listed in the main.js. If you want to update any of the constant values such as “certificate controller,” please refer to the DockerFile.
This document will help an implementer configure a certificate (template and QR code) for a health event such as vaccination. This section includes configuring:
The DIVOC platform provides API services for generating digitally verifiable QR code-based vaccination certificates. The API for certificate generation has 6 sections:
PreEnrollmentCode: This section is linked to the 'dose' in the vaccination section to uniquely identify an event. For example, beneficiary registration number (R101) and dose number (1) as (R101-1) will be used to identify the first dose event uniquely. Similarly, beneficiary registration number (R101) and dose number (2) as (R101-2) will be used to identify the second dose event uniquely.
Recipient: It contains information about the beneficiary.
Vaccination: It contains details about the vaccination event such as name, batch, and vaccination date.
Vaccinator: It contains details about the vaccinator.
Facility: It contains details about the facility where beneficiaries will get vaccinated.
Meta: It contains additional information, which is not part of the QR code, such as the number of past doses taken.
You can refer to the API service call with sample data below:
Refer to the /v3/certify service here for details.
Click here if you want to understand the mandatory and non-mandatory information that should be there in a vaccination certificate, according to global standards.
Generate configured QR code
Generate configured certificate template
a. Please refer to the existing service details in the ‘certification’ section (/v3/certify): https://egovernments.github.io/DIVOC/developer-docs/api/admin-api.html#../../india/interfaces/vaccination-api.yaml
b. The detailed field validations are mentioned here: https://github.com/egovernments/DIVOC/blob/4076e69cf152fd76dafa8a0565777895f55b1245/interfaces/vaccination-api.yaml
Click the following to see how you can make the changes:
Environment variables are added in divoc-config.yml in the orchestration node.
To display the config map, run the following command:
If multiple config maps exist, add environment variables to all the config maps.
To edit the config map, run the following command:
Next, add the variables under ‘data.’ Save and exit.
Restart the services where environment variables have been used by running the following command:
All content on this page by is licensed under a .
This section will help an implementer configure the DIVOC “Update Certificate” API.
Implementers can use the “Update Certificate” API to process the requested updates - both in the QR code and human-readable sections of a specific certificate.
The DIVOC platform provides API services for updating vaccination certificates. You can refer to the API service call ‘/v3/certificate’ for the method PUT .
The payload of the update service is the same as that of the certificate generation request. Click to know more.
The platform provides flexibility to update values in the ‘recipient,’ ‘vaccination,’ ‘vaccinator,’ and ‘facility’ sections. Click if you want to understand the mandatory and non-mandatory information that should be there in a vaccination certificate, according to global standards.
a. The update certificate request is processed in function. The pre-enrollment code and dose-wise certificates will be searched in the system to make an update request. The function will trigger the subsequent process to update the certificates.
b. An implementer has the provision to restrict the number of update requests against a specific certificate in order to avoid the misuse of this functionality (that is, fraudulent generation of multiple certificate copies). For instance, the implementer can configure the “Update Limit” to only “5,” in which case the certificate can only be updated five times. The following steps are needed to enable this configuration:
The document will help an implementer make changes to DIVOC’s verification component in line with any changes made to the certificate. It could include changes in the QR code section of the certificate or the logo, among others.
This section will cover the steps to update the verification component by configuring:
Verification portal home page
Verification confirmation page
The user will be directed to the verification page according to the route defined in file:
2. You can configure the timeout period for the camera to read the QR code in config.CERTIFICATE_SCAN_TIMEOUT.
3. If the camera is unable to read the QR code content, the timeout can be set to retry.
4. The QR code scan is triggered from the ‘VerifyCertificate’ method. Once the QR code is read by the application, it is unzipped using the jsZip library.
Example: Include the beneficiary’s parent name as a mandatory field in the verification confirmation page.
Add a parameter in the function “vaccinationContextV2” to set the schema.
Add recipientParentName in the certificate variable inside the function createCertificate.
Build and deploy your changes.
Note:
To remove any value (such as “vaccine type”) from the UI screen, you can remove that parameter in the certification field.
The fully-qualified domain name (FQDN) (for example, ).
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
Step 1: Open file and check the function that will limit the number of certificates being updated.
Step 2: Open file and update the limit by configuring CERTIFICATE_UPDATE_LIMIT.
Click to understand how DIVOC's “Update Certificate” service works.
All content on this page by is licensed under a .
The required UI changes, including messaging and branding, can be configured on file.
You can refer to file as an example of a country-specific configuration ().
Open this file: .
Click to know what information is included in the DIVOC certificate.
The ‘recipientParentName’ should match with the key in the QR code Json file available in the .
All content on this page by is licensed under a .