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

feat: add more notation attributes to values.yaml #1982

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

shahramk64
Copy link
Contributor

Description

What this PR does / why we need it:

Currently, helm chart parameters exist for ORAS stores and KMP resources, but not for Notation Verifier. We need to add parameters for setting up Notation Verifier.

Which issue(s) this PR fixes (optional, using fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when the PR gets merged):

Fixes #1965

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Helm Chart Change (any edit/addition/update that is necessary for changes merged to the main branch)
  • This change requires a documentation update

How Has This Been Tested?

Checklist:

  • Does the affected code have corresponding tests?
  • Are the changes documented, not just with inline documentation, but also with conceptual documentation such as an overview of a new feature, or task-based documentation like a tutorial? Consider if this change should be announced on your project blog.
  • Does this introduce breaking changes that would require an announcement or bumping the major version?
  • Do all new files have appropriate license header?

Post Merge Requirements

  • MAINTAINERS: manually trigger the "Publish Package" workflow after merging any PR that indicates Helm Chart Change

@shahramk64 shahramk64 force-pushed the skalantari/support-out-of-box-experience-for-typical-scenarios branch from c4f857c to ed37c20 Compare December 12, 2024 12:52
Copy link

codecov bot commented Dec 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

see 4 files with indirect coverage changes

@shahramk64 shahramk64 force-pushed the skalantari/support-out-of-box-experience-for-typical-scenarios branch 5 times, most recently from 636dae5 to 1d9740d Compare December 13, 2024 01:15
@shahramk64 shahramk64 force-pushed the skalantari/support-out-of-box-experience-for-typical-scenarios branch from 1d9740d to ecfa7f3 Compare December 13, 2024 04:53
@shahramk64 shahramk64 marked this pull request as ready for review December 13, 2024 05:01
signatureVerification:
level: strict
trustStores:
- ca: certs
Copy link
Collaborator

Choose a reason for hiding this comment

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

How can different trust policies use different stores?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How can different trust policies use different stores?

Consider the following verifier.yaml:

apiVersion: config.ratify.deislabs.io/v1beta1
kind: Verifier
metadata:
  name: verifier-notation
spec:
  name: notation
  artifactTypes: application/vnd.cncf.notary.signature
  parameters:
    verificationCertStores:
      my_private_cert:
        - kmpprovider-akv
      my_public_cert:
        - inline_mar_images
    trustPolicyDoc:
      version: "1.0"
      trustPolicies:
        - name: my_private_registry
          registryScopes:
            - "skalantari_registry.azurecr.io/*"
          signatureVerification:
            level: strict
          trustStores:
            - ca:my_private_cert
          trustedIdentities:
            - "my identity"
        - name: mar_images
          registryScopes:
            - "mcr.azurecr.io/*"
          signatureVerification:
            level: strict
          trustStores:
            - ca:inline_mar_images
          trustedIdentities:
            - "mar identity"

It defines two trustPolicies, each include their trustStores, trustedIdentities, and registryScopes. In my PR, I moved this section to values.yaml so that the user can configure it before the installation. Note that verificationCertStores is filled with the values specified in values.yaml too (notationCerts in values.yaml is used)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you describe how users configure values.yaml for the verifier.yaml example?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think what @yizha1 is getting is how would the user from the helm chart be able to set up the verificationCertStores field because that would require the mapping between the notation trust store name and the ratify KMP names that belong to that trust store.

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.

Ratify to support out-of-box experience for typical scenarios
3 participants