Skip to content

docs: support registry-level scopes in trust policy - #330

Open
rgnote wants to merge 2 commits into
notaryproject:mainfrom
rgnote:registry-scopes-289
Open

docs: support registry-level scopes in trust policy#330
rgnote wants to merge 2 commits into
notaryproject:mainfrom
rgnote:registry-scopes-289

Conversation

@rgnote

@rgnote rgnote commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Extend registryScopes in the OCI trust policy to accept a registry host (a value with no / separator) in addition to a fully qualified repository URI. A registry scope applies the policy to every repository in that registry, which addresses the operational pain of enumerating a fully qualified URI per repository when trust is reasoned about at the registry (e.g. account+region) boundary.

To keep the "exactly one applicable policy per artifact" invariant, the scope forms are given an explicit specificity ordering (repository > registry > global) and the most specific match wins, so a repository level exception can coexist with a broader registry or global policy. Matching is defined as exact, case-sensitive string comparison with no reference expansion, prefix matching, or case folding.

Resolves #289

Extend `registryScopes` in the OCI trust policy to accept a registry
host (a value with no `/` separator) in addition to a fully qualified
repository URI. A registry scope applies the policy to every repository
in that registry, which addresses the operational pain of enumerating a
fully qualified URI per repository when trust is reasoned about at the
registry (e.g. account+region) boundary.

To keep the "exactly one applicable policy per artifact" invariant, the
scope forms are given an explicit specificity ordering (repository >
registry > global) and the most specific match wins, so a repository
level exception can coexist with a broader registry or global policy.
Matching is defined as exact, case-sensitive string comparison with no
reference expansion, prefix matching, or case folding.

Resolves notaryproject#289

Signed-off-by: Rakesh Gariganti <5878554+rgnote@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the OCI trust policy specification to allow registryScopes entries to target either a specific repository (${registry-name}/${namespace}/${repository-name}) or an entire registry host (${registry-name}), and defines how implementations must select a single applicable policy using a specificity ordering.

Changes:

  • Extend registryScopes to support registry-host (no /) values in addition to fully qualified repository URIs.
  • Specify exact, case-sensitive matching semantics and a specificity order (repository > registry > global) to preserve the “exactly one applicable policy” invariant.
  • Add an example demonstrating a registry-wide policy with a repository-level exception.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread specs/trust-store-trust-policy.md Outdated
Comment thread specs/trust-store-trust-policy.md
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Rakesh Gariganti <5878554+rgnote@users.noreply.github.com>

@yizha1 yizha1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @rgnote left one comment.

- The scope MUST contain one of the following:
- List of one or more fully qualified repository URIs.
- Each value in the scope collection MUST be one of the following:
- A fully qualified repository URI of the form `${registry-name}/${namespace}/${repository-name}`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What is the behavior if a user specify ${registry-name}/${namespace}, for example registry.acme-rockets.io/software/, does it mean all the repositories under software follow the specific policy?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support specifying multiple registries in the trust policy

3 participants