Skip to content

Security considerations for client_metadata parameters - #735

Open
dpostnikov wants to merge 5 commits into
mainfrom
dpostnikov-patch-3
Open

Security considerations for client_metadata parameters#735
dpostnikov wants to merge 5 commits into
mainfrom
dpostnikov-patch-3

Conversation

@dpostnikov

@dpostnikov dpostnikov commented Apr 27, 2026

Copy link
Copy Markdown
Collaborator

resolves #670

Comment thread 1.1/openid-4-verifiable-presentations-1_1.md Outdated
Co-authored-by: Frederik Krogsdal Jacobsen <fkj@users.noreply.github.com>
Comment thread 1.1/openid-4-verifiable-presentations-1_1.md
Comment on lines +1985 to +1989
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.

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 have to be careful not to conflict with this text:

Image

"It is recommended" probably needs to be reworded, and 'Ecosystems' we used 'profiles' in the other text.

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.

@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:

Suggested change
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.

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.

@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.

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.

@jogu Would be great to have some more detail on this.

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 my concern was in the conflict between

It is recommended (for Wallet implementers) to use client_metadata parameters...

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_metadata parameters for client-supplied parameters that can be used untrusted, for example, a public key.

(Pretty sure that can be improved upon)

Comment thread 1.1/openid-4-verifiable-presentations-1_1.md Outdated
@paulbastian

Copy link
Copy Markdown
Contributor

@fkj to re-review
@jogu please re-review
@c2bo @javereec to also add reviews

@fkj
fkj requested review from c2bo and javereec June 4, 2026 15:13
Comment thread 1.1/openid-4-verifiable-presentations-1_1.md Outdated
Comment thread 1.1/openid-4-verifiable-presentations-1_1.md Outdated
Comment on lines +1985 to +1989
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.

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.

@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:

Suggested change
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.

@fkj
fkj requested a review from jogu June 15, 2026 19:33
Comment on lines +1985 to +1989
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.

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 my concern was in the conflict between

It is recommended (for Wallet implementers) to use client_metadata parameters...

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_metadata parameters for client-supplied parameters that can be used untrusted, for example, a public key.

(Pretty sure that can be improved upon)

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

Copy link
Copy Markdown
Collaborator

@dpostnikov can you respond to reviews here before the WG calls this week?

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

Copy link
Copy Markdown
Collaborator

@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 dpostnikov left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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

@dpostnikov
dpostnikov requested review from fkj, jogu and lj-raidiam August 5, 2026 06:26
@dpostnikov
dpostnikov requested a review from brentzundel August 5, 2026 07:40

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.

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.

This uses a "recommended" which we should probably either avoid or capitalize.

Also, the example should be a new sentence.

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.

Applying Frederik's suggestion, plus also resolving my currently unresolved comment #735 (comment)

Suggested change
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.

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.

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?

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 addresses both your points I think, as well as cleaning up a bit of terminology and simplifying wording:

Suggested change
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.

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.

can -> MAY?

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.

Suggestion that resolves that and my own ecosystem vs profiles point.

Suggested change
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.

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 addresses both your points I think, as well as cleaning up a bit of terminology and simplifying wording:

Suggested change
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.

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.

Repeating my above suggestion as it needs applied here too:

Suggested change
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.

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.

Applying Frederik's suggestion, plus also resolving my currently unresolved comment #735 (comment)

Suggested change
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.

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.

Repeating my above suggestion as it needs applied here too:

Suggested change
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.

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.

Suggestion that resolves that and my own ecosystem vs profiles point.

Suggested change
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`

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.

Add the missing fullstop (the 1.0 change already added this):

Suggested change
* `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.

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.

Repeating 1.0 suggestion from above:

Suggested change
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.

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.

Retrieving all client metadata from client_metadata parameter seems too restrictive

8 participants