Skip to content

Implement the ability in Ansible Kolla to deploy RabbitMQ with inter-node comunication encrypted via TLS #468

Open

Description

@fdobrovolny

Epic #462

As an SCS Operator, I want to be able to deploy RabbitMQ with TLS encryption enabled between the RabbitMQ cluster nodes so that I can have OpenStack services communication E2E encrypted.

When this is implemented #469 is immidietly required as cli would stop working:

Once a node has inter-node connection configured with TLS, CLI tools such as rabbitmqctl and rabbitmq-diagnostics also must use TLS to talk to the node. Plain TCP connections will be fail.

Therefore:

As an SCS Operator, I want to be able to use rabbitmqctl with the RabbitMQ cluster with TLS encryption enabled between the RabbitMQ cluster nodes, so that I can use CLI tools for debugging.

https://www.rabbitmq.com/clustering-ssl.html

As pointed out below there is some capability regarding TLS of Kolla in RabbitMQ as of now mainly rabbitmq_enable_tls and om_rabbitmq_enable_tls. This should be extended to fulfill all objectives.

Definition of Ready:

  • 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:

  • Ansible Kolla is able to deploy RabbitMQ with TLS encryption enabled between nodes
  • CLI tools are configured to use TLS to talk to the RabbitMQ cluster.
  • The patch has been submitted to upstream and merged.
  • Change has been included in the testbed.
  • CI tests have run successfully
  • Documentation has been updated
  • Release Notes have been updated

Activity

  1. added
    IaaS
    upstream
    SCS-VP04
    on Nov 3, 2023
  2. added this to the R6 (v7.0.0) milestone on Nov 3, 2023
  3. fdobrovolny commented on Nov 3, 2023

    @fdobrovolny
    Author

    @berendt I think you are correct, I was going of off the docs page:

    https://docs.openstack.org/kolla-ansible/latest/reference/message-queues/rabbitmq.html

    But I think you commented under the wrong issue I think it is #469.

  4. berendt commented on Nov 3, 2023

    @berendt

    Should be the right issue. I will enable the RabbitMQ inter-node encryption. This will also enable the client-server traffic encryption.

    When om_rabbitmq_enable_tls is true (it defaults to the value of rabbitmq_enable_tls), applicable OpenStack services will be configured to use oslo.messaging with TLS enabled.
    
  5. fdobrovolny commented on Nov 3, 2023

    @fdobrovolny
    Author

    I think:
    rabbitmq_enable_tls enables SSL listener rather then https://www.rabbitmq.com/clustering-ssl.html
    om_rabbitmq_enable_tls enables Oslo messaging to use the TLS endpoint.

    As the docs state:

    Encryption of the following channels is not currently supported:

    • 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)

    But I think I wrote the #469 wrong as it was supposed to address the "RabbitMQ CLI communication with RabbitMQ server nodes" and now looking into it closer seems like that was meant like configure the CLI client to use the TLS endpoint.

    As for the inter-node communication it requires the inet_tls flag is not present https://github.com/openstack/kolla-ansible/blob/master/ansible/roles/rabbitmq/templates/rabbitmq-env.conf.j2#L5

  6. berendt commented on Nov 3, 2023

    @berendt

    om_rabbitmq_enable_tls defaults to the value of rabbitmq_enable_tls. With osism/testbed#1826 I will set rabbitmq_enable_tls to true (this is related to this issue) and this will results in om_rabbitmq_enable_tls = true as well.

  7. berendt commented on Nov 3, 2023

    @berendt

    As for the inter-node communication it requires the inet_tls flag is not present https://github.com/openstack/kolla-ansible/blob/master/ansible/roles/rabbitmq/templates/rabbitmq-env.conf.j2#L5

    I think we should add this with a check on rabbitmq_enable_tls.

  8. self-assigned this
    on Dec 13, 2023
  9. MatusJenca2 commented on Jan 8, 2024

    @MatusJenca2

    This issue progress (December):

    • rabbitmq internode tls configured properly outside Kolla in Docker
    • TLS configuration file and task added to Ansible playbook
      Problems:
    • can't start RabbitMQ, possibly some config error
    • I have no capacity to test in HA mode (the internode communication itself needs it), I need testbed or something
  10. horazont commented on Jan 10, 2024

    @horazont
    Member

    As mentioned in #462 (comment) we have seen spurious TLS errors with RabbitMQ cluster encryption ("certificate has expired" even though it hadn't). This was not reproducible. In case you can reproduce this, we'd be interested to hear about that.

    For general configuration of RabbitMQ TLS encryption, you can look at the steps the YAOOK project did to enable cluster encryption for RabbitMQ here:

  11. fdobrovolny commented on Jan 12, 2024

    @fdobrovolny
    Author

    In yaook there is basicaly all stuff about the RabbitMQ already done we can use it as inspiration for ansiblle kolla.

  12. berendt commented on Mar 5, 2024

    @berendt

    In yaook there is basicaly all stuff about the RabbitMQ already done we can use it as inspiration for ansiblle kolla.

    Is there any progress on the inter RabbbitMQ communication?

  13. MatusJenca2 commented on Apr 22, 2024

    @MatusJenca2

    I just started working on this again, while I am waiting for the other upstream work to be reviewed/merged
    Progress

    • Create test environment (3 RabbitMQ nodes)
    • Configure intertnode TLS
    • Verify if internode TLS is utilized (tcpdump?)
    • Create upstream PR/patch
    • Upstream patch merged
  14. moved this from Backlog to Doing in Sovereign Cloud Stackon Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

IaaSSCS-VP04upstream

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions