-
Notifications
You must be signed in to change notification settings - Fork 21
Description
DRAFT
Pack Signing Motivation
This is a proposal to make cpackget installation more secure through pack signing by tackling the following top use cases:
- Integrity: make sure a pack has not been altered during its transport
- Authenticity: make sure a pack supposed to be issued by a Vendor is really coming from Vendor
- Access Control: accept some packs only if they are coming from some vendors
Design
The fundamental idea is to use keys signed by PKI/x509 certificates to sign packs and be later on validated by cpackget.
Each vendor would be responsible for generating their Root CA, then generate sub-certificates depending on their needs. Example:
- ARM Root CA
1.1. MCU Group Cert
1.1.1. Joachim Krech's Cert - ST Root CA
2.1. Software Center Cert
2.1.1. Le Mans Cert
2.1.1.1. Frederic Ruelle Cert - NXP Root CA
3.1. Bob Cert
Aspects of the approach:
- All Root CA will be shipped in cpackget's secure store of certs (customizable).
- If Frederic Ruelle signed a pack with his key, cpackget can:
2.1. Check integrity by checking the signature file and the original pack file
2.2. Validate its authenticity because it has been signed by MCU Group Cert which has been signed by ARM Root CA, present in the certs store.
2.3. Optionally check access control by matching the key's cert against the specific Root CA. - Because keys and certs can be revoked at any time, the public key should not have any reference in the pdsc file.
- Cpackget can be told on the behavior when checking a pack signature via cmdline args, such as
--ignore-validity-dateor--ignor-ownership
Q&A
The following questions have been asked during discussion of this proposal:
Q1: How to ensure that the pack file has not been modified?
The signature file is just an encrypted hash sum of the pack file, so during signature checking, the hash of the pack will be re-generated and compared against the one embedded in the signature file.
Q2: How to ensure that the pack was created by the vendor?
Because of the nature of X.509 certs, it's possible to track a signing key up to its original ROOT CA. All Root CAs should be in a secure store trusted by cpackget.
Q3: If a pack was signed by a key that is no longer valid, is there a solution without re-signing all packs signed with that key?
No, re-signing is required because the key is no longer trusted by cpackget.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status