Skip to content

Commit

Permalink
Added support for tls min version and tls cipher suites
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonneurohr committed Jul 25, 2019
1 parent ddbcf2d commit c7f4571
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ consul_tls_verify_incoming_https: false
consul_tls_verify_server_hostname: false
consul_tls_files_remote_src: false

consul_tls_min_version: "{{ lookup('env','CONSUL_TLS_MIN_VERSION') | default('tls12', true) }}"
consul_tls_cipher_suites: ""
consul_tls_prefer_server_cipher_suites: "{{ lookup('env','CONSUL_TLS_PREFER_SERVER_CIPHER_SUITES') | default('false', true) }}"

## DNS
consul_delegate_datacenter_dns: "{{ lookup('env','CONSUL_DELEGATE_DATACENTER_DNS') | default(false, true) }}"
consul_dnsmasq_enable: "{{ lookup('env','CONSUL_DNSMASQ_ENABLE') | default(false, true) }}"
Expand Down
5 changes: 5 additions & 0 deletions templates/config.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@
"verify_outgoing": {{ consul_tls_verify_outgoing | bool | to_json }},
"verify_incoming_https": {{consul_tls_verify_incoming_https | bool| to_json }},
"verify_server_hostname": {{ consul_tls_verify_server_hostname | bool | to_json }},
"tls_min_version": "{{ consul_tls_min_version }}",
{% if consul_tls_cipher_suites is defined and consul_tls_cipher_suites %}
"tls_cipher_suites": "{{ vault_tls_cipher_suites}}",
{% endif %}
"tls_prefer_server_cipher_suites": {{ vault_tls_prefer_server_cipher_suites | bool | to_json }},
{% endif %}

{## LAN Join ##}
Expand Down

3 comments on commit c7f4571

@issmirnov
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jasonneurohr can you update the documentation? Our consul playbook doesn't have vault_tls_prefer_server_cipher_suites defined and this commit broke the build.

Did you perhaps mean to use consul_tls_prefer_server_cipher_suites ? (note the consul prefix)

@jasonneurohr
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @issmirnov - good pickup. I'm submitting a fixed version now which also includes the documentation updates.

@jasonneurohr
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request submitted - #302

Please sign in to comment.