walt-id / waltid-identity

All-in-one open-source identity and wallet toolkit.
Apache License 2.0
124 stars 48 forks source link

Verifier policy : presentation-definition ,if order of credentials in request_credentials can pass. #832

Open thanachot30 opened 16 hours ago

thanachot30 commented 16 hours ago

Describe the bug

HI, now i try to Verifier with policy : presentation-definition

To Reproduce

i create verifier policy with

{
  "vp_policies": [
    "signature",
    "expired",
    "not-before",
    "presentation-definition"
  ],
  "vc_policies": [
    "signature",
    "expired",
    "not-before"
  ],
  "request_credentials": [
   {
      "format": "jwt_vc_json",
      "type": "BirthCertificate"
    },
   {
      "format": "jwt_vc_json",
      "type": "EducationalID"
    }
  ]
}

and use https://wallet.walt.id for present

vc_3

Yes, it can verifier success. by wallet order like this

vc_4

But if i change order of request_credentials list ,with same credentials type

   "request_credentials": [
   {
      "format": "jwt_vc_json",
      "type": "EducationalID"
    },
   {
      "format": "jwt_vc_json",
      "type": "BirthCertificate"
    }
  ]

then, it not success to verifi

error_present

Question

My question is, why is it like this? And is the current situation right or wrong?

Thank you for your assistanc