Skip to content

Commit f411525

Browse files
committed
Drop expect_ and valid_ prefixes, remove algorithm matching
1 parent 638dcab commit f411525

7 files changed

+65
-86
lines changed

Diff for: examples/query_lang/claims_alternatives.json

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
{
2-
"expect_credentials": [
2+
"credentials": [
33
{
44
"group": "pid",
55
"format": "vc+sd-jwt",
6-
"expect_meta": {
7-
"vct_values": [ "https://credentials.example.com/identity_credential" ],
8-
"credential_signing_alg_values": ["ES256", "ES384"],
9-
"sd_alg_values": ["SHA-256"]
6+
"meta": {
7+
"vct_values": [ "https://credentials.example.com/identity_credential" ]
108
},
119
// Comments in JSON to be removed before merging PR, they are just here to make Brian less sad
12-
"expect_claims": [ // define claims, may add other properties like a purpose to each claims
10+
"claims": [ // define claims, may add other properties like a purpose to each claims
1311
{
14-
"id": "a", // required for use in valid_claim_sets below; if that is omitted, the id is optional
12+
"id": "a", // required for use in claim_sets below; if that is omitted, the id is optional
1513
"path": ["last_name"]
1614
},
1715
{"id": "b", "path": ["postal_code"]},
@@ -20,7 +18,7 @@
2018
{"id": "e", "path": ["date_of_birth"]},
2119
{"id": "f", "path": ["email"]}
2220
],
23-
"valid_claim_sets": [ // defines the rules
21+
"claim_sets": [ // defines the rules
2422
// postal code or (locality and region), last_name, and date_of_birth are mandatory; email is optional
2523
["a", "b", "e", "f?"],
2624
["a", "c", "d", "e", "f?"]

Diff for: examples/query_lang/credentials_alternatives.json

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"expect_credentials": [
2+
"credentials": [
33
{
44
"id": "pid",
55
"format": "vc+sd-jwt",
6-
"expect_meta": {
6+
"meta": {
77
"vct_values": ["https://credentials.example.com/identity_credential"]
88
},
9-
"expect_claims": [
9+
"claims": [
1010
{"path": ["given_name"]},
1111
{"path": ["family_name"]},
1212
{"path": ["address", "street_address"]}
@@ -15,10 +15,10 @@
1515
{
1616
"id": "other_pid",
1717
"format": "vc+sd-jwt",
18-
"expect_meta": {
18+
"meta": {
1919
"vct_values": ["https://othercredentials.example/pid"]
2020
},
21-
"expect_claims": [
21+
"claims": [
2222
{"path": ["given_name"]},
2323
{"path": ["family_name"]},
2424
{"path": ["address", "street_address"]}
@@ -27,21 +27,21 @@
2727
{
2828
"id": "pid_reduced_cred_1",
2929
"format": "vc+sd-jwt",
30-
"expect_meta": {
30+
"meta": {
3131
"vct_values": ["https://credentials.example.com/reduced_identity_credential"]
3232
},
33-
"expect_claims": [
33+
"claims": [
3434
{"path": ["family_name"]},
3535
{"path": ["given_name"]}
3636
]
3737
},
3838
{
3939
"id": "pid_reduced_cred_2",
4040
"format": "vc+sd-jwt",
41-
"expect_meta": {
41+
"meta": {
4242
"vct_values": ["https://cred.example/residence_credential"]
4343
},
44-
"expect_claims": [
44+
"claims": [
4545
{"path": ["postal_code"]},
4646
{"path": ["locality"]},
4747
{"path": ["region"]}
@@ -50,19 +50,19 @@
5050
{
5151
"id": "nice_to_have",
5252
"format": "vc+sd-jwt",
53-
"expect_meta": {
53+
"meta": {
5454
"vct_values": ["https://company.example/company_rewards"]
5555
},
56-
"expect_claims": [
56+
"claims": [
5757
{"id": "current", "path": ["rewards_number"]},
5858
{"id": "legacy", "path": ["legacy_system_rewards_number"]}
5959
],
60-
"valid_claim_sets": [
60+
"claim_sets": [
6161
["current", "legacy?"]
6262
]
6363
}
6464
],
65-
"valid_credential_sets": [
65+
"credential_sets": [
6666
// deliver the pid, or the other_pid, or both pid_reduced_cred1 + 2; nice_to_have is optional in all cases
6767
["pid", "nice_to_have?"],
6868
["other_pid", "nice_to_have?"],

Diff for: examples/query_lang/multi_credentials.json

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"expect_credentials": [
2+
"credentials": [
33
{
44
"id": "pid",
55
"format": "vc+sd-jwt",
6-
"expect_meta": {
6+
"meta": {
77
"vct_values": ["https://credentials.example.com/identity_credential"]
88
},
9-
"expect_claims": [
9+
"claims": [
1010
{"path": ["given_name"]},
1111
{"path": ["family_name"]},
1212
{"path": ["address", "street_address"]}
@@ -15,12 +15,10 @@
1515
{
1616
"id": "mdl",
1717
"format": "mso_mdoc",
18-
"expect_meta": {
19-
"doctype_values": ["org.iso.7367.1.mVR"],
20-
"alg_values": [ "EdDSA" ],
21-
"hash_algorithm_values": [ "SHA-384"]
18+
"meta": {
19+
"doctype_values": ["org.iso.7367.1.mVR"]
2220
},
23-
"expect_claims": [
21+
"claims": [
2422
{
2523
"namespace": "org.iso.7367.1",
2624
"claim_name": "vehicle_holder"

Diff for: examples/query_lang/simple.json

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
{
2-
"expect_credentials": [
2+
"credentials": [
33
{
44
"id": "my_credential",
55
"format": "vc+sd-jwt",
6-
"expect_meta": {
7-
"vct_values": [ "https://credentials.example.com/identity_credential" ],
8-
"credential_signing_alg_values": ["ES256", "ES384"],
9-
"sd_alg_values": ["SHA-256"]
6+
"meta": {
7+
"vct_values": [ "https://credentials.example.com/identity_credential" ]
108
},
11-
"expect_claims": [
9+
"claims": [
1210
{"path": ["last_name"]},
1311
{"path": ["first_name"]},
1412
{"path": ["address", "street_address"]}

Diff for: examples/query_lang/simple_mdoc.json

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
{
2-
"expect_credentials": [
2+
"credentials": [
33
{
44
"id": "my_credential",
55
"format": "mso_mdoc",
6-
"expect_meta": {
7-
"doctype_values": ["org.iso.7367.1.mVR"],
8-
"credential_signing_alg_values": [ "EdDSA" ],
9-
"hash_algorithm_values": [ "SHA-384"]
6+
"meta": {
7+
"doctype_values": ["org.iso.7367.1.mVR"]
108
},
11-
"expect_claims": [
9+
"claims": [
1210
{
1311
"namespace": "org.iso.7367.1",
1412
"claim_name": "vehicle_holder"

Diff for: examples/query_lang/value_matching_simple.json

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
{
2-
"expect_credentials": [
2+
"credentials": [
33
{
44
"id": "my_credential",
55
"format": "vc+sd-jwt",
6-
"expect_meta": {
7-
"vct_values": [ "https://credentials.example.com/identity_credential" ],
8-
"credential_signing_alg_values": ["ES256", "ES384"],
9-
"sd_alg_values": ["SHA-256"]
6+
"meta": {
7+
"vct_values": [ "https://credentials.example.com/identity_credential" ]
108
},
11-
"expect_claims": [
9+
"claims": [
1210
{
1311
"path": ["last_name"],
1412
"value": "Doe"

Diff for: openid-4-verifiable-presentations-1_0.md

+28-39
Original file line numberDiff line numberDiff line change
@@ -613,15 +613,15 @@ Presentations that match the query.
613613
A valid VP Query is defined as a JSON-encoded object with the following
614614
top-level properties:
615615

616-
`expect_credentials`:
616+
`credentials`:
617617
: REQUIRED. A non-empty array of Credential Queries as defined in (#credential_query)
618618
that specify the requested Verifiable Credentials.
619619

620-
`valid_credential_sets`:
620+
`credential_sets`:
621621
: OPTIONAL. A non-empty array containing arrays of identifiers for Credential Queries defined in
622-
`expect_credentials` that defines which sets of Credentials may be returned.
622+
`credentials` that defines which sets of Credentials may be returned.
623623
The identifier MAY be postfixed by `?`, indicating that
624-
delivery of the the respective Credential is optional. For details, see
624+
delivery of the respective Credential is optional. For details, see
625625
(#vp_query_lang_processing_rules).
626626

627627
Note: While this specification does not define additional top-level properties,
@@ -637,39 +637,38 @@ It contains the following properties:
637637

638638
`id`:
639639
: REQUIRED. A string identifying the Credential in the response and, if provided,
640-
the constraints in `valid_credential_sets`. The value MUST be a non-empty string
640+
the constraints in `credential_sets`. The value MUST be a non-empty string
641641
consisting of alphanumeric, underscore (`_`) or hyphen (`-`) characters.
642642
Within the Authorization Request, the same `id` MUST NOT
643643
be present more than once.
644644

645645
`format`:
646646
: REQUIRED. A string that specifies the format of the requested
647647
Verifiable Credential. Valid Credential Format Identifier values are defined in
648-
Appendix A of [@!OpenID.VCI]. The value of this property MUST be one of the
649-
supported Credential Formats as defined in the Wallet's metadata.
648+
Appendix A of [@!OpenID.VCI].
650649

651-
`expect_meta`:
650+
`meta`:
652651
: OPTIONAL. An object defining additional properties requested by the Verifier that
653652
apply to the metadata and validity data of the Credential. The properties of
654653
this object are defined per Credential Format in (#format_specific_properties). If omitted,
655654
no specific constraints are placed on the metadata or validity of the requested
656655
Credential.
657656

658-
`expect_claims`:
657+
`claims`:
659658
: OPTIONAL. A non-empty array of objects as defined in (#claims_query) that specifies
660659
claims in the requested Credentials.
661660

662-
`valid_claim_sets`:
661+
`claim_sets`:
663662
: OPTIONAL. A non-empty array containing arrays of identifiers for elements in
664-
`expect_claims`. The identifier MAY be postfixed by `?`, indicating that
663+
`claims`. The identifier MAY be postfixed by `?`, indicating that
665664
delivery of the the respective claim is OPTIONAL.
666665

667666
## Claims Query {#claims_query}
668667

669-
Each entry in `expect_claims` MUST be an object with the following properties:
668+
Each entry in `claims` MUST be an object with the following properties:
670669

671670
`id`:
672-
: REQUIRED if `valid_claim_sets` is present; OPTIONAL otherwise. A string
671+
: REQUIRED if `claim_sets` is present; OPTIONAL otherwise. A string
673672
identifying the particular claim. The value MUST be a non-empty string
674673
consisting of alphanumeric, underscore (`_`) or hyphen (`-`) characters.
675674
Within the particular `expected_claims` array, the same `id` MUST NOT
@@ -693,42 +692,42 @@ in the Verifiable Credential, e.g., `first_name`.
693692
`value`:
694693
: OPTIONAL. A string, integer or boolean value that specifies the expected value of the claim. If the
695694
`value` property is present, the Wallet MUST return the claim only if the type and value
696-
of the claim match the type and value specified in the query.
695+
of the claim match the type and value specified in the query. This property MUST NOT be present if the `values` property is present.
697696

698697
`values`:
699698
: OPTIONAL. An array of strings, integers or boolean values that specifies the expected values of the claim.
700699
If the `values` property is present, the Wallet MUST return the claim only if the
701-
type and value of the claim both match for at least one of the elements in the array.
700+
type and value of the claim both match for at least one of the elements in the array. This property MUST NOT be present if the `value` property is present.
702701

703702
### Selecting Claims and Credentials {#vp_query_lang_processing_rules}
704703

705704
The same basic logic applies for selecting claims and for selecting credentials, as detailed in the following.
706705

707706
#### Selecting Claims
708707

709-
The following rules apply for selecting claims via `expect_claims` and `valid_claim_sets`:
708+
The following rules apply for selecting claims via `claims` and `claim_sets`:
710709

711-
- If `expect_claims` is not provided, the Verifier requests all claims existing
710+
- If `claims` is not provided, the Verifier requests all claims existing
712711
in the Credential.
713-
- If `expect_claims` is provided, but `valid_claim_sets` is not provided,
714-
the Verifier requests all claims listed in `expect_claims`.
712+
- If `claims` is provided, but `claim_sets` is not provided,
713+
the Verifier requests all claims listed in `claims`.
715714
- Otherwise, the Verifier requests one combination of the claims listed in
716-
`valid_claim_sets`, with optional claims marked by the postfix `?`.
715+
`claim_sets`, with optional claims marked by the postfix `?`.
717716

718717
If the Wallet cannot deliver all non-optional claims requested by the Verifier according to these rules, it MUST NOT
719718
return the respective Credential.
720719

721720
#### Selecting Credentials
722721

723-
The following rules apply for selecting Credentials via `expect_credentials` and `valid_credential_sets`:
722+
The following rules apply for selecting Credentials via `credentials` and `credential_sets`:
724723

725-
- If `valid_credential_sets` is not provided, the Verifier requests all
726-
Credentials in `expect_credentials` to be returned.
724+
- If `credential_sets` is not provided, the Verifier requests all
725+
Credentials in `credentials` to be returned.
727726
- Otherwise, the Verifier requests one combination of the Credentials
728-
listed in `valid_credential_sets`, with optional credentials marked by the postfix `?`.
727+
listed in `credential_sets`, with optional credentials marked by the postfix `?`.
729728

730729
Credentials not matching the respective constraints expressed within
731-
`expect_credentials` MUST NOT be returned, i.e., they are treated as if
730+
`credentials` MUST NOT be returned, i.e., they are treated as if
732731
they would not exist in the Wallet.
733732

734733
If the Wallet cannot deliver all non-optional Credentials requested by the Verifier according to these rules, it MUST NOT
@@ -748,22 +747,12 @@ be valid type identifiers as defined in [@!I-D.ietf-oauth-sd-jwt-vc]. The Wallet
748747
MAY return credentials that inherit from any of the specified types, following
749748
the inheritance logic defined in [@!I-D.ietf-oauth-sd-jwt-vc].
750749

751-
`credential_signing_alg_values`:
752-
: OPTIONAL. An array of strings that specifies
753-
the allowed algorithms for signing the SD-JWT (i.e., only the issuer-signed part).
754-
755-
`kbjwt_signing_alg_values`:
756-
: OPTIONAL. An array of strings that specifies the
757-
allowed algorithms for signing the Key-Binding JWT (KB-JWT) (i.e., the part signed
758-
by the holder).
759-
760-
`sd_alg_values`:
761-
: OPTIONAL. An array of strings that specifies the allowed hash algorithms for
762-
digests in the SD-JWT and KB-JWT.
763-
764750
### Format `mso_mdoc` {#format_mso_mdoc}
765751

766-
TBD
752+
`doctype_values`:
753+
: OPTIONAL. An array of strings that specifies allowed values for the
754+
doctype of the requested Verifiable Credential. All elements in the array MUST
755+
be valid doctype identifiers as defined in ISO 18013-5.
767756

768757
### Format `jwt_vp*`
769758

0 commit comments

Comments
 (0)