Skip to content

make credential_type an array - #61

Open
c2bo wants to merge 8 commits into
mainfrom
46-make-credential_type-array
Open

c2bo wants to merge 8 commits into
mainfrom
46-make-credential_type-array

Conversation

@c2bo

@c2bo c2bo commented Sep 21, 2026

Copy link
Copy Markdown
Member

Closes #46

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

📄 Editor's Copy preview

https://openid.github.io/dchp/PREVIEW-DO-NOT-USE/pr-61/digital-credentials-harmonized-presentation-editors-copy.html

Preview of 479d69a; updated on every push. For review only — the official specifications are published at https://openid.net/specs/

github-actions Bot pushed a commit that referenced this pull request Sep 21, 2026

@jogu jogu left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to update the definition of 'allow_multiple' - it currently says "Allow returning multiple credentials of the same type" and my presumption is with this change you end up allowing any of the types in the array. (This falls out of it being semantically equivalent to the longer form non-array form of repeating the query.)

Note this will clash with #57 - we could use stacked PRs here: https://docs.github.com/en/pull-requests/how-tos/stacked-pull-requests (i.e. built on top of my branch, and assuming mine is merged first GitHub should auto retarget yours to main when mine is merged). The a query matches credentials whose docType or vct "is identical to the requested value" in mine will need to be updated too.

Comment thread draft/digital-credentials-harmonized-presentation.md Outdated
Comment thread draft/digital-credentials-harmonized-presentation.md Outdated
Comment thread draft/digital-credentials-harmonized-presentation.md Outdated
Comment thread draft/digital-credentials-harmonized-presentation.md Outdated
| `encryption_ref` | `7` | `int` | O | Reference to an entry in `additional_encryption_contexts`; absent means the main `encryption_context` is used |

Listing multiple values in `credential_type` is a size optimization for requesting the same data elements from credential types that are closely related (e.g., newer versions of the same credential type). The same effect could be achieved by defining multiple `CredentialQuery` entries.
The verifier MUST ensure that every element in `elements_dict` is defined for each listed credential type.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed on today's WG call:

Martijn will make a comment/suggestion. It's not a "MUST" but for the query to work this needs to be the case, e.g. if one credential has an extension and the other doesn't.

Comment thread draft/digital-credentials-harmonized-presentation.md Outdated
Comment thread draft/digital-credentials-harmonized-presentation.md Outdated
Co-authored-by: Joseph Heenan <joseph@heenan.me.uk>
Co-authored-by: Oliver Terbu <o.terbu@gmail.com>
github-actions Bot pushed a commit that referenced this pull request Sep 24, 2026
github-actions Bot pushed a commit that referenced this pull request Sep 24, 2026
@c2bo

c2bo commented Sep 24, 2026

Copy link
Copy Markdown
Member Author

Not sure what gh did from committing a 2 word change (via UI suggestions in gh) to creating a 1200 line commit that doesn't change anything but 2 words...

I'll force push remove the last commit if this doesn't fix itself

@c2bo
c2bo force-pushed the 46-make-credential_type-array branch from 3b3211d to a9ce0fc Compare September 24, 2026 15:59
github-actions Bot pushed a commit that referenced this pull request Sep 24, 2026
|---|---|---|---|---|
| `credential_format` | `1` | `tstr` | M | Format identifier (e.g., `"mso_mdoc"`, `"vc+sd-jwt"`) |
| `credential_type` | `2` | `tstr` | M | Credential type (e.g., `"org.iso.18013.5.1.mDL"`) |
| `credential_types` | `2` | `[ + tstr ]` | M | Acceptable credential types (e.g., `["org.iso.18013.5.1.mDL"]`). The wallet may present a credential of any listed type |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "the wallet may present a credential of any listed type" seems like a processing rule that probably needs to be centralized somewhere else. Also does "may" need to be "MAY"?

Comment thread draft/digital-credentials-harmonized-presentation.md Outdated
|---|---|---|---|---|
| `credential_format` | `1` | `tstr` | M | Format identifier (e.g., `"mso_mdoc"`, `"vc+sd-jwt"`) |
| `credential_type` | `2` | `tstr` | M | Credential type (e.g., `"org.iso.18013.5.1.mDL"`) |
| `credential_types` | `2` | `[ + tstr ]` | M | Acceptable credential types (e.g., `["org.iso.18013.5.1.mDL"]`). The wallet may present a credential of any listed type |

@jogu jogu Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed on today's call:

The 'may' sentence is normative and probably sits better in the processing rules section. Remove the second sentence from here.

Martijn to check if we have an issue for adding that processing rules section.

@jogu
jogu requested a review from bhjelm October 5, 2026 14:24
github-actions Bot pushed a commit that referenced this pull request Oct 9, 2026

@jogu jogu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM , two very editorial nits.

Comment thread draft/digital-credentials-harmonized-presentation.md Outdated
Comment thread draft/digital-credentials-harmonized-presentation.md Outdated
Co-authored-by: Joseph Heenan <joseph@heenan.me.uk>
github-actions Bot pushed a commit that referenced this pull request Oct 15, 2026
Comment thread draft/digital-credentials-harmonized-presentation.md Outdated
| `encryption_ref` | `7` | `int` | O | Reference to an entry in `additional_encryption_contexts`; absent means the main `encryption_context` is used |

Listing multiple values in `credential_types` is a size optimization for requesting the same data elements from credential types that are closely related (e.g., newer versions of the same credential type). It is equivalent to defining one `CredentialQuery` per listed credential type, identical in all other respects, and offering them as alternatives.
The verifier shall ensure that every element in `elements_dict` is defined for each listed credential type.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with the sentiment, but normatively saying when you can and cannot put multiple credential types in the array is difficult, especially since normatively saying when something is or isn't defined for a credential type is likely ambiguous.
To give another extreme example, if you ask for:

credential_type = [type_a, typeb]

and then ask for the following data elements:
element_only_in_type_a OR element_only_in_type_b

it will still work, even though you are doing something that you shouldn't do.

In general I feel that putting multiple credential types in a single credential type makes it more difficult for the relying party that creates the query and therefore I would recommend not to use the feature. However I also don't think normatively it's a problem because of the very clear processing rule.


Listing multiple values in `credential_types` is a size optimization for requesting the same data elements from credential types that are closely related (e.g., newer versions of the same credential type). It is equivalent to defining one `CredentialQuery` per listed credential type, identical in all other respects, and offering them as alternatives.
The verifier shall ensure that every element in `elements_dict` is defined for each listed credential type.
If the requirements differ between credential types, the verifier shall use separate `CredentialQuery` entries instead.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As with the previous comment, I agree with the sentiment, but I don't think we should normatively say this. What I would like to say is "probably you should just use separate credential queries to unless you have a good reason to put them in a single query." but then with better words.

Co-authored-by: Martijn Haring <62745275+martijnharing@users.noreply.github.com>
github-actions Bot pushed a commit that referenced this pull request Oct 19, 2026
github-actions Bot pushed a commit that referenced this pull request Oct 19, 2026
Comment thread draft/digital-credentials-harmonized-presentation.md Outdated
Comment on lines +147 to +148
The verifier shall ensure that every element in `elements_dict` is defined for each listed credential type.
If the requirements differ between credential types, the verifier shall use separate `CredentialQuery` entries instead.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed on today's WG call; consensus on call:

We don't have similar text for other forms of queries, we can just remove the two lines.

github-actions Bot pushed a commit that referenced this pull request Oct 19, 2026

This branch has not been deployed

No deployments
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.

Make credential_type an array

7 participants