eu-digital-identity-wallet / eudi-srv-web-issuing-eudiw-py

APIs and code of the eudiw provider backend PID, mDL and EAA issuer following OID4VCI
Apache License 2.0
18 stars 21 forks source link

500 error when trying to issue mDL from CBOR formatter API #10

Closed kskaret closed 6 months ago

kskaret commented 7 months ago

Hi! We have been trying to use the CBOR formatter API to create and sign Mdocs, as described here: https://github.com/eu-digital-identity-wallet/eudi-srv-web-issuing-eudiw-py/blob/main/api_docs/cbor_formatter.md

As reference input we are using the example messages described in these unit tests: https://github.com/eu-digital-identity-wallet/eudi-srv-web-issuing-eudiw-py/blob/main/app/tests/test_route_formatter.py

So far we have successfully managed to create a PID with an input body as follows: { "version":"0.1", "country":"PT", "doctype":"eu.europa.ec.eudiw.pid.1", "device_publickey":"LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFOElFUUJqNENaZDNZaWZYbmpxUmx0SUlpSkQ2VwpoWkV4RWtQVWdQUnkvWXd1ZUZzSk42UGVod3F0dlUxRnoyMG5XOVpjVUxLem9LaVdnaGlOeTM4NTBBPT0KLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t", "data":{ "eu.europa.ec.eudiw.pid.1":{ "family_name": "Garcia", "given_name": "javier", "birth_date": "1965-01-01", "age_over_18": true, "unique_id": "86b73c6c-7542-4923-a986-97d2cdf7f07a", "issuance_date": "2023-07-19", "expiry_date": "2023-08-19", "issuing_authority": "Bundes...", "issuing_country": "DE" } } }

But we are still struggling with the issuanse of mDL. This is our input: { "version": "0.3", "country":"FC", "doctype": "org.iso.18013.5.1.mDL", "device_publickey":"LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFOElFUUJqNENaZDNZaWZYbmpxUmx0SUlpSkQ2VwpoWkV4RWtQVWdQUnkvWXd1ZUZzSk42UGVod3F0dlUxRnoyMG5XOVpjVUxLem9LaVdnaGlOeTM4NTBBPT0KLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t", "data": { "org.iso.18013.5.1": { "birth_date": "13-12-2000", "birth_place": "Lisboa", "document_number": "18923", "driving_privileges": [ { "ExpiryDate": "2099-12-31", "IssueDate": "2000-01-01", "Restriction": [], "Type": "B" } ], "expiry_date": "Fri, 25 Aug 2023 10:15:53 GMT", "family_name": "Lima", "given_name": "João", "issue_date": "Wed, 26 Jul 2023 10:15:53 GMT", "issuing_authority": "IMTT-Lisboa", "issuing_country": "PT", "portrait": "/9j/4AAQSkZJRgABAQAAAQAB...", "un_distinguishing_sign": "P" } } }

The response is HTTP 500. Could you help us pinpoint what is wrong with our request?

aridder commented 7 months ago

The reason is wrong date format. Should be formatted as "yyyy-MM-dd". The test cases here use the formats you have @kskaret. Fixed in #11

kskaret commented 7 months ago

Thx @aridder , got it working now 👍 🤩

pinamiranda commented 6 months ago

Comment closed as the issue has been addressed. If further feedback is needed, the comment can be reopened.