Consul
Encryption parameters for Consul agent configuration files
The page provides reference information for encryption parameters in a Consul agent configuration file.
Encryption parameters
auto_encryptThis object allows setting options for theauto_encryptfeature.The following sub-keys are available:
allow_tls(Defaults tofalse) This option enablesauto_encrypton the servers and allows them to automatically distribute certificates from the service mesh CA to the clients. If enabled, the server can accept incoming connections from both the built-in CA and the service mesh CA, as well as their certificates. Note, the server will only present the built-in CA and certificate, which the client can verify using the CA it received fromauto_encryptendpoint. If disabled, a client configured withauto_encrypt.tlswill be unable to start.tls(Defaults tofalse) Allows the client to request the service mesh CA and certificates from the servers, for encrypting RPC communication. The client will make the request to any servers listed in the-retry-joinoption. This requires that every server to haveauto_encrypt.allow_tlsenabled. When bothauto_encryptoptions are used, it allows clients to receive certificates that are generated on the servers. If the-server-portis not the default one, it has to be provided to the client as well. Usually this is discovered through LAN gossip, butauto_encryptprovision happens before the information can be distributed through gossip. The most secureauto_encryptsetup is when the client is provided with the built-in CA,verify_server_hostnameis turned on, and when an ACL token withnode.writepermissions is setup. It is also possible to useauto_encryptwith a CA and ACL, but withoutverify_server_hostname, or only with a ACL enabled, or only with CA andverify_server_hostname, or only with a CA, or finally without a CA and without ACL enabled. In any case, the communication to theauto_encryptendpoint is always TLS encrypted.Warning: Enabling
auto_encrypt.tlsconflicts with theauto_configfeature. Only one option may be specified.dns_san(Defaults to[]) When this option is being used, the certificates requested byauto_encryptfrom the server have thesedns_sanset as DNS SAN.ip_san(Defaults to[]) When this option is being used, the certificates requested byauto_encryptfrom the server have theseip_sanset as IP SAN.
encrypt- Specifies the secret key to use for encryption of Consul network traffic. This key must be 32-bytes that are Base64-encoded. The easiest way to create an encryption key is to useconsul keygen. All nodes within a cluster must share the same encryption key to communicate. The provided key is automatically persisted to the data directory and loaded automatically whenever the agent is restarted. This means that to encrypt Consul's gossip protocol, this option only needs to be provided once on each agent's initial startup sequence. If it is provided after Consul has been initialized with an encryption key, then the provided key is ignored and a warning will be displayed.encrypt_verify_incoming- This is an optional parameter that can be used to disable enforcing encryption for incoming gossip in order to upshift from unencrypted to encrypted gossip on a running cluster. See this section for more information. Defaults to true.encrypt_verify_outgoing- This is an optional parameter that can be used to disable enforcing encryption for outgoing gossip in order to upshift from unencrypted to encrypted gossip on a running cluster. See this section for more information. Defaults to true.