boulder

module
v0.0.0-...-27708be Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2015 License: MPL-2.0

README

Boulder - An ACME CA

This is an initial implementation of an ACME-based CA. The ACME protocol allows the CA to automatically verify that an applicant for a certificate actually controls an identifier, and allows domain holders to issue and revoke certificates for their domains.

Build Status Coverage Status

Docker

Boulder is available as a Docker image from Quay.io. The Docker image expects the config.json file to be located at /boulder/config.json within the container.

(Note: You can override the config.json location by specifying a different BOULDER_CONFIG environment variable, such as with -e BOULDER_CONFIG=mypath/myfile.config.)

There are no default commands; you must choose one of the executables from the cmd path.

There are several tags available:

  • stable is maintained by the Let's Encrypt team as a fairly stable copy of Boulder.
  • latest is a more recent build of Boulder. It may lag behind the master ref, as automated builds are being reworked.
  • Tags for individual short-format git refs, representing those builds.

A quick-start method for running a Boulder instance is to use one of the example configurations:

> mkdir .boulder-config
> cp test/boulder-config.json .boulder-config/config.json
> docker run --name=boulder --read-only=true --rm=true -v $(pwd)/.boulder-config:/boulder:ro -p 4000:4000 quay.io/letsencrypt/boulder:latest boulder

To run a single module, specifying the AMQP server, you might use something more like:

> docker run --name=boulder --read-only=true --rm=true -v $(pwd)/.boulder-config:/boulder:ro quay.io/letsencrypt/boulder:stable boulder-ra

Quickstart

Install RabbitMQ from https://rabbitmq.com/download.html. It's required to run tests.

Install libtool-ltdl dev libraries, which are required for Boulder's PKCS11 support.

Ubuntu: sudo apt-get install libltdl3-dev

CentOS: sudo yum install libtool-ltdl-devel

OS X: sudo port install libtool or brew install libtool

(On OS X, using port, you will have to add CGO_CFLAGS="-I/opt/local/include" CGO_LDFLAGS="-L/opt/local/lib" to your environment or go invocations.)

> go get github.com/letsencrypt/boulder # Ignore errors about no buildable files
> cd $GOPATH/src/github.com/letsencrypt/boulder
# This starts each Boulder component with test configs. Ctrl-C kills all.
> python ./start.py
> cd test/js
> npm install
> nodejs test.js
> ./test.sh

You can also check out the official client from https://github.com/letsencrypt/lets-encrypt-preview/ and follow the setup instructions there.

Component Model

The CA is divided into the following main components:

  1. Web Front End
  2. Registration Authority
  3. Validation Authority
  4. Certificate Authority
  5. Storage Authority

This component model lets us separate the function of the CA by security context. The Web Front End and Validation Authority need access to the Internet, which puts them at greater risk of compromise. The Registration Authority can live without Internet connectivity, but still needs to talk to the Web Front End and Validation Authority. The Certificate Authority need only receive instructions from the Registration Authority.


client <--ACME--> WFE ---+
  .                      |
  .                      +--- RA --- CA
  .                      |
client <-checks->  VA ---+

In Boulder, these components are represented by Go interfaces. This allows us to have two operational modes: Consolidated and distributed. In consolidated mode, the objects representing the different components interact directly, through function calls. In distributed mode, each component runs in a separate process (possibly on a separate machine), and sees the other components' methods by way of a messaging layer.

Internally, the logic of the system is based around two types of objects, authorizations and certificates, mapping directly to the resources of the same name in ACME.

Requests from ACME clients result in new objects and changes to objects. The Storage Authority maintains persistent copies of the current set of objects.

Objects are also passed from one component to another on change events. For example, when a client provides a successful response to a validation challenge, it results in a change to the corresponding validation object. The Validation Authority forward the new validation object to the Storage Authority for storage, and to the Registration Authority for any updates to a related Authorization object.

Boulder supports distributed operation using AMQP as a message bus (e.g., via RabbitMQ). For components that you want to be remote, it is necessary to instantiate a "client" and "server" for that component. The client implements the component's Go interface, while the server has the actual logic for the component. More details in amqp-rpc.go.

The full details of how the various ACME operations happen in Boulder are laid out in DESIGN.md

Dependencies

All dependencies are vendorized under the Godeps directory, both to make dependency management easier and to avoid insecure fallback in go get.

To update dependencies:

# Disable insecure fallback by blocking port 80.
sudo /sbin/iptables -A OUTPUT -p tcp --dport 80 -j DROP
# Fetch godep
go get -u https://github.com/tools/godep
# Update to the latest version of a dependency. Alternately you can cd to the
# directory under GOPATH and check out a specific revision. Here's an example
# using cfssl:
go get -u github.com/cloudflare/cfssl/...
# Update the Godep config to the appropriate version.
godep update github.com/cloudflare/cfssl/...
# Save the dependencies, rewriting any internal or external dependencies that
# may have been added.
godep save -r ./...
git add Godeps
git commit
# Assuming you had no other iptables rules, re-enable port 80.
sudo iptables -D OUTPUT 1

TODO

See the issues list

Directories

Path Synopsis
Godeps
_workspace/src/github.com/cactus/go-statsd-client/statsd
Package statsd provides a StatsD client implementation that is safe for concurrent use by multiple goroutines and for efficiency can be created and reused.
Package statsd provides a StatsD client implementation that is safe for concurrent use by multiple goroutines and for efficiency can be created and reused.
_workspace/src/github.com/cloudflare/cfssl/auth
Package auth implements an interface for providing CFSSL authentication.
Package auth implements an interface for providing CFSSL authentication.
_workspace/src/github.com/cloudflare/cfssl/config
Package config contains the configuration logic for CFSSL.
Package config contains the configuration logic for CFSSL.
_workspace/src/github.com/cloudflare/cfssl/crypto/pkcs11key
Package pkcs11key implements crypto.Signer for PKCS #11 private keys.
Package pkcs11key implements crypto.Signer for PKCS #11 private keys.
_workspace/src/github.com/cloudflare/cfssl/crypto/pkcs12
Package pkcs12 implements a subset of PKCS #12 as described here: https://tools.ietf.org/html/rfc7292
Package pkcs12 implements a subset of PKCS #12 as described here: https://tools.ietf.org/html/rfc7292
Package pbkdf implements
_workspace/src/github.com/cloudflare/cfssl/crypto/pkcs7
Package pkcs7 implements the subset of the CMS PKCS #7 datatype that is typically used to package certificates and CRLs.
Package pkcs7 implements the subset of the CMS PKCS #7 datatype that is typically used to package certificates and CRLs.
_workspace/src/github.com/cloudflare/cfssl/csr
Package csr implements certificate requests for CFSSL.
Package csr implements certificate requests for CFSSL.
_workspace/src/github.com/cloudflare/cfssl/errors
Package errors provides error types returned in CF SSL.
Package errors provides error types returned in CF SSL.
_workspace/src/github.com/cloudflare/cfssl/helpers
Package helpers implements utility functionality common to many CFSSL packages.
Package helpers implements utility functionality common to many CFSSL packages.
_workspace/src/github.com/cloudflare/cfssl/helpers/derhelpers
Package derhelpers implements common functionality on DER encoded data
Package derhelpers implements common functionality on DER encoded data
_workspace/src/github.com/cloudflare/cfssl/helpers/pkcs11uri
Package pkcs11uri provides helpers for parsing PKCS #11 URIs.
Package pkcs11uri provides helpers for parsing PKCS #11 URIs.
_workspace/src/github.com/cloudflare/cfssl/info
Package info contains the definitions for the info endpoint
Package info contains the definitions for the info endpoint
_workspace/src/github.com/cloudflare/cfssl/log
Package log implements a wrapper around the Go standard library's logging package.
Package log implements a wrapper around the Go standard library's logging package.
_workspace/src/github.com/cloudflare/cfssl/ocsp
Package ocsp exposes OCSP signing functionality, much like the signer package does for certificate signing.
Package ocsp exposes OCSP signing functionality, much like the signer package does for certificate signing.
_workspace/src/github.com/cloudflare/cfssl/ocsp/config
Package config in the ocsp directory provides configuration data for an OCSP signer.
Package config in the ocsp directory provides configuration data for an OCSP signer.
_workspace/src/github.com/cloudflare/cfssl/ocsp/pkcs11
Package pkcs11 in the ocsp directory provides a way to construct a PKCS#11-based OCSP signer.
Package pkcs11 in the ocsp directory provides a way to construct a PKCS#11-based OCSP signer.
_workspace/src/github.com/cloudflare/cfssl/signer
Package signer implements certificate signature functionality for CFSSL.
Package signer implements certificate signature functionality for CFSSL.
_workspace/src/github.com/cloudflare/cfssl/signer/local
Package local implements certificate signature functionality for CFSSL.
Package local implements certificate signature functionality for CFSSL.
_workspace/src/github.com/cloudflare/cfssl/signer/pkcs11
Package pkcs11 implements support for PKCS #11 signers.
Package pkcs11 implements support for PKCS #11 signers.
_workspace/src/github.com/cloudflare/cfssl/signer/universal
Package universal implements a signer that can do remote or local
Package universal implements a signer that can do remote or local
_workspace/src/github.com/codegangsta/cli
Package cli provides a minimal framework for creating and organizing command line Go applications.
Package cli provides a minimal framework for creating and organizing command line Go applications.
_workspace/src/github.com/dgryski/go-rc2
Package rc2 implements the RC2 cipher
Package rc2 implements the RC2 cipher
_workspace/src/github.com/go-sql-driver/mysql
Go MySQL Driver - A MySQL-Driver for Go's database/sql package
Go MySQL Driver - A MySQL-Driver for Go's database/sql package
_workspace/src/github.com/letsencrypt/go-jose
Package jose aims to provide an implementation of the Javascript Object Signing and Encryption set of standards.
Package jose aims to provide an implementation of the Javascript Object Signing and Encryption set of standards.
_workspace/src/github.com/mattn/go-sqlite3
Package sqlite3 provides interface to SQLite3 databases.
Package sqlite3 provides interface to SQLite3 databases.
_workspace/src/github.com/miekg/dns
Package dns implements a full featured interface to the Domain Name System.
Package dns implements a full featured interface to the Domain Name System.
_workspace/src/github.com/miekg/dns/idn
Package idn implements encoding from and to punycode as speficied by RFC 3492.
Package idn implements encoding from and to punycode as speficied by RFC 3492.
_workspace/src/github.com/miekg/pkcs11
Package pkcs11 is a wrapper around the PKCS#11 cryptographic library.
Package pkcs11 is a wrapper around the PKCS#11 cryptographic library.
_workspace/src/github.com/streadway/amqp
AMQP 0.9.1 client with RabbitMQ extensions
AMQP 0.9.1 client with RabbitMQ extensions
_workspace/src/golang.org/x/crypto/ocsp
Package ocsp parses OCSP responses as specified in RFC 2560.
Package ocsp parses OCSP responses as specified in RFC 2560.
_workspace/src/gopkg.in/gorp.v1
Package gorp provides a simple way to marshal Go structs to and from SQL databases.
Package gorp provides a simple way to marshal Go structs to and from SQL databases.
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL