Skip to content

Add requestOrigin attribute to DigitalCredential - #567

Open
marcoscaceres wants to merge 14 commits into
add-document-origin-to-request-contextfrom
requestorigin-attr
Open

Add requestOrigin attribute to DigitalCredential#567
marcoscaceres wants to merge 14 commits into
add-document-origin-to-request-contextfrom
requestorigin-attr

Conversation

@marcoscaceres

@marcoscaceres marcoscaceres commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Exposes the origin the response was bound to on the returned credential, so an encrypted response can be tied to the origin it was produced for, consistent with how protocol and data make the response self-describing. Closes #566. Relates to #512, #520, #95.

The following tasks have been completed:

  • Web platform tests: the requestOrigin attribute is covered by WPT's auto-generated IDL (extracted from the published spec by Reffy into webref), which will pick it up automatically once this merges.

Implementation commitment:

  • WebKit
  • Chromium (link to issue)
  • Gecko (link to issue)

Documentation and checks:

  • Affects privacy
  • Affects security
  • Pinged MDN
  • Updated Explainer
  • Updated digitalcredentials.dev

Preview | Diff

marcoscaceres and others added 13 commits May 9, 2026 15:08
Thread the `origin` parameter from Credential Management's
`[[DiscoverFromExternalSource]]` through to the request context as
`document origin`. This is the calling document's origin (i.e., the
iframe's origin in cross-origin scenarios), which is needed for request
validation.

The top-level origin remains for credential chooser UI display. Both
are now available in the request context for their respective purposes.

Closes #504
The request context now carries both the document origin, the origin in
which the request was made (the calling document's environment settings
object's origin, per Credential Management), and the top-level origin,
used only when presenting the request to the user. This lets the digital
credential chooser attribute a cross-origin request to the site the user
is visiting while leaving the document origin unchanged.

Adds guidance on presenting one origin versus both, keyed on whether the
two origins are same site, and an open issue on whether disclosing both
origins should be a MUST rather than a SHOULD for cross-origin requests.
Drops the WebAuthn and Storage Access analogies from the credential
chooser presentation note, and replaces the inline issue with a
reference to the filed issue on whether the disclosure should be a MUST
and whether to refuse the request when both origins cannot be conveyed.
Replaces the SHOULD-based prose with a switch, matching the style used
for error handling, stating which origins the credential chooser
presents: the top-level origin when it and the document origin are same
site, and both origins otherwise. Removes the inline issue marker.
@marcoscaceres
marcoscaceres requested a review from a team as a code owner July 28, 2026 06:43
@marcoscaceres marcoscaceres added the agenda+ Add to the weekly agenda label Jul 30, 2026
@marcoscaceres
marcoscaceres force-pushed the add-document-origin-to-request-context branch from 94a9737 to 0152cb1 Compare July 30, 2026 12:16
@marcoscaceres marcoscaceres removed the agenda+ Add to the weekly agenda label Aug 6, 2026
@marcoscaceres

Copy link
Copy Markdown
Collaborator Author

@copilot resolve the merge conflicts in this pull request

…gin-attr

Co-authored-by: marcoscaceres <870154+marcoscaceres@users.noreply.github.com>

Copilot AI commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Done — resolved the merge conflicts with add-document-origin-to-request-context in commit a5aa550. The base branch's restructured algorithm steps (splitting topLevelDocument/topLevelOrigin into separate steps, updated prose) were taken from the base branch, while the requestOrigin security paragraph unique to this PR was preserved.

@hlflanagan

Copy link
Copy Markdown

Discussed again on Series A call, 10 August 2026

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.

3 participants