You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When filtering credentials using the PEX library, the name property in the matches in some cases contain an invalid name.
When I define a presentation definition with two submission requirements with rule: pick and count: 1, the matches will always point to the same input descriptor, even though they satisfy another input descriptor.
PD with two submission requirements. Those are satisfied with two different credentials for two different input descriptors. The matches is as follows:
As you can see the name property points to the same input descriptor id. If the input descriptor were to have a name, the property here would both be the name of the same input descriptor, even thought they point to different input descriptors (as per the submission requirements).
However, when I leave out some credentials the and the matches can't be satisfied, the name property suddenly switches to the other input descriptor id, so it's wrong the other way around (this is if I only provide the first credential):
It seems there's a bug in the input_desciptor that is used for the name property, as the other fields (which credential from which group it picks for the submission requirement) are correct in this case.
Other information (e.g. detailed explanation, stack traces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)
Presentation Definition
{
"id":"022c2664-68cc-45cc-b291-789ce8b599eb",
"name":"Presentation Definition",
"purpose":"We want to know your name and e-mail address (will not be stored)",
"input_descriptors":[
{
"id":"c2834d0e-3c95-4721-b21a-40e3d7ea2549",
"purpose":"To access this portal your DBC Conference 2023 attendance proof is required.",
"group":[
"A"
],
"schema":[
{
"uri":"DBCConferenceAttendee",
"required":true
}
],
"constraints":{
"fields":[
{
"path":[
"$.credentialSubject.event.name",
"$.vc.credentialSubject.event.name"
],
"filter":{
"type":"string",
"pattern":"DBC Conference 2023"
}
}
]
}
},
{
"id":"c2834d0e-3c95-4721-b21a-40e3d7ea25434",
"purpose":"To access this portal you need to show your JFF Plugfest OpenBadge credential.",
"group":[
"B"
],
"schema":[
{
"uri":"OpenBadgeCredential",
"required":true
}
]
}
],
"submission_requirements":[
{
"rule":"pick",
"count":1,
"from":"A"
},
{
"rule":"pick",
"count":1,
"from":"B"
}
]
}
I'm submitting a ...
[x] bug report
Summary
When filtering credentials using the PEX library, the
name
property in the matches in some cases contain an invalid name.When I define a presentation definition with two submission requirements with
rule: pick
andcount: 1
, the matches will always point to the same input descriptor, even though they satisfy another input descriptor.See this REPL that replicates the issue: https://replit.com/@timo10/PEX-Playground-Match-name-bug
Basically what happens:
As you can see the
name
property points to the same input descriptor id. If the input descriptor were to have aname
, the property here would both be the name of the same input descriptor, even thought they point to different input descriptors (as per the submission requirements).However, when I leave out some credentials the and the matches can't be satisfied, the
name
property suddenly switches to the other input descriptor id, so it's wrong the other way around (this is if I only provide the first credential):Then when I only provide the second credential and not the first, it switches again from wich input descriptor id it uses:
It seems there's a bug in the input_desciptor that is used for the
name
property, as the other fields (which credential from which group it picks for the submission requirement) are correct in this case.Presentation Definition
Credentials
[ "eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiIsImtpZCI6ImRpZDprZXk6ekRuYWVlY3Vacjg2OXZTNTl4R1BSTmRTTnFEVHBvc2pTWlVqQ1E3c1RoUkExeDRDNyN6RG5hZWVjdVpyODY5dlM1OXhHUFJOZFNOcURUcG9zalNaVWpDUTdzVGhSQTF4NEM3In0.eyJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiREJDQ29uZmVyZW5jZUF0dGVuZGVlIl0sImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImZpcnN0TmFtZSI6IkphbiIsImxhc3ROYW1lIjoiUmlldHZlbGQiLCJlbWFpbCI6ImphbkBhbmltby5pZCIsImV2ZW50Ijp7Im5hbWUiOiJEQkMgQ29uZmVyZW5jZSAyMDIzIiwiZGF0ZSI6IjIwMjMtMDYtMjYifX19LCJpc3MiOiJkaWQ6a2V5OnpEbmFlZWN1WnI4Njl2UzU5eEdQUk5kU05xRFRwb3NqU1pVakNRN3NUaFJBMXg0QzciLCJzdWIiOiJkaWQ6andrOmV5SmpjbllpT2lKUUxUSTFOaUlzSW10MGVTSTZJa1ZESWl3aWVDSTZJbUZqWWtsUmFYVk5jek5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_KMqZIbU7VKpsKACw" ]
Select Results (two credentials provided to `selectFrom`)
Select Results (only first credential provided to `selectFrom`)
Select Results (only second credential provided to `selectFrom`)
The text was updated successfully, but these errors were encountered: