Merge pull request #8 from letsencrypt/namechange

Change name of project from anvil to boulder
This commit is contained in:
Josh Aas 2015-01-13 14:44:07 -08:00
commit 81081d37c1
13 changed files with 53 additions and 53 deletions

View File

@ -1,5 +1,5 @@
Anvil - An ACME CA
==================
Boulder - An ACME CA
====================
This is an initial implementation of an ACME-based CA. The [ACME protocol](https://github.com/letsencrypt/acme-spec/) 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.
@ -8,9 +8,9 @@ Quickstart
----------
```
> go get github.com/letsencrypt/anvil/anvil-start
> ./anvil-start monolithic # without AMQP
> ./anvil-start monolithic-amqp # with AMQP
> go build github.com/letsencrypt/boulder/boulder-start
> ./boulder-start monolithic # without AMQP
> ./boulder-start monolithic-amqp # with AMQP
```
@ -48,7 +48,7 @@ client <-checks-> VA ---+
```
In Anvil, 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.
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.
@ -56,7 +56,7 @@ Requests from ACME clients result in new objects and changes objects. The Stora
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.
Anvil 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`.
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`.
Files
-----
@ -71,7 +71,7 @@ Files
* `rpc-wrappers.go` - RPC wrappers for the various component type
* `objects.go` - Objects that are passed between components
* `util.go` - Miscellaneous utility methods
* `anvil_test.go` - Unit tests
* `boulder_test.go` - Unit tests
Dependencies:

View File

@ -3,7 +3,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
package anvil
package boulder
import (
"errors"

View File

@ -8,7 +8,7 @@ package main
import (
"fmt"
"github.com/codegangsta/cli"
"github.com/letsencrypt/anvil"
"github.com/letsencrypt/boulder"
"github.com/streadway/amqp"
"net/http"
"os"
@ -22,7 +22,7 @@ func failOnError(err error, msg string) {
}
}
// This is the same as amqpConnect in anvil, but with even
// This is the same as amqpConnect in boulder, but with even
// more aggressive error dropping
func amqpChannel(url string) (ch *amqp.Channel) {
conn, err := amqp.Dial(url)
@ -34,7 +34,7 @@ func amqpChannel(url string) (ch *amqp.Channel) {
}
// Start the server and wait around
func runForever(server *anvil.AmqpRpcServer) {
func runForever(server *boulder.AmqpRpcServer) {
forever := make(chan bool)
server.Start()
fmt.Fprintf(os.Stderr, "Server running...\n")
@ -43,8 +43,8 @@ func runForever(server *anvil.AmqpRpcServer) {
func main() {
app := cli.NewApp()
app.Name = "anvil-start"
app.Usage = "Command-line utility to start Anvil's servers in stand-alone mode"
app.Name = "boulder-start"
app.Usage = "Command-line utility to start Boulder's servers in stand-alone mode"
app.Version = "0.0.0"
// Server URL hard-coded for now
@ -66,11 +66,11 @@ func main() {
Usage: "Start the CA in monolithic mode, without using AMQP",
Action: func(c *cli.Context) {
// Create the components
wfe := anvil.NewWebFrontEndImpl()
sa := anvil.NewSimpleStorageAuthorityImpl()
ra := anvil.NewRegistrationAuthorityImpl()
va := anvil.NewValidationAuthorityImpl()
ca, err := anvil.NewCertificateAuthorityImpl()
wfe := boulder.NewWebFrontEndImpl()
sa := boulder.NewSimpleStorageAuthorityImpl()
ra := boulder.NewRegistrationAuthorityImpl()
va := boulder.NewValidationAuthorityImpl()
ca, err := boulder.NewCertificateAuthorityImpl()
failOnError(err, "Unable to create CA")
// Wire them up
@ -105,25 +105,25 @@ func main() {
ch := amqpChannel(amqpServerURL)
// Create AMQP-RPC clients for CA, VA, RA, SA
cac, err := anvil.NewCertificateAuthorityClient("CA.client", "CA.server", ch)
cac, err := boulder.NewCertificateAuthorityClient("CA.client", "CA.server", ch)
failOnError(err, "Failed to create CA client")
vac, err := anvil.NewValidationAuthorityClient("VA.client", "VA.server", ch)
vac, err := boulder.NewValidationAuthorityClient("VA.client", "VA.server", ch)
failOnError(err, "Failed to create VA client")
rac, err := anvil.NewRegistrationAuthorityClient("RA.client", "RA.server", ch)
rac, err := boulder.NewRegistrationAuthorityClient("RA.client", "RA.server", ch)
failOnError(err, "Failed to create RA client")
sac, err := anvil.NewStorageAuthorityClient("SA.client", "SA.server", ch)
sac, err := boulder.NewStorageAuthorityClient("SA.client", "SA.server", ch)
failOnError(err, "Failed to create SA client")
// ... and corresponding servers
// (We need this order so that we can give the servers
// references to the clients)
cas, err := anvil.NewCertificateAuthorityServer("CA.server", ch)
cas, err := boulder.NewCertificateAuthorityServer("CA.server", ch)
failOnError(err, "Failed to create CA server")
vas, err := anvil.NewValidationAuthorityServer("VA.server", ch, &rac)
vas, err := boulder.NewValidationAuthorityServer("VA.server", ch, &rac)
failOnError(err, "Failed to create VA server")
ras, err := anvil.NewRegistrationAuthorityServer("RA.server", ch, &vac, &cac, &sac)
ras, err := boulder.NewRegistrationAuthorityServer("RA.server", ch, &vac, &cac, &sac)
failOnError(err, "Failed to create RA server")
sas := anvil.NewStorageAuthorityServer("SA.server", ch)
sas := boulder.NewStorageAuthorityServer("SA.server", ch)
// Start the servers
cas.Start()
@ -132,7 +132,7 @@ func main() {
sas.Start()
// Wire up the front end (wrappers are already wired)
wfe := anvil.NewWebFrontEndImpl()
wfe := boulder.NewWebFrontEndImpl()
wfe.RA = &rac
wfe.SA = &sac
@ -159,14 +159,14 @@ func main() {
// Create necessary clients
ch := amqpChannel(amqpServerURL)
rac, err := anvil.NewRegistrationAuthorityClient("RA.client", "RA.server", ch)
rac, err := boulder.NewRegistrationAuthorityClient("RA.client", "RA.server", ch)
failOnError(err, "Unable to create RA client")
sac, err := anvil.NewStorageAuthorityClient("SA.client", "SA.server", ch)
sac, err := boulder.NewStorageAuthorityClient("SA.client", "SA.server", ch)
failOnError(err, "Unable to create SA client")
// Create the front-end and wire in its resources
wfe := anvil.NewWebFrontEndImpl()
wfe := boulder.NewWebFrontEndImpl()
wfe.RA = &rac
wfe.SA = &sac
@ -191,7 +191,7 @@ func main() {
Action: func(c *cli.Context) {
ch := amqpChannel(amqpServerURL)
cas, err := anvil.NewCertificateAuthorityServer("CA.server", ch)
cas, err := boulder.NewCertificateAuthorityServer("CA.server", ch)
failOnError(err, "Unable to create CA server")
runForever(cas)
},
@ -202,7 +202,7 @@ func main() {
Action: func(c *cli.Context) {
ch := amqpChannel(amqpServerURL)
sas := anvil.NewStorageAuthorityServer("SA.server", ch)
sas := boulder.NewStorageAuthorityServer("SA.server", ch)
runForever(sas)
},
},
@ -212,10 +212,10 @@ func main() {
Action: func(c *cli.Context) {
ch := amqpChannel(amqpServerURL)
rac, err := anvil.NewRegistrationAuthorityClient("RA.client", "RA.server", ch)
rac, err := boulder.NewRegistrationAuthorityClient("RA.client", "RA.server", ch)
failOnError(err, "Unable to create RA client")
vas, err := anvil.NewValidationAuthorityServer("VA.server", ch, &rac)
vas, err := boulder.NewValidationAuthorityServer("VA.server", ch, &rac)
failOnError(err, "Unable to create VA server")
runForever(vas)
},
@ -227,16 +227,16 @@ func main() {
// TODO
ch := amqpChannel(amqpServerURL)
vac, err := anvil.NewValidationAuthorityClient("VA.client", "VA.server", ch)
vac, err := boulder.NewValidationAuthorityClient("VA.client", "VA.server", ch)
failOnError(err, "Unable to create VA client")
cac, err := anvil.NewCertificateAuthorityClient("CA.client", "CA.server", ch)
cac, err := boulder.NewCertificateAuthorityClient("CA.client", "CA.server", ch)
failOnError(err, "Unable to create CA client")
sac, err := anvil.NewStorageAuthorityClient("SA.client", "SA.server", ch)
sac, err := boulder.NewStorageAuthorityClient("SA.client", "SA.server", ch)
failOnError(err, "Unable to create SA client")
ras, err := anvil.NewRegistrationAuthorityServer("RA.server", ch, &vac, &cac, &sac)
ras, err := boulder.NewRegistrationAuthorityServer("RA.server", ch, &vac, &cac, &sac)
failOnError(err, "Unable to create RA server")
runForever(ras)
},

View File

@ -3,7 +3,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
package anvil
package boulder
import ()

View File

@ -3,7 +3,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
package anvil
package bouler
import (
"crypto/rand"

View File

@ -3,7 +3,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
package anvil
package boulder
import (
"crypto/x509"

View File

@ -3,7 +3,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
package anvil
package boulder
import (
"crypto/x509"
@ -39,7 +39,7 @@ const (
// An AcmeIdentifier encodes an identifier that can
// be validated by ACME. The protocol allows for different
// types of identifier to be supported (DNS names, IP
// addresses, etc.), but currently anvil only supports
// addresses, etc.), but currently we only support
// domain names.
type AcmeIdentifier struct {
Type IdentifierType `json:"type"` // The type of identifier being encoded
@ -132,7 +132,7 @@ func (ch Challenge) MergeResponse(resp Challenge) Challenge {
// on the wire (e.g., ID) must be made empty before marshaling.
type Authorization struct {
// An identifier for this authorization, unique across
// authorizations and certificates within this anvil instance.
// authorizations and certificates within this instance.
ID string `json:"id,omitempty"`
// The identifier for which authorization is being given
@ -164,11 +164,11 @@ type Authorization struct {
Contact []AcmeURL `json:"contact,omitempty"`
}
// Certificate objects are entirely internal to Anvil. The only
// Certificate objects are entirely internal to the server. The only
// thing exposed on the wire is the certificate itself.
type Certificate struct {
// An identifier for this authorization, unique across
// authorizations and certificates within this anvil instance.
// authorizations and certificates within this instance.
ID string
// The certificate itself

View File

@ -3,7 +3,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
package anvil
package boulder
import (
"crypto/sha256"

View File

@ -3,7 +3,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
package anvil
package boulder
import (
"crypto/x509"

View File

@ -3,7 +3,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
package anvil
package boulder
import (
"fmt"

View File

@ -3,7 +3,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
package anvil
package boulder
import (
"crypto"

View File

@ -3,7 +3,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
package anvil
package boulder
import (
"bytes"

View File

@ -3,7 +3,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
package anvil
package boulder
import (
"encoding/json"