Scroll to navigation

OC ADM(1) June 2016 OC ADM(1)

NAME

oc adm verify-image-signature - Verify the image identity contained in the image signature

SYNOPSIS

oc adm verify-image-signature [OPTIONS]

DESCRIPTION

Verifies the image signature of an image imported to internal registry using the local public GPG key.

This command verifies if the image identity contained in the image signature can be trusted by using the public GPG key to verify the signature itself and matching the provided expected identity with the identity (pull spec) of the given image. By default, this command will use the public GPG keyring located in "$GNUPGHOME/.gnupg/pubring.gpg"

By default, this command will not save the result of the verification back to the image object; to do so the user must specify the "--save" flag. Note that to modify the image signature verification status, the user must have permissions to edit an image object (usually an "image-auditor" role).

Note that using the "--save" flag on already verified image together with invalid GPG key or invalid expected identity will cause the saved verification status to be removed and the image will become "unverified".

If this command is outside the cluster, users must specify the "--registry-url" parameter with the public URL of image registry.

To remove all verifications, users can use the "--remove-all" flag.

OPTIONS

--expected-identity=""
An expected image docker reference to verify (required).

--insecure=false
If set, use the insecure protocol for registry communication.

--public-key="pubring.gpg"
A path to a public GPG key to be used for verification. (defaults to "pubring.gpg")

--registry-url=""
The address to use when contacting the registry, instead of using the internal cluster address. This is useful if you can't resolve or reach the internal registry address.

--remove-all=false
If set, all signature verifications will be removed from the given image.

--save=false
If true, the result of the verification will be saved to an image object.

OPTIONS INHERITED FROM PARENT COMMANDS

--as=""
Username to impersonate for the operation. User could be a regular user or a service account in a namespace.

--as-group=[]
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.

--as-uid=""
UID to impersonate for the operation.

--cache-dir="/home/abuild/.kube/cache"
Default cache directory

--certificate-authority=""
Path to a cert file for the certificate authority

--client-certificate=""
Path to a client certificate file for TLS

--client-key=""
Path to a client key file for TLS

--cluster=""
The name of the kubeconfig cluster to use

--context=""
The name of the kubeconfig context to use

--disable-compression=false
If true, opt-out of response compression for all requests to the server

--insecure-skip-tls-verify=false
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure

--kubeconfig=""
Path to the kubeconfig file to use for CLI requests.

--match-server-version=false
Require server version to match client version

-n, --namespace=""
If present, the namespace scope for this CLI request

--profile="none"
Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex)

--profile-output="profile.pprof"
Name of the file to write the profile to

--request-timeout="0"
The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.

-s, --server=""
The address and port of the Kubernetes API server

--tls-server-name=""
Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used

--token=""
Bearer token for authentication to the API server

--user=""
The name of the kubeconfig user to use

--warnings-as-errors=false
Treat warnings received from the server as errors and exit with a non-zero exit code

EXAMPLE


# Verify the image signature and identity using the local GPG keychain
oc adm verify-image-signature sha256:c841e9b64e4579bd56c794bdd7c36e1c257110fd2404bebbb8b613e4935228c4 \
--expected-identity=registry.local:5000/foo/bar:v1

# Verify the image signature and identity using the local GPG keychain and save the status
oc adm verify-image-signature sha256:c841e9b64e4579bd56c794bdd7c36e1c257110fd2404bebbb8b613e4935228c4 \
--expected-identity=registry.local:5000/foo/bar:v1 --save

# Verify the image signature and identity via exposed registry route
oc adm verify-image-signature sha256:c841e9b64e4579bd56c794bdd7c36e1c257110fd2404bebbb8b613e4935228c4 \
--expected-identity=registry.local:5000/foo/bar:v1 \
--registry-url=docker-registry.foo.com

# Remove all signature verifications from the image
oc adm verify-image-signature sha256:c841e9b64e4579bd56c794bdd7c36e1c257110fd2404bebbb8b613e4935228c4 --remove-all

SEE ALSO

oc-adm(1),

HISTORY

June 2016, Ported from the Kubernetes man-doc generator

Openshift CLI User Manuals Openshift