1podman-image-trust(1)() podman-image-trust(1)()
2
3
4
6 podman-image-trust - Manage container registry image trust policy
7
8
10 podman image trust set|show [options] registry[/repository]
11
12
14 Manages which registries you trust as a source of container images
15 based on its location. (This option is not available with the remote
16 Podman client, including Mac and Windows (excluding WSL2) machines)
17
18
19 The location is determined by the transport and the registry host of
20 the image. Using this container image docker://docker.io/library/busy‐
21 box as an example, docker is the transport and docker.io is the reg‐
22 istry host.
23
24
25 Trust is defined in /etc/containers/policy.json and is enforced when a
26 user attempts to pull a remote image from a registry. The trust policy
27 in policy.json describes a registry scope (registry and/or repository)
28 for the trust. This trust can use public keys for signed images.
29
30
31 The scope of the trust is evaluated from most specific to the least
32 specific. In other words, a policy may be defined for an entire reg‐
33 istry. Or it could be defined for a particular repository in that reg‐
34 istry. Or it could be defined down to a specific signed image inside of
35 the registry.
36
37
38 For example, the following list includes valid scope values that could
39 be used in policy.json from most specific to the least specific:
40
41
42 docker.io/library/busybox:notlatest docker.io/library/busybox
43 docker.io/library docker.io
44
45
46 If no configuration is found for any of these scopes, the default value
47 (specified by using "default" instead of REGISTRY[/REPOSITORY]) is
48 used.
49
50
51 Trust type provides a way to:
52
53
54 Allowlist ("accept") or Denylist ("reject") registries or Require sig‐
55 nature (“signedBy”).
56
57
58 Trust may be updated using the command podman image trust set for an
59 existing trust scope.
60
61
63 --help, -h
64 Print usage statement.
65
66
67 set OPTIONS
68 --pubkeysfile=KEY1, -f
69 A path to an exported public key on the local system. Key paths
70 will be referenced in policy.json. Any path to a file may be used but
71 locating the file in /etc/pki/containers is recommended. Options may be
72 used multiple times to
73 require an image be signed by multiple keys. The --pubkeysfile op‐
74 tion is required for the signedBy type.
75
76
77 --type=value, -t
78 The trust type for this policy entry.
79 Accepted values:
80 signedBy (default): Require signatures with corresponding list of
81 public keys
82 accept: do not require any signatures for this
83 registry scope
84 reject: do not accept images for this registry scope
85
86
87 show OPTIONS
88 --json, -j
89 Output trust as JSON for machine parsing
90
91
92 --noheading, -n
93 Omit the table headings from the trust listings
94
95
96 --raw
97 Output trust policy file as raw JSON
98
99
101 Accept all unsigned images from a registry
102
103
104 sudo podman image trust set --type accept docker.io
105
106
107
108 Modify default trust policy
109
110
111 sudo podman image trust set -t reject default
112
113
114
115 Display system trust policy
116
117
118 podman image trust show
119
120
121
122 TRANSPORT NAME TYPE ID STORE
123 all default reject
124 repository docker.io/library accept
125 repository registry.access.redhat.com signed security@redhat.com https://access.redhat.com/webassets/docker/content/sigstore
126 repository registry.redhat.io signed security@redhat.com https://registry.redhat.io/containers/sigstore
127 repository docker.io reject
128 docker-daemon accept
129
130
131
132 Display trust policy file
133
134
135 podman image trust show --raw
136
137
138
139 {
140 "default": [
141 {
142 "type": "reject"
143 }
144 ],
145 "transports": {
146 "docker": {
147 "docker.io": [
148 {
149 "type": "reject"
150 }
151 ],
152 "docker.io/library": [
153 {
154 "type": "insecureAcceptAnything"
155 }
156 ],
157 "registry.access.redhat.com": [
158 {
159 "type": "signedBy",
160 "keyType": "GPGKeys",
161 "keyPath": "/etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release"
162 }
163 ],
164 "registry.redhat.io": [
165 {
166 "type": "signedBy",
167 "keyType": "GPGKeys",
168 "keyPath": "/etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release"
169 }
170 ]
171 },
172 "docker-daemon": {
173 "": [
174 {
175 "type": "insecureAcceptAnything"
176 }
177 ]
178 }
179 }
180 }
181
182
183
184 Display trust as JSON
185
186
187 podman image trust show --json
188
189
190
191 [
192 {
193 "transport": "all",
194 "name": "* (default)",
195 "repo_name": "default",
196 "type": "reject"
197 },
198 {
199 "transport": "repository",
200 "name": "docker.io",
201 "repo_name": "docker.io",
202 "type": "reject"
203 },
204 {
205 "transport": "repository",
206 "name": "docker.io/library",
207 "repo_name": "docker.io/library",
208 "type": "accept"
209 },
210 {
211 "transport": "repository",
212 "name": "registry.access.redhat.com",
213 "repo_name": "registry.access.redhat.com",
214 "sigstore": "https://access.redhat.com/webassets/docker/content/sigstore",
215 "type": "signed",
216 "gpg_id": "security@redhat.com"
217 },
218 {
219 "transport": "repository",
220 "name": "registry.redhat.io",
221 "repo_name": "registry.redhat.io",
222 "sigstore": "https://registry.redhat.io/containers/sigstore",
223 "type": "signed",
224 "gpg_id": "security@redhat.com"
225 },
226 {
227 "transport": "docker-daemon",
228 "type": "accept"
229 }
230 ]
231
232
233
235 containers-policy.json(5)
236
237
239 January 2019, updated by Tom Sweeney (tsweeney at redhat dot com) De‐
240 cember 2018, originally compiled by Qi Wang (qiwan at redhat dot com)
241
242
243
244 podman-image-trust(1)()