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

schema uri in example using a string #64

Open
nklomp opened this issue Sep 25, 2022 · 5 comments
Open

schema uri in example using a string #64

nklomp opened this issue Sep 25, 2022 · 5 comments

Comments

@nklomp
Copy link
Member

nklomp commented Sep 25, 2022

Our Presentation Exchange library conforms to PE v1. In our library we are enforcing that a schema URI is a valid URI according to https://identity.foundation/presentation-exchange/spec/v1.0.0/#input-descriptor-object

In this profile an example is however given where the URI is the string at https://identity.foundation/jwt-vc-presentation-profile/#requesting-verifiable-credentials

The example:

 "schema": [
              {
                "uri": "InteropExampleVC"
              }
            ]

Is this on purpose or is this an error in the example? If a simple string is allowed in the profile, it for sure needs to be mentioned. I do not see how a string would work for a location where an actual schema is supposed to be found though

@nklomp
Copy link
Member Author

nklomp commented Sep 26, 2022

It seems that the orig spec lists the uri property as a string. The question still remains though

@dtmcg
Copy link
Contributor

dtmcg commented Jan 18, 2023

call to work item to provide info on how each implementer uses schema vs @context & type

@Sakurann
Copy link
Collaborator

Microsoft uses types in presentation definition for the verifier to request certain credentials and the wallet to filter a requested credential. The rationale was

  • we do not use JSON-LD, hence all of the Credentials in the ecosystem have a same @context value, so cannot use @context value.
  • credentialSchema is an optional property and our credentials do not have this property, so cannot use it either.

So type property was a way to differentiate credentials with different claim sets about the user.

@sudeshrshetty
Copy link

sudeshrshetty commented Feb 4, 2023

We can still use presentation exchange to query by credential type by following below pattern,

{
    "id": "69ddc987-55c2-4f1f-acea-f2838be10605",
    "input_descriptors": [
        {
            "id": "23b00531-caa1-49f3-a5a1-4a0eae8c0921",
            "constraints": {
                "fields": [
                    {
                        "path": [
                            "$.type",
                            "$.vc.type"
                        ],
                        "filter": {
                            "type": "array",
                            "contains": {
                                "type": "string",
                                "const": "VerifiedEmployee"
                            }
                        }
                    }
                ]
            }
        }
    ]
}

Note: CredentialType are not collision-resistant

@nklomp
Copy link
Member Author

nklomp commented Feb 4, 2023

Yes of course, just like you could for @context or credentialSchema, except that is not what this issue is about.

Since then we have updated our library to also accept strings for v1 PE schema's as that is what we encounter in the wild

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants