Skip to content

Refine processing expected_origins and processing steps#719

Open
awoie wants to merge 13 commits into
mainfrom
awoie/fix-224
Open

Refine processing expected_origins and processing steps#719
awoie wants to merge 13 commits into
mainfrom
awoie/fix-224

Conversation

@awoie
Copy link
Copy Markdown
Contributor

@awoie awoie commented Apr 16, 2026

Fixes #224

Comment thread 1.0/openid-4-verifiable-presentations-1_0.md Outdated
Comment thread 1.0/openid-4-verifiable-presentations-1_0.md Outdated
Comment thread 1.1/openid-4-verifiable-presentations-1_1.md Outdated
Comment thread 1.1/openid-4-verifiable-presentations-1_1.md Outdated
Co-authored-by: Oliver Terbu <o.terbu@gmail.com>
@awoie
Copy link
Copy Markdown
Contributor Author

awoie commented Apr 16, 2026

I removed the term "opaque" as per WG consensus.

@awoie awoie changed the title Clarify origin is an opaque string Refine processing expected_origins and processing steps Apr 16, 2026
Comment thread 1.0/openid-4-verifiable-presentations-1_0.md Outdated
Comment thread 1.1/openid-4-verifiable-presentations-1_1.md Outdated
Co-authored-by: Oliver Terbu <o.terbu@gmail.com>
Copy link
Copy Markdown
Member

@fkj fkj left a comment

Choose a reason for hiding this comment

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

I think the clarity could be improved by also adding text to note that an Origin can really be any string in the definition of Origin.

Comment thread 1.0/openid-4-verifiable-presentations-1_0.md Outdated
Comment thread 1.1/openid-4-verifiable-presentations-1_1.md Outdated
@Sakurann
Copy link
Copy Markdown
Collaborator

APAC DCP WG discussion:

Comment thread 1.0/openid-4-verifiable-presentations-1_0.md Outdated
Co-authored-by: Frederik Krogsdal Jacobsen <fkj@users.noreply.github.com>
Comment thread 1.1/openid-4-verifiable-presentations-1_1.md Outdated
Co-authored-by: Oliver Terbu <o.terbu@gmail.com>
Origin:
: An identifier for the calling website or native application, asserted by the web or app platform. A web origin is the combination of a scheme/protocol, host, and port, with port being omitted when it matches the default port of the scheme. An app platform may use a linked web origin, or use a platform-specific URI for the app origin. For example, the Verifier for the organization MyExampleOrg is served from https://verify.example.com. The web origin is `https://verify.example.com` with `https` being the scheme, `verify.example.com` being the host, and the port is not explicitly included as `443` is the default port for the protocol `https`. The native applications origin on some platforms will also be `https://verify.example.com` and on other platforms, may be `platform:pkg-key-hash:Z4OFzVVSZrzTRa3eg79hUuHy12MVW0vzPDf4q4zaPs0`.
Origin:
: An identifier for the calling website or native application, asserted by the web or app platform. The Origin is any string, but will typically follow a platform-specific convention. A web origin is the combination of a scheme/protocol, host, and port, with port being omitted when it matches the default port of the scheme. An app platform may use a linked web origin, or use a platform-specific URI for the app origin. For example, the Verifier for the organization MyExampleOrg is served from https://verify.example.com. The web origin is `https://verify.example.com` with `https` being the scheme, `verify.example.com` being the host, and the port is not explicitly included as `443` is the default port for the protocol `https`. The native applications origin on some platforms will also be `https://verify.example.com` and on other platforms, may be `platform:pkg-key-hash:Z4OFzVVSZrzTRa3eg79hUuHy12MVW0vzPDf4q4zaPs0`.
Copy link
Copy Markdown

@lj-raidiam lj-raidiam Apr 27, 2026

Choose a reason for hiding this comment

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

We use the terms "app origin" and "web origin" here, where "app origin" can be a URI. Could we reference the relevant RFCs for clarity? WDYT @awoie @fkj?
If this suggestion is added, RFC 6454 should be added to the references at the bottom.

Suggested change
: An identifier for the calling website or native application, asserted by the web or app platform. The Origin is any string, but will typically follow a platform-specific convention. A web origin is the combination of a scheme/protocol, host, and port, with port being omitted when it matches the default port of the scheme. An app platform may use a linked web origin, or use a platform-specific URI for the app origin. For example, the Verifier for the organization MyExampleOrg is served from https://verify.example.com. The web origin is `https://verify.example.com` with `https` being the scheme, `verify.example.com` being the host, and the port is not explicitly included as `443` is the default port for the protocol `https`. The native applications origin on some platforms will also be `https://verify.example.com` and on other platforms, may be `platform:pkg-key-hash:Z4OFzVVSZrzTRa3eg79hUuHy12MVW0vzPDf4q4zaPs0`.
: An identifier for the calling website or native application, asserted by the web or app platform. The Origin is any string, but will typically follow a platform-specific convention. A web origin follows scheme, host, and port convention defined in [@!RFC6454], with port being omitted when it matches the default port of the scheme. An app platform may use a linked web origin, or use a platform-specific URI syntax as defined by [@!RFC3986] for the app origin. For example, the Verifier for the organization MyExampleOrg is served from https://verify.example.com. The web origin is `https://verify.example.com` with `https` being the scheme, `verify.example.com` being the host, and the port is not explicitly included as `443` is the default port for the protocol `https`. The native applications origin on some platforms will also be `https://verify.example.com` and on other platforms, may be `platform:pkg-key-hash:Z4OFzVVSZrzTRa3eg79hUuHy12MVW0vzPDf4q4zaPs0`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't see why not, it might add some clarity.

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.

I don’t think that’s the right spec. Browser and most modern URL implementations use WHATWG URL.

Similarly, origin you probably want :
https://html.spec.whatwg.org/multipage/browsers.html#concept-origin

Generally, please avoid redefining what’s in other specs. Subtle wording differences can lead to confusion.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

See proposal below.

Origin:
: An identifier for the calling website or native application, asserted by the web or app platform. A web origin is the combination of a scheme/protocol, host, and port, with port being omitted when it matches the default port of the scheme. An app platform may use a linked web origin, or use a platform-specific URI for the app origin. For example, the Verifier for the organization MyExampleOrg is served from https://verify.example.com. The web origin is `https://verify.example.com` with `https` being the scheme, `verify.example.com` being the host, and the port is not explicitly included as `443` is the default port for the protocol `https`. The native applications origin on some platforms will also be `https://verify.example.com` and on other platforms, may be `platform:pkg-key-hash:Z4OFzVVSZrzTRa3eg79hUuHy12MVW0vzPDf4q4zaPs0`.
Origin:
: An identifier for the calling website or native application, asserted by the web or app platform. The Origin is any string, but will typically follow a platform-specific convention. A web origin is the combination of a scheme/protocol, host, and port, with port being omitted when it matches the default port of the scheme. An app platform may use a linked web origin, or use a platform-specific URI for the app origin. For example, the Verifier for the organization MyExampleOrg is served from https://verify.example.com. The web origin is `https://verify.example.com` with `https` being the scheme, `verify.example.com` being the host, and the port is not explicitly included as `443` is the default port for the protocol `https`. The native applications origin on some platforms will also be `https://verify.example.com` and on other platforms, may be `platform:pkg-key-hash:Z4OFzVVSZrzTRa3eg79hUuHy12MVW0vzPDf4q4zaPs0`.
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.

I think this is all you want here, but check:

Suggested change
: An identifier for the calling website or native application, asserted by the web or app platform. The Origin is any string, but will typically follow a platform-specific convention. A web origin is the combination of a scheme/protocol, host, and port, with port being omitted when it matches the default port of the scheme. An app platform may use a linked web origin, or use a platform-specific URI for the app origin. For example, the Verifier for the organization MyExampleOrg is served from https://verify.example.com. The web origin is `https://verify.example.com` with `https` being the scheme, `verify.example.com` being the host, and the port is not explicitly included as `443` is the default port for the protocol `https`. The native applications origin on some platforms will also be `https://verify.example.com` and on other platforms, may be `platform:pkg-key-hash:Z4OFzVVSZrzTRa3eg79hUuHy12MVW0vzPDf4q4zaPs0`.
: an [origin](https://html.spec.whatwg.org/multipage/browsers.html#concept-origin) or an [opaque origin](https://html.spec.whatwg.org/multipage/browsers.html#concept-origin-opaque) [[HTML]]. See [7.1.1 Origins](https://html.spec.whatwg.org/multipage/browsers.html#origin) of HTML for details.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good point. I think we were not previously aware that WHATWG actually defined the opaque origin as a concept. I still think it might be relevant to say that the opaque origin is platform-specific.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should still preserve text with examples about platform-provided origin (app-to-app) imho. Even if we re-use other, existing terminology. I believe we should be more explicit here, especially with an example what a platform-provided origin could look like

Copy link
Copy Markdown
Contributor

@marcoscaceres marcoscaceres May 2, 2026

Choose a reason for hiding this comment

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

Yes, a non-normative example would be great. If there’s a common one that’s already in use, all the better. However, it’s important to think about any that we know absolutely must not be allowed (e.g., file:, http:)… they don’t need to be defined here, but should be somewhere.

something like:

If the url's scheme is a local scheme, or http:, or file:, or javascript:, or ws:, or wss:, return error.

Copy link
Copy Markdown
Contributor Author

@awoie awoie May 27, 2026

Choose a reason for hiding this comment

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

Since expected_origins is part of the OID4VP protocol payload, OID4VP can define constraints on the values a verifier is allowed to provide there. The platform-provided origin itself is outside the scope of OID4VP and is determined by the W3C Digital Credentials API / platform layer. OID4VP can therefore only specify how the wallet compares expected_origins with the origin provided by the platform, and how the wallet behaves when no match is found, or the value of expected_origins uses an unsafe / unsupported URI scheme.

We could say something like this (wdyt @marcoscaceres @fkj @c2bo ?) :

Values using unsafe or unsupported URI schemes, including ftp, javascript, data, ws, and wss, MUST NOT be used. Values using the http scheme MUST NOT be used unless they are explicitly allowed for constrained scenarios such as local development or equivalent non-production environments.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

How about the following which combines @marcoscaceres reference while including native applications as well as retaining the examples?

Origin: An identifier for the calling website or native application, asserted by the underlying web or application platform.
For Web-based callers, the Origin is an opaque origin or tuple origin as defined in HTML Section 7.1.1 "Origins"[HTML].
For native application callers, the Origin follows a platform-specific convention. Some platforms use a linked web origin, while others use a platform-specific application origin.
For example, the Verifier for the organization MyExampleOrg is served from https://verify.example.com. The corresponding web Origin is https://verify.example.com, where https is the scheme, verify.example.com is the host, and the port is not explicitly included because 443 is the default port for https. On some platforms, a native application uses the same Origin, while on others it uses a platform-specific value such as platform:pkg-key-hash:Z4OFzVVSZrzTRa3eg79hUuHy12MVW0vzPDf4q4zaPs0.
The Origin provided by the underlying platform is outside the scope of this specification.

We could then also add a constraint on expected_origins as follows:

Values using unsafe or unsupported URI schemes, including ftp, javascript, data, ws, and wss, MUST NOT be used. Values using the http scheme MUST NOT be used unless they are explicitly allowed for constrained scenarios such as local development or equivalent non-production environments.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Wdyt about the above proposal @fkj @marcoscaceres @c2bo @lj-raidiam ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That sounds good to me!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we should add that the platform-specific application origins MUST be treated as opaque origins (cf. the HTML spec).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The Origin provided by the underlying platform is outside the scope of this specification.

I guess we could modify the last sentence along those lines?

The Origin provided by the underlying platform is outside the scope of this specification and MUST be treated as an opaque string.

Comment thread 1.0/openid-4-verifiable-presentations-1_0.md
Comment thread 1.0/openid-4-verifiable-presentations-1_0.md
@brentzundel
Copy link
Copy Markdown
Collaborator

Discussed during call. In general Marco's proposed change seems fine, but it should have correct references and retain some example text.

@brentzundel
Copy link
Copy Markdown
Collaborator

@marcoscaceres could you respond to comments made so far?

@paulbastian
Copy link
Copy Markdown
Contributor

wg call:

  • suggestion from @c2bo and @fkj to further iterate on @awoie latest proposal, taking reference from Marcos suggesting and merging them with ideas from @awoie
  • @c2bo is syncing with @awoie to make a new proposal, as it seems to complicated in a suggestion

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.

Clarifications on processing expected_origins and processing steps

10 participants