Internet-Draft | SCRAPI | December 2023 |
Birkholz, et al. | Expires 15 June 2024 | [Page] |
This document defines the SCITT REST API, an http interface to transparency services, supporting the primary operations needed to implement the SCITT Architecture [I-D.draft-ietf-scitt-architecture].¶
This note is to be removed before publishing as an RFC.¶
Source for this draft and an issue tracker can be found at https://github.com/ietf-scitt/draft-birkholz-scitt-scrapi.¶
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 15 June 2024.¶
Copyright (c) 2023 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
This API definition MAY be exposed externally as part of a suite of APIs, or be encapsulated internally and exposed indirectly via proprietart APIs.¶
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 SCITT REST API is designed to support identifier systems that are currently relevant to supply chains, including DID, x509 and PGP.¶
In order to support these systems, the API must be aware of specific header parameters, in particular, kid
, x5u
and x5c
.¶
The API enables implementers to deploy interoperable URIs for disclosing information feeds related to supply chain actors, and artifacts accessible via transparency services.¶
TBD (comments on OAuth / Client Attestation).¶
TBD (comments on GAIN / OIDC).¶
TBD (comments on URLs / QR Codes).¶
In cases where a signed statement is issued by one party and registered by another, there is a need to prove posession of key material and detect tampering while authenticating both parties.¶
Typically a nonce would be chosen by the transparency service and the second party would sign over the nonce, when registering the first issuer's signed statement.¶
In order to avoid interactivity and improve interoperability, document describes a non-exclusive, but mandatory to support, confirmation scheme¶
In this scheme the verifier's challenge is a recent unix timestamp, the presenting party need not request this information from the transparency service.¶
Here is an example key binding token that can be paired with the confirmation claim in a signed statement:¶
{ "iat": 1698077790, "aud": "https://transparency.example", "nonce": "1698077790" }¶
When applying registration policies to signed statements with confirmation, the transparency service acts as a verifier, and performs the following checks:¶
verify the integrity of the issuer's signed statement¶
confirm the verified content meets the registration policy for the transparency service.¶
verify the key binding token, using the confirmation claim in the verified issuer signed statement¶
ensure the key binding token has a nonce that is a string representation of a recent unix timestamp¶
The exact window of validity for proving possession is a configuration detail of the transparency service. unix timestamps are used so that only a losely synchronised notion of time need be assumed and there is no requirement to account for timezones¶
If the confirmation key is stolen, the attacker can produce key binding tokens from that point forward in time. In an interactive confirmation schema, the transparency service can force the confirmation key holder to produce a signature over a nonce that is not guessable, and this prevents certain attacks related to the duration of access to a signing capability and other timing details. However, the cost of coordinating with the transparency service, coupled with the purpose of registering with a transparency service (to obtain a receipt, proving a signed statement was acceptable at a point in time) justify specifying the recent timestamp nonce as a mandatory to implement context binding.¶
In the case that a SCITT transparency service wants to support challenges (nonces) that are context binding, the transparency service can expose a "challenge token endpoint".¶
This endpoint can process request paramters, and issuer a challenge token, that future regsitrations can use to bind to the original request. This interaction model works well for scenarios where requirements for a given regsitration might change over time, but it is important for the registering party to commit to acceptable values at the time that a signed statement is registered. These endpoints are optional to implement.¶
POST https://transparency.example/registration¶
Headers:¶
Content-Type: application/cose
¶
Body: SCITT COSE_Sign1 message¶
Note: that the challenge token MUST be present and integrity protected when submitting signed statements to this endpoint.
Note: this endpoint is a duplicate of POST https://transparency.example/entries
¶
All messages are sent as HTTP GET or POST requests.¶
If the Transparency Service cannot process a client's request, it MUST return an HTTP 4xx or 5xx status code, and the body SHOULD be a JSON problem details object ([RFC7807]) containing:¶
type: A URI reference identifying the problem. To facilitate automated response to errors, this document defines a set of standard tokens for use in the type field within the URN namespace of: "urn:ietf:params:scitt:error:".¶
detail: A human-readable string describing the error that prevented the Transparency Service from processing the request, ideally with sufficient detail to enable the error to be rectified.¶
Error responses SHOULD be sent with the Content-Type: application/problem+json
HTTP header.¶
As an example, submitting a Signed Statement with an unsupported signature algorithm would return a 400 Bad Request
status code and the following body:¶
{ "type": "urn:ietf:params:scitt:error:badSignatureAlgorithm", "detail": "Signing algorithm not support" }¶
Most error types are specific to the type of request and are defined in the respective subsections below. The one exception is the "malformed" error type, which indicates that the Transparency Service could not parse the client's request because it did not comply with this document:¶
Error code: malformed
(The request could not be parsed).¶
Clients SHOULD treat 500 and 503 HTTP status code responses as transient failures and MAY retry the same request without modification at a later date.
Note that in the case of a 503 response, the Transparency Service MAY include a Retry-After
header field per [RFC7231] in order to request a minimum time for the client to wait before retrying the request.
In the absence of this header field, this document does not specify a minimum.¶
POST https://transparency.example/entries¶
Headers:¶
Content-Type: application/cose
¶
Body: SCITT COSE_Sign1 message¶
One of the following:¶
Status 201 - Registration is successful.¶
Status 202 - Registration is running.¶
Status 400 - Registration was unsuccessful due to invalid input.¶
If 202 is returned, then clients should wait until Registration succeeded or failed by polling the Registration status using the Operation ID returned in the response. Clients should always obtain a Receipt as a proof that Registration has succeeded.¶
One of the following:¶
Status 200 - Registration is running¶
Status 200 - Registration was successful¶
Status 200 - Registration failed¶
Status 404 - Unknown Operation ID¶
If an operation failed, then error details SHOULD be embedded as a JSON problem details object in the "error"
field.¶
If an operation ID is invalid (i.e., it does not correspond to any submit operation), a service may return either a 404 or a running
status.
This is because differentiating between the two may not be possible in an eventually consistent system.¶
IANA is requested to register the URN sub-namespace urn:ietf:params:scitt
in the "IETF URN Sub-namespace for Registered Protocol Parameter Identifiers"
Registry [IANA.params], following the template in [RFC3553]:¶
Registry name: scitt Specification: [RFCthis] Repository: http://www.iana.org/assignments/scitt Index value: No transformation needed.¶
TODO: Register them from here.¶
For discovering scitt configuration.¶
TODO: Register them from here.¶
This section requests registration of the "application/receipt+cose" media type [RFC2046] in the "Media Types" registry in the manner described in [RFC6838].¶
TODO: Consider negotiation for receipt as "JSON" or "YAML". TODO: Consider impact of media type on "Data URIs" and QR Codes.¶
To indicate that the content is a SCITT Receipt:¶
Type name: application¶
Subtype name: receipt+cose¶
Required parameters: n/a¶
Optional parameters: n/a¶
Encoding considerations: TODO¶
Security considerations: TODO¶
Interoperability considerations: n/a¶
Published specification: this specification¶
Applications that use this media type: TBD¶
Fragment identifier considerations: n/a¶
Additional information:¶
Person & email address to contact for further information: TODO¶
Intended usage: COMMON¶
Restrictions on usage: none¶
Author: TODO¶
Change Controller: IESG¶
Provisional registration? No¶
Not ready to throw these texts into the trash bin yet.¶