tektoncd / tektoncd/chains

[rfc] Separate Chains controller system and userspace identities.

Open
#968 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
277
Forks
164
Avg merge
2d 3h
Merged PRs (30d)
61

Description

Writing down some thoughts that have been rattling in my head for a bit. Please leave any feedback + comments!

/cc @lcarva @chitrangpatel for explicit feedback, but feedback welcome from everyone.

tl;dr: I think we should separate Chains into 2 separate service account identities: trusted build provenance attestations and untrusted userspace signing.

Background

Chains today will sign 2 types of things:

  • Build (i.e. Run) Provenance that it generates itself
  • OCI images specified in Run output by user pipelines.

Today, we run Chains in a single reconciler with a single service account and single config - this means that the same key/identity that is used to sign build provenance is also used to sign OCI refs that users output from their pipelines.

This can make it hard to reason about the trust boundary of things Chains signs - especially if clients choose to do unexpected things like have Chains sign an "OCI image" that is actually another provenance document, or something that wasn't actually output by the Pipeline.

Proposal

Split the trust boundary into 2 parts separated by service account:

  • tekton-chains (existing service account): service account that outputs trusted system-generated provenance.
  • tekton-chains-userspace: service account that outputs "untrusted" (really depends on how much you trust the underlying pipelines) userspace derived signatures.

By separating by service account, we can guarantee distinct identities even with use of keyless signing. The consequence of this means that the controller will need to be split into 2 deployments/configs/etc. (one for each service account), though this also opens up a bunch of possibilities for different Chains deployments such as having a cluster-wide build provenance config (tekton-chains) and configurable namespace/tenant configs (tekton-chains-userspace).

Alternatives
  • Remove OCI signing from chains and recommend everyone to sign in their Runs - I think there's value in having the auto-sign behavior, even if it doesn't give you as much metadata as signing within the build itself. I'd like to avoid this.
  • Keep things as they are - This is going to be a problem for deployments where the Chains operators don't trust the user pipelines (this came up in a recent Slack thread). I think we need some answer.
  • Same controller/service account, different configs / keys - This won't work for keyless signing, since they'd have the same identity.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the keyless-signing section of docs/sigstore.md and the proposal's trust-boundary discussion. No implementation files or tests are named; the issue is an RFC, so progress requires deciding whether the two-service-account controller design is accepted and defining its deployment and configuration scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.