mirror of
https://github.com/optim-enterprises-bv/secureblue.git
synced 2025-11-06 21:37:51 +00:00
Merge branch 'template' into image-signing
This commit is contained in:
@@ -22,6 +22,12 @@ YAFTI_ENABLED="$(get_yaml_string '.firstboot.yafti')"
|
||||
# Welcome.
|
||||
echo "Building custom Fedora ${FEDORA_VERSION} from image: \"${BASE_IMAGE}\"."
|
||||
|
||||
# Setup container signing
|
||||
echo "Setup container signing in policy.json and cosign.yaml"
|
||||
echo "Registry to write: $IMAGE_REGISTRY"
|
||||
sed -i "s ghcr.io/ublue-os $IMAGE_REGISTRY g" /usr/etc/containers/policy.json
|
||||
sed -i "s ghcr.io/ublue-os $IMAGE_REGISTRY g" /usr/etc/containers/registries.d/cosign.yaml
|
||||
|
||||
# Add custom repos.
|
||||
get_yaml_array repos '.rpm.repos[]'
|
||||
if [[ ${#repos[@]} -gt 0 ]]; then
|
||||
|
||||
74
usr/etc/containers/policy.json
Normal file
74
usr/etc/containers/policy.json
Normal file
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"default": [
|
||||
{
|
||||
"type": "reject"
|
||||
}
|
||||
],
|
||||
"transports": {
|
||||
"docker": {
|
||||
"registry.access.redhat.com": [
|
||||
{
|
||||
"type": "signedBy",
|
||||
"keyType": "GPGKeys",
|
||||
"keyPath": "/etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release"
|
||||
}
|
||||
],
|
||||
"registry.redhat.io": [
|
||||
{
|
||||
"type": "signedBy",
|
||||
"keyType": "GPGKeys",
|
||||
"keyPath": "/etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release"
|
||||
}
|
||||
],
|
||||
"ghcr.io/ublue-os": [
|
||||
{
|
||||
"type": "sigstoreSigned",
|
||||
"keyPath": "/usr/etc/pki/containers/cosign.pub",
|
||||
"signedIdentity": {
|
||||
"type": "matchRepository"
|
||||
}
|
||||
}
|
||||
],
|
||||
"": [
|
||||
{
|
||||
"type": "insecureAcceptAnything"
|
||||
}
|
||||
]
|
||||
},
|
||||
"docker-daemon": {
|
||||
"": [
|
||||
{
|
||||
"type": "insecureAcceptAnything"
|
||||
}
|
||||
]
|
||||
},
|
||||
"atomic": {
|
||||
"": [
|
||||
{
|
||||
"type": "insecureAcceptAnything"
|
||||
}
|
||||
]
|
||||
},
|
||||
"dir": {
|
||||
"": [
|
||||
{
|
||||
"type": "insecureAcceptAnything"
|
||||
}
|
||||
]
|
||||
},
|
||||
"oci": {
|
||||
"": [
|
||||
{
|
||||
"type": "insecureAcceptAnything"
|
||||
}
|
||||
]
|
||||
},
|
||||
"tarball": {
|
||||
"": [
|
||||
{
|
||||
"type": "insecureAcceptAnything"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
3
usr/etc/containers/registries.d/cosign.yaml
Normal file
3
usr/etc/containers/registries.d/cosign.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
docker:
|
||||
ghcr.io/ublue-os:
|
||||
use-sigstore-attachments: true
|
||||
Reference in New Issue
Block a user