All Projects → redhat-cop → image-scanning-signing-service

redhat-cop / image-scanning-signing-service

Licence: other
Image Signing and Scanning as a Service

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects
Dockerfile
14818 projects
Makefile
30231 projects

Projects that are alternatives of or similar to image-scanning-signing-service

openshift-event-controller
A Container-based python controller used to integration OpenShift with other things
Stars: ✭ 13 (-63.89%)
Mutual labels:  container-cop
openshift-management
Set of maintenance scripts & cron jobs for OpenShift Container Platform
Stars: ✭ 112 (+211.11%)
Mutual labels:  container-cop
template2helm
Converts an OpenShift template into a Helm chart
Stars: ✭ 28 (-22.22%)
Mutual labels:  container-cop
resource-locker-operator
No description or website provided.
Stars: ✭ 28 (-22.22%)
Mutual labels:  container-cop
declarative-openshift
Working examples of manifests for openshift for use in a declarative management strategy.
Stars: ✭ 17 (-52.78%)
Mutual labels:  container-cop
ocp-disconnected-docs
No description or website provided.
Stars: ✭ 28 (-22.22%)
Mutual labels:  container-cop
openshift-disconnected-operators
No description or website provided.
Stars: ✭ 52 (+44.44%)
Mutual labels:  container-cop
k8s-notify
Turn kubernetes events into useful notifications & alerts
Stars: ✭ 46 (+27.78%)
Mutual labels:  container-cop
group-sync-operator
Synchronizes groups from external providers into OpenShift
Stars: ✭ 73 (+102.78%)
Mutual labels:  container-cop
uncontained.io
On containers, cloud, and digitial transformation
Stars: ✭ 42 (+16.67%)
Mutual labels:  container-cop
gitops-catalog
Tools and technologies that are hosted on an OpenShift cluster
Stars: ✭ 163 (+352.78%)
Mutual labels:  container-cop
keepalived-operator
An operator to manage VIPs backed by keepalived
Stars: ✭ 101 (+180.56%)
Mutual labels:  container-cop
cert-operator
An OpenShift controller using the Operator SDK for managing TLS certficate lifecycle
Stars: ✭ 27 (-25%)
Mutual labels:  container-cop

Image Signing Operator

This repository is currently undergoing active development. Functionality may be in flux

Install Operator

Create Namespace

$ oc new-project image-management

Install CRD and Resources

$ oc apply -f deploy/crds/imagesigningrequests.cop.redhat.com_imagesigningrequests_crd.yaml
$ oc apply -f deploy/service_account.yaml
$ oc apply -f deploy/role.yaml
$ oc apply -f deploy/role_binding.yaml
$ oc apply -f deploy/scc.yaml
$ oc apply -f deploy/secret.yaml

Deploy

Apply the operator to the image-management namespace

$ oc apply -f deploy/operator.yaml

Registry Types

This operator supports a wide range of registry types when declaring an image to sign. The type and location of the image to sign are found within the containerImage attribute of the ImageSigningRequest CR.

Container Repository

Traditional format for utalizing a remote container, either by specifying a tag or digest. These are of kind ContainerRepository under the containerImage attribute.

Tag

containerImage:
  kind: ContainerRepository
  name: quay.io/redhat-cop/image-scanning-signing-service:latest

Digest

containerImage:
  kind: ContainerRepository
  name: quay.io/redhat-cop/image-scanning-signing-service&sha256:a47ae897b964f1e543452c31a24bbd3d46ed5830f4a6d9992be97d0ce61ceb6b

ImageStreamTag (OpenShift)

Sepcify an OCP ImageStream along with the corresponding tag of the desired image to sign. These are of kind ImageStreamTag under the containerImage attribute.

containerImage:
  kind: ImageStreamTag
  name: image-scanning-signing-service:latest

Pull Secrets

A pull secret can be included in the ImageSigningRequest for when needing to access a private repository to sign images.

spec:
  containerImage:
    kind: ContainerRepository
    name: quay.io/redhat-cop/image-scanning-signing-service:latest
  pullSecret
    name: quay

Creating Pull Secret (OpenShift)

There are two options to create the secret needed for accessing a private repository.

Existing Docker Config File

If using docker login locally you can use your existing config.json file to create a secret with your tokens needed for remote login.

⚠️ Security Risk: This will upload the tokens for all remote repositories that you have logged into locally.

 oc secrets new <pull_secret_name> \
     .dockerconfigjson=path/to/.docker/config.json

Existing Docker Config File

Create a new secret by including your repository's credentials within the oc cli secrets command.

oc secrets new-dockercfg <pull_secret_name> \
    --docker-server=<registry_server> --docker-username=<user_name> \
    --docker-password=<password> --docker-email=<email>

Example Workflow (OpenShift)

To facilitate Image Signing, the image signer makes use of a ImageSigningRequest Custom Resource Definition which allows users to declare their intent to have an image signed. This section will walk through the process of signing an image after a new image has been built.

OpenShift provides a number of quickstart templates. One of these templates contains a simple .NET Core web application application. This is an ideal use case to showcase image signing in action. Build an Application

First, create a new project called dotnet-example

$ oc new-project dotnet-example

Instantiate the dotnet-example template within the project using the default values specified in the template

$ oc new-app --template=dotnet-example

Declare an Intent to Sign the Image

To declare your intent to sign the previously built image, a new ImageSigningRequest can be created within the project. A typical request is shown below

apiVersion: imagesigningrequests.cop.redhat.com/v1alpha1
kind: ImageSigningRequest
metadata:
  name: dotnet-app
spec:
  containerImage:
    kind: ImageStreamTag
    name: dotnet-example:latest

The above example can be applied to the cluster by running

$ oc apply -f deploy/examples/imagestreamtag.yaml

The signing pod will launch in the image-management namespace and handle the signing of the specified image. the ImageSigningRequest in the dotnet-example namespace will be updated and contain the name of the signed image in the Status section. Confirm this by running

$ oc get imagesigningrequest/dotnet-app -o yaml

Finally, the newly created Image will contain the signatures associated with the signing action. This can be confirmed by running the following command:

$ oc get image $(oc get imagesigningrequest dotnet-app --template='{{ .status.signedImage }}') -o yaml

Development

How-To

Testing

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].