Internet-Draft VP Verifier October 2024
Steele Expires 14 April 2025 [Page]
Workgroup:
Network Working Group
Internet-Draft:
draft-steele-vp-verifier-latest
Published:
Intended Status:
Informational
Expires:
Author:
O. Steele
Transmute

VP Verifier

Abstract

This document describes a protocol for exchanging Verifiable Presentations using HTTP.

About This Document

This note is to be removed before publishing as an RFC.

The latest revision of this draft can be found at https://OR13.github.io/draft-steele-vp-verifier/draft-steele-vp-verifier.html. Status information for this document may be found at https://datatracker.ietf.org/doc/draft-steele-vp-verifier/.

Source for this draft and an issue tracker can be found at https://github.com/OR13/draft-steele-vp-verifier.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on 14 April 2025.

Table of Contents

1. Introduction

The Verifiable Credentials (VC) data model is described in [W3C-VC], and securing mechanisms based on JOSE and COSE are described in [Secure-VC].

Verifiable Presentations (VP) are described in both [W3C-VC] and [Secure-VC].

Although HTTP based protocols exist for making Verifiable Presentations, such as [OpenID4VP], they are encumbered by the conventions and history of OAuth and the experience needed to deploy OpenID successfully.

This document describes an HTTP API for VP Verifiers, that provides interoperability while limiting normative dependencies, optionality and excessive cryptographic agility.

The API this document specifies is designed with priority for use by organizations or businesses that need to exchange presentations with other organizations or governments.

Although this API describes HTTP resources which require authentication, a specific authentication mechanism is not specified.

2. Conventions and Definitions

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

The terms issuer, subject and holder are defined in [W3C-VC].

The terms iat, exp, aud, are defined in [RFC7519].

The term nonce is defined in [RFC9449].

The term cnf is defined in [RFC7800].

The term ES256 is a digital signature algorithm described in Section 3.4 of [RFC7518].

This document uses "..." to ellide text in examples for readability.

3. Mandatory to Implement

Although [Secure-VC] describes several different media types, and each media type can be secured with many different signing or encryption algorithms, this documents specifies the following as mandatory to implement:

The following media types MUST be supported as JWT Claim Sets in the request body of the presentation API:

The following media types MUST be supported as Enveloped Credentials in presentation JWT Claim Set:

The following JSON Web Signature algorithms MUST be supported:

This document might be updated in the future to support additional media types or signing algorithms.

4. Verifier Resources

4.1. Presentations

The /presentations resource describes the collection of verifiable presentations associated with a verifier.

This collection supports creating resources.

4.1.1. Create

Creating a verifiable presentation requires several individual steps to be completed.

The requirements for implementing Verifiable Presentations as described in [W3C-VC] and [Secure-VC] in ways that support both credential confirmation and replay attack protection are not well defined at the time this document was written.

Not all credentials will support confirmation, but all presentations can be made to mitigate replay attacks.

The following text describes a simple flow that cannot support confirmation or mitigate replay attacks, which is improved upon in the subsequent section.

First the holder needs to gather all the verifiable credentials that need to be presented, and to construct a Verifiable Presentation that includes them.

Note that each verifiable credential in application/vc+jwt format is encoded as a data URI as described in [RFC2397].

Next the holder signs the presentation to produce a JWT of content type application/vp+jwt.

The following informative example displays a decoded verifiable presentation:

{
  "typ": "vp+jwt",
  "alg": "ES256",
  "kid": "https://example.gov/keys/42"
}.{
  "@context": [
    "https://www.w3.org/ns/credentials/v2",
  ],
  "type": "VerifiablePresentation",
  "holder": "https://example.gov",
  "verifiableCredential": [{
    "@context": ["https://www.w3.org/ns/credentials/v2"],
    "type": ["EnvelopedVerifiableCredential"],
    "id": "data:application/vc+jwt,eyJraW..."
  }]
}
Figure 1: A Verifiable Presenation

Next the holder uses an http client to submit this verifiable presentation to a verifier:

Request:

POST /presentations HTTP/1.1
Host: example.gov
Authorization: Bearer ey...
Content-Type: application/vp+jwt
Accept: application/json

eyJhbGciOiJFZE...

Response:

HTTP/1.1 200 OK
Content-Type: application/json

{
  ...
}

Figure 2: Submitting a Verifiable Presentation

The server MUST authenticate the client submitting the presentation. The server SHOULD verify the presentation asynchronously, but MAY return verification status in response to a presentation submission.

The submission of presentation tokens and enveloped verifiable credentials is subject to replay attacks. The following section is dedicated to discussing the submission of presentations with replay protection and of credentials with confirmation methods.

4.1.1.1. Interactive Presentations

Verifiers who wish to be assured that a holder making a presentation still controls a specific cryptographic key, or who wish to receive presentations of credentials that include confirmation need to support interactive presentation submission.

An interactive presentation starts with a holder requesting a nonce from the verifier:

Request:

POST /nonce HTTP/1.1
Host: example.gov
Content-Length: 0
Authorization: Bearer ey...
Accept: application/json

Response:

HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store

{
  "c_nonce": "wKI4LT17ac15ES9bw8ac4",
  "c_nonce_expires_in": 120
}

Figure 3: Requesting a Nonce

The holder then signs this nonce, to produce a confirmation token:

{
  "typ": "...+jwt",
  "alg": "ES256",
  "kid": "..."
}.{
  "aud": "https://example.gov",
  "iat": 1701960444,
  "exp": 1701960555,
  "nonce": "LarRGSbmUPYtRYO6BQ4yn8"
}
Figure 4: Confirmation Token

The example above is informative. The structure of a confirmation token is credential type specific.

This process is repeated for each credential that contains a confirmation method, using the key or identifier the confirmation method (cnf) specifies. Each confirmation token is then embedded in a Verifiable Presentation next to the credential that requires it.

Finally the holder then signs the nonce and audience, as part of their production of the application/vp+jwt:

For example:

{
  "typ": "vp+jwt",
  "alg": "ES256",
  "kid": "https://example.gov/keys/42"
}.{
  "@context": [
    "https://www.w3.org/ns/credentials/v2",
  ],
  "type": "VerifiablePresentation",
  "holder": "https://holder.example.gov",
  "aud": "https://verifier.example.gov",
  "nonce": "LarRGSbmUPYtRYO6BQ4yn8",
  "verifiableCredential": [{
    "@context": ["https://www.w3.org/ns/credentials/v2"],
    "type": ["EnvelopedVerifiableCredential"],
    "id": "data:application/vc+jwt,eyJraW..."
  },{
    "@context": ["https://www.w3.org/ns/credentials/v2"],
    "id": "data:application/...+jwt,eyJraW..."
  }]
}
Figure 5: A Verifiable Presenation for an Audience

In the example above, we assume that the second element of "verifiableCredential" contains a data uri that includes the confirmation token for the credential in the first element.

This structure allows verifiers who usually process confirmation tokens along with credentials in JWT format, to receive both the credential and the confirmation token in a single signed presentation request.

In the case that additional status information needs to be presented by the holder to the verifier, such as a status list or status assertion, those credentials can be presented along with the other credentials embedded in the signed presentation.

It is worth noting that some credential formats such as application/vc+sd-jwt or application/vc+cose can transport confirmation tokens alongside or inside the original credential.

Future revisions to this document might describe how to submit verifiable presentations that rely on structured suffixes other than +jwt.

5. Security Considerations

5.1. Private Keys

It is important to protect the signing key used to issue presentations, as well as any confirmation keys associated with the credentials. It is RECOMMENDED that all private keys be initialized such that they cannot be exported.

5.2. Authorization

HTTP Clients that submit verifiable presentations MUST be authenticated. A client may submit credentials related to or bound to many different subjects. A full description of policy for verifying presentations from holders is beyond the scope of this document.

5.3. HTTPS

HTTPS MUST be used with all resources described in this document. Verifiers MUST support at least TLS 1.3 or a more recent version.

6. IANA Considerations

This document has no IANA actions.

7. References

7.1. Normative References

[RFC2119]
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/rfc/rfc2119>.
[RFC2397]
Masinter, L., "The "data" URL scheme", RFC 2397, DOI 10.17487/RFC2397, , <https://www.rfc-editor.org/rfc/rfc2397>.
[RFC7518]
Jones, M., "JSON Web Algorithms (JWA)", RFC 7518, DOI 10.17487/RFC7518, , <https://www.rfc-editor.org/rfc/rfc7518>.
[RFC7519]
Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token (JWT)", RFC 7519, DOI 10.17487/RFC7519, , <https://www.rfc-editor.org/rfc/rfc7519>.
[RFC7800]
Jones, M., Bradley, J., and H. Tschofenig, "Proof-of-Possession Key Semantics for JSON Web Tokens (JWTs)", RFC 7800, DOI 10.17487/RFC7800, , <https://www.rfc-editor.org/rfc/rfc7800>.
[RFC8174]
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, , <https://www.rfc-editor.org/rfc/rfc8174>.
[RFC9449]
Fett, D., Campbell, B., Bradley, J., Lodderstedt, T., Jones, M., and D. Waite, "OAuth 2.0 Demonstrating Proof of Possession (DPoP)", RFC 9449, DOI 10.17487/RFC9449, , <https://www.rfc-editor.org/rfc/rfc9449>.
[Secure-VC]
"Securing Verifiable Credentials using JOSE and COSE", n.d., <https://www.w3.org/TR/vc-jose-cose/>.
[W3C-VC]
"Verifiable Credentials Data Model v2.0", n.d., <https://www.w3.org/TR/vc-data-model-2.0/>.

7.2. Informative References

[OpenID4VP]
OpenID Foundation, "OpenID for Verifiable Presentations", n.d., <https://openid.net/specs/openid-4-verifiable-presentations-1_0.html>.

Acknowledgments

TODO acknowledge.

Author's Address

Orie Steele
Transmute