Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarification Needed: A single DGC with multiple certificates of different types #161

Closed
bhavin-qryptal opened this issue May 21, 2021 · 16 comments
Assignees
Labels
general A general issue with test data, such as with the data provided in the /common folder.

Comments

@bhavin-qryptal
Copy link
Collaborator

Issue Description

Question: Is it legit to have a single DGC with multiple certificates of different types (e.g. One or more Vaccination Record(s) , Recovery Report(s) and/or Test Report(s)) ?

I recall having read somewhere (could not find that reference anymore) which mentioned that a single DGC could have one more certificates of same types. e.g. Two Vaccination Records (for 1st dose and 2nd dose), however, It could not contain a combination of Vaccination Report and Recovery Report. Now, I am having a doubt whether this understanding is correct or not. Please help with some reference, if you could. I have noticed quite a few examples (an example) in test data repository which contains more than one types of the certificates under single DGC.

Also, if certificates of different types are allowed in single DGC, I believe, we would need to ensure that given DSC is eligible (extended Key Usage ) to sign all underlying types of the certificates. Please do opine on this.

Proposed Solution

Seeking clarification with some references to the documents.

@bhavin-qryptal bhavin-qryptal added the general A general issue with test data, such as with the data provided in the /common folder. label May 21, 2021
@asitplus-pteufl
Copy link
Collaborator

The HCERT spec defines this aspect here: https://github.com/ehn-digital-green-development/hcert-spec/blob/main/hcert_spec.md#a4-extended-key-usage-identifiers

you have two options:

  • either put in the OIDs you need in the DSC

  • or put no OID in the DSC, then it is considered as valid for all types

@bhavin-qryptal
Copy link
Collaborator Author

you have two options:

  • either put in the OIDs you need in the DSC
  • or put no OID in the DSC, then it is considered as valid for all types

Thank you. This is helpful. However, I still wish to confirm whether is it legit to have a single DGC with multiple certificates of different types?

@asitplus-pteufl
Copy link
Collaborator

I think the official confirmation would be better to have from @SchulzeStTSI
let me verify if I got it right (not quite sure, because you are writing, a single DGC, but I think you mean "a single DSC")
you would like to use a single DSC (the document signing certificate) that signs multiple DGCs types (e.g. test, recovery, vacc), right?
That's the way we do it (Austria), we have a DSC without any OID which automatically - according to the linked - spec enables it to create all types of DGCs

@bhavin-qryptal
Copy link
Collaborator Author

@daniel-eder , @SchulzeStTSI , Kindly help. Thank you.

@asitplus-pteufl
Copy link
Collaborator

asitplus-pteufl commented May 21, 2021

ah sorry, I think I got your question wrong.
NO, a DGC is only allowed to have one type (test, rec, vacc). Lacking the official link right now
The schema technically allows for more than one per DGC, but this is not allowed from business rules perspectives. @SchulzeStTSI do you have an official reference for that?

@SchulzeStTSI
Copy link
Collaborator

@asitplus-pteufl @bhavin-qryptal Currently is defined that one DGC can have 1 Event from only one type. The definition for the business rules is still in progress.

@bhavin-qryptal
Copy link
Collaborator Author

Thank you @asitplus-pteufl and @SchulzeStTSI . There very large number of test files from NL which does not comply with this rule e.g. https://github.com/eu-digital-green-certificates/dgc-testdata/blob/main/NL/2DCode/raw/310.json

@dslmeinte
Copy link
Collaborator

dslmeinte commented May 21, 2021 via email

@SchulzeStTSI
Copy link
Collaborator

SchulzeStTSI commented May 21, 2021

@dslmeinte There is currently a open point how we continue with this. My proposal would be to set oneOf for v,t and r, and set maxItems:1 for all entries. But this currently under discussion.

@dslmeinte
Copy link
Collaborator

@SchulzeStTSI oneOf[r,t,v] + maxItems=1 is exactly what I was thinking, to keep things somewhat backward-compatible. (Still begs the question why it wasn't oneOf's with objects instead of arrays in the 1st place.)

Where does this discussion take place?

@bhavin-qryptal
Copy link
Collaborator Author

If it helps, recently rolled out test script has a logic to ensure that a single DGC could have one more certificates of same types. e.g. Two Vaccination Records (for 1st dose and 2nd dose). However, It would not allow a combination of different types, e.g. Vaccination Report and Recovery Report in one DGC.

Please let me know if the test script criteria need to be tightened further to ensure ONLY one certificate record is allowed per DGC.

@dirkx
Copy link

dirkx commented May 22, 2021

@bhavin-qryptal that needs to await the answer from the legal people.

@SchulzeStTSI - I am afraid that that is not quite correct - At this point in time - the current version of the regulation does NOT stipulate this. It allows for a piece of paper (or a yellow booklet or a qr code) to contain multiple V's, T's and R's. And it allows for multiple V, T or R events. The certificates it refers to are medical certificates.

So following the WG meeting on Friday (21/5) we need to await the clarification from the legal people - including the clarification on the prohibition to store between processes and its effect on multiple scans if events (or a set of events of the same type; e.g. two vaccinations in a row) are rendered on separate bits of paper / QR codes.

@dslmeinte
Copy link
Collaborator

dslmeinte commented May 22, 2021 via email

@daniel-eder
Copy link
Member

@bhavin-qryptal The last status I know about is - as Meinte and Dirk mentioned - that we are still awaiting clarification from legal. @SchulzeStTSI can you update this issue when we have clarification?

@SchulzeStTSI
Copy link
Collaborator

@bhavin-qryptal The regulation clarifies now this topic: only one type of certificate with one entry is allowed. Means only one v OR t OR r Record with maximum one item in the array.

@bhavin-qryptal
Copy link
Collaborator Author

@bhavin-qryptal The regulation clarifies now this topic: only one type of certificate with one entry is allowed. Means only one v OR t OR r Record with maximum one item in the array.

Thank you for the confirmation. I have made change in the test script to reflect this. ref: #261

daniel-eder added a commit that referenced this issue Jun 2, 2021
… allowed (#261)

* Updated known Issue List

* Updated known issue listing

* Enhanced Error Handling Capability to be able to flag invalid JSON files as knwon failures and updated Known Issue List.

* Enhanced Error Handling Capability to be able to flag invalid JSON files as knwon failures and updated Known Issue List.

* Update dgc-testdata-verification.yml

* Update dgc-testdata-verification.yml

* Update dgc-testdata-verification.yml

* Update dgc-testdata-verification.yml

* Update requirements.txt

* Update dgc-testdata-verification.yml

* Update dgc-testdata-verification.yml

* Update requirements.txt

* Enhanced error handling and reporting for test_picture_decode

* Fix for #213 -> test script is stricter than spec and Updated Known Issue List

* Updated Known Issue List

* Enhanced Test Coverage for SI and LV Test Dataset

* Revert test code changes for LV and SI

* Updated Known Issue List

* Update known_issues.csv

* Update known_issues.csv

* Only one type of certificate with one entry is allowed. Ref #161

Co-authored-by: Daniel Eder <danieleder@outlook.at>
SchulzeStTSI pushed a commit that referenced this issue Jun 3, 2021
* Updated known Issue List

* Updated known issue listing

* Enhanced Error Handling Capability to be able to flag invalid JSON files as knwon failures and updated Known Issue List.

* Enhanced Error Handling Capability to be able to flag invalid JSON files as knwon failures and updated Known Issue List.

* Update dgc-testdata-verification.yml

* Update dgc-testdata-verification.yml

* Update dgc-testdata-verification.yml

* Update dgc-testdata-verification.yml

* Update requirements.txt

* Update dgc-testdata-verification.yml

* Update dgc-testdata-verification.yml

* Update requirements.txt

* Enhanced error handling and reporting for test_picture_decode

* Fix for #213 -> test script is stricter than spec and Updated Known Issue List

* Updated Known Issue List

* Enhanced Test Coverage for SI and LV Test Dataset

* Revert test code changes for LV and SI

* Updated Known Issue List

* Update known_issues.csv

* Update known_issues.csv

* Only one type of certificate with one entry is allowed. Ref #161

* Update known issues list

Co-authored-by: Daniel Eder <danieleder@outlook.at>
daniel-eder added a commit that referenced this issue Jun 10, 2021
* Updated known Issue List

* Updated known issue listing

* Enhanced Error Handling Capability to be able to flag invalid JSON files as knwon failures and updated Known Issue List.

* Enhanced Error Handling Capability to be able to flag invalid JSON files as knwon failures and updated Known Issue List.

* Update dgc-testdata-verification.yml

* Update dgc-testdata-verification.yml

* Update dgc-testdata-verification.yml

* Update dgc-testdata-verification.yml

* Update requirements.txt

* Update dgc-testdata-verification.yml

* Update dgc-testdata-verification.yml

* Update requirements.txt

* Enhanced error handling and reporting for test_picture_decode

* Fix for #213 -> test script is stricter than spec and Updated Known Issue List

* Updated Known Issue List

* Enhanced Test Coverage for SI and LV Test Dataset

* Revert test code changes for LV and SI

* Updated Known Issue List

* Update known_issues.csv

* Update known_issues.csv

* Only one type of certificate with one entry is allowed. Ref #161

* Update known issues list

* Update known issues list

Co-authored-by: Daniel Eder <danieleder@outlook.at>
daniel-eder added a commit that referenced this issue Jun 15, 2021
* Updated known Issue List

* Updated known issue listing

* Enhanced Error Handling Capability to be able to flag invalid JSON files as knwon failures and updated Known Issue List.

* Enhanced Error Handling Capability to be able to flag invalid JSON files as knwon failures and updated Known Issue List.

* Update dgc-testdata-verification.yml

* Update dgc-testdata-verification.yml

* Update dgc-testdata-verification.yml

* Update dgc-testdata-verification.yml

* Update requirements.txt

* Update dgc-testdata-verification.yml

* Update dgc-testdata-verification.yml

* Update requirements.txt

* Enhanced error handling and reporting for test_picture_decode

* Fix for #213 -> test script is stricter than spec and Updated Known Issue List

* Updated Known Issue List

* Enhanced Test Coverage for SI and LV Test Dataset

* Revert test code changes for LV and SI

* Updated Known Issue List

* Update known_issues.csv

* Update known_issues.csv

* Only one type of certificate with one entry is allowed. Ref #161

* Update known issues list

* Update known issues list

* Handle datetime with and without fraction for comparison

Co-authored-by: Daniel Eder <danieleder@outlook.at>
daniel-eder added a commit that referenced this issue Jun 28, 2021
…version 1.3 and updated known_issues.csv (#358)

* Updated known Issue List

* Updated known issue listing

* Enhanced Error Handling Capability to be able to flag invalid JSON files as knwon failures and updated Known Issue List.

* Enhanced Error Handling Capability to be able to flag invalid JSON files as knwon failures and updated Known Issue List.

* Update dgc-testdata-verification.yml

* Update dgc-testdata-verification.yml

* Update dgc-testdata-verification.yml

* Update dgc-testdata-verification.yml

* Update requirements.txt

* Update dgc-testdata-verification.yml

* Update dgc-testdata-verification.yml

* Update requirements.txt

* Enhanced error handling and reporting for test_picture_decode

* Fix for #213 -> test script is stricter than spec and Updated Known Issue List

* Updated Known Issue List

* Enhanced Test Coverage for SI and LV Test Dataset

* Revert test code changes for LV and SI

* Updated Known Issue List

* Update known_issues.csv

* Update known_issues.csv

* Only one type of certificate with one entry is allowed. Ref #161

* Update known issues list

* Update known issues list

* Handle datetime with and without fraction for comparison

* Handle datetime with and without fraction for comparison. Use schema version 1.3 and updated known_issues.csv

Co-authored-by: Daniel Eder <danieleder@outlook.at>
daniel-eder added a commit that referenced this issue Jun 28, 2021
* Updated known Issue List

* Updated known issue listing

* Enhanced Error Handling Capability to be able to flag invalid JSON files as knwon failures and updated Known Issue List.

* Enhanced Error Handling Capability to be able to flag invalid JSON files as knwon failures and updated Known Issue List.

* Update dgc-testdata-verification.yml

* Update dgc-testdata-verification.yml

* Update dgc-testdata-verification.yml

* Update dgc-testdata-verification.yml

* Update requirements.txt

* Update dgc-testdata-verification.yml

* Update dgc-testdata-verification.yml

* Update requirements.txt

* Enhanced error handling and reporting for test_picture_decode

* Fix for #213 -> test script is stricter than spec and Updated Known Issue List

* Updated Known Issue List

* Enhanced Test Coverage for SI and LV Test Dataset

* Revert test code changes for LV and SI

* Updated Known Issue List

* Update known_issues.csv

* Update known_issues.csv

* Only one type of certificate with one entry is allowed. Ref #161

* Update known issues list

* Update known issues list

* Handle datetime with and without fraction for comparison

* Handle datetime with and without fraction for comparison. Use schema version 1.3 and updated known_issues.csv

* Support multiple schema versions for validation.

* Updated known issue list

Co-authored-by: Daniel Eder <danieleder@outlook.at>
daniel-eder added a commit that referenced this issue Aug 26, 2021
* Updated known Issue List

* Updated known issue listing

* Enhanced Error Handling Capability to be able to flag invalid JSON files as knwon failures and updated Known Issue List.

* Enhanced Error Handling Capability to be able to flag invalid JSON files as knwon failures and updated Known Issue List.

* Update dgc-testdata-verification.yml

* Update dgc-testdata-verification.yml

* Update dgc-testdata-verification.yml

* Update dgc-testdata-verification.yml

* Update requirements.txt

* Update dgc-testdata-verification.yml

* Update dgc-testdata-verification.yml

* Update requirements.txt

* Enhanced error handling and reporting for test_picture_decode

* Fix for #213 -> test script is stricter than spec and Updated Known Issue List

* Updated Known Issue List

* Enhanced Test Coverage for SI and LV Test Dataset

* Revert test code changes for LV and SI

* Updated Known Issue List

* Update known_issues.csv

* Update known_issues.csv

* Only one type of certificate with one entry is allowed. Ref #161

* Update known issues list

* Update known issues list

* Handle datetime with and without fraction for comparison

* Handle datetime with and without fraction for comparison. Use schema version 1.3 and updated known_issues.csv

* Support multiple schema versions for validation.

* Updated known issue list

* Change default schema URL to version 1.3.0

Co-authored-by: Daniel Eder <danieleder@outlook.at>
zawmyolatt added a commit to Notarise-gov-sg/dgc-testdata that referenced this issue Aug 26, 2021
commit 13e33a0
Author: Jože Mlakar <joze.mlakar@ixtlan-team.si>
Date:   Thu Aug 26 10:25:17 2021 +0200

    SI: following valuesets appropriately (eu-digital-green-certificates#365)

    * First samples using https://github.com/ixtlan-team/dgc-java based on https://github.com/DIGGSweden/dgc-java

    * Revert "First samples using https://github.com/ixtlan-team/dgc-java based on https://github.com/DIGGSweden/dgc-java"

    This reverts commit a229148.

    * Slovenian test cases made with https://github.com/ixtlan-team/dgc-java

    * Sample files from Slovenia using ACC DSC (eu-digital-green-certificates#77)

    This commit updates samples from Slovenia. Much has changed:
    - The samples are now signed using DSC from ACC environment.
    - At the moment DSC is not yet available in ACC as we are waiting for the EC team to complete the inclusion of our NB certs
    - DSC is created as recommended on onboarding documents (EC)
    - DGCs are created usign dgc-java project that Slovenia is using for our implementation

    * Fixing standardized names (eu-digital-green-certificates#220)

    * Fixing standardized names (eu-digital-green-certificates#220)

    * Update 1.json

    * New vac samples and added test and rec samples. All signed with DSC from ACC.

    * Fixing the incorrenct DSC used for previous commit

    * Samples changed after dgc-java modified

    * Fixing number of digits in  fractions to 6

    * SI: All new codes now issued by NB - ACC

    * Added EXPECTEDRESULTS array for validation

    * SI: following valuesets appropriately

    * SI: following valuesets appropriately

    * SI: following valuesets appropriately

    * SI: following valuesets appropriately

    Co-authored-by: Jože Mlakar <JozeM@ixtlan-team.si>

commit 4ec6d5e
Author: Bhavin Sanghvi <84303320+bhavin-qryptal@users.noreply.github.com>
Date:   Thu Aug 26 15:59:45 2021 +0800

    To fix failing tests - Change default schema URL to version 1.3.0 (eu-digital-green-certificates#392)

    * Updated known Issue List

    * Updated known issue listing

    * Enhanced Error Handling Capability to be able to flag invalid JSON files as knwon failures and updated Known Issue List.

    * Enhanced Error Handling Capability to be able to flag invalid JSON files as knwon failures and updated Known Issue List.

    * Update dgc-testdata-verification.yml

    * Update dgc-testdata-verification.yml

    * Update dgc-testdata-verification.yml

    * Update dgc-testdata-verification.yml

    * Update requirements.txt

    * Update dgc-testdata-verification.yml

    * Update dgc-testdata-verification.yml

    * Update requirements.txt

    * Enhanced error handling and reporting for test_picture_decode

    * Fix for eu-digital-green-certificates#213 -> test script is stricter than spec and Updated Known Issue List

    * Updated Known Issue List

    * Enhanced Test Coverage for SI and LV Test Dataset

    * Revert test code changes for LV and SI

    * Updated Known Issue List

    * Update known_issues.csv

    * Update known_issues.csv

    * Only one type of certificate with one entry is allowed. Ref eu-digital-green-certificates#161

    * Update known issues list

    * Update known issues list

    * Handle datetime with and without fraction for comparison

    * Handle datetime with and without fraction for comparison. Use schema version 1.3 and updated known_issues.csv

    * Support multiple schema versions for validation.

    * Updated known issue list

    * Change default schema URL to version 1.3.0

    Co-authored-by: Daniel Eder <danieleder@outlook.at>

commit d142b8d
Author: Mathias Wegmüller <83816011+mathias-wegmueller-ti8m@users.noreply.github.com>
Date:   Thu Aug 19 17:17:51 2021 +0200

    CH: Update test data for Switzerland. (eu-digital-green-certificates#389)

    * CH - Added initial test data for Switzerland.

    * CH - Updated test data for Switzerland (SCHEMA 1.2.1).

    * CH - Fixed value of optional claim iss (key 1) for Switzerland.

    * CH - Added new test data for Switzerland created with current release 1.1.

    * CH - Added new test data for Switzerland created with current release 1.2.

    * CH - Added new test data for Switzerland created with current release 2.0.

    * CH: Update test data for Switzerland.

    Co-authored-by: Mathias Wegmüller <matthias.wegmueller@bit.admin.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
general A general issue with test data, such as with the data provided in the /common folder.
Projects
None yet
Development

No branches or pull requests

6 participants