Skip to content

add redirect_uri to Credential Offer - #759

Open
paulbastian wants to merge 23 commits into
mainfrom
pb/redirect
Open

paulbastian wants to merge 23 commits into
mainfrom
pb/redirect

Conversation

@paulbastian

@paulbastian paulbastian commented Jun 18, 2026 •

Copy link
Copy Markdown
Contributor

Replaces #723

  • discuss whether to use SHOULD or MAY to open redirect_uri
  • make editorial changes to fix grants text in Credential Offer Parameters in 1.0?
  • discuss whether expected_redirect_origins should be origins or paths

@dpostnikov
dpostnikov requested review from GarethCOliver and fkj June 22, 2026 08:06
Comment thread 1.1/openid-4-verifiable-credential-issuance-1_1.md Outdated
Comment on lines +394 to +403
* `authorization_code`: OPTIONAL. Object for the Authorization Code Grant type.
* `issuer_state`: OPTIONAL. String value created by the Credential Issuer and opaque to the Wallet that is used to bind the subsequent Authorization Request with a context set up during previous process steps. If the Wallet decides to use the Authorization Code Flow and received a value for this parameter, it MUST include it in the subsequent Authorization Request to the Authorization Server as the `issuer_state` parameter value.
* `authorization_server`: OPTIONAL string that the Wallet can use to identify the Authorization Server to use with this grant type when `authorization_servers` parameter in the Credential Issuer metadata has multiple entries. It MUST NOT be used otherwise. The value of this parameter MUST match with one of the values in the `authorization_servers` array obtained from the Credential Issuer metadata.
* `urn:ietf:params:oauth:grant-type:pre-authorized_code`: OPTIONAL. Object for the Pre-authorized Code Grant type.
* `pre-authorized_code`: REQUIRED. The code representing the Credential Issuer's authorization for the Wallet to obtain Credentials of a certain type. This code MUST be short lived and single use. If the Wallet decides to use the Pre-Authorized Code Flow, this parameter value MUST be included in the subsequent Token Request with the Pre-Authorized Code Flow.
* `tx_code`: OPTIONAL. Object indicating that a Transaction Code is required if present, even if empty. It describes the requirements for a Transaction Code, which the Authorization Server expects the End-User to present along with the Token Request in a Pre-Authorized Code Flow. If the Authorization Server does not expect a Transaction Code, this object is absent; this is the default. The Transaction Code is intended to bind the Pre-Authorized Code to a certain transaction to prevent replay of this code by an attacker that, for example, scanned the QR code while standing behind the legitimate End-User. It is RECOMMENDED to send the Transaction Code via a separate channel. If the Wallet decides to use the Pre-Authorized Code Flow, the Transaction Code value MUST be sent in the `tx_code` parameter with the respective Token Request as defined in (#token-request). If no `length`, `description`, or `input_mode` is given, this object MAY be empty.
* `input_mode` : OPTIONAL. String specifying the input character set. Possible values are `numeric` (only digits) and `text` (any characters). The default is `numeric`.
* `length`: OPTIONAL. Integer specifying the length of the Transaction Code. This helps the Wallet to render the input screen and improve the user experience.
* `description`: OPTIONAL. String containing guidance for the Holder of the Wallet on how to obtain the Transaction Code, e.g., describing over which communication channel it is delivered. The Wallet is RECOMMENDED to display this description next to the Transaction Code input screen to improve the user experience. The length of the string MUST NOT exceed 300 characters. The `description` does not support internationalization, however the Issuer MAY detect the Holder's language by previous communication or an HTTP Accept-Language header within an HTTP GET request for a Credential Offer URI.
* `authorization_server`: OPTIONAL string that the Wallet can use to identify the Authorization Server to use with this grant type when `authorization_servers` parameter in the Credential Issuer metadata has multiple entries. It MUST NOT be used otherwise. The value of this parameter MUST match with one of the values in the `authorization_servers` array obtained from the Credential Issuer metadata.

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.

for reviews: this part is only moved upwards

Comment thread 1.1/openid-4-verifiable-credential-issuance-1_1.md Outdated
Comment thread 1.1/openid-4-verifiable-credential-issuance-1_1.md Outdated
Comment thread 1.1/openid-4-verifiable-credential-issuance-1_1.md Outdated
Comment thread 1.1/openid-4-verifiable-credential-issuance-1_1.md Outdated
Comment thread 1.1/openid-4-verifiable-credential-issuance-1_1.md Outdated
Comment thread 1.1/openid-4-verifiable-credential-issuance-1_1.md Outdated
Comment on lines 396 to 399

Additional Credential Offer parameters MAY be defined and used.
The Wallet MUST ignore any unrecognized parameters.

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.

these editorial changes move these two lines further down, which currently split the grants parameter from the grants values

Comment thread 1.1/openid-4-verifiable-credential-issuance-1_1.md Outdated
Comment thread 1.1/openid-4-verifiable-credential-issuance-1_1.md Outdated
Comment thread 1.1/openid-4-verifiable-credential-issuance-1_1.md Outdated
Comment thread 1.1/openid-4-verifiable-credential-issuance-1_1.md Outdated
Comment thread 1.1/openid-4-verifiable-credential-issuance-1_1.md Outdated
Comment thread 1.1/openid-4-verifiable-credential-issuance-1_1.md Outdated
Comment thread 1.1/openid-4-verifiable-credential-issuance-1_1.md Outdated
Comment thread 1.1/examples/credential_offer_authz_code.txt Outdated
Comment thread 1.0/openid-4-verifiable-credential-issuance-1_0.md
Comment thread 1.1/openid-4-verifiable-credential-issuance-1_1.md Outdated
paulbastian and others added 2 commits July 16, 2026 17:13
Co-authored-by: Paul Bastian <paul.bastian@posteo.de>
Co-authored-by: Joseph Heenan <joseph@authlete.com>
Comment thread 1.1/openid-4-verifiable-credential-issuance-1_1.md Outdated
Comment thread 1.1/openid-4-verifiable-credential-issuance-1_1.md Outdated
Comment thread 1.1/openid-4-verifiable-credential-issuance-1_1.md Outdated
@paulbastian

Copy link
Copy Markdown
Contributor Author

@jogu could you review again please?
@fkj @c2bo can you review?

@Sakurann
Sakurann requested review from c2bo, fkj and jogu July 30, 2026 15:49
@dpostnikov

Copy link
Copy Markdown
Collaborator

DCP WG call today: Awaiting @jogu and @c2bo review

@c2bo c2bo left a comment

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.

Small nit/proposal and I am wondering if calling it redirect_uri which directly clashes with OAuth naming is helpful or harmful. Maybe we should call it something like issuer_return_uri instead?

Looks good to me otherwise.

Comment thread 1.1/openid-4-verifiable-credential-issuance-1_1.md Outdated
@jogu

jogu commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Small nit/proposal and I am wondering if calling it redirect_uri which directly clashes with OAuth naming is helpful or harmful. Maybe we should call it something like issuer_return_uri instead?

I agree with Christian - I think using a different name would really help avoid confusing, having two redirect_uris (the oauth one and this new one) in the same flow sounds like something best avoided.

@brentzundel

Copy link
Copy Markdown
Collaborator

Discussed today, no opposition in group to the change suggested here: #759 (review)
@jogu will finish his review and @GarethCOliver will review

@c2bo

c2bo commented Sep 17, 2026

Copy link
Copy Markdown
Member

I thought a bit about @jogu's comments during today's WG call. I believe the usual OAuth risk of redirec_uri don't really apply here since the redirect is not part of the security critical parts, but simply a redirect for information/UX - so at most a phishing angle still protected by TLS? I guess it would make sense nonetheless to warn to not use an origin that also hosts an open redirector etc.

Alternative solution: Rename the expected_redirect_origins parameter to something else and allow it to carry both, origins and URIs -> deployments can choose to use either an origin or full URLs. That gives deployments the freedom to adjust this to their deployment reality and should be reasonably easy to implement on the Wallet side: if the string contains path/query values, treat it as a strict URL match, otherwise compare prefix (origin).


## Redirect to the Credential Issuer {#redirect-security}

The `expected_redirect_origins` Credential Issuer metadata parameter allows the Wallet to authenticate the origin of the `redirect_uri`. An attacker that is able to modify a Credential Offer, as described in (#credential-offer-security), can therefore manipulate the path, query, and fragment components under a listed origin. Credential Issuers therefore SHOULD only list origins whose content they fully control. In multi-tenant environments, this is achieved by hosting each tenant on its own subdomain, so that every tenant has a distinct origin, and by listing only that tenant's origin in `expected_redirect_origins`. Credential Issuers that cannot separate origins in this way and that are concerned about phishing attacks SHOULD NOT use the `redirect_uri` Credential Offer parameter.

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.

This feels like we're still leaving a foot gun there - is there really a clear use case that means (for example) we couldn't like URLs and require everything except the url query to match?

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.

Paul and I discussed a bit:

I understand his reason for using origins is that it can be troublesome to get paths in the .well-known updated when the expected redirect uris need to change.

I still think that allowing a redirect to anywhere opens the possibility for some phishing attacks - e.g. as an attack I send a credential offer issues a credential to the user, then redirects to somewhere on a massive website that ends up suggesting the user presents their new credential to an attacker controlled site to "prove your credential works" or "see how the flow works".

It feels to me like the same set of people that have trouble updating origins in .well-known has some overlap with the set of people that will have huge websites where that potential for user generated content is there.

It's definitely a trade off. I think I'm still feeling like the better option is to force the security on people, meaning they end up having to either get the .well-known updated, or spin up a subdomain (the latter being what we're basically recommending anyway). My fear is without that people will cut corners ("it's only a should, we can ignore it as it's difficult for us").

Comment thread 1.1/openid-4-verifiable-credential-issuance-1_1.md
## Redirect to the Credential Issuer {#redirect-security}

The `expected_redirect_origins` Credential Issuer metadata parameter allows the Wallet to authenticate the origin of the `redirect_uri`. An attacker that is able to modify a Credential Offer, as described in (#credential-offer-security), can therefore manipulate the path, query, and fragment components under a listed origin. Credential Issuers therefore SHOULD only list origins whose content they fully control. In multi-tenant environments, this is achieved by hosting each tenant on its own subdomain, so that every tenant has a distinct origin, and by listing only that tenant's origin in `expected_redirect_origins`. Credential Issuers that cannot separate origins in this way and that are concerned about phishing attacks SHOULD NOT use the `redirect_uri` Credential Offer parameter.

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 think we should add to the text in privacy considerations to, not disimmilar to the text we already have about the oauth redirect url.

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.

I don't understand this

Comment thread 1.1/openid-4-verifiable-credential-issuance-1_1.md Outdated
* `nonce_endpoint`: OPTIONAL. URL of the Credential Issuer's Nonce Endpoint, as defined in (#nonce-endpoint). This URL MUST use the `https` scheme and MAY contain port, path, and query parameter components. If omitted, the Credential Issuer does not require the use of `c_nonce`.
* `deferred_credential_endpoint`: OPTIONAL. URL of the Credential Issuer's Deferred Credential Endpoint, as defined in (#deferred-credential-issuance). This URL MUST use the `https` scheme and MAY contain port, path, and query parameter components. If omitted, the Credential Issuer does not support the Deferred Credential Endpoint.
* `notification_endpoint`: OPTIONAL. URL of the Credential Issuer's Notification Endpoint, as defined in (#notification-endpoint). This URL MUST use the `https` scheme and MAY contain port, path, and query parameter components. If omitted, the Credential Issuer does not support the Notification Endpoint.
* `expected_redirect_origins`: REQUIRED if the Credential Issuer uses the `redirect_uri` Credential Offer parameter (#credential-offer-parameters), and otherwise omitted. A non-empty array of strings, where each string is an origin, as defined in [@!RFC6454], that the Credential Issuer may use in the `redirect_uri` of the Credential Offer. If a Credential Offer contains a `redirect_uri`, the Wallet MUST NOT utilize it unless the origin of the `redirect_uri` matches one of the values in this array. If this parameter is omitted, the Wallet MUST ignore any `redirect_uri` present in a Credential Offer from this Credential Issuer.

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 'MUST NOT utilize' here duplicates the MUST in the parameter definition:

Because the Credential Offer is not authenticated (see (#credential-offer-security)), the Wallet MUST validate this value against the expected_redirect_origins Credential Issuer metadata parameter as defined in (#credential-issuer-parameters) and MUST ignore the redirect_uri if the validation fails.

I'd suggest removing the MUST here and referring to the normative text in the parameter definition.

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.

I think we have similar duplications of MUST statements throughout the spec, I don't see a concern here

Comment thread 1.1/openid-4-verifiable-credential-issuance-1_1.md Outdated
Comment thread 1.1/openid-4-verifiable-credential-issuance-1_1.md Outdated
@brentzundel

Copy link
Copy Markdown
Collaborator

Discussed in meeting, @paulbastian will address open comments

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.

8 participants