-
Notifications
You must be signed in to change notification settings - Fork 736
Add failing unit test for multiple "attr:<attr_name>::value" restrictions #1893
Add failing unit test for multiple "attr:<attr_name>::value" restrictions #1893
Conversation
…ions Signed-off-by: Nicholas Rempel <nbrempel@gmail.com>
Signed-off-by: Nicholas Rempel <nbrempel@gmail.com>
Signed-off-by: artem.ivanov <artem.ivanov@dsr-company.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did changes to fit this test and sent PR to your repo.
nrempel#2
BUT
The generated proof doesn't contain any evidence that Prover really used a credential that matches to this restriction "attr::sex::value": "male"
. We can't check it somehow.
…ictions Improved verification of attr::<attr_name>::value/marker restrictions
Signed-off-by: Nicholas Rempel <nbrempel@gmail.com>
Signed-off-by: Nicholas Rempel <nbrempel@gmail.com>
Signed-off-by: Nicholas Rempel <nbrempel@gmail.com>
a48a7b6
to
b9ab0a5
Compare
4d91641
to
b9ab0a5
Compare
Thanks! If I understand correctly, this means that the query will correctly return values for |
For your case:
|
@Artemkaaas Ok thank you. It's good that the results from the wallet are correct. I do think that the verification should fail if the verifier cannot prove all of the attribute restrictions are met – but this is another discussion. Is anything left to merge this fix? We rely on the functionality. |
I'm not sure if the "fix" better rather then original behavior. As I understand from the ticket description, if multiply restriction are specified, the verification always fails. This PR allow to pass verification by ignoring non-related attributes restriction. From the libindy consumer point of view returning the success is not so fair action by libindy: application put the restrictions in proof request, but libindy ignore part of them |
my and @nrempel DM:
vs
I don't have enough understanding why the first format is useful. My guess for the reason is "in the 2nd case we can't be sure what both attributes are from the same credential. If it's a correct reason then we should solve the actual problem (no restriction to force the same credential to be used) instead of trying to make a not-always-possible-to-verify restrictions like @nrempel what do you think about the ability to force usage of attributes from the same credential and set restrictions similar to current flow (2nd)? like:
|
Another option suggested by Nicolas:
it has kind of breaking changes but they are manageable by an app |
If this approach is possible, It's also beneficial for us since it reduces the number of wallet queries we need to make in a large volume scenario. |
This PR is superseded by #1958 |
@nrempel we've merged the PR which allows to have |
Thanks @jovfer, I'll take a look. |
Illustrates the issue define here: https://jira.hyperledger.org/browse/IS-1381