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

Present proof same attribute as predicate #582

Closed
berendsliedrecht opened this issue Dec 15, 2021 · 0 comments · Fixed by #640
Closed

Present proof same attribute as predicate #582

berendsliedrecht opened this issue Dec 15, 2021 · 0 comments · Fixed by #640

Comments

@berendsliedrecht
Copy link
Contributor

berendsliedrecht commented Dec 15, 2021

When responding to a proof request with an attribute and predicate of the same value, e.g. requesting attribute age and predicate age > 5 the request fails. This makes sense (ish) as it should not happen that we request a value as well as a predicate variant of this. Indy-sdk throws an error here with CommonInvalidStructure. Since this is not logged at the agent it is very difficult to debug. (Even with the log of CommonInvalidStructure it is difficult to debug).

I propose to check in the framework if the requested attributes and requested predicates do not match in some way. After the check throw an error, as we cannot warn this, that the requested predicate cannot be in the attributes as well.

However... all of this should not even happen at the prover. The verifier should never be able to send this request. My verifier is ACA-Py so it might also be an issue there. I also don't think we check this when creating a proof in AFJ.

I am not a 100% that this is the exact reason why IndySdk errors. It might be something else that also happens when we have this kind of proof request structure.

  • Write some tests cases that test the following:
    • Can we parse a proof request that having matching attribute names with the same cred def id filter
    • Can we parse a proof request that have a attribute name and predicate name matching with the same cred def id filter
    • Can we parse a proof request that having matching attribute names with different cred def id filter
    • Can we parse a proof request that have a attribute name and predicate name matching with the different cred def id filter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant