Merge "Add support for encrypting Barbican API"

This commit is contained in:
Zuul 2020-05-13 16:36:27 +00:00 committed by Gerrit Code Review
commit 9540f22e24
5 changed files with 30 additions and 8 deletions

View File

@ -16,12 +16,14 @@ barbican_services:
external: false external: false
port: "{{ barbican_api_port }}" port: "{{ barbican_api_port }}"
listen_port: "{{ barbican_api_listen_port }}" listen_port: "{{ barbican_api_listen_port }}"
tls_backend: "{{ barbican_enable_tls_backend }}"
barbican_api_external: barbican_api_external:
enabled: "{{ enable_barbican }}" enabled: "{{ enable_barbican }}"
mode: "http" mode: "http"
external: true external: true
port: "{{ barbican_api_port }}" port: "{{ barbican_api_port }}"
listen_port: "{{ barbican_api_listen_port }}" listen_port: "{{ barbican_api_listen_port }}"
tls_backend: "{{ barbican_enable_tls_backend }}"
barbican-keystone-listener: barbican-keystone-listener:
container_name: barbican_keystone_listener container_name: barbican_keystone_listener
group: barbican-keystone-listener group: barbican-keystone-listener
@ -142,3 +144,8 @@ barbican_ks_roles:
- "{{ barbican_creator_role }}" - "{{ barbican_creator_role }}"
- "{{ barbican_observer_role }}" - "{{ barbican_observer_role }}"
- "{{ barbican_audit_role }}" - "{{ barbican_audit_role }}"
####################
# TLS
####################
barbican_enable_tls_backend: "{{ kolla_enable_tls_backend }}"

View File

@ -49,7 +49,7 @@
- include_tasks: copy-certs.yml - include_tasks: copy-certs.yml
when: when:
- kolla_copy_ca_into_containers | bool - kolla_copy_ca_into_containers | bool or barbican_enable_tls_backend | bool
- name: Copying over config.json files for services - name: Copying over config.json files for services
template: template:

View File

@ -1,6 +1,9 @@
[uwsgi] [uwsgi]
socket = {{ api_interface_address | put_address_in_context('url') }}:{{ barbican_api_listen_port }} {% if barbican_enable_tls_backend | bool %}
protocol = http https-socket = {{ api_interface_address | put_address_in_context('url') }}:{{ barbican_api_listen_port }},/etc/barbican/certs/barbican-cert.pem,/etc/barbican/certs/barbican-key.pem
{% else %}
http-socket = {{ api_interface_address | put_address_in_context('url') }}:{{ barbican_api_listen_port }}
{% endif %}
processes = {{ openstack_service_workers }} processes = {{ openstack_service_workers }}
lazy = true lazy = true
vacuum = true vacuum = true

View File

@ -19,7 +19,19 @@
"owner": "barbican", "owner": "barbican",
"perm": "0600", "perm": "0600",
"optional": true "optional": true
}{% if barbican_policy_file is defined %}, }{% if barbican_enable_tls_backend | bool %},
{
"source": "{{ container_config_directory }}/barbican-cert.pem",
"dest": "/etc/barbican/certs/barbican-cert.pem",
"owner": "barbican",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/barbican-key.pem",
"dest": "/etc/barbican/certs/barbican-key.pem",
"owner": "barbican",
"perm": "0600"
}{% endif %}{% if barbican_policy_file is defined %},
{ {
"source": "{{ container_config_directory }}/{{ barbican_policy_file }}", "source": "{{ container_config_directory }}/{{ barbican_policy_file }}",
"dest": "/etc/barbican/{{ barbican_policy_file }}", "dest": "/etc/barbican/{{ barbican_policy_file }}",

View File

@ -2,7 +2,7 @@
features: features:
- | - |
Added configuration options to enable backend TLS encryption from HAProxy Added configuration options to enable backend TLS encryption from HAProxy
to the Keystone, Glance, Heat, Placement, Horizon, and Cinder services. to the Keystone, Glance, Heat, Placement, Horizon, Barbican, and Cinder
When used in conjunction with enabling TLS for service API endpoints, services. When used in conjunction with enabling TLS for service API
network communcation will be encrypted end to end, from client through endpoints, network communcation will be encrypted end to end, from client
HAProxy to the backend service. through HAProxy to the backend service.