From 1ec3e8276f43bce56165dce441461f3135ea717b Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Mon, 26 Oct 2020 12:10:01 -0400 Subject: [PATCH] Add Unix listener docs (#750) Co-authored-by: Jeff Malnick --- .../docs/configuration/listener/index.mdx | 3 +- .../docs/configuration/listener/tcp.mdx | 2 +- .../docs/configuration/listener/unix.mdx | 161 ++++++++++++++++++ website/data/docs-navigation.js | 5 +- 4 files changed, 168 insertions(+), 3 deletions(-) create mode 100644 website/content/docs/configuration/listener/unix.mdx diff --git a/website/content/docs/configuration/listener/index.mdx b/website/content/docs/configuration/listener/index.mdx index a9f45ab8b..4822052ba 100644 --- a/website/content/docs/configuration/listener/index.mdx +++ b/website/content/docs/configuration/listener/index.mdx @@ -10,6 +10,7 @@ description: |- # `listener` Stanza The `listener` stanza configures the addresses and ports on which Boundary will -respond to requests. At this time, there is only one listener - [TCP][tcp]. +respond to requests. At this time, there are two listeners - [TCP][tcp] and [Unix][unix]. [tcp]: /docs/configuration/listener/tcp +[unix]: /docs/configuration/listener/unix \ No newline at end of file diff --git a/website/content/docs/configuration/listener/tcp.mdx b/website/content/docs/configuration/listener/tcp.mdx index 8b3f7dcba..8a27c6631 100644 --- a/website/content/docs/configuration/listener/tcp.mdx +++ b/website/content/docs/configuration/listener/tcp.mdx @@ -46,7 +46,7 @@ allowed. - `http_write_timeout` `string: "0")` - Specifies the maximum duration before timing out writes of the response and is reset whenever a new request's header - is read. The default value of `"0"` means inifinity. This is specified using a + is read. The default value of `"0"` means infinity. This is specified using a label suffix like `"30s"` or `"1h"`. + +- `max_request_duration` `(string: "90s")` – Specifies the maximum + request duration allowed before Boundary cancels the request. This overrides + `default_max_request_duration` for this listener. + +- `tls_disable` `(string: "false")` – Specifies if TLS will be disabled. Boundary + assumes TLS by default, so you must explicitly disable TLS to opt-in to + insecure communication. + +- `tls_cert_file` `(string: , reloads-on-SIGHUP)` – + Specifies the path to the certificate for TLS. To configure the listener to + use a CA certificate, concatenate the primary certificate and the CA + certificate together. The primary certificate should appear first in the + combined file. On `SIGHUP`, the path set here _at Boundary startup_ will be used + for reloading the certificate; modifying this value while Boundary is running + will have no effect for `SIGHUP`s. + +- `tls_key_file` `(string: , reloads-on-SIGHUP)` – + Specifies the path to the private key for the certificate. If the key file + is encrypted, you will be prompted to enter the passphrase on server startup. + The passphrase must stay the same between key files when reloading your + configuration using `SIGHUP`. On `SIGHUP`, the path set here _at Boundary + startup_ will be used for reloading the certificate; modifying this value + while Boundary is running will have no effect for `SIGHUP`s. + +- `tls_min_version` `(string: "tls12")` – Specifies the minimum supported + version of TLS. Accepted values are "tls10", "tls11", "tls12" or "tls13". + + ~> **Warning**: TLS 1.1 and lower are generally considered insecure. + +- `tls_cipher_suites` `(string: "")` – Specifies the list of supported + ciphersuites as a comma-separated-list. The list of all available ciphersuites + is available in the [Golang TLS documentation][golang-tls]. + +- `tls_prefer_server_cipher_suites` `(string: "false")` – Specifies to prefer the + server's ciphersuite over the client ciphersuites. + +- `tls_require_and_verify_client_cert` `(string: "false")` – Turns on client + authentication for this listener; the listener will require a presented + client cert that successfully validates against system CAs. + +- `tls_client_ca_file` `(string: "")` – PEM-encoded Certificate Authority file + used for checking the authenticity of client. + + + +## `unix` Listener Examples + +### Configuring TLS + +This example shows enabling a TLS listener. + +```hcl +listener "unix" { + purpose = "api" + address = "/var/run/boundary-api.sock" + tls_cert_file = "/etc/certs/Boundary.crt" + tls_key_file = "/etc/certs/Boundary.key" +} +``` + +### Listening on Multiple Interfaces + +This example shows Boundary listening on a private interface, as well as localhost. + +```hcl +listener "tcp" { + purpose = "api" + address = "/var/run/boundary-api.sock" +} + +listener "tcp" { + purpose = "cluster" + address = "/var/run/boundary-cluster.sock" +} +``` + +[golang-tls]: https://golang.org/src/crypto/tls/cipher_suites.go +[api-addr]: /docs/configuration#api_addr +[cluster-addr]: /docs/configuration#cluster_addr diff --git a/website/data/docs-navigation.js b/website/data/docs-navigation.js index dd34b1344..f1bc623ba 100644 --- a/website/data/docs-navigation.js +++ b/website/data/docs-navigation.js @@ -61,7 +61,10 @@ export default [ content: [ { category: 'listener', - content: ['tcp'], + content: [ + 'tcp', + 'unix', + ], }, { category: 'kms',