Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How does a credential issuer trust the wallet attestation issuer's public key? #101

Open
joelposti opened this issue May 6, 2024 · 5 comments

Comments

@joelposti
Copy link

Section 4.3.1. Wallet Attestation Schema defines that the wallet attestation issuer's (a.k.a. wallet provider's) public key is distributed using a mechanism defined in SD-JWT VC section 5. JWT VC Issuer Metadata. The mechanism is essentially:

  1. Download a JSON document from an HTTPS URL.
  2. Get a JWK key
    a. either by finding the key from the document's jwks.keys array
    b. or by downloading another JSON document from a JWKS endpoint referenced in the original document's jwks_uri field and finding the key from jwks.keys array in the second JSON document.

Presumably this key resolution is done by the credential issuer during the credential issuance process. What is lacking here is a trust model. How does the credential issuer trust the key presented in the first or the second JSON document? How does the credential issuer know that the wallet attestation is signed by a legitimate wallet provider?

ISO/IEC 23220-3 defines a similar wallet attestation schema and presents a certificate chain-based trust model in one of its wallet attestation examples. In the example the wallet provider's public key is distributed along with the wallet attestation by inserting a certificate with the public key to the wallet attestation's x5c header. I suppose the idea there is that the credential issuer has a CA certificate in its trust store and can thus establish trust to the wallet provider's certificate and public key via the CA certificate.

@paulbastian
Copy link
Collaborator

HAIP does not define the trust mechanism in general, and so the wallet attestation trust is not an exception to this. As you have written, JWT VC Issuer Metadata is a mechanism to retrieve a public key, not a trust mechanism. But so is x5c header as well in the ISO example?

Ultimatly, you need some form of trust mechanism (ETSI Trust list, OpenID Federation or EBSI?) to determine that a key is actually privileged to mean something in the ecosystems that we are building. Right now, as these things are not defined yet(!), the trust is implicit, meaning there must be an out-of-band/pre-registered trust connection between two parties.

I think in the very near future, we will see these trust mechanisms competing for the eIDAS throne.

@joelposti
Copy link
Author

joelposti commented May 7, 2024

Thank you for response!

As you wrote in your comment a trust model and a trust mechanism needs to be built on top HAIP. How easy that is depends partly on the foundations that HAIP and other underlying specfications lay out. The underlying specifications do have opinions regarding the trust mechanisms, at least indirectly. For example, let's consider the OAuth 2.0 Attestation-Based Client Authentication specification. It goes into quite a lot of detail in describing how trust in the wallet's public key is established. There are not that many ways one can build a trust mechanism on top of that specification. I think it's OK for the underlying specifications to have opinions regarding trust mechanisms. However, the specification should consider how easy or feasible it is to build a trust mechanism on top of the specification's foundations.

As you have written, JWT VC Issuer Metadata is a mechanism to retrieve a public key, not a trust mechanism. But so is x5c header as well in the ISO example?

X5c header can indeed be considered a key delivery mechanism but it also provides a framework for a trust mechanism. In other words, it's easy to imagine and design a trust mechanism on top of a wallet attestation that has an x5c header. I think it's less easy to work out a trust mechanism on top of a key delivery mechanism that is based on downloading unsigned JSON documents. That is the problem I am facing as a HAIP implementer. I want to follow the specification but I do not know how to solve the trust issue in an interoperable way with the building blocks the spec gives me.

@peppelinux
Copy link
Member

According to the last ARF version, both OpenID Federation and X.509 based PKI can be used for the satisfaction of the functional requirements of the infrastructure of trust

therefore, having an issued Wallet Instance Attestation, we have the following elements:

  • An Issuer unique identifier (eg: HTTPs URL)
  • Optionally, a trust chain (eg: X.509 certificate chain or OpenID Federation Trust Chain)

the benefit of using openid federation is that its trust chain carries also the metadata, the policies and the trust marks.
See: https://italia.github.io/eudi-wallet-it-docs/versione-corrente/en/wallet-attestation.html#table-wallet-attestation-claim

@Sakurann
Copy link
Contributor

yes, a trust model and a trust mechanism needs to be built on top HAIP. the HAIP intends to be silent on this exact question: "How does a credential issuer trust the wallet attestation issuer's public key?" maybe you have a PKI, or maybe you have obtained a root CA out of band, etc.

HAIP currently only allows x.509 or web-based key resolution. whether openid federation needs to be allowed is a separate issue.

Are there any specific suggestions how to make this clearer in the text? modify out of scope section? otherwise, would close as resolved.

@joelposti
Copy link
Author

joelposti commented Jun 17, 2024

yes, a trust model and a trust mechanism needs to be built on top HAIP. the HAIP intends to be silent on this exact question: "How does a credential issuer trust the wallet attestation issuer's public key?" maybe you have a PKI, or maybe you have obtained a root CA out of band, etc.

All right. I understand. If HAIP is to remain silent on the matter of trust models and mechanisms, would it be possible to reconsider the requirements in the section about the credential issuer key resolution mechanisms? It is interesting and seemingly inconsistent that the credential issuer can make use of either the web-based or the X.509-certficate-based mechanism while at the same time the wallet attestation issuer is limited to just the web-based one.

Also, maybe I am splitting hairs here, but the following rather specific requirements regarding the credential issuer's X.509-certificate-based mechanism seem to wander into the territory of trust mechanisms. The requirements go beyond the scope of key resolution and credential signature validation. The requirements do not seem to be in line with the idea that HAIP should remain silent about trust mechanisms.

https://openid.net/specs/openid4vc-high-assurance-interoperability-profile-sd-jwt-vc-1_0-00.html#section-7.1-2.2
x.509 certificates: the SD-JWT VC contains the issuer's certificate along with a trust chain in the x5c JOSE header. In this case, the iss value MUST be an URL with a FQDN matching a dNSName Subject Alternative Name (SAN) [RFC5280] entry in the leaf certificate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants