|
| 1 | +# Trusting digital signatures in TEA |
| 2 | + |
| 3 | +Software transparency is a lot about trust. Within the |
| 4 | +API documents needs to be signed with an electronic |
| 5 | +signature. CycloneDX boms supports signatures within |
| 6 | +the JSON file, but other artefacts may need external |
| 7 | +signature files. |
| 8 | + |
| 9 | +- __Integrity__: Documents dowloaded needs to be the same |
| 10 | + as documents published |
| 11 | +- __Identity__: Customers needs to be able to verify the |
| 12 | + publisher of the documents and verify that it is |
| 13 | + the expected publisher |
| 14 | + |
| 15 | +In order to sign, a pair of asymmetric keys will be needed. |
| 16 | +The public key is used to create a certificate, signed |
| 17 | +by a certificate authority (CA). |
| 18 | + |
| 19 | +A software publisher may bye CA services from a commercial vendors |
| 20 | +or set up an internal solution. The issue with that is that external |
| 21 | +parties do not automatically trust that internal PKI. |
| 22 | + |
| 23 | +This document outlines a proposal on how to build that trust and |
| 24 | +make it possible for publishers to use an internal PKI. It is |
| 25 | +of course important that this PKI is maintained according to |
| 26 | +best current practise. |
| 27 | + |
| 28 | +## API trust |
| 29 | + |
| 30 | +The TEA API is built on the HTTP protocol with TLS encryption |
| 31 | +and authentication, using the https:// URL scheme. |
| 32 | + |
| 33 | +The TLS server certificate is normally issued by a public Certificate |
| 34 | +Authority that is part of the Web PKI. The client needs to validate |
| 35 | +the TLS server certificate to make sure that the certificate name |
| 36 | +(CN or Subject Alt Name) matches the host part of the URI. |
| 37 | + |
| 38 | +If the certificate validates properly, the API can be trusted. |
| 39 | +The server is the right server. This trust can be used to |
| 40 | +implement trust in a private PKI used to sign documents. |
| 41 | + |
| 42 | +## Getting trust anchors |
| 43 | + |
| 44 | +Much like the EST protocol, the TEA protocol can be used |
| 45 | +to download trust anchors for a private PKI. These are |
| 46 | +PEM-encoded certificates that are in one text file. |
| 47 | + |
| 48 | +The TEA API has a `/trust-anchors/` API that will download |
| 49 | +the current trust anchor APIs. This file is not signed, |
| 50 | +that would cause a chicken-and-egg problem. |
| 51 | + |
| 52 | +## Validating the trust anchors using DNSsec (DANE) |
| 53 | + |
| 54 | +## Digital signatures |
| 55 | + |
| 56 | +### Digital signatures as specified for CycloneDX |
| 57 | +"Digital signatures may be applied to a BOM or to an assembly within a BOM. CycloneDX supports XML Signature, JSON Web Signature (JWS), and JSON Signature Format (JSF). Signed BOMs benefit by providing advanced integrity and non-repudiation capabilities." |
| 58 | +https://cyclonedx.org/use-cases/#authenticity |
| 59 | + |
| 60 | + |
| 61 | +### External (deattached) digital signatures for other documents |
| 62 | + |
| 63 | +- indication of hash algorithm |
| 64 | +- indicator of cert used |
| 65 | +- intermediate cert and sign cert |
| 66 | + |
| 67 | +### Validating the digital signature |
| 68 | + |
| 69 | +## Using Sigstore for signing |
| 70 | + |
| 71 | +## Suggested PKI setup |
| 72 | + |
| 73 | +### Root cert |
| 74 | + |
| 75 | +#### Root cert validity and renewal |
| 76 | + |
| 77 | +### Intermediate cert |
| 78 | + |
| 79 | +#### Intermediate cert validity and renewal |
| 80 | + |
| 81 | +### Signature |
| 82 | + |
| 83 | +#### Time stamp services |
| 84 | + |
| 85 | +### DNS entry |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | +## References |
| 90 | + |
| 91 | +- IETF RFC DANE |
| 92 | +- IETF DANCE architecture (IETF draft) |
| 93 | +- IETF Digital signature |
| 94 | +- JSON web signatures (JWS) - https://datatracker.ietf.org/doc/html/rfc7515 |
| 95 | +- JSON signature format (JSF) - https://cyberphone.github.io/doc/security/jsf.html |
| 96 | +- [IETF Enrollment over Secure Transport (EST) RFC 7030](https://www.rfc-editor.org/rfc/rfc7030) |
0 commit comments