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

Support indy 1.16 predicate restrictions #1213

Conversation

sklump
Copy link
Contributor

@sklump sklump commented May 27, 2021

Still to work out:

  • general WQL (+ "$and") for restrictions in proof request requested attributes/predicates
  • not necessarily relying on these being a list: they can be a (WQL statement) dict or a list of (WQL statement) dicts, each (WQL statement) dict possibly being its own compound WQL statement; e.g., this is a valid restriction:
{
  "$and": [
    {
      "$or": [
        {
          "schema_name": "membership"
        },
        {
          "schema_name": "members"
        }
      ]
    },
    {
      "$neq": {
        "schema_version": "0.1"
      }
    },
    {
      "issuer_did": "abc123"
    },
    {
      "$not": {
        "$in": {
          "attr::name::value": [
            "joe",
            "dolly",
            "bill"
          ]
        }
      }
    }
  ]
}

sklump added 2 commits May 27, 2021 18:15

Verified

This commit was signed with the committer’s verified signature. The key has expired.
acuderman Andraz Cuderman
…in proof receipt

Signed-off-by: sklump <[email protected]>

Verified

This commit was signed with the committer’s verified signature. The key has expired.
acuderman Andraz Cuderman
…t-python into support-indy-1.16-predicate-restrictions
@sklump sklump requested a review from ianco May 27, 2021 18:26
@sklump
Copy link
Contributor Author

sklump commented May 27, 2021

Reference: https://hyperledger-indy.readthedocs.io/projects/sdk/en/latest/docs/design/011-wallet-query-language/README.html

But "$and" is in the code where it's implicit in the standard.

@codecov-commenter
Copy link

Codecov Report

Merging #1213 (a0c1236) into main (2b54294) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1213      +/-   ##
==========================================
- Coverage   98.47%   98.47%   -0.01%     
==========================================
  Files         456      456              
  Lines       25431    25428       -3     
==========================================
- Hits        25042    25039       -3     
  Misses        389      389              

@ianco ianco merged commit 1c7bc86 into openwallet-foundation:main May 27, 2021
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 this pull request may close these issues.

None yet

3 participants