Repository navigation
Description
Update 31.5.2024: current state: https://scs.sovereignit.de/nextcloud/s/G4DzznMKeJHqMBx
Introduction
OpenStack is a platform used for the SCS IaaS layer (Infrastructure as a Service).
Currently, the deployment is mostly done using Kolla.
This EPIC will implement end-to-end TLS encryption of selected OpenStack services shown below.
Services
This epic will focus on the following services as they are the default ones in our IaaS layer.
-
Keystone - Keystone is the identity service in OpenStack, responsible for user authentication and authorization and managing domains, projects, and roles.
-
Horizon - Horizon is the dashboard of OpenStack, providing a web-based user interface to other services, allowing administrators and users to manage resources and services.
-
Glance - Glance is the image service in OpenStack, responsible for discovering, registering, and retrieving virtual machine images.
-
Cinder - Cinder is the block storage service, providing persistent block storage resources for virtual machine instances.
-
Placement - Placement is a service for tracking resource provider inventories and usages, helping in the efficient allocation of resources across the cluster.
-
Nova - Nova is the compute service in OpenStack, responsible for creating and managing virtual machines and compute instances.
-
Neutron - Neutron is the networking service providing network connectivity between interface devices managed by other OpenStack services.
-
Heat - Heat is the orchestration service, allowing developers to define and deploy composite cloud applications using templates.
-
Memcached - Memcached is a caching layer in OpenStack, improving performance by alleviating database load.
-
MariaDB - MariaDB is the database backend for OpenStack services, storing and managing data efficiently.
-
RabbitMQ - RabbitMQ is the messaging service used in OpenStack for communication between the different components and services.
-
Redis - Redis is a database, cache, and message broker within OpenStack, ensuring high-performance data management.
-
OpenvSwitch - OpenvSwitch is a multilayer virtual switch implemented to ensure effective network automation in an OpenStack environment.
-
libvirt - Used for virtualization
-
Octavia - Load balancing service
-
CloudKitty - Billing service
-
Barbican - storage of encryption keys
-
Designate - DNS as a service
Current state
Non-internal OpenStack endpoints
OpenStack API: External client
EC --|TLS|-- HA --|HTTP|-- OS
(External) (public internet) (HAProxy) (OpenStack Networking) (OpenStack Services)
| | | |
Client Keystone Glance Placement ...
The communication between external clients and the OpenStack services is crucial. It needs to be secured to prevent data leakage and unauthorized access as this data often travels across the open internet, is highly susceptible to interception, and has considerable potential for misuse.
Kolla, out of the box, provides the ability to encrypt external traffic using a HAProxy. Details
OpenStack API: Internal client
IC --|TLS|-- HA --|HTTP|-- OS
(Internal) (OpenStack Networking) (HAProxy) (OpenStack Networking) (OpenStack Services)
| | | |
Client Keystone Glance Placement ...
The communication from within the OpenStack is the second most vulnerable communication. This kind of communication usually serves to manage resources from CI/CD tools or services such as the SCS KaaS layer. For the attacker to gain access, they can intercept this kind of communication, for example, from a compromised ci build.
Kolla, out of the box, can encrypt internal traffic using a HAProxy. Details
HAProxy to backend services
EC --|TLS|-- HA --|TLS|-- OS
(External) (public internet) (HAProxy) (OpenStack Networking) (OpenStack Services)
| | | |
Client Keystone Glance Placement ...
The communication from HAproxy to respective services is much harder to intercept as this traffic is internal to OpenStack; however, here, an attacker is possible from one compromised service to intercept all API traffic.
Kolla enables end-to-end TLS encryption from HAProxy to services that support TLS Termination, currently out of the services of interest, the following services are supported:
- n. 1. Keystone
- n. 2. Horizon
- n. 3. Glance
- n. 4. Cinder
- n. 5. Placement
- n. 6. Nova
- n. 7. Netron
- n. 8. Heat
- n. 13. OpenVSwitch
- n. 18. Barbican
Only RabbitMQ is not currently supported.
Backend services to their data services
EC --|TLS|-- HA --|TLS|-- OS --|TLS|-- DS
(External) (public internet) (HAProxy) (OpenStack Networking) (OpenStack Services) (OpenStack Networking) (Data Service)
| | | | | |
Client Keystone Glance Placement ... MariaDB Redis ...
To provide truly end-to-end traffic encryption within our infrastructure, all communications between services and their respective databases and brokers must be conducted via TLS (Transport Layer Security). This measure not only encrypts the data in transit but also ensures the communication channels are authenticated and integrity-protected.
Memcached
Memcached does support TLS; however, this support is only experimental, and custom build binaries are needed. For our use case, this is a no-go.
MariaDB
MariaDB has production-ready support for TLS encryption, and Galera Clusters does also support TLS encryption between nodes. Details, Galera Details
Kolla does not currently support the installation of MariaDB with TLS enabled.
RabbitMQ
RabbitMQ does support TLS encryption for connection as well as for inter-node communication. Details
Kolla currently supports encryption of:
- client-server traffic, typically between OpenStack services using the oslo.messaging library and RabbitMQ
- RabbitMQ Management API and UI (frontend connection to HAProxy only)
And does not support encryption of:
- RabbitMQ cluster traffic between RabbitMQ server nodes
- RabbitMQ CLI communication with RabbitMQ server nodes
- RabbitMQ Management API and UI (backend connection from HAProxy to RabbitMQ)
Redis
Redis supports TLS encryption for client and inter-node communication; however, this has to be enabled during the build and is not feature-enabled by default.
Details
Kolla currently does not support TLS encryption.
Note: We had issues with oslo.cache connecting via TLS to redis, minor upstream change might be needed.
Motivation
As a part of our ongoing efforts to maintain high-security standards, it's crucial to encrypt the OpenStack API and OpenStack internal communication.
Encrypting this internal traffic adds a strong layer of security. It helps protect our data and operations from potential internal threats. Even if unauthorized individuals gain access to our network, the encrypted communication ensures they cannot understand or misuse the shared data across different services within the cluster.
The purpose of this Decision Record is to outline why we need to encrypt Internal traffic, what solutions are proposed, and what solution we decide to implement for our OpenStack clusters. We will explain the technical considerations, expected benefits, and possible challenges tied to this initiative. as well as a summary of the present status of various services within our ecosystem. This document provides a clear and detailed account of our decision-making process, serving as a helpful reference for any similar security enhancement efforts in the future.
Proposal for changes in Kolla
In light of the analysis of the current state of TLS within our Kolla-OpenStack environment, several steps are proposed to enhance the security of the Internal traffic within our SCS OpenStack clusters.
Non-internal OpenStack endpoints
OpenStack API: External client ✅
No action is needed.
OpenStack API: Internal client ✅
No action is needed.
HAProxy to backend services 📎
Implement TLS between HAProxy and RabbitMQ.
Backend services to their data services
Caching / Memcached 🚧
Considering the experimental nature of TLS support in Memcached, we recommend transitioning to Redis as the caching layer due to its more reliable TLS encryption support. Since Redis can effectively replace all the functions of Memcached, and given that the Redis setup is already in place within Kolla, we propose replacing Memcached with Redis.
Database / MariaDB 📎
Our proposal involves enhancing Kolla to include support for the following:
- Enabling TLS for MariaDB clients
- Allowing MariaDB to accept TLS connections
- Implementing TLS for MariaDB Galera cluster to secure internode connections
Message Broker / RabbitMQ 📎
Since RabbitMQ already has partial TLS support in Kolla, we recommend completing the support by adding the following functionalities:
- Securing RabbitMQ cluster traffic between RabbitMQ server nodes with TLS encryption
- Enabling TLS for RabbitMQ CLI communication with RabbitMQ server nodes
- Establishing TLS encryption for the RabbitMQ Management API and UI, including backend connections from HAProxy to RabbitMQ
Caching / Redis 📎
We propose enhancing Kolla by introducing comprehensive support for Redis TLS.
Libvirt ✅
Mentioned by @artificial-intelligence
It is possible to use TLS for communication between nova and libvirt. Libvirt already enables the ability to use SSL for live migrations; however, Ansible Kolla misses a way to enable this.
SovereignCloudStack/standards#370 (comment)
https://docs.openstack.org/kolla-ansible/latest/reference/compute/libvirt-guide.html.
https://docs.openstack.org/nova/latest/admin/secure-live-migration-with-qemu-native-tls.html
https://github.com/openstack/kolla-ansible/blob/a3f3dc7ab5e1bed82bee9a0a8563e0e812e90b6c/ansible/roles/nova-cell/templates/libvirtd.conf.j2#L4
UPDATE: #533 - Christian pointed out to my mistake I was looking in a wrong config ansible-kolla does already provide this functionality
Octavia 📎
Octavia already requires SSL certificates for their primary function, and Ansible Kolla generates them automatically.
However, communication with backend services is not utilized. Also, the API of Octavia is exposed via HAProxy.
Octavia uses:
- Oslo messaging / RabbitMQ
- MySQL Database
- Memcache for
keystone_authtokenandservice_auth
https://docs.openstack.org/kolla-ansible/latest/reference/networking/octavia.html
https://github.com/openstack/kolla-ansible/blob/a3f3dc7ab5e1bed82bee9a0a8563e0e812e90b6c/ansible/roles/octavia/templates/octavia.conf.j2
https://docs.openstack.org/octavia/latest/install/install-ubuntu.html
CloudKitty 📎
CloudKitty uses:
- Oslo database / MySQL Database
- Memcache for
keystone_authtoken - Oslo messaging / RabbitMQ ✅
- Prometheus collection backend ✅
- Custom ca for Prometheus-supported
- Gnochi collection backend auths via OpenStack ✅
- Tooz - orchestrator / MySQL backend
- Storage
- InfluxDB - SSL Supported ✅
- ElasticSearch - SSL Supported ✅
Barbican 📎
Barbican uses:
- Oslo database / MySQL Database
- Memcache for
keystone_authtoken - Oslo messaging / RabbitMQ ✅
Designate 📎
Designate uses:
- Memcache for
keystone_authtoken - sqlalchemy for storage
- Oslo messaging / RabbitMQ ✅
- Tooz - coordination - Redis backend without SSL
- Backend:
- Bind9 - SSL unsupported
- Infoblox - SSL supported
Definition of Ready:
- User Story is small enough to be finished within one sprint
- User Story is clear and understood by the whole team
- Acceptance criteria are defined
- Acceptance criteria are clear and understood by the whole team
Definition of Done:
- Add ability to deploy Redis with TLS enabled to Ansible Kolla #463
- Implement ability of OpenStack services to use redis via TLS as their caching backend. #464
- Implement ability to deploy MariaDB using Ansible Kolla with inter-node comunication encrypted via TLS #465
- Implement ability for Ansible Kolla to deploy MariaDB with the ability to accept connections via TLS #466
- Implement Ability to deploy OpenStack services via Ansible Kolla using ProxySQL over TLS connection #467
- Implement the ability in Ansible Kolla to deploy RabbitMQ with inter-node comunication encrypted via TLS #468
- Implement ability of OpenStack services to use redis as their oslo caching backend #489
- Implement the ability to use TLS between rabbitmq and HAProxy for UI #490
- Add ability to Ansible Kolla to be able to confire Libvirt live migration #533
- Implement suport of redis in keystonemiddleware.auth_token #555
- Implement use of redis as backend for Tooz orchestration/coordination in Ansible Kolla #562
- All acceptance criteria are met
- Changes have been reviewed
- CI tests have run successfully
- Documentation has been updated
- Release Notes have been updated
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDoing
Activity
artificial-intelligence commentedon Jan 10, 2024
I still miss an answer to my questions in SovereignCloudStack/standards#370 (comment)
specifically the question if actually each openstack service was investigated or on what other basis it was decided which services need TLS security?
Because I still see gaps here and I see no explanation why these gaps are there, e.g. libvirt live migration was not mentioned initially, or cloudkitty, for example.
I just remembered these services from the top of my head, so it might very well be that we miss more services.
Or is the goal of this issue not to implement E2E encryption between all Openstack Services?
If this is the case it would be good to mention this somewhere, at least it's not clear to me from the current proposals/issues.
horazont commentedon Jan 10, 2024
FTR: We have seen issues with reloading TLS certificates on the galera/replication endpoints of MySQL/Galera without a restart of the node. So plan for rolling restarts of the galera nodes once you enable TLS on the galera replication endpoints.
There is also anecdotal evidence of weird behaviour with TLS and RabbitMQ (spurious "certificate has expired" messages), but that was not reproducible outside one specific environment.
fdobrovolny commentedon Jan 10, 2024
There will be a breakout session to discuss this topic. Please vote on the best suiting time. The voting closes today at 13:00 CEST the result will be announced here.
https://dud-poll.inf.tu-dresden.de/EZjR7-W7fA/
fdobrovolny commentedon Jan 10, 2024
Friday 14:00 CEST has been selected we will meet on the following link:
https://conf.scs.koeln:8443/SCS-Tech
fkr commentedon Jan 10, 2024
@fdobrovolny feel free to add a one-time event in the public calendar.
fdobrovolny commentedon Jan 12, 2024
Questions:
Source: https://docs.openstack.org/oslo.cache/latest/configuration/index.html#cache.backend
fdobrovolny commentedon Mar 12, 2024
Out of the meeting above, the following output was reached. We need to take a look at these additional services:
The description of this task was updated to that fact, so far, the state is the following:
fdobrovolny commentedon Mar 13, 2024
Continuing my previous comment.
@berendt Raised a comment if we really want to support CloudKitty
#562 (comment)
CloudKitty
keystone_authtoken- Implement suport of redis in keystonemiddleware.auth_token #555fdobrovolny commentedon Mar 13, 2024
Continuing
Barbican:
keystone_authtoken- Implement suport of redis in keystonemiddleware.auth_token #555fdobrovolny commentedon Mar 13, 2024
Designate:
keystone_authtoken- Implement suport of redis in keystonemiddleware.auth_token #555OgarOgarovic commentedon May 31, 2024
This is the current state of implementation of encryption in kolla-ansible:
https://scs.sovereignit.de/nextcloud/s/G4DzznMKeJHqMBx