Skip to content

Commit a3a23c8

Browse files
committed
fix: update with security policies
Signed-off-by: Chris Butler <chris.butler@redhat.com>
1 parent 71dcba5 commit a3a23c8

File tree

5 files changed

+50
-10
lines changed

5 files changed

+50
-10
lines changed

ansible/init-data-gzipper.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
kubeconfig: "{{ lookup('env', 'KUBECONFIG') }}"
88
cluster_platform: "{{ global.clusterPlatform | default('none') | lower }}"
99
hub_domain: "{{ global.hubClusterDomain | default('none') | lower}}"
10+
security_policy_flavour: "{{ global.coco.securityPolicyFlavour | default('insecure') }}"
1011
template_src: "initdata-default.toml.tpl"
1112
tasks:
1213
- name: Create temporary working directory

ansible/initdata-default.toml.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ kbs_cert = """
2727
'''
2828

2929
[image]
30-
image_security_policy_uri = 'kbs:///default/security-policy/osc
30+
image_security_policy_uri = 'kbs:///default/security-policy/{{ security_policy_flavour }}
3131
'''
3232

3333
"policy.rego" = '''

values-global.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ global:
1111
# This defines whether or not to use upstream resources for CoCo.
1212
# Defines whether or not the hub cluster can be used for confidential containers
1313
coco:
14+
securityPolicyFlavour: "insecure" # insecure, signed or reject is expected.
1415
azure:
1516
defaultVMFlavour: "Standard_DC2as_v5"
1617
VMFlavours: "Standard_DC2as_v5,Standard_DC4as_v5,Standard_DC8as_v5,Standard_DC16as_v5"
@@ -24,6 +25,7 @@ main:
2425
clusterGroupChartVersion: 0.9.*
2526

2627
# Common secret store configuration used across multiple charts
28+
# Warning do not rely on this. it does not consistently apply.
2729
secretStore:
2830
name: vault-backend
2931
kind: ClusterSecretStore

values-secret.yaml.template

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,55 @@ version: "2.0"
88
secrets:
99

1010

11-
- name: 'securityPolicyConfig'
11+
- name: securityPolicyConfig
1212
vaultPrefixes:
1313
- hub
1414
fields:
15-
- name: osc
15+
# Accept all images without verification (INSECURE - dev/testing only)
16+
- name: insecure
1617
value: |
1718
{
18-
"default": [
19-
{
20-
"type": "insecureAcceptAnything"
21-
}],
22-
"transports": {}
19+
"default": [{"type": "insecureAcceptAnything"}],
20+
"transports": {}
2321
}
22+
# Reject all images (useful for testing policy enforcement)
23+
- name: reject
24+
value: |
25+
{
26+
"default": [{"type": "reject"}],
27+
"transports": {}
28+
}
29+
# Only accept signed images (production)
30+
# Edit the transports section to add your signed images.
31+
# Each image needs a corresponding cosign public key in cosign-keys secret.
32+
# The keys much line up with the keys below
33+
- name: signed
34+
value: |
35+
{
36+
"default": [{"type": "reject"}],
37+
"transports": {
38+
"docker": {
39+
"registry.example.com/my-image": [
40+
{
41+
"type": "sigstoreSigned",
42+
"keyPath": "kbs:///default/cosign-keys/key-0"
43+
}
44+
]
45+
}
46+
}
47+
}
48+
49+
# Cosign public keys for image signature verification
50+
# Required when using the "signed" policy above.
51+
# Add your cosign public key files here.
52+
# Generate a cosign key pair: cosign generate-key-pair
53+
#- name: cosign-keys
54+
# vaultPrefixes:
55+
# - hub
56+
# fields:
57+
# - name: key-0
58+
# path: ~/.coco-pattern/trustee/cosign-key-0.pub
59+
2460

2561
- name: attestationStatus
2662
vaultPrefixes:

values-simple.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,12 @@ clusterGroup:
8080
repoURL: https://github.com/butler54/trustee-chart.git
8181
targetRevision: merge-certs
8282
path: ./
83+
extraValueFiles:
84+
- '$patternref/overrides/values-trustee.yaml'
8385
# chart: trustee
8486
# chartVersion: 0.1.*
8587
# Use the override file to specify the list of secrets accessible to trustee from the ESO backend (today by default, Vault).
86-
extraValueFiles:
87-
- '$patternref/overrides/values-trustee.yaml'
88+
8889
# sandbox:
8990
# name: sandbox
9091
# namespace: openshift-sandboxed-containers-operator #upstream config

0 commit comments

Comments
 (0)