github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/website/content/docs/commands/operator/keyring.mdx (about)

     1  ---
     2  layout: docs
     3  page_title: 'Commands: operator keyring'
     4  sidebar_title: keyring
     5  ---
     6  
     7  # Command: operator keyring
     8  
     9  The `operator keyring` command is used to examine and modify the encryption keys
    10  used in Nomad server. It is capable of distributing new encryption keys to the
    11  cluster, retiring old encryption keys, and changing the keys used by the cluster
    12  to encrypt messages.
    13  
    14  Nomad allows multiple encryption keys to be in use simultaneously. This is
    15  intended to provide a transition state while the cluster converges. It is the
    16  responsibility of the operator to ensure that only the required encryption keys
    17  are installed on the cluster. You can review the installed keys using the
    18  `-list` argument, and remove unneeded keys with `-remove`.
    19  
    20  All operations performed by this command can only be run against server nodes
    21  and will effect the entire cluster.
    22  
    23  All variations of the `keyring` command return 0 if all nodes reply and there
    24  are no errors. If any node fails to reply or reports failure, the exit code
    25  will be 1.
    26  
    27  If ACLs are enabled, this command requires a token with the `agent:write`
    28  capability.
    29  
    30  ## Usage
    31  
    32  ```plaintext
    33  nomad operator keyring [options]
    34  ```
    35  
    36  Only one actionable argument may be specified per run, including `-list`,
    37  `-install`, `-remove`, and `-use`.
    38  
    39  ## General Options
    40  
    41  @include 'general_options_no_namespace.mdx'
    42  
    43  The list of available flags are:
    44  
    45  - `-list` - List all keys currently in use within the cluster.
    46  
    47  - `-install` - Install a new encryption key. This will broadcast the new key to
    48    all members in the cluster.
    49  
    50  - `-use` - Change the primary encryption key, which is used to encrypt messages.
    51    The key must already be installed before this operation can succeed.
    52  
    53  - `-remove` - Remove the given key from the cluster. This operation may only be
    54    performed on keys which are not currently the primary key.
    55  
    56  ## Output
    57  
    58  The output of the `nomad operator keyring -list` command consolidates
    59  information from all the Nomad servers from all datacenters and regions to
    60  provide a simple and easy to understand view of the cluster.
    61  
    62  ```shell-session
    63  $ nomad operator keyring -list
    64  ==> Gathering installed encryption keys...
    65  Key
    66  PGm64/neoebUBqYR/lZTbA==
    67  ```