Skip to content

Commit fefeb24

Browse files
authored
Prepare release v1.0.0 (#559)
* Prepare release v1.0.0 * review: remove infrastructure items from CHANGELOG.md * review: updated CHANGELOG.md message * review: added ACME v1 reference in README.md * review: README.md updates * review: removed experimental note
1 parent 6004e59 commit fefeb24

File tree

2 files changed

+78
-51
lines changed

2 files changed

+78
-51
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## [v1.0.0] - 2018-05-30
4+
5+
### Changed:
6+
- **[lib]** ACME v2 Support.
7+
- **[dnsprovider]** Renamed `/providers/dns/googlecloud` to `/providers/dns/gcloud`.
8+
- **[dnsprovider]** Modified Google Cloud provider `gcloud.NewDNSProviderServiceAccount` function to extract the project id directly from the service account file.
9+
- **[dnsprovider]** Made errors more verbose for the Cloudflare provider.
10+
311
## [v0.5.0] - 2018-05-29
412

513
### Added:

README.md

Lines changed: 70 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,53 @@
11
# lego
2+
23
Let's Encrypt client and ACME library written in Go
34

45
[![GoDoc](https://godoc.org/github.com/xenolf/lego/acme?status.svg)](https://godoc.org/github.com/xenolf/lego/acme)
56
[![Build Status](https://travis-ci.org/xenolf/lego.svg?branch=master)](https://travis-ci.org/xenolf/lego)
67
[![Dev Chat](https://img.shields.io/badge/dev%20chat-gitter-blue.svg?label=dev+chat)](https://gitter.im/xenolf/lego)
78
[![Beerpay](https://beerpay.io/xenolf/lego/badge.svg)](https://beerpay.io/xenolf/lego)
89

9-
#### General
10-
This is a work in progress. Please do *NOT* run this on a production server and please report any bugs you find!
10+
## Installation
1111

12-
#### Installation
1312
lego supports both binary installs and install from source.
1413

1514
To get the binary just download the latest release for your OS/Arch from [the release page](https://github.com/xenolf/lego/releases)
1615
and put the binary somewhere convenient. lego does not assume anything about the location you run it from.
1716

18-
To install from source, just run
19-
```
17+
To install from source, just run:
18+
19+
```bash
2020
go get -u github.com/xenolf/lego
2121
```
2222

2323
To build lego inside a Docker container, just run
24-
```
24+
25+
```bash
2526
docker build -t lego .
2627
```
2728

28-
The container is, by default, built from `master`.
29-
This can be overridden by supplying a build argument containing a git SHA or reference.
29+
That will build lego from the current source, if you want to build a different
30+
version, you can checkout the desired branch/tag/commit, and re-running the
31+
above mentioned command.
32+
33+
If you want to tag the binary with the designated release, you can do so by
34+
passing the version identifier as a [`--build-arg`](https://docs.docker.com/engine/reference/commandline/build/#set-build-time-variables---build-arg)
35+
3036
```bash
31-
docker build --build-arg LEGO_VERSION=tags/v0.5.0 -t lego .
37+
docker build --build-arg LEGO_VERSION=v1.0.0 -t lego .
3238
```
3339

34-
##### From the package manager
40+
Otherwise the release will be tagged with the `dev` version identifier.
41+
42+
### From the package manager
43+
3544
- [ArchLinux (AUR)](https://aur.archlinux.org/packages/lego-git):
36-
```
37-
yaourt -S lego-git
38-
```
39-
#### Features
45+
46+
```bash
47+
yaourt -S lego-git
48+
```
49+
50+
## Features
4051

4152
- Register with CA
4253
- Obtain certificates, both from scratch or with an existing CSR
@@ -55,33 +66,9 @@ Please keep in mind that CLI switches and APIs are still subject to change.
5566

5667
When using the standard `--path` option, all certificates and account configurations are saved to a folder *.lego* in the current working directory.
5768

58-
#### Sudo
59-
The CLI does not require root permissions but needs to bind to port 80 and 443 for certain challenges.
60-
To run the CLI without sudo, you have four options:
61-
62-
- Use setcap 'cap_net_bind_service=+ep' /path/to/program
63-
- Pass the `--http` or/and the `--tls` option and specify a custom port to bind to. In this case you have to forward port 80/443 to these custom ports (see [Port Usage](#port-usage)).
64-
- Pass the `--webroot` option and specify the path to your webroot folder. In this case the challenge will be written in a file in `.well-known/acme-challenge/` inside your webroot.
65-
- Pass the `--dns` option and specify a DNS provider.
66-
67-
#### Port Usage
68-
By default lego assumes it is able to bind to ports 80 and 443 to solve challenges.
69-
If this is not possible in your environment, you can use the `--http` and `--tls` options to instruct
70-
lego to listen on that interface:port for any incoming challenges.
71-
72-
If you are using this option, make sure you proxy all of the following traffic to these ports.
73-
74-
HTTP Port:
75-
- All plaintext HTTP requests to port 80 which begin with a request path of `/.well-known/acme-challenge/` for the HTTP challenge.
76-
77-
TLS Port:
78-
- All TLS handshakes on port 443 for the TLS-SNI challenge.
79-
80-
This traffic redirection is only needed as long as lego solves challenges. As soon as you have received your certificates you can deactivate the forwarding.
81-
82-
#### Usage
69+
## Usage
8370

84-
```
71+
```text
8572
NAME:
8673
lego - Let's Encrypt client written in Go
8774
@@ -119,56 +106,84 @@ GLOBAL OPTIONS:
119106
--version, -v print the version
120107
```
121108
122-
##### CLI Example
109+
### Sudo
110+
111+
The CLI does not require root permissions but needs to bind to port 80 and 443 for certain challenges.
112+
To run the CLI without sudo, you have four options:
113+
114+
- Use setcap 'cap_net_bind_service=+ep' /path/to/program
115+
- Pass the `--http` or/and the `--tls` option and specify a custom port to bind to. In this case you have to forward port 80/443 to these custom ports (see [Port Usage](#port-usage)).
116+
- Pass the `--webroot` option and specify the path to your webroot folder. In this case the challenge will be written in a file in `.well-known/acme-challenge/` inside your webroot.
117+
- Pass the `--dns` option and specify a DNS provider.
118+
119+
### Port Usage
120+
121+
By default lego assumes it is able to bind to ports 80 and 443 to solve challenges.
122+
If this is not possible in your environment, you can use the `--http` and `--tls` options to instruct
123+
lego to listen on that interface:port for any incoming challenges.
124+
125+
If you are using this option, make sure you proxy all of the following traffic to these ports.
126+
127+
HTTP Port:
128+
129+
- All plaintext HTTP requests to port 80 which begin with a request path of `/.well-known/acme-challenge/` for the HTTP challenge.
130+
131+
TLS Port:
132+
133+
- All TLS handshakes on port 443 for the TLS-SNI challenge.
134+
135+
This traffic redirection is only needed as long as lego solves challenges. As soon as you have received your certificates you can deactivate the forwarding.
136+
137+
### CLI Example
123138
124139
Assumes the `lego` binary has permission to bind to ports 80 and 443. You can get a pre-built binary from the [releases](https://github.com/xenolf/lego/releases) page.
125140
If your environment does not allow you to bind to these ports, please read [Port Usage](#port-usage).
126141
127142
Obtain a certificate:
128143
129144
```bash
130-
$ lego --email="[email protected]" --domains="example.com" run
145+
lego --email="[email protected]" --domains="example.com" run
131146
```
132147
133148
(Find your certificate in the `.lego` folder of current working directory.)
134149
135150
To renew the certificate:
136151
137152
```bash
138-
$ lego --email="[email protected]" --domains="example.com" renew
153+
lego --email="[email protected]" --domains="example.com" renew
139154
```
140155
141156
To renew the certificate only if it's older than 30 days
142157
143158
```bash
144-
$ lego --email="[email protected]" --domains="example.com" renew --days 30
159+
lego --email="[email protected]" --domains="example.com" renew --days 30
145160
```
146161
147162
Obtain a certificate using the DNS challenge and AWS Route 53:
148163
149164
```bash
150-
$ AWS_REGION=us-east-1 AWS_ACCESS_KEY_ID=my_id AWS_SECRET_ACCESS_KEY=my_key lego --email="[email protected]" --domains="example.com" --dns="route53" run
165+
AWS_REGION=us-east-1 AWS_ACCESS_KEY_ID=my_id AWS_SECRET_ACCESS_KEY=my_key lego --email="[email protected]" --domains="example.com" --dns="route53" run
151166
```
152167
153168
Note that `--dns=foo` implies `--exclude=http-01`. lego will not attempt other challenges if you've told it to use DNS instead.
154169
155170
Obtain a certificate given a certificate signing request (CSR) generated by something else:
156171
157172
```bash
158-
$ lego --email="[email protected]" --csr=/path/to/csr.pem run
173+
lego --email="[email protected]" --csr=/path/to/csr.pem run
159174
```
160175
161176
(lego will infer the domains to be validated based on the contents of the CSR, so make sure the CSR's Common Name and optional SubjectAltNames are set correctly.)
162177
163178
lego defaults to communicating with the production Let's Encrypt ACME server. If you'd like to test something without issuing real certificates, consider using the staging endpoint instead:
164179
165180
```bash
166-
$ lego --server=https://acme-staging.api.letsencrypt.org/directory …
181+
lego --server=https://acme-staging.api.letsencrypt.org/directory …
167182
```
168183
169-
#### DNS Challenge API Details
184+
## DNS Challenge API Details
170185
171-
##### AWS Route 53
186+
### AWS Route 53
172187
173188
The following AWS IAM policy document describes the permissions required for lego to complete the DNS challenge.
174189
Replace `<INSERT_YOUR_HOSTED_ZONE_ID_HERE>` with the Route 53 zone ID of the domain you are authorizing.
@@ -200,7 +215,7 @@ Replace `<INSERT_YOUR_HOSTED_ZONE_ID_HERE>` with the Route 53 zone ID of the dom
200215
}
201216
```
202217
203-
#### ACME Library Usage
218+
## ACME Library Usage
204219
205220
A valid, but bare-bones example use of the acme package:
206221
@@ -240,7 +255,7 @@ if err != nil {
240255
}
241256
242257
// We specify an http port of 5002 and an tls port of 5001 on all interfaces
243-
// because we aren't running as root and can't bind a listener to port 80 and 443
258+
// because we aren't running as root and can't bind a listener to port 80 and 443
244259
// (used later when we attempt to pass challenges). Keep in mind that we still
245260
// need to proxy challenge traffic to port 5002 and 5001.
246261
client.SetHTTPAddress(":5002")
@@ -276,3 +291,7 @@ fmt.Printf("%#v\n", certificates)
276291
277292
// ... all done.
278293
```
294+
295+
## ACME v1
296+
297+
lego introduced support for ACME v2 in [v1.0.0](https://github.com/xenolf/lego/releases/tag/v1.0.0), if you still need to utilize ACME v1, you can do so by using the [v0.5.0](https://github.com/xenolf/lego/releases/tag/v0.5.0) version.

0 commit comments

Comments
 (0)