Security considerations for client_metadata parameters - #735
Conversation
Co-authored-by: Frederik Krogsdal Jacobsen <fkj@users.noreply.github.com>
| Wallet implementers need to choose a source of client metadata they can trust within their own ecosystem or implementation. This should determine whether it is safe to use or display to a User. For example, a client name obtained from an X.509 certificate can be trusted, whereas a client name from the `client_metadata` parameter cannot. | ||
|
|
||
| It is recommended to use `client_metadata` parameters only for client-supplied parameters that can be used untrusted, for example, a public key. | ||
|
|
||
| Ecosystems can use other ecosystem-specific trusted data sources as long as they conduct a proper trust evaluation. |
There was a problem hiding this comment.
@jogu What specifically is the problem with the "it is recommended" text? Just that it reads as a normative statement?
And what about something like this:
| Wallet implementers need to choose a source of client metadata they can trust within their own ecosystem or implementation. This should determine whether it is safe to use or display to a User. For example, a client name obtained from an X.509 certificate can be trusted, whereas a client name from the `client_metadata` parameter cannot. | |
| It is recommended to use `client_metadata` parameters only for client-supplied parameters that can be used untrusted, for example, a public key. | |
| Ecosystems can use other ecosystem-specific trusted data sources as long as they conduct a proper trust evaluation. | |
| Ecosystems can define other ecosystem-specific trusted data sources in a profile as long as they conduct a proper trust evaluation. |
There was a problem hiding this comment.
@jogu where do you think it conflicts? Is it the example of the public key and should we be more specific that it is about specific, ephemeral public keys as described in the section?
In the spec I also often notice we use "ecosystems or profiles" instead of the one or the other. Maybe that applies here as well.
There was a problem hiding this comment.
@jogu Would be great to have some more detail on this.
There was a problem hiding this comment.
I think my concern was in the conflict between
It is recommended (for Wallet implementers) to use
client_metadataparameters...
and
Other metadata parameters MUST be ignored unless a profile <...>'
If the recommendation is scoped to profiles that's better. But maybe something like:
Profiles MAY define additional
client_metadataparameters for client-supplied parameters that can be used untrusted, for example, a public key.
(Pretty sure that can be improved upon)
| Wallet implementers need to choose a source of client metadata they can trust within their own ecosystem or implementation. This should determine whether it is safe to use or display to a User. For example, a client name obtained from an X.509 certificate can be trusted, whereas a client name from the `client_metadata` parameter cannot. | ||
|
|
||
| It is recommended to use `client_metadata` parameters only for client-supplied parameters that can be used untrusted, for example, a public key. | ||
|
|
||
| Ecosystems can use other ecosystem-specific trusted data sources as long as they conduct a proper trust evaluation. |
There was a problem hiding this comment.
@jogu What specifically is the problem with the "it is recommended" text? Just that it reads as a normative statement?
And what about something like this:
| Wallet implementers need to choose a source of client metadata they can trust within their own ecosystem or implementation. This should determine whether it is safe to use or display to a User. For example, a client name obtained from an X.509 certificate can be trusted, whereas a client name from the `client_metadata` parameter cannot. | |
| It is recommended to use `client_metadata` parameters only for client-supplied parameters that can be used untrusted, for example, a public key. | |
| Ecosystems can use other ecosystem-specific trusted data sources as long as they conduct a proper trust evaluation. | |
| Ecosystems can define other ecosystem-specific trusted data sources in a profile as long as they conduct a proper trust evaluation. |
| Wallet implementers need to choose a source of client metadata they can trust within their own ecosystem or implementation. This should determine whether it is safe to use or display to a User. For example, a client name obtained from an X.509 certificate can be trusted, whereas a client name from the `client_metadata` parameter cannot. | ||
|
|
||
| It is recommended to use `client_metadata` parameters only for client-supplied parameters that can be used untrusted, for example, a public key. | ||
|
|
||
| Ecosystems can use other ecosystem-specific trusted data sources as long as they conduct a proper trust evaluation. |
There was a problem hiding this comment.
I think my concern was in the conflict between
It is recommended (for Wallet implementers) to use
client_metadataparameters...
and
Other metadata parameters MUST be ignored unless a profile <...>'
If the recommendation is scoped to profiles that's better. But maybe something like:
Profiles MAY define additional
client_metadataparameters for client-supplied parameters that can be used untrusted, for example, a public key.
(Pretty sure that can be improved upon)
|
@dpostnikov can you respond to reviews here before the WG calls this week? |
|
@dpostnikov we need your response to the comments and requests for changes |
Co-authored-by: Frederik Krogsdal Jacobsen <fkj@users.noreply.github.com> Co-authored-by: Joseph Heenan <joseph@heenan.me.uk> Co-authored-by: Lukasz Jaromin <lukasz.jaromin@raidiam.com>
dpostnikov
left a comment
There was a problem hiding this comment.
Apply suggestions from code review
Co-authored-by: Frederik Krogsdal Jacobsen fkj@users.noreply.github.com
Co-authored-by: Joseph Heenan joseph@heenan.me.uk
Co-authored-by: Lukasz Jaromin lukasz.jaromin@raidiam.com
|
|
||
| Wallet implementers need to choose a source of client metadata they can trust within their own ecosystem or implementation. This should determine whether it is safe to use or display to a User. For example, a client name obtained from an X.509 leaf certificate that chains to a trust anchor the Wallet trusts may be appropriate to be displayed to an End-User, whereas a client name from the `client_metadata` parameter is not suitable to display. | ||
|
|
||
| It is recommended to use `client_metadata` parameters only for client-supplied parameters that can be used untrusted, for example, a public key used to encrypt the response. |
There was a problem hiding this comment.
This uses a "recommended" which we should probably either avoid or capitalize.
Also, the example should be a new sentence.
There was a problem hiding this comment.
Applying Frederik's suggestion, plus also resolving my currently unresolved comment #735 (comment)
| It is recommended to use `client_metadata` parameters only for client-supplied parameters that can be used untrusted, for example, a public key used to encrypt the response. | |
| Profiles of this specification MAY define additional `client_metadata` parameters, as described in (#new_parameters). It is RECOMMENDED that such parameters are limited to client-supplied values that can safely be used without being trusted. One example of such a value is a public key used to encrypt the Authorization Response. |
|
|
||
| ## Source of Verifier Metadata | ||
|
|
||
| Wallet implementers need to choose a source of client metadata they can trust within their own ecosystem or implementation. This should determine whether it is safe to use or display to a User. For example, a client name obtained from an X.509 leaf certificate that chains to a trust anchor the Wallet trusts may be appropriate to be displayed to an End-User, whereas a client name from the `client_metadata` parameter is not suitable to display. |
There was a problem hiding this comment.
This uses a "should" which we should avoid here I think.
It's not really clear what the second sentence actually is intended to mean: "should" it determine or does it determine?
There was a problem hiding this comment.
This addresses both your points I think, as well as cleaning up a bit of terminology and simplifying wording:
| Wallet implementers need to choose a source of client metadata they can trust within their own ecosystem or implementation. This should determine whether it is safe to use or display to a User. For example, a client name obtained from an X.509 leaf certificate that chains to a trust anchor the Wallet trusts may be appropriate to be displayed to an End-User, whereas a client name from the `client_metadata` parameter is not suitable to display. | |
| Wallet implementers need to choose a source of Verifier metadata they can trust within their own ecosystem or implementation, including determining whether metadata is safe to use or display to an End-User. For example, a Verifier name obtained from an X.509 leaf certificate that chains to a trust anchor the Wallet trusts may be suitable to display to an End-User, whereas a Verifier name from the `client_metadata` parameter is not suitable to display. |
|
|
||
| It is recommended to use `client_metadata` parameters only for client-supplied parameters that can be used untrusted, for example, a public key used to encrypt the response. | ||
|
|
||
| Ecosystems can use other ecosystem-specific trusted data sources as long as they conduct a proper trust evaluation. |
There was a problem hiding this comment.
Suggestion that resolves that and my own ecosystem vs profiles point.
| Ecosystems can use other ecosystem-specific trusted data sources as long as they conduct a proper trust evaluation. | |
| Wallets MAY use other ecosystem-specific trusted sources of Verifier metadata, provided the Wallet is able to establish trust in those sources. As described in (#new_parameters), authoritative data obtained from such sources takes precedence over the values passed in the `client_metadata` parameter. |
|
|
||
| ## Source of Verifier Metadata | ||
|
|
||
| Wallet implementers need to choose a source of client metadata they can trust within their own ecosystem or implementation. This should determine whether it is safe to use or display to a User. For example, a client name obtained from an X.509 leaf certificate that chains to a trust anchor the Wallet trusts may be appropriate to be displayed to an End-User, whereas a client name from the `client_metadata` parameter is not suitable to display. |
There was a problem hiding this comment.
This addresses both your points I think, as well as cleaning up a bit of terminology and simplifying wording:
| Wallet implementers need to choose a source of client metadata they can trust within their own ecosystem or implementation. This should determine whether it is safe to use or display to a User. For example, a client name obtained from an X.509 leaf certificate that chains to a trust anchor the Wallet trusts may be appropriate to be displayed to an End-User, whereas a client name from the `client_metadata` parameter is not suitable to display. | |
| Wallet implementers need to choose a source of Verifier metadata they can trust within their own ecosystem or implementation, including determining whether metadata is safe to use or display to an End-User. For example, a Verifier name obtained from an X.509 leaf certificate that chains to a trust anchor the Wallet trusts may be suitable to display to an End-User, whereas a Verifier name from the `client_metadata` parameter is not suitable to display. |
|
|
||
| ## Source of Verifier Metadata | ||
|
|
||
| Wallet implementers need to choose a sources of client metadata they can trust within their own ecosystem or implementation. This should determine whether it is safe to use or display to a User. For example, a client name obtained from an X.509 leaf certificate that chains to a trust anchor the Wallet trusts may be appropriate to be displayed to an End-User, whereas a client name from the `client_metadata` parameter is not suitable to display. |
There was a problem hiding this comment.
Repeating my above suggestion as it needs applied here too:
| Wallet implementers need to choose a sources of client metadata they can trust within their own ecosystem or implementation. This should determine whether it is safe to use or display to a User. For example, a client name obtained from an X.509 leaf certificate that chains to a trust anchor the Wallet trusts may be appropriate to be displayed to an End-User, whereas a client name from the `client_metadata` parameter is not suitable to display. | |
| Wallet implementers need to choose a source of Verifier metadata they can trust within their own ecosystem or implementation, including determining whether metadata is safe to use or display to an End-User. For example, a Verifier name obtained from an X.509 leaf certificate that chains to a trust anchor the Wallet trusts may be suitable to display to an End-User, whereas a Verifier name from the `client_metadata` parameter is not suitable to display. |
|
|
||
| Wallet implementers need to choose a source of client metadata they can trust within their own ecosystem or implementation. This should determine whether it is safe to use or display to a User. For example, a client name obtained from an X.509 leaf certificate that chains to a trust anchor the Wallet trusts may be appropriate to be displayed to an End-User, whereas a client name from the `client_metadata` parameter is not suitable to display. | ||
|
|
||
| It is recommended to use `client_metadata` parameters only for client-supplied parameters that can be used untrusted, for example, a public key used to encrypt the response. |
There was a problem hiding this comment.
Applying Frederik's suggestion, plus also resolving my currently unresolved comment #735 (comment)
| It is recommended to use `client_metadata` parameters only for client-supplied parameters that can be used untrusted, for example, a public key used to encrypt the response. | |
| Profiles of this specification MAY define additional `client_metadata` parameters, as described in (#new_parameters). It is RECOMMENDED that such parameters are limited to client-supplied values that can safely be used without being trusted. One example of such a value is a public key used to encrypt the Authorization Response. |
|
|
||
| Wallet implementers need to choose a sources of client metadata they can trust within their own ecosystem or implementation. This should determine whether it is safe to use or display to a User. For example, a client name obtained from an X.509 leaf certificate that chains to a trust anchor the Wallet trusts may be appropriate to be displayed to an End-User, whereas a client name from the `client_metadata` parameter is not suitable to display. | ||
|
|
||
| It is recommended to use `client_metadata` parameters only for client-supplied parameters that can be used untrusted, for example, a public key used to encrypt the response. |
There was a problem hiding this comment.
Repeating my above suggestion as it needs applied here too:
| It is recommended to use `client_metadata` parameters only for client-supplied parameters that can be used untrusted, for example, a public key used to encrypt the response. | |
| Profiles of this specification MAY define additional `client_metadata` parameters, as described in (#new_parameters). It is RECOMMENDED that such parameters are limited to client-supplied values that can safely be used without being trusted. One example of such a value is a public key used to encrypt the Authorization Response. |
|
|
||
| It is recommended to use `client_metadata` parameters only for client-supplied parameters that can be used untrusted, for example, a public key used to encrypt the response. | ||
|
|
||
| Ecosystems can use other ecosystem-specific trusted data sources as long as they conduct a proper trust evaluation. |
There was a problem hiding this comment.
Suggestion that resolves that and my own ecosystem vs profiles point.
| Ecosystems can use other ecosystem-specific trusted data sources as long as they conduct a proper trust evaluation. | |
| Wallets MAY use other ecosystem-specific trusted sources of Verifier metadata, provided the Wallet is able to establish trust in those sources. As described in (#new_parameters), authoritative data obtained from such sources takes precedence over the values passed in the `client_metadata` parameter. |
| * `x509_san_dns`: When the Client Identifier Prefix is `x509_san_dns`, the original Client Identifier (the part after the `x509_san_dns:` prefix) MUST be a DNS name and match a `dNSName` Subject Alternative Name (SAN) [@!RFC5280] entry in the leaf certificate passed with the request. The request MUST be signed with the private key corresponding to the public key in the leaf X.509 certificate of the certificate chain added to the request in the `x5c` JOSE header [@!RFC7515] of the signed request object. The Wallet MUST validate the signature and the trust chain of the X.509 certificate. The following requirement applies unless the interaction is using the DC API as defined in (#dc_api): If the Wallet can establish trust in the Client Identifier authenticated through the certificate, e.g. because the Client Identifier is contained in a list of trusted Client Identifiers, it may allow the client to freely choose the `redirect_uri` value. If not, the FQDN of the `redirect_uri` value MUST match the Client Identifier without the prefix `x509_san_dns:`. Example Client Identifier: `x509_san_dns:client.example.org`. | ||
|
|
||
| * `x509_hash`: When the Client Identifier Prefix is `x509_hash`, the original Client Identifier (the part without the `x509_hash:` prefix) MUST be a hash and match the hash of the leaf certificate passed with the request. The request MUST be signed with the private key corresponding to the public key in the leaf X.509 certificate of the certificate chain added to the request in the `x5c` JOSE header parameter [@!RFC7515] of the signed request object. The value of `x509_hash` is the base64url-encoded value of the SHA-256 hash of the DER-encoded X.509 certificate. The Wallet MUST validate the signature and the trust chain of the X.509 leaf certificate. All Verifier metadata other than the public key MUST be obtained from the `client_metadata` parameter. Example Client Identifier: `x509_hash:Uvo3HtuIxuhC92rShpgqcT3YXwrqRxWEviRiA0OZszk` | ||
| * `x509_hash`: When the Client Identifier Prefix is `x509_hash`, the original Client Identifier (the part without the `x509_hash:` prefix) MUST be a hash and match the hash of the leaf certificate passed with the request. The request MUST be signed with the private key corresponding to the public key in the leaf X.509 certificate of the certificate chain added to the request in the `x5c` JOSE header parameter [@!RFC7515] of the signed request object. The value of `x509_hash` is the base64url-encoded value of the SHA-256 hash of the DER-encoded X.509 certificate. The Wallet MUST validate the signature and the trust chain of the X.509 leaf certificate. Example Client Identifier: `x509_hash:Uvo3HtuIxuhC92rShpgqcT3YXwrqRxWEviRiA0OZszk` |
There was a problem hiding this comment.
Add the missing fullstop (the 1.0 change already added this):
| * `x509_hash`: When the Client Identifier Prefix is `x509_hash`, the original Client Identifier (the part without the `x509_hash:` prefix) MUST be a hash and match the hash of the leaf certificate passed with the request. The request MUST be signed with the private key corresponding to the public key in the leaf X.509 certificate of the certificate chain added to the request in the `x5c` JOSE header parameter [@!RFC7515] of the signed request object. The value of `x509_hash` is the base64url-encoded value of the SHA-256 hash of the DER-encoded X.509 certificate. The Wallet MUST validate the signature and the trust chain of the X.509 leaf certificate. Example Client Identifier: `x509_hash:Uvo3HtuIxuhC92rShpgqcT3YXwrqRxWEviRiA0OZszk` | |
| * `x509_hash`: When the Client Identifier Prefix is `x509_hash`, the original Client Identifier (the part without the `x509_hash:` prefix) MUST be a hash and match the hash of the leaf certificate passed with the request. The request MUST be signed with the private key corresponding to the public key in the leaf X.509 certificate of the certificate chain added to the request in the `x5c` JOSE header parameter [@!RFC7515] of the signed request object. The value of `x509_hash` is the base64url-encoded value of the SHA-256 hash of the DER-encoded X.509 certificate. The Wallet MUST validate the signature and the trust chain of the X.509 leaf certificate. Example Client Identifier: `x509_hash:Uvo3HtuIxuhC92rShpgqcT3YXwrqRxWEviRiA0OZszk`. |
|
|
||
| It is recommended to use `client_metadata` parameters only for client-supplied parameters that can be used untrusted, for example, a public key used to encrypt the response. | ||
|
|
||
| Ecosystems can use other ecosystem-specific trusted data sources as long as they conduct a proper trust evaluation. |
There was a problem hiding this comment.
Repeating 1.0 suggestion from above:
| Ecosystems can use other ecosystem-specific trusted data sources as long as they conduct a proper trust evaluation. | |
| Wallets MAY use other ecosystem-specific trusted sources of Verifier metadata, provided the Wallet is able to establish trust in those sources. As described in (#new_parameters), authoritative data obtained from such sources takes precedence over the values passed in the `client_metadata` parameter. |

resolves #670