Source repo for Docker's Documentation
Go to file
Ying Li e8528ec391 Attempt to match the model exactly up with the initial sql + the
migrate sql.

Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-12 15:44:00 -07:00
Godeps Add new dependency: github.com/mitchellh/go-homedir 2015-09-10 16:07:38 -07:00
client Add ChangeIterator interface for Changelists 2015-08-30 14:19:00 -07:00
cmd Merge pull request #196 from ggtools/birthday-pr 2015-09-24 17:15:01 -07:00
cryptoservice Return invalid password when cannot retrieve passphrase 2015-07-22 03:42:16 -07:00
docs Add documentation for environment variable. 2015-09-20 19:26:33 +02:00
errors make key algorithm configurable for local development with in memory ed25519 crypto service 2015-07-30 11:53:39 -07:00
fixtures Fixed bug in Root Validation and added more test 2015-07-17 14:33:05 -07:00
keystoremanager Import and export symlinks in keystore 2015-08-03 15:03:31 -07:00
notarymysql Attempt to match the model exactly up with the initial sql + the 2015-10-12 15:44:00 -07:00
pkg/passphrase Update passphrase error message 2015-08-10 12:44:30 -07:00
proto Fixing protobufs and signer 2015-07-22 16:51:55 -07:00
server Attempt to match the model exactly up with the initial sql + the 2015-10-12 15:44:00 -07:00
signer Change logging to use contexts effectively 2015-07-31 16:06:56 -07:00
trustmanager Import and export symlinks in keystore 2015-08-03 15:03:31 -07:00
utils Don't blindly overwrite ctx with result of Authorized 2015-08-17 15:42:32 -07:00
version Removing default version from version.go 2015-07-28 15:38:24 -07:00
.gitignore validation tests 2015-08-06 17:38:37 -07:00
CONTRIBUTING.md Update contributing for notary 2015-06-21 12:51:35 -07:00
Dockerfile change canonical json package 2015-09-03 20:11:49 -07:00
LICENSE Update license to set copyright holder 2015-07-31 16:27:40 -07:00
MAINTAINERS adding MAINTAINERS and CONTRIBUTING.md (copied dfrom distribution with a few tweaks) 2015-06-19 13:44:00 -07:00
Makefile fix makefile 2015-08-05 17:54:11 -07:00
NOTARY_VERSION Renaming VERSION to NOTARY_VERSION 2015-07-30 11:03:36 -07:00
README.md Update README 2015-08-11 23:26:49 -07:00
ROADMAP.md Refactored Rufus API 2015-07-14 00:23:38 -07:00
circle.yml gofmt across the baord 2015-07-20 11:00:24 -07:00
docker-compose.yml viper config for notary signer 2015-07-27 17:33:11 -07:00
notary-server-Dockerfile pass ldflags to the notary-signer and notary-server builds 2015-07-31 09:57:07 -07:00
notary-signer-Dockerfile pass ldflags to the notary-signer and notary-server builds 2015-07-31 09:57:07 -07:00

README.md

Notary

Overview

The Notary project comprises a server and a client for running and interacting with trusted collections.

Notary aims to make the internet more secure by making it easy for people to publish and verify content. We often rely on TLS to secure our communications with a web server which is inherently flawed, as any compromise of the server enables malicious content to be substituted for the legitimate content.

With Notary, publishers can sign their content offline using keys kept highly secure. Once the publisher is ready to make the content available, they can push their signed trusted collection to a Notary Server.

Consumers, having acquired the publisher's public key through a secure channel, can then communicate with any notary server or (insecure) mirror, relying only on the publisher's key to determine the validity and integrity of the received content.

Goals

notary is based on The Update Framework, a secure general design for the problem of software distribution and updates. By using TUF, notary achieves a number of key advantages:

  • Survivable Key Compromise: Content publishers must manage keys in order to sign their content. Signing keys may be compromised or lost so systems must be designed in order to be flexible and recoverable in the case of key compromise. TUF's notion of key roles is utilized to separate responsibilities across a hierarchy of keys such that loss of any particular key (except the root role) by itself is not fatal to the security of the system.
  • Freshness Guarantees: Replay attacks are a common problem in designing secure systems, where previously valid payloads are replayed to trick another system. The same problem exists in the software update systems, where old signed can be presented as the most recent. notary makes use of timestamping on publishing so that consumers can know that they are receiving the most up to date content. This is particularly important when dealing with software update where old vulnerable versions could be used to attack users.
  • Configurable Trust Thresholds: Oftentimes there are a large number of publishers that are allowed to publish a particular piece of content. For example, open source projects where there are a number of core maintainers. Trust thresholds can be used so that content consumers require a configurable number of signatures on a piece of content in order to trust it. Using thresholds increases security so that loss of individual signing keys doesn't allow publishing of malicious content.
  • Signing Delegation: To allow for flexible publishing of trusted collections, a content publisher can delegate part of their collection to another signer. This delegation is represented as signed metadata so that a consumer of the content can verify both the content and the delegation.
  • Use of Existing Distribution: notary's trust guarantees are not tied at all to particular distribution channels from which content is delivered. Therefore, trust can be added to any existing content delivery mechanism.
  • Untrusted Mirrors and Transport: All of the notary metadata can be mirrored and distributed via arbitrary channels.

Notary CLI

notary is a tool for publishing and managing trusted collections of content. Publishers can digitally sign collections and consumers can verify integrity and origin of content. This ability is built on a straightforward key management and signing interface to create signed collections and configure trusted publishers.

Using Notary

Lets try using notary.

As setup, lets build notary and then start up a local notary-server.

make binaries
docker-compose build
docker-compose up -d

First, lets initiate a notary collection called example.com/scripts

notary init example.com/scripts

Now, look at the keys you created as a result of initialization

notary key list

Cool, now add a local file install.sh and call it v1

notary add example.com/scripts v1 install.sh

Wouldn't it be nice if others could know that you've signed this content? Use publish to publish your collection to your default notary-server

notary publish example.com/scripts

Now, others can pull your trusted collection

notary list example.com/scripts

More importantly, they can verify the content of your script by using notary verify:

curl example.com/install.sh | notary verify example.com/scripts v1 | sh

Notary Server

Notary Server manages TUF data over an HTTP API compatible with the notary client.

It may be configured to use either JWT or HTTP Basic Auth for authentication. Currently it only supports MySQL for storage of the TUF data, we intend to expand this to other storage options.

Setup for Development

The notary repository comes with Dockerfiles and a docker-compose file to faciliate development. Simply run the following commands to start a notary server with a temporary MySQL database in containers:

$ docker-compose build
$ docker-compose up

If you are on Mac OSX with boot2docker or kitematic, you'll need to update your hosts file such that the name notary is associated with the IP address of your VM (for boot2docker, this can be determined by running boot2docker ip, with kitematic, echo $DOCKER_HOST should show the IP of the VM). If you are using the default Linux setup, you need to add 127.0.0.1 notary to your hosts file.

Compiling Notary Server

From the root of this git repository, run make binaries. This will compile the notary and notary-server applications and place them in a bin directory at the root of the git repository (the bin directory is ignored by the .gitignore file).

Running Notary Server

The notary-server application has the following usage:

$ bin/notary-server --help
usage: bin/notary-serve
  -config="": Path to configuration file
  -debug=false: Enable the debugging server on localhost:8080

Configuring Notary Server

The configuration file must be a json file with the following format:

{
    "server": {
        "addr": ":4443",
        "tls_cert_file": "./fixtures/notary-server.crt",
        "tls_key_file": "./fixtures/notary-server.key"
    },
    "logging": {
        "level": 5
    }
}

The pem and key provided in fixtures are purely for local development and testing. For production, you must create your own keypair and certificate, either via the CA of your choice, or a self signed certificate.