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

Adding cleaned up version of key management requirements #67

Merged
merged 28 commits into from
Sep 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
684ccb0
Create keymanagementscenarios.md
NiazFK Jun 22, 2020
f727c70
Update keymanagementscenarios.md
NiazFK Jul 10, 2020
aceaa7b
Update keymanagementscenarios.md
NiazFK Jul 17, 2020
6e997da
Update keymanagementscenarios.md
NiazFK Jul 19, 2020
25ea164
Update keymanagementscenarios.md
NiazFK Jul 20, 2020
3ab610e
Update keymanagementscenarios.md
NiazFK Jul 20, 2020
053c97f
Architecture Diagrams
NiazFK Sep 25, 2020
7e7b404
Update keymanagementscenarios.md
NiazFK Oct 2, 2020
d4ed3cf
Update keymanagementscenarios.md
NiazFK Oct 2, 2020
b0f8718
Update keymanagementscenarios.md
NiazFK Oct 2, 2020
a5fe2a7
Update keymanagementscenarios.md
NiazFK Oct 26, 2020
388c9eb
Update keymanagementscenarios.md
NiazFK Nov 2, 2020
7808ca7
Update keymanagementscenarios.md
NiazFK Nov 2, 2020
203856d
Update keymanagementscenarios.md
NiazFK Feb 8, 2021
dc5790e
Update keymanagementscenarios.md
NiazFK Feb 8, 2021
c1bba8b
Update keymanagementscenarios.md
NiazFK Mar 3, 2021
c9cdf3a
Update and rename keymanagementscenarios.md to keymanagementrequireme…
NiazFK Mar 8, 2021
acd25cf
Update keymanagementrequirements.md
NiazFK Mar 8, 2021
16fc214
Update keymanagementrequirements.md
NiazFK Apr 9, 2021
6c7c202
Update keymanagementrequirements.md
NiazFK Apr 9, 2021
4cd1eb3
Update keymanagementrequirements.md
NiazFK Apr 16, 2021
269140c
Update keymanagementrequirements.md
NiazFK Apr 16, 2021
6157b48
Update keymanagementrequirements.md
NiazFK Apr 16, 2021
4fcb03d
Update keymanagementrequirements.md
NiazFK Apr 22, 2021
928d70b
Update keymanagementrequirements.md
NiazFK Apr 23, 2021
7d00034
Update keymanagementrequirements.md
NiazFK Apr 23, 2021
7a6e9d5
Moving links to issues
NiazFK Apr 30, 2021
2c04195
Updated with proper JSON.
NiazFK Jul 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions keymanagementrequirements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Overview
Key management for container signing can be broadly categorized into three general use cases:
- Key Setup/Signing (Key managment and integrations with client tooling for generating signatures.)
- Deployment configurations (Configuring trust policies and which keys to trust for artifacts.)
- Signature Validity (Expiry, Revocation and/or Trusted Update List. Mechanism to update information on the validity of signatures.)

## Personas:
- Publisher: User who builds and signs containers.
- Publisher Admin: In some scenarios a publisher will include a group of users (i.e. teams or enterprises). Admin users (i.e. security administrator) will be responsible for configuring roots, provide access to use or generate delegate keys, and make decisions for key revocation.
- Publisher Builder: In some scenarios a publisher will include a group of users (i.e. teams or enterprises). Builders (i.e. developers, build hosts) will be responsible for creating artifacts.
- Publisher Signer: In some scenarios a publisher will include a group of users (i.e. teams or enterprises). Signers (i.e. developers, signing hosts) will be responsible for signing artifacts.
- Deployer: User who deploys containers.
- Deployer Admin: In some scenarios a deployer will include a group of users (i.e. teams or enterprises). Admin users (i.e. security administrators) will be responsible for configuring deployment policies, including potentially a set of trusted roots or required signatures.
- Deployer Operator: In some scenarios a publisher will include a group of users (i.e. teams or enterprises). Operators (i.e. developers, deployment hosts) will be responsible for pulling container images from registries, verifying their signatures, and then running them.
- Repository Owner: In some scenarios a container may be stored in a repository that is managed by the repository owner. The repository may be public or private and could also be air-gapped.

## Definitions:
- Root key: A self signed key used for the lowest designation of trust. Root keys can be created by developers, organizations, public/private CAs, and registry operators. The root key should be retrieved from a trusted source that can establish the authenticity of the creator's identity.
- Signing key: A signing key is used to generate artifact signatures. A signing key should be signed with a root key or one of its intermediaries. The certificate chain with a signing key can be used to verify which root it belongs to. While a root key can be used as a signing key, this is not recommended as it creates a large blast radius and increases the risk of compromising a root key.
- Trust Policy: The trust policy defines whether to enable signature validation and which checks need to be run. An example trust policy:
```
{
"trustPolicy": {
"signatureCheck": true,
"optionalChecks": {
"signatureExpiry": true,
"signatureRescinded": false
},
"trustStore": [
"truststore.json",
{
"trustedRoots": [{
"root": "test.crt"
}]
}
NiazFK marked this conversation as resolved.
Show resolved Hide resolved
],
"trustedArtifacts": []
}
}
```
- Trust Store: The trust store defines the relationship between signing keys and artifacts that are used at validation time to determine whether to trust an artifact with a crytptographically valid signature. The trust store will relate a scope (any source, specific registry, specific repository, or specific target) with a certificate (for root key, intermediate, or signing key) or key repository (for automated key distribtuion). It is not recommended to use a signing key as this will cause signature validation to fail if the signing key is rotated. An example trustStore where the first root is trusted for artifacts from any registry and the second root is only trusted for artifacts from "registry.wabbit-networks.io" :
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would make more sense to me to have "scope" moved into the trust policy rather than the trust store. Leaving the trust store as simply a set of named keys. The policy could then be used to define things like permitted registry mirrors, or fine grained scopes for specific public keys in the trust store.

```
{
"trustedRoots": [{
"root": "-----BEGIN CERTIFICATE-----examplecertificate-----END CERTIFICATE-----"
},
{
"root": "-----BEGIN CERTIFICATE-----examplecertificate-----END CERTIFICATE-----",
"scope": "registry.wabbit-networks.io"
}
]
}
```
- Trust Store Key Information: The key information configured in the trust store will be cryptographically verifiable and contain:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make policies on keys in the trust store, I think it may help to include a client configurable name for the key. E.g. I may name one key "Docker Hub" and another "GCR", and configure my trust policies with just that name.

- Public Key: Will be used to verify signed artifacts.
- Signed Identity: Identity of creator of the signing key.
- (Optional) Issuer: If the key is an intermediate this will describe the owner of the root.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to see more definition on what it means to "describe the owner of the root". I'm looking for something that can't be easily broken by a bad key (e.g. a lone developer makes their key claim to be the root for all of Docker Hub to make their local mirror work, and doesn't realize how a user configurable field in their key breaks other notary clients). Will this reference point to another key in the trust store? Would it make sense to simply include the full certificate chain any time a key other than a root is added to the store?

- (Optional) Mechanism to check whether signatures generated with the signing key have been rescinded.

## Requirements
- Signing an artifact MUST NOT require the publisher to perform additional actions with a registry/repository or registry operator. Uploading a signature MAY require additional actions.
- Retrieving a signature MUST NOT require the deployer to perform additional actions with a registry/repository or registry operator beyond those required to pull an unsigned artifact.
- Artifact integrity, source, and signature expiry MUST be verifiable from the signature AND NOT require additional calls to the registry/repository.
- Signature allow list/deny list MAY require additional calls that will be defined in a separate document.
- Copying an artifact from one repository to another SHOULD NOT invalidate the signature on the artifact.
- Publishers SHOULD be able to sign with keys stored on their local machines, secure tokens, Hardware Security Modules (HSMs), or cloud based Key Management Services.
- Publishers SHOULD be able to generate multiple signatures for a single artifact.
- Publisher admins MUST have a mechanism to revoke signatures to indicate they are no longer trusted.
- Trust stores MUST be configurable by the deployer admin.
- Deployer admins MUST be able to configure trusted entities for individual repositories and targets.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add something along the lines that "Deployer MUST be able to trust a signing key with a certificate chain that leads to a trusted root or intermediate certificate according to the trust policy". We're still missing the detail of how to communicate that certificate chain (e.g. does it get pushed to the registry with the signing artifact, along side the signature, or from an external discovery system).

- Deployers MUST be able to validate signatures on any version of an artifact including whether they have been revoked by the publisher.
- Signature validation MUST be enforceable in air-gapped environments.

## Prototype Stages
1. Signature generation for each of the key storage scenarios. A succesful prototype should enable signing with keys on each of the following: local host, secure tokens, Hardware Security Modules (HSMs), and cloud based Key Management Services.
2. Trust store configuration and signature source validation in runtime environments. A succesful prototype should enable configuring a trust store in a runtime environment. The prototype should validate signatures from a trusted source and reject signatures from a source that is not listed. The prototype will not check for other aspects of signature validity (expiry/revocation).
3. Key rotation. A succesful prototype should meet all requirements from the key rotation document.
4. Signature/Key Expiration. A succesful prototype should meet all requirements from the signature/key expiry document.
5. Signature allowlist/denylist. A succesful prototype should meet all requirements from the signatur allowlist/denylist document.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/nv2-keymgmt-architecture-pull-v1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/nv2-keymgmt-architecture-sign-v1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.