Skip to content

mozilla-services/autograph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
Aug 27, 2024
Nov 21, 2024
Dec 17, 2024
Oct 11, 2024
Dec 11, 2024
Aug 21, 2024
Oct 8, 2021
Sep 26, 2024
Nov 7, 2024
Jan 8, 2025
Jan 8, 2025
Sep 12, 2024
Jun 5, 2024
Oct 10, 2024
Sep 24, 2024
Mar 28, 2019
Dec 5, 2024
Jan 5, 2016
Dec 17, 2024
Dec 17, 2024
Aug 2, 2024
Sep 3, 2024
Apr 19, 2017
Oct 15, 2024
Mar 31, 2021
Nov 12, 2024
Jun 21, 2024
Jan 8, 2025
Jan 8, 2025
Sep 12, 2024
Dec 10, 2024
Sep 3, 2024
Sep 3, 2024
Jan 20, 2016
Apr 4, 2019
Sep 13, 2021
Jan 8, 2025
Aug 20, 2024
Dec 11, 2024
Sep 15, 2021
Jul 15, 2024
Jul 15, 2024
Sep 20, 2024
Oct 8, 2024
Sep 12, 2024
Oct 8, 2024
May 1, 2024
Apr 1, 2019
Aug 29, 2024
Aug 29, 2024
Aug 15, 2024

Repository files navigation

Autograph

Autograph is a cryptographic signature service that implements Content-Signature, XPI Signing for Firefox web extensions, MAR Signing for Firefox updates, APK Signing for Android, GPG2 and RSA.

CircleCI Coverage Status Dependabot Status

Why is it called "autograph"? Because it's a service to sign stuff.

Installation

Use Docker whenever possible. The golang version on your machine is likely not the correct version for autograph.

Using Docker

docker pull mozilla/autograph && docker run mozilla/autograph

This will download the latest build of autograph from DockerHub and run it with its dev configuration.

Local Development

Local Development with Docker

(This process will start a number of gpg-agent processes on your host machine, then does a killall gpg-agent to clean up.)

After making any changes, please test locally by:

make build             # updates local docker images
make integration-test  # must pass
docker compose up      # runs unit tests in container, must pass

Note

You must monitor the output of docker to detect when the unit tests have completed. Otherwise, it will run forever with heartbeat messages. The following pipeline is useful (and available in the Makefile as target test-in-docker): FIXME: Note dependency between autograph app and monitor and all the Dockerfiles

docker compose up 2>&1 | tee compose.log \
    | (grep --silent "autograph-unit-test exited with code" && docker compose down; \
       grep "autograph-unit-test" compose.log)

Using go get

Do Not Use unless you are an experienced golang developer.

If you don't yet have a GOPATH, export one:

$ export GOPATH=$HOME/go
$ mkdir $GOPATH

Install ltdl:

  • on Ubuntu: ltdl-dev
  • on RHEL/Fedora/Arch: libtool-ltdl-devel
  • on MacOS: libtool (NB: this might require brew unlink libtool && brew link libtool)

Then download and build autograph:

$ go get github.com/mozilla-services/autograph

The resulting binary will be placed in $GOPATH/bin/autograph. To run autograph with the example conf, do:

$ cd $GOPATH/src/github.com/mozilla-services/autograph
$ $GOPATH/bin/autograph -c autograph.yaml

Example clients are in the tools directory. You can install the Go one like this:

$ go get github.com/mozilla-services/autograph/tools/autograph-client
$ $GOPATH/bin/autograph-client -u alice -p fs5wgcer9qj819kfptdlp8gm227ewxnzvsuj9ztycsx08hfhzu -t http://localhost:8000/sign/data -r '[{"input": "Y2FyaWJvdW1hdXJpY2UK"}]'
2016/08/23 17:25:55 signature 0 pass

Documentation

Signers

Signing

Autograph exposes a REST API that services can query to request signature of their data. Autograph knows which key should be used to sign the data of a service based on the service's authentication token. Access control and rate limiting are performed at that layer as well.

signing.png