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

Add version and request type to protocol identifier for DC API #381

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

awoie
Copy link
Contributor

@awoie awoie commented Jan 10, 2025

This PR adds version and request type to the protocol identifier for DC API.

Fixes #326, fixes #363

@awoie
Copy link
Contributor Author

awoie commented Jan 10, 2025

Is there any issue with setting the value to unsigned although the request was signed? Does this open up similar attack vectors as alg=none?

Copy link
Member

@c2bo c2bo left a comment

Choose a reason for hiding this comment

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

Not entirely sure about the protocolpart in the urn - do we need that? What about urn:openid:openid4vp:1.0:signed?
Also we should stick with openid4vp (and openid4vci) instead of oid4vp imho

@@ -1958,7 +1958,14 @@ And lastly, as part of the request, the Wallet is provided with information abou

## Protocol

To use OpenID4VP over the DC API, the value of the exchange protocol used with the Digital Credentials API (DC API), is `openid4vp`.
To use OpenID4VP with the Digital Credentials API (DC API), the exchange protocol value has the following format: `urn:openid:protocol:oid4vp:<version>:<request-type>`. The `<version>` field adheres to semantic versioning, and `<request-type>` explicitly specifies the type of request. This approach eliminates the need for wallets to perform implicit parameter matching to accurately identify the version and the expected request and response parameters.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
To use OpenID4VP with the Digital Credentials API (DC API), the exchange protocol value has the following format: `urn:openid:protocol:oid4vp:<version>:<request-type>`. The `<version>` field adheres to semantic versioning, and `<request-type>` explicitly specifies the type of request. This approach eliminates the need for wallets to perform implicit parameter matching to accurately identify the version and the expected request and response parameters.
To use OpenID4VP with the Digital Credentials API (DC API), the exchange protocol value has the following format: `urn:openid:protocol:openid4vp:<version>:<request-type>`. The `<version>` field adheres to semantic versioning, and `<request-type>` explicitly specifies the type of request. This approach eliminates the need for wallets to perform implicit parameter matching to accurately identify the version and the expected request and response parameters.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If there are no requirements, I would use the shortest version possible, e.g., urn:openid4vp:1.0:signed, urn:openid4vp:1.0:unsigned. What do you think @c2bo @timcappalli ?

Copy link
Member

@timcappalli timcappalli Jan 14, 2025

Choose a reason for hiding this comment

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

Fine with dropping "protocol" but I believe keeping the org name is common practice. If length is the concern, maybe just use "oidf"? So it would be urn:oidf:openid4vp:1.0:signed.

@selfissued should weigh in here.

Copy link
Member

Choose a reason for hiding this comment

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

I am happy with either one.

Adding the oidf seems to be a bit cleaner in terms of namespacing, but I don't think it's likely to encounter a naming clash here, so I guess urn:openid4vp:1.0:signed would be fine as well if we need/want to optimize for size?

Copy link
Member

@timcappalli timcappalli Jan 15, 2025

Choose a reason for hiding this comment

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

so there is some OIDF precedent. CIBA defines a URN-based grant type that includes both the organization and the type (in this case params): urn:openid:params:grant-type:ciba. There's also urn:openid:params:jwt:claim:auth_req_id and urn:openid:params:jwt:claim:rt_hash.

So if we wanted to be consistent with other OIDF specs, I think we'd want it to be urn:openid:protocol:openid4vp:1.0:signed.

@selfissued @ve7jtb any comments on this?

Comment on lines +1967 to +1968
* Unsigned requests: `urn:openid:protocol:oid4vp:1.0:unsigned`
* Signed requests: `urn:openid:protocol:oid4vp:1.0:signed`
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* Unsigned requests: `urn:openid:protocol:oid4vp:1.0:unsigned`
* Signed requests: `urn:openid:protocol:oid4vp:1.0:signed`
* Unsigned requests: `urn:openid:protocol:openid4vp:1.0:unsigned`
* Signed requests: `urn:openid:protocol:openid4vp:1.0:signed`

Copy link

@hlozi hlozi left a comment

Choose a reason for hiding this comment

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

in general the request signature has value only if the Wallet can verify it. if the wallet can't verify the signature (for example in case of not trusting the chain the RP used) the request is considered by the wallet to be unsigned.

openid-4-verifiable-presentations-1_0.md Show resolved Hide resolved
@hlozi hlozi self-requested a review January 10, 2025 16:11
Copy link

@hlozi hlozi left a comment

Choose a reason for hiding this comment

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

This could potentially lead to relying on the indicator as if the verification was performed by the Wallet, which may choose not to verify the signature.

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