Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NMS-13163: enable Docker Content Trust #21

Draft
wants to merge 41 commits into
base: master
Choose a base branch
from
Draft

Conversation

swachter
Copy link

Issue: https://issues.opennms.org/browse/NMS-13163

Before this can be merged DCT must be setup for the various image collections on GitHub. In particular, in a one-time action the root key for the OpenNMS repo, targets keys for the various image collections, and a delegate (signer) key must be created (and backed up).

After GitHub has been setup, additional environment variables have to be configured in Circle-CI, namely:

  • DELEGATE_PRIVATE_KEY: The base64 encoded value of the private key
  • DELEGATE_PRIVATE_KEY_NAME: The name (hash) of the private key file
  • DELEGATE_PRIVATE_KEY_PASSPHRASE: The passphrase to unlock the delegate key

@swachter swachter requested a review from indigo423 April 21, 2021 09:16
Copy link
Contributor

@indigo423 indigo423 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I think figuring out the secret parts and we get close to get all the bits and pieces to move forward. Thank you very much for digging through it.

name: Setup Environment Variables
command: |
echo "export CONTAINER_REGISTRY=docker.io" >> $BASH_ENV
echo "export CONTAINER_REGISTRY_REPO=opennmsdcttest" >> $BASH_ENV
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CONTAINER_REGISTRY (docker.io) and CONTAINER_REGISTRY_REPO/ORGANISATION (opennmsdcttest) are now given by CircleCI config instead of the config in the repository. What I see right now are three options:

  • Container registry and organization directly in the repo in a config
  • Container registry and organization directly in the CI/CD script
  • Container registry and organization as an environment injected by a CircleCI context

Just double checking here if this is the best place to define the target publishing images with just in mind we might want to switch to a different registry structure. It's not super critical, read this here more like an informal comment not as a change request :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the registry / organization should be settable from the outside then we should rethink how we handle the "no build args in FROM" limitation of docker builds with content trust. Some base images have to be addressed by the registry / organization.

@swachter swachter marked this pull request as draft May 12, 2021 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants