Repository navigation
add redirect_uri to Credential Offer - #759
paulbastian wants to merge 23 commits into
Conversation
| * `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. |
There was a problem hiding this comment.
for reviews: this part is only moved upwards
Co-authored-by: Gareth Oliver <gco@google.com>
|
|
||
| Additional Credential Offer parameters MAY be defined and used. | ||
| The Wallet MUST ignore any unrecognized parameters. | ||
|
|
There was a problem hiding this comment.
these editorial changes move these two lines further down, which currently split the grants parameter from the grants values
Co-authored-by: Paul Bastian <paul.bastian@posteo.de>
Co-authored-by: Joseph Heenan <joseph@authlete.com>
c2bo
left a comment
There was a problem hiding this comment.
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.
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. |
|
Discussed today, no opposition in group to the change suggested here: #759 (review) |
|
I thought a bit about @jogu's comments during today's WG call. I believe the usual OAuth risk of 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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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").
| ## 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. | ||
|
|
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
I don't understand this
| * `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. |
There was a problem hiding this comment.
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_originsCredential Issuer metadata parameter as defined in (#credential-issuer-parameters) and MUST ignore theredirect_uriif the validation fails.
I'd suggest removing the MUST here and referring to the normative text in the parameter definition.
There was a problem hiding this comment.
I think we have similar duplications of MUST statements throughout the spec, I don't see a concern here
|
Discussed in meeting, @paulbastian will address open comments |
Co-authored-by: Joseph Heenan <joseph@authlete.com>
Replaces #723