-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Website Content for the tls command
- Loading branch information
Showing
6 changed files
with
148 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
layout: docs | ||
page_title: 'Commands: tls ca create' | ||
description: | | ||
This command creates a Certificate Authority that can be used to create | ||
self signed certificates to be used for Nomad TLS setup. | ||
--- | ||
|
||
# Command: nomad tls ca create | ||
|
||
Create is used to create a self signed Certificate Authority to be used for Nomad TLS setup. | ||
|
||
## Usage | ||
|
||
```plaintext | ||
nomad tls ca create [options] | ||
``` | ||
|
||
## CA Create Options | ||
|
||
- `-additional-name-constraint=<value>` : Add name constraints for the CA. | ||
Results in rejecting certificates for other DNS than specified. Can be used | ||
multiple times. Only used in combination with `-name-constraint`. | ||
- `common-name` : Common Name of CA. Defaults to Nomad Agent CA. | ||
- `-days=<int>` : Provide number of days the CA is valid for from now on, defaults to 5 years. | ||
- `-domain=<string>` : Domain of nomad cluster. Only used in combination with | ||
`-name-constraint`. Defaults to `nomad`. | ||
- `-name-constraint` : Add name constraints for the CA. Results in rejecting | ||
certificates for other DNS than specified. If turned on localhost and -domain | ||
will be added to the allowed DNS. If the UI is going to be served over HTTPS | ||
its DNS has to be added with `-additional-constraint`. It is not possible to | ||
add that after the fact! Defaults to false. | ||
|
||
|
||
## Example | ||
|
||
Create CA: | ||
|
||
```shell-session | ||
$ nomad tls ca create | ||
==> CA Certificate saved to: nomad-agent-ca.pem | ||
==> CA Certificate key saved to: nomad-agent-ca-key.pem | ||
``` | ||
|
||
Create a CA with a specified domain: | ||
|
||
```shell-session | ||
$ nomad tls ca create -name-constraint="true" -domain="foo.com" | ||
==> CA Certificate saved to: foo.com-agent-ca.pem | ||
==> CA Certificate key saved to: foo.com-agent-ca-key.pem | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
layout: docs | ||
page_title: 'Commands: tls ca info' | ||
description: | | ||
This command displays relevant information that is contained within a | ||
Certificate Authority certificate. | ||
--- | ||
|
||
# Command: nomad tls ca info | ||
|
||
Info is used to display relevant information that is contained within a profided certificate file. | ||
|
||
## Usage | ||
|
||
```plaintext | ||
nomad tls ca info [file-name] | ||
``` | ||
|
||
## Example | ||
|
||
Display default CA: | ||
|
||
```shell-session | ||
$ nomad tls ca info nomad-agent-ca.pem | ||
Serial Number 314623649437549144006237783956683542664 | ||
Issuer CN Nomad Agent CA 314623649437549144006237783956683542664 | ||
Common Name CN=Nomad Agent CA 314623649437549144006237783956683542664,O=HashiCorp Inc.,POSTALCODE=94105,STREET=101 Second Street,L=San Francisco,ST=CA,C=US | ||
Expiry Date 2027-11-13 21:37:38 +0000 UTC | ||
Permitted DNS Domains [] | ||
``` | ||
|
||
Display CA with a custom domain foo.com: | ||
|
||
```shell-session | ||
$ nomad tls ca info foo.com-agent-ca.pem | ||
Serial Number 189027561135335847320487296530900061259 | ||
Issuer CN Nomad Agent CA 189027561135335847320487296530900061259 | ||
Common Name CN=Nomad Agent CA 189027561135335847320487296530900061259,O=HashiCorp Inc.,POSTALCODE=94105,STREET=101 Second Street,L=San Francisco,ST=CA,C=US | ||
Expiry Date 2027-11-13 21:38:15 +0000 UTC | ||
Permitted DNS Domains [foo.com localhost] | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
layout: docs | ||
page_title: 'Commands: TLS Cert Info' | ||
description: | | ||
This command displays relevant information that is contained within a | ||
certificate. | ||
--- | ||
|
||
# Command: nomad tls cert info | ||
|
||
Info is used to display relevant information that is contained within a profided certificate file. | ||
|
||
## Usage | ||
|
||
```plaintext | ||
nomad tls cert info [file-name] | ||
``` | ||
|
||
## Examples | ||
|
||
Display default Certificate Info: | ||
|
||
```shell-session | ||
$ nomad tls cert info global-cli-nomad.pem | ||
Serial Number 307777061759235334129808343588809897525 | ||
Issuer CN Nomad Agent CA 314623649437549144006237783956683542664 | ||
Common Name CN=cli.global.nomad | ||
Expiry Date 2023-11-14 21:40:45 +0000 UTC | ||
DNS Names [cli.global.nomad localhost] | ||
IP Addresses [] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,28 @@ | ||
--- | ||
layout: docs | ||
page_title: 'Commands: TLS' | ||
page_title: 'Commands: tls' | ||
description: | | ||
The tls command is used to help with creating a Certificate Authority | ||
and up self signed certificates for Nomad TLS configuration. | ||
--- | ||
|
||
# Nomad TLS | ||
# Command: tls | ||
|
||
Command: `nomad tls` | ||
|
||
The `tls` command is used to help with setting up a CA and certificates for Nomad TLS. | ||
|
||
## Basic Examples | ||
|
||
Create a CA: | ||
|
||
```shell-session | ||
$ nomad tls ca create | ||
==> Saved nomad-agent-ca.pem | ||
==> Saved nomad-agent-ca-key.pem | ||
``` | ||
|
||
Create a client certificate: | ||
|
||
```shell-session | ||
$ nomad tls cert create -client | ||
==> Using nomad-agent-ca.pem and nomad-agent-ca-key.pem | ||
==> Saved dc1-client-nomad.pem | ||
==> Saved dc1-client-nomad-key.pem | ||
``` | ||
The `tls` command is used to help with setting up a self signed CA and certificates for Nomad TLS. | ||
|
||
## Usage | ||
|
||
Usage: `nomad tls <subcommand> <subcommand> [options]` | ||
|
||
Run `nomad tls <subcommand> -h` for help on that subcommand. The following | ||
subcommands are available: | ||
|
||
```text | ||
Usage: nomad tls <subcommand> <subcommand> [options] | ||
# ... | ||
Subcommands: | ||
ca Helpers for CAs | ||
cert Helpers for certificates | ||
``` | ||
- [`ca create`][cacreate] - Create Certificate Authority | ||
- [`ca info`][cainfo] - Display information from a CA certificate | ||
- [`cert create`][certcreate] - Create self signed certificates | ||
- [`cert info`][certinfo] - Display information from a certificate | ||
|
||
For more information, examples, and usage about a subcommand, click on the name | ||
of the subcommand in the sidebar or one of the links below: | ||
[cacreate]: /docs/commands/tls/ca-create 'Create Certificate Authority' | ||
[cainfo]: /docs/commands/tls/ca-info 'Display information from a CA certificate' | ||
[certcreate]: /docs/commands/tls/cert-create 'Create self signed certificates' | ||
[certinfo]: /docs/commands/tls/cert-info 'Display information from a certificate' |