-
Notifications
You must be signed in to change notification settings - Fork 64
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
Ratify to support out-of-box experience for typical scenarios #1965
Comments
We discussed this during the community meeting today. We can explore adding steps in helmfile or directly update the helmCharts. @yizha1 , please provide samples of the desired --set values command and result CR for reference. |
The standard Notary Project trust policy:{
"version": "1.0",
"trustPolicies": [
{
"name": "acme-rockets-images",
"registryScopes": [ "registry.acme-rockets.io/software/net-monitor", "registry.acme-rockets.io/software/net-logger" ],
"signatureVerification": {
"level" : "strict",
},
"trustStores": ["ca:acme-rockets", "tsa:trusted-tsa"],
"trustedIdentities": [
"x509.subject: C=US, ST=WA, L=Seattle, O=acme-rockets.io, OU=Finance, CN=SecureBuilder",
"x509.subject: C=US, ST=WA, L=Seattle, O=acme-rockets.io, OU=Design, CN=SecureBuilder",
]
},
{
"name": "public-images",
"registryScopes": [ "registry.wabbit-networks.io/software/net-utils" ],
"signatureVerification": {
"level" : "strict",
},
"trustStores": ["ca:wabbit-networks", "tsa:trusted-tsa"],
"trustedIdentities": [
"x509.subject: C=US, ST=WA, L=Seattle, O=wabbit-networks.io, OU=Security Tools"
]
}
]
} An example for the default Notation configuration in values.yamlnotation:
enabled: true
trustPolicies:
- name: default
registryScopes:
- "*" // Empty or "*" for Any images
trustStores:
- type: ca
- filePath: "./notation.cert" // MUST provide the root certificate
- type: tsa
trustIdentities:
- "*" //Empty or "*" for any identitifies issued by the root certificate, not secure Notation verifier based on the default configuration:
An example for user updated configuration in values.yamlnotation:
enabled: true
trustPolicies:
- name: acme-rockets-images
registryScopes:
- "registry.acme-rockets.io/software/net-monitor"
- "registry.acme-rockets.io/software/net-logger"
trustStores:
- type: ca
certificates:
- azurekeyvault:
vaultURI:
tenantId:
certificates: []
keys: []
refreshInterval:
- type: tsa
certificates:
- filePath: "./tsa.cert"
trustIdentities:
- "C=US, ST=WA, L=Seattle, O=acme-rockets.io, OU=Finance, CN=SecureBuilder",
- "C=US, ST=WA, L=Seattle, O=acme-rockets.io, OU=Design, CN=SecureBuilder"
- name: public-images
registryScopes:
- "registry.wabbit-networks.io/software/net-utils"
trustStores:
- type: ca
certificates:
- filePath: "./notation.cert"
- type: tsa
certificates:
- filePath: "./tsa.cert"
trustIdentities:
- "C=US, ST=WA, L=Seattle, O=wabbit-networks.io, OU=Security Tools" After helm installationThere will be four resources created based on the above example:
apiVersion: config.ratify.deislabs.io/v1beta1
kind: Verifier
metadata:
name: verifier-notation
spec:
name: notation
artifactTypes: application/vnd.cncf.notary.signature
parameters:
verificationCertStores:
ca:
certs1:
- gatekeeper-system/akv-kmp
certs2
- gatekeeper-system/inline-kmp-notation
tsa:
certs:
- gatekeeper-system/inline-kmp-tsa
trustPolicyDoc:
version: "1.0"
trustPolicies:
- name: acme-rockets-images
registryScopes:
- "registry.acme-rockets.io/software/net-monitor"
- "registry.acme-rockets.io/software/net-logger"
signatureVerification:
level: strict
trustStores:
- ca:certs1
- tsa:certs
trustedIdentities:
- "x509.subject: C=US, ST=WA, L=Seattle, O=acme-rockets.io, OU=Finance, CN=SecureBuilder",
- "x509.subject: C=US, ST=WA, L=Seattle, O=acme-rockets.io, OU=Design, CN=SecureBuilder"
- name: public-images
registryScopes:
- "registry.wabbit-networks.io/software/net-utils"
signatureVerification:
level: strict
trustStores:
- ca:certs2
- tsa:certs
trustedIdentities:
- "x509.subject: C=US, ST=WA, L=Seattle, O=wabbit-networks.io, OU=Security Tools" |
Hi @yizha1, in response to " how to connect the KMP to the notation verifier". In this sample verifier, trustStore contains a reference to kmp.
|
During installation, users do not know the name of a KMP. Ratify needs to render KMP resources based on user input and then reference it in the verifier resource. |
@shahramk64 @susanshi @akashsinghal @binbin-li @duffney I made an update on the comment #1965 (comment). Any suggestions on simplying the configuration are welcome. For helm installation command, as there are several parameters and layers for Notation configuration, I would suggest that users can use Example:
|
@shahramk64 can you clarify your questions? The proposal is not change the trust policies schema, Ratify just fetch the necessary values from the input and build the trust policies as required by Notary Project trust policies. |
Hi @yizha1, sorry for the confusion.
trustStores is defined in a way that contains AKV information. I thought that's updating the trustStore schema, but that's just in the values.yaml. However, That info is currently being provided in the values.yaml file in azureKeyVault attribute. I moved the trustPolicies attributes to the values.yaml file so that the user can provide their own set of values, and I set the default values to the existing values in verifier.yaml (so that the tests pass). This way the user can define multiple trustPolicies in values.yaml and provide their own trustStores and trustedIdentities in each trustPolicy. The thing that doesn't seem to be feasible is matching the certStores with trustedIdentities automatically during the installation for each trustPolicy. I am not sure if that was your intension though. Please have a look at my PR and let me know if it's not providing the capability that you are after. cc: @susanshi |
What would you like to be added?
This issue is for Ratify to provide out-of-box experience in the context of Notary Project signature validation on K8s clusters.
There are three typical scenarios:
After helm installatioin, Ratify should be ready to work. Users should not be required to configure any custom resources by default. For advanced users or any runtime updates, users can update custom resources accordingly based on their needs. Thus, Ratify helm chart should support necessary parameters to set up resources: ORAS Stores, KMP and Notation Verifier.
Scenario 1: As images are stored in a public registry, users can skip the configuration for ORAS store, but able to create the following resources by specifying helm chart values:
Scenario 2: Users should be able to create the following resource by specifying helm chart values:
Scenario 3: Users should be able to create the following resource by specifying helm chart values:
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. The issue #1943 asked for trustedIdentities configuration, but it is not enough, we should allow users to
An example of Notation Verifier parameters will be provided in the issue comment later.
NOTE: This issue does not include the configuration required for setting up admission policies, which could be tracked in another issue for UX improvements.
Anything else you would like to add?
No response
Are you willing to submit PRs to contribute to this feature?
The text was updated successfully, but these errors were encountered: