bootstrap.txt 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. Bootstrapping CFSSL
  2. ====================
  3. CFSSL has no other dependencies besides a working Go 1.4 installation.
  4. It uses only standard library components, besides those packages
  5. included in the software.
  6. 1. Installing CFSSL
  7. ```
  8. go get -u github.com/cloudflare/cfssl/cmd/cfssl
  9. ```
  10. The `cfssl` binary may now be found in the `$GOPATH/bin` directory.
  11. 1.1 Installing mkbundle
  12. Installing the `mkbundle` utility is similar:
  13. ```
  14. go get -u github.com/cloudflare/cfssl/cmd/mkbundle
  15. ```
  16. 1.2 Installing cfssljson
  17. The `cfssljson` utility is installed with:
  18. ```
  19. go get -u github.com/cloudflare/cfssl/cmd/cfssljson
  20. ```
  21. Alternatively, all three can be accomplished in one pass:
  22. ```
  23. go get -u github.com/cloudflare/cfssl/cmd/...
  24. ```
  25. All three binaries will now be in the `$GOPATH/bin` directory.
  26. 2. Set up the intermediate and root certificate bundles
  27. The pre-built default CloudFlare bundles may be found in the
  28. [cfssl_trust](https://github.com/cloudflare/cfssl_trust) repository.
  29. `cfssl` will, by default, look for these bundles in `/etc/cfssl/`;
  30. it will look for a `ca-bundle.crt` and `int-bundle.crt`.
  31. 3. [Optional] Set up the CA certificate and key
  32. First, create a JSON file containing the key request similar to the
  33. following (perhaps in `ca.json`):
  34. ```
  35. {
  36. "hosts": [
  37. "ca.example.com"
  38. ],
  39. "key": {
  40. "algo": "rsa",
  41. "size": 4096
  42. },
  43. "names": [
  44. {
  45. "C": "US",
  46. "L": "San Francisco",
  47. "O": "Internet Widgets, LLC",
  48. "OU": "Certificate Authority",
  49. "ST": "California"
  50. }
  51. ]
  52. }
  53. ```
  54. Then, initialise the CA:
  55. ```
  56. cfssl genkey -initca ca.json | cfssljson -bare ca
  57. ```
  58. When `cfssl` starts up, it will look by default for a CA key named
  59. `ca-key.pem` and a certificate named `ca.pem` in `/etc/cfssl`; this may
  60. be changed via the command line options. If it can't find the key and
  61. certificate mentioned, it start up without the CA functionality enabled.
  62. 4. Start up the server
  63. ```
  64. cfssl serve
  65. ```
  66. The endpoints for the server are described in `doc/api.txt`.