Git Product home page Git Product logo

cot-gpg-keys's Introduction

Task Status

TaskCluster worker GPG key repo

This repo contains GPG pubkeys, used to validate the signature in the Taskcluster worker Chain of Trust artifact.

We use the latest revision that is tagged (a la git describe); that tag must be signed by a valid key. The whitelist of valid gpg fingerprints for git commit signing is in puppet.

Directory structure

At the top level, we have

  docker-worker/
    subdir/  # datestring, timestamp, or ami-group ids, for cleanup purposes
      pubkey1
      pubkey2
      ...
    ...
  generic-worker/
    subdir/  # datestring, timestamp, or ami-group ids, for cleanup purposes
      pubkey1
      pubkey2
      ...
    ...
  scriptworker/
    trusted/
    valid/

Tagging git commits

You need to have a trusted gpg key to perform this step!

In your ~/.gitconfig:

  • set your user.signingkey to your long keyid or fingerprint
  • set your gpg.program to the path to gpg. I recommend the latest gpg 2.0.x.

To tag,

# First make sure all changes since the last tag are legit!
git pull --ff-only --tags
PREVIOUS_TAG=`git describe --abbrev=0`
# check the signature of the previous tag
git tag -v "$PREVIOUS_TAG"
# check the commit logs between the previous tag and HEAD
git log "$PREVIOUS_TAG"..HEAD
# check the diff between the previous tag and HEAD
git diff "$PREVIOUS_TAG"
# if that all looks good, tag
DATE=`python -c "from __future__ import print_function; import datetime; d=datetime.datetime.utcnow(); print('%04d%02d%02d%02d%02d%02d'%(d.year,d.month,d.day,d.hour,d.minute,d.second))"`
git tag -s -m "production-$DATE" production-$DATE
git push --tags
# you also need to `git push --tags` to the upstream repo
git push [email protected]:mozilla-releng/cot-gpg-keys.git --tags

I added a tag.sh to do the above, minus the extra git push.

We no longer need to sign commits.

Backing out changes

We pull with --ff-only, so non-fast-forward changes are not allowed. Also, git describe shows the latest reachable revision that's tagged. Therefore, if you need to back out changes,

  • land the backout as a new commit
  • tag the new commit

Note: gpg keys with revoked subkeys will break

if gpg --with-colons --list-sigs --with-fingerprint --with-fingerprint contains any rev or rvk lines, that key will no longer be trusted to sign tags or other gpg keys in scriptworker. Please generate a new key.

cot-gpg-keys's People

Contributors

escapewindow avatar gregarndt avatar grenade avatar johanlorenzo avatar jvehent avatar mozilla-github-standards avatar

Watchers

 avatar  avatar  avatar

cot-gpg-keys's Issues

CODE_OF_CONDUCT.md file missing

As of January 1 2019, Mozilla requires that all GitHub projects include this CODE_OF_CONDUCT.md file in the project root. The file has two parts:

  1. Required Text - All text under the headings Community Participation Guidelines and How to Report, are required, and should not be altered.
  2. Optional Text - The Project Specific Etiquette heading provides a space to speak more specifically about ways people can work effectively and inclusively together. Some examples of those can be found on the Firefox Debugger project, and Common Voice. (The optional part is commented out in the raw template file, and will not be visible until you modify and uncomment that part.)

If you have any questions about this file, or Code of Conduct policies and procedures, please reach out to [email protected].

(Message COC001)

`git describe` orders by date without timezone

PREVIOUS_TAG=git describe --abbrev=0

This shows the latest tag, assuming the tags are in the same timezone, or separated by >N hours. But, if

  • tag a is created by someone in Europe
  • tab b is later created by someone in California, but without 8+ hours of separation,

then git describe orders the European tag first.

We need a better way.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.