Skip to content

Commit 7d119c2

Browse files
authored
Merge pull request #528 from smallstep/max/install
Updates to README
2 parents ca1286a + 2fee0c9 commit 7d119c2

File tree

1 file changed

+3
-265
lines changed

1 file changed

+3
-265
lines changed

README.md

+3-265
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ Whatever your use case, `step-ca` is easy to use and hard to misuse, thanks to [
2222

2323
[Website](https://smallstep.com/certificates) |
2424
[Documentation](https://smallstep.com/docs) |
25-
[Installation Guide](#installation-guide) |
26-
[Quickstart](#quickstart) |
25+
[Installation](https://smallstep.com/docs/step-ca/installation) |
2726
[Getting Started](https://smallstep.com/docs/step-ca/getting-started) |
2827
[Contributor's Guide](./docs/CONTRIBUTING.md)
2928

@@ -103,270 +102,9 @@ ACME is the protocol used by Let's Encrypt to automate the issuance of HTTPS cer
103102
- [Install root certificates](https://smallstep.com/docs/step-cli/reference/certificate/install/) on your machine and browsers, so your CA is trusted
104103
- [Inspect](https://smallstep.com/docs/step-cli/reference/certificate/inspect/) and [lint](https://smallstep.com/docs/step-cli/reference/certificate/lint/) certificates
105104

106-
## Installation Guide
105+
## Installation
107106

108-
These instructions will install an OS specific version of the `step-ca` binary on
109-
your local machine.
110-
111-
Want to build from source? See [our contributor's guide](./docs/CONTRIBUTING.md)
112-
113-
### Mac OS
114-
115-
Install `step` and `step-ca` together, via [Homebrew](https://brew.sh/):
116-
117-
```
118-
$ brew install step
119-
```
120-
121-
### Linux
122-
123-
> **Note:** The [`step` CLI tool](https://github.com/smallstep/cli) is the easiest way to initialize, configure, and control `step-ca`. While `step` is not technically required to run `step-ca`, it is very much recommended.
124-
125-
#### Debian
126-
127-
1. Install `step`.
128-
129-
Download the Debian package from the
130-
[latest `step` release](https://github.com/smallstep/cli/releases/latest):
131-
132-
```
133-
$ wget https://github.com/smallstep/cli/releases/download/vX.Y.Z/step-cli_X.Y.Z_amd64.deb
134-
```
135-
136-
Install the Debian package:
137-
138-
```
139-
$ sudo dpkg -i step-cli_X.Y.Z_amd64.deb
140-
```
141-
142-
2. Install `step-ca`.
143-
144-
Download the Debian package from the [latest `step-ca` release](https://github.com/smallstep/certificates/releases/latest):
145-
146-
```
147-
$ wget https://github.com/smallstep/certificates/releases/download/vX.Y.Z/step-ca_X.Y.Z_amd64.deb
148-
```
149-
150-
Install the Debian package:
151-
152-
```
153-
$ sudo dpkg -i step-ca_X.Y.Z_amd64.deb
154-
```
155-
156-
#### Arch Linux
157-
158-
We are using the [Arch User Repository](https://aur.archlinux.org) to distribute
159-
`step` binaries for Arch Linux.
160-
161-
* The `step` binary tarball can be found [here](https://aur.archlinux.org/packages/step-cli-bin/).
162-
* The `step-ca` binary tarball can be found [here](https://aur.archlinux.org/packages/step-ca-bin/).
163-
164-
You can use [pacman](https://www.archlinux.org/pacman/) to install the packages.
165-
166-
#### RHEL/CentOS
167-
168-
1. Install `step`.
169-
170-
Download the Linux tarball from the
171-
[latest `step` release](https://github.com/smallstep/cli/releases/latest):
172-
173-
```
174-
$ wget -O step-cli.tar.gz https://github.com/smallstep/cli/releases/download/vX.Y.Z/step_linux_X.Y.Z_amd64.tar.gz
175-
```
176-
177-
Install `step` by unzipping and copying the executable over to `/usr/bin`:
178-
179-
```
180-
$ tar -xf step-cli.tar.gz
181-
$ sudo cp step_X.Y.Z/bin/step /usr/bin
182-
```
183-
184-
2. Install `step-ca`.
185-
186-
Download the Linux package from the [latest `step-ca` release](https://github.com/smallstep/certificates/releases/latest):
187-
188-
```
189-
$ wget -O step-ca.tar.gz https://github.com/smallstep/certificates/releases/download/vX.Y.Z/step-ca_linux_X.Y.Z_amd64.tar.gz
190-
```
191-
192-
Install `step-ca` by unzipping and copying the executable over to `/usr/bin`:
193-
194-
```
195-
$ tar -xf step-ca.tar.gz
196-
$ sudo cp step-ca_X.Y.Z/bin/step-ca /usr/bin
197-
```
198-
199-
See the [`systemctl` setup section](https://smallstep.com/docs/step-ca/certificate-authority-server-production#running-step-ca-as-a-daemon) for a
200-
guide on configuring `step-ca` as a daemon.
201-
202-
### Kubernetes
203-
204-
We publish [helm charts](https://hub.helm.sh/charts/smallstep/step-certificates) for easy installation on kubernetes:
205-
206-
```
207-
helm install step-certificates
208-
```
209-
210-
> <a href="https://github.com/smallstep/autocert"><img width="25%" src="https://raw.githubusercontent.com/smallstep/autocert/master/autocert-logo.png"></a>
211-
>
212-
> If you're using Kubernetes, make sure you [check out
213-
> autocert](https://github.com/smallstep/autocert): a kubernetes add-on that builds on `step
214-
> certificates` to automatically inject TLS/HTTPS certificates into your containers.
215-
216-
### Docker
217-
218-
See our [Docker getting started guide](https://smallstep.com/docs/tutorials/docker-tls-certificate-authority)
219-
220-
### Test
221-
222-
<pre><code><b>$ step version</b>
223-
Smallstep CLI/0.10.0 (darwin/amd64)
224-
Release Date: 2019-04-30 19:01 UTC
225-
226-
<b>$ step-ca version</b>
227-
Smallstep CA/0.10.0 (darwin/amd64)
228-
Release Date: 2019-04-30 19:02 UTC</code></pre>
229-
230-
## Quickstart
231-
232-
In the following guide we'll run a simple `hello` server that requires clients
233-
to connect over an authorized and encrypted channel using HTTPS. `step-ca`
234-
will issue certificates to our server, allowing it to authenticate and encrypt
235-
communication.
236-
237-
![Animated terminal showing step certificates in practice](https://github.com/smallstep/certificates/raw/master/docs/images/step-ca-2-legged.gif)
238-
239-
Let's get started!
240-
241-
### Prerequisites
242-
243-
* [`step`](#installation-guide)
244-
* [golang](https://golang.org/doc/install)
245-
246-
### Let's get started!
247-
248-
#### 1. Run `step ca init` to create your CA's keys & certificates and configure `step-ca`:
249-
250-
<pre><code><b>$ step ca init</b>
251-
✔ What would you like to name your new PKI? (e.g. Smallstep): <b>Example Inc.</b>
252-
✔ What DNS names or IP addresses would you like to add to your new CA? (e.g. ca.smallstep.com[,1.1.1.1,etc.]): <b>localhost</b>
253-
✔ What address will your new CA listen at? (e.g. :443): <b>127.0.0.1:8080</b>
254-
✔ What would you like to name the first provisioner for your new CA? (e.g. [email protected]): <b>[email protected]</b>
255-
✔ What do you want your password to be? [leave empty and we'll generate one]: <b>abc123</b>
256-
257-
Generating root certificate...
258-
all done!
259-
260-
Generating intermediate certificate...
261-
all done!
262-
263-
✔ Root certificate: /Users/bob/src/github.com/smallstep/step/.step/certs/root_ca.crt
264-
✔ Root private key: /Users/bob/src/github.com/smallstep/step/.step/secrets/root_ca_key
265-
✔ Root fingerprint: 702a094e239c9eec6f0dcd0a5f65e595bf7ed6614012825c5fe3d1ae1b2fd6ee
266-
✔ Intermediate certificate: /Users/bob/src/github.com/smallstep/step/.step/certs/intermediate_ca.crt
267-
✔ Intermediate private key: /Users/bob/src/github.com/smallstep/step/.step/secrets/intermediate_ca_key
268-
✔ Default configuration: /Users/bob/src/github.com/smallstep/step/.step/config/defaults.json
269-
✔ Certificate Authority configuration: /Users/bob/src/github.com/smallstep/step/.step/config/ca.json
270-
271-
Your PKI is ready to go. To generate certificates for individual services see 'step help ca'.</code></pre>
272-
273-
This command will:
274-
275-
- Generate [password protected](https://github.com/smallstep/certificates/blob/master/docs/GETTING_STARTED.md#passwords) private keys for your CA to sign certificates
276-
- Generate a root and [intermediate signing certificate](https://security.stackexchange.com/questions/128779/why-is-it-more-secure-to-use-intermediate-ca-certificates) for your CA
277-
- Create a JSON configuration file for `step-ca` (see [configuration docs](https://smallstep.com/docs/step-ca/configuration) for details)
278-
279-
You can find these artifacts in `$STEPPATH` (or `~/.step` by default).
280-
281-
#### 2. Start `step-ca`:
282-
283-
You'll be prompted for your password from the previous step, to decrypt the CA's private signing key:
284-
285-
<pre><code><b>$ step-ca $(step path)/config/ca.json</b>
286-
Please enter the password to decrypt /Users/bob/src/github.com/smallstep/step/.step/secrets/intermediate_ca_key: <b>abc123</b>
287-
2019/02/18 13:28:58 Serving HTTPS on 127.0.0.1:8080 ...</code></pre>
288-
289-
#### 3. Copy our `hello world` golang server.
290-
291-
```
292-
$ cat > srv.go <<EOF
293-
package main
294-
295-
import (
296-
"net/http"
297-
"log"
298-
)
299-
300-
func HiHandler(w http.ResponseWriter, req *http.Request) {
301-
w.Header().Set("Content-Type", "text/plain")
302-
w.Write([]byte("Hello, world!\n"))
303-
}
304-
305-
func main() {
306-
http.HandleFunc("/hi", HiHandler)
307-
err := http.ListenAndServeTLS(":8443", "srv.crt", "srv.key", nil)
308-
if err != nil {
309-
log.Fatal(err)
310-
}
311-
}
312-
EOF
313-
```
314-
315-
#### 4. Get an identity for your server from the Step CA.
316-
317-
<pre><code><b>$ step ca certificate localhost srv.crt srv.key</b>
318-
✔ Key ID: rQxROEr7Kx9TNjSQBTETtsu3GKmuW9zm02dMXZ8GUEk ([email protected])
319-
✔ Please enter the password to decrypt the provisioner key: abc123
320-
✔ CA: https://localhost:8080/1.0/sign
321-
✔ Certificate: srv.crt
322-
✔ Private Key: srv.key
323-
324-
<b>$ step certificate inspect --bundle srv.crt</b>
325-
Certificate:
326-
Data:
327-
Version: 3 (0x2)
328-
Serial Number: 140439335711218707689123407681832384336 (0x69a7a1d7f6f22f68059d2d9088307750)
329-
Signature Algorithm: ECDSA-SHA256
330-
Issuer: CN=Example Inc. Intermediate CA
331-
Validity
332-
Not Before: Feb 18 21:32:35 2019 UTC
333-
Not After : Feb 19 21:32:35 2019 UTC
334-
Subject: CN=localhost
335-
...
336-
Certificate:
337-
Data:
338-
Version: 3 (0x2)
339-
Serial Number: 207035091234452090159026162349261226844 (0x9bc18217bd560cf07db23178ed90835c)
340-
Signature Algorithm: ECDSA-SHA256
341-
Issuer: CN=Example Inc. Root CA
342-
Validity
343-
Not Before: Feb 18 21:27:21 2019 UTC
344-
Not After : Feb 15 21:27:21 2029 UTC
345-
Subject: CN=Example Inc. Intermediate CA
346-
...</code></pre>
347-
348-
Note that `step` and `step-ca` handle details like [certificate bundling](https://smallstep.com/blog/everything-pki.html#intermediates-chains-and-bundling) for you.
349-
350-
#### 5. Run the simple server.
351-
352-
<pre><code><b>$ go run srv.go &</b></code></pre>
353-
354-
#### 6. Get the root certificate from the Step CA.
355-
356-
In a new Terminal window:
357-
358-
<pre><code><b>$ step ca root root.crt</b>
359-
The root certificate has been saved in root.crt.</code></pre>
360-
361-
#### 7. Make an authenticated, encrypted curl request to your server using HTTP over TLS.
362-
363-
<pre><code><b>$ curl --cacert root.crt https://localhost:8443/hi</b>
364-
Hello, world!</code></pre>
365-
366-
*All Done!*
367-
368-
Check out the [Getting Started](./docs/GETTING_STARTED.md) guide for more examples
369-
and best practices on running Step CA in production.
107+
See our installation docs [here](https://smallstep.com/docs/step-ca/installation).
370108

371109
## Documentation
372110

0 commit comments

Comments
 (0)