Closed bentito closed 11 months ago
Hi,
Afaik this needs correct signing key for pulling images from private repos and /etc/containers/policy.json
must be modified to refect path and entry for the signing key and /etc/containers/policy.json
must be on the VM and not on your macOS client.
Could you confirm if policy.json
is correctly populated and on the VM ?
Use podman machine ssh
to ssh inside the machine and verify it.
Overall I think @mtrmac can help here.
https://github.com/containers/podman/issues/17391 is still a valid problem.
My best guess here is that Podman is correctly enforcing the signature policy as configured (in particular, as shipped by default), and that policy does not trust the involved key. Compare https://access.redhat.com/solutions/6542281 for a rough outline of how the policy might need to be adapted.
There’s probably a discussion to be had about whether these signing keys should (or should not) be trusted by default; that debate needs to happen with the relevant Red Hat product teams, not here in the upstream Podman repository.
Yes, policy.json
is there:
core@localhost:~$ cat /etc/containers/policy.json
{
"default": [
{
"type": "insecureAcceptAnything"
}
],
"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"
}
]
},
"docker-daemon": {
"": [
{
"type": "insecureAcceptAnything"
}
]
}
}
}
And of course, this insecure workaround does allow the pull to work:
cat /etc/containers/policy.json
{
"default": [
{
"type": "insecureAcceptAnything"
}
],
"transports": {
"docker": {
"registry.access.redhat.com": [
{
"type": "signedBy",
"keyType": "GPGKeys",
"keyPath": "/etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release"
}
],
"registry.redhat.io": [
{
"type": "insecureAcceptAnything"
}
]
},
"docker-daemon": {
"": [
{
"type": "insecureAcceptAnything"
}
]
}
}
}
Thanks. The above applies then: either locally update your policy.json
, or discuss, using official Red Hat product support channels, what the policy should be.
Issue Description
https://github.com/containers/podman/issues/17391 is still a valid problem.
Doesn't matter if tls-verify is on/off.
And actually adding that this is a problem on CentOS 9 too. Adding an extra
podman info
and error message below.Steps to reproduce the issue
Steps to reproduce the issue
Describe the results you received
MacOS: Error: copying system image from manifest list: Source image rejected: Invalid GPG signature: gpgme.Signature{Summary:128, Fingerprint:"1AC4971355A34A82", Status:gpgme.Error{err:0x9}, Timestamp:time.Date(2023, time.November, 20, 5, 30, 12, 0, time.Local), ExpTimestamp:time.Date(1969, time.December, 31, 19, 0, 0, 0, time.Local), WrongKeyUsage:false, PKATrust:0x0, ChainModel:false, Validity:0, ValidityReason:error(nil), PubkeyAlgo:1, HashAlgo:8}
CentOS: podman pull registry.redhat.io/redhat/community-operator-index:v4.14 Error: docker pull registry.redhat.io/redhat/community-operator-index:v4.14 failed with error: (exit status 125) Trying to pull registry.redhat.io/redhat/community-operator-index:v4.14... Error: copying system image from manifest list: Source image rejected: Invalid GPG signature: gpgme.Signature{Summary:128, Fingerprint:"1AC4971355A34A82", Status:gpgme.Error{err:0x9}, Timestamp:time.Date(2023, time.November, 20, 17, 35, 46, 0, time.Local), ExpTimestamp:time.Date(1970, time.January, 1, 0, 0, 0, 0, time.Local), WrongKeyUsage:false, PKATrust:0x0, ChainModel:false, Validity:0, ValidityReason:error(nil), PubkeyAlgo:1, HashAlgo:8}
Describe the results you expected
The image to pull
podman info output (MacOS)
podman info output (CentOS)
Podman in a container
Yes and No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
MacOS and CentOS both fail similarly
Additional information
No response