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

Updated Key Management Scenarios #38

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3a7100a
Create keymanagementscenarios.md
NiazFK Jun 22, 2020
4a7ceb5
Update keymanagementscenarios.md
NiazFK Jul 10, 2020
c63d2fc
Update keymanagementscenarios.md
NiazFK Jul 17, 2020
54891ae
Update keymanagementscenarios.md
NiazFK Jul 19, 2020
9b31852
Update keymanagementscenarios.md
NiazFK Jul 20, 2020
51d87a1
Update keymanagementscenarios.md
NiazFK Jul 20, 2020
c9267a7
Merge pull request #1 from notaryproject/main
NiazFK Sep 25, 2020
cde4090
Architecture Diagrams
NiazFK Sep 25, 2020
4cd9fba
Update keymanagementscenarios.md
NiazFK Oct 2, 2020
3972977
Update keymanagementscenarios.md
NiazFK Oct 2, 2020
aa67584
Update keymanagementscenarios.md
NiazFK Oct 2, 2020
27ed427
Update keymanagementscenarios.md
NiazFK Oct 26, 2020
1a644da
Update keymanagementscenarios.md
NiazFK Nov 2, 2020
f7b0e46
Update keymanagementscenarios.md
NiazFK Nov 2, 2020
0706e40
Update keymanagementscenarios.md
NiazFK Feb 8, 2021
f59d01b
Update keymanagementscenarios.md
NiazFK Feb 8, 2021
7b00536
Update keymanagementscenarios.md
NiazFK Mar 3, 2021
3cd4c0c
Update and rename keymanagementscenarios.md to keymanagementrequireme…
NiazFK Mar 8, 2021
d3155e2
Update keymanagementrequirements.md
NiazFK Mar 8, 2021
0a04b10
Update keymanagementrequirements.md
NiazFK Apr 9, 2021
2cbcaac
Update keymanagementrequirements.md
NiazFK Apr 9, 2021
c694f26
Update keymanagementrequirements.md
NiazFK Apr 16, 2021
7050a8b
Update keymanagementrequirements.md
NiazFK Apr 16, 2021
8aa13a6
Update keymanagementrequirements.md
NiazFK Apr 16, 2021
59ff813
Update keymanagementrequirements.md
NiazFK Apr 22, 2021
edaf816
Update keymanagementrequirements.md
NiazFK Apr 23, 2021
72f6936
Update keymanagementrequirements.md
NiazFK Apr 23, 2021
5d77d98
Merge pull request #2 from NiazFK/NiazFK-draftchanges
NiazFK Apr 23, 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
51 changes: 51 additions & 0 deletions keymanagementrequirements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Overview
Key management for container signing can be broadly categorized into three general use cases:
Copy link
Contributor

Choose a reason for hiding this comment

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

Key management for container signing

Key management for artifact signing

- Key Setup/Signing (Key managment and integrations with client tooling for generating signatures.)
NiazFK marked this conversation as resolved.
Show resolved Hide resolved
- Trust store configuration (Configuring which keys to trust for artifacts from a predefined source.)
- 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.
NiazFK marked this conversation as resolved.
Show resolved Hide resolved
- 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.
Copy link
Contributor

Choose a reason for hiding this comment

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

while we tend to think of enterprises in our cloud business, just suggesting we use less "big business" terms.

This sentence works well without the (i.e. teams or enterprises)

+1 on the clarification of builders are developers and build hosts to indicated human and systems identities.

- 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.
NiazFK marked this conversation as resolved.
Show resolved Hide resolved
- 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.
Copy link
Contributor

Choose a reason for hiding this comment

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

(i.e. teams or enterprises)

- 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.
NiazFK marked this conversation as resolved.
Show resolved Hide resolved
- 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.
Copy link
Contributor

Choose a reason for hiding this comment

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

There's a repo concept, and collection of repo concept where a collection of repos may live below a root repo.
This is akin to the docker hub "org" concept.

docker.io/org/repo

In this case, a user may want to configure something at their org level, or the repo level.

I'm not sure we need to change anything here, but wanted to highlight this could represent a hierarchy where the repository may represent a single repo, or a collection of repos below the repo.


## 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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Could organizations be the community-friendly replacement for enterprises

- 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 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 source (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.
Copy link
Contributor

Choose a reason for hiding this comment

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

(any source, specific registry, specific repository, or specific target)

What does target imply here?

- Trust Store Key Information: The key information configured in the trust store will be cryptographically verifiable and contain:
- 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.
- Mechanism to update validity of signatures generated with the signing key.

NiazFK marked this conversation as resolved.
Show resolved Hide resolved
## 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.
NiazFK marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add a requirement for:

A user MUST be able to pull the signature and validate the content before pulling the content?

This would mitigate trojan horse attacks where the content must be pulled and only later do they determine the content is problematic.

Copy link
Contributor

Choose a reason for hiding this comment

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

Pulling and validating the signature first then pull the content is beneficial in terms of engineering for saving network bandwidth.

However, in some scenarios where the client just want to dump / archive the content and signatures without any validation, they can pull in any order.

Copy link
Contributor

@SteveLasker SteveLasker Apr 15, 2021

Choose a reason for hiding this comment

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

@shizhMSFT, is there something about the addition of...

A user MUST be able to pull the signature and validate the content before pulling the content?

... that conflicts with the ability to pull the content and signatures? The note above is more related to assuring the signatures are separable from the content, so we can verify the signature before the content. It's not meant to imply a user can't pull content and signatures, just they must be separable.

- 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.
- Moving an artifact from one repository to another SHOULD NOT invalidate the signature on the artifact.
NiazFK marked this conversation as resolved.
Show resolved Hide resolved
- 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.
NiazFK marked this conversation as resolved.
Show resolved Hide resolved
- Trust stores MUST be configurable by the deployer admin.
NiazFK marked this conversation as resolved.
Show resolved Hide resolved
- Deployer admins MUST be able to configure trusted entities for individual repositories and targets.
NiazFK marked this conversation as resolved.
Show resolved Hide resolved
- Deployers MUST be able to validate signatures on any version of an artifact including whether they have been revoked by the publisher.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggest SHOULD as we make revocation an optional element.

Copy link
Contributor

Choose a reason for hiding this comment

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

Revocation is optional for the publisher, but if there is a revocation made, the deployer MUST be able to see that it was revoked (they may choose to ignore this fact, but they should see it first).

- Signature validation MUST be enforceable in air-gapped environments.
Copy link
Contributor

Choose a reason for hiding this comment

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

+1

We might want to state an obvious here.

Signature validation MUST be enforceable in air-gapped environments.

Signature validation MUST be enforceable in air-gapped environments without any external access.

This accounts for the TSA goals, where the TSA can be verified in the air-gapped environment, as the TSA keys are capable of being copied to the Air-gapped environment.


## Requirements that need further discussion
Copy link
Contributor

Choose a reason for hiding this comment

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

Everything above looks solid, with minor nits in wording.

In the spirit of getting agreed content merged, should content above be merged, with content below re-submitted as a separate PR or discussion?

- Signature/Key Expiry
- Root key auto rotation
- Signature allow list/deny list (trusted updates/revocation list)

## Prototype Stages
NiazFK marked this conversation as resolved.
Show resolved Hide resolved
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.