-
Notifications
You must be signed in to change notification settings - Fork 207
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
Requesting similar attributes from different credentials fails #837
Comments
Thanks for opening this issue @Iskander508! I wasn't aware you could request multiple attributes with the same name from different credentials. I agree we should loosen the check. Are you willing to open a PR for this? |
@TimoGlastra I'm not very familiar with the internal codebase, but I'm wondering: Is it actually correct that this kind of check is done in this aries library? Wouldn't it make more sense to do it inside indy-sdk? |
If we don't do the check indy-sdk will eventually blow up with an error that looks something like: Understand you're not very familiar with the internal codebase. I'll add it to my list, but can't guarantee I can work on it in the near feature |
OK, now I understand why we have it, and I think I could give it a try to implement a better solution. In order to make it right, the logic might be quite complex around the
However for this case it is not so obvious whether it should be allowed or not:
Trying to create a proof in this case could potentially fail if we would use the same credential for both the attribute-group as well as the predicate. But if we have both I understand that this is very theoretical indeed, but my opinion would be that if we are not 100% sure it will not work, then we should allow it (and let it fail later, maybe with a more cryptic error). What would be your opinion about it? |
Yes I think you're right, we shouldn't put restrictions on the usage of indy credentials in AFJ, so if we can't determine it we should just allow it. |
Would it make sense for AFJ (or other Aries Framework) to do a post-mortem on failed proofs? E.g. rather than doing an up front restriction and blocking the proof, do a failed verification set of checks to provide more insight to the caller as to what might have happened? |
Yes that would make a lot of sense! Good idea @swcurran :) |
I agree @swcurran. That would be a much cleaner solution. Do you plan to create a PR for it? |
After including this change: #640
when being requested (as a holder/prover) attributes from 2 different credentials, that happen to use the same identifier, an assertion failure is reported. e.g. consider a proof request like this:
This proof request will fail on the assertion with a message:
The proof request contains duplicate items: issued_on
. Since the 2 credentials can be completely unrelated and the collision is then purely coincidental, this should be allowed.I think the assertion should ONLY check whether a predicate is matching with a requested attribute name (and maybe even only if both use the same set of restrictions, otherwise they could again be meant to come from different credentials)
The text was updated successfully, but these errors were encountered: