RabbitMQ: How to configure the on-demand Rabbitmq with LDAP for TAS
search cancel

RabbitMQ: How to configure the on-demand Rabbitmq with LDAP for TAS

book

Article ID: 293237

calendar_today

Updated On:

Products

VMware RabbitMQ

Issue/Introduction

Prerequisite:
  • You have a working OpenLDAP server.
  • You prepare some users for test. In this scenario, we used the LDAP user "demo" and the password "demo" for test.

Note:
This KB is for only applicable for older style (Erlang term-style) config formats. 

You can provide both sysctl-style and Erlang term-style configuration for an on-demand service plan. Please check below guide for sysctl-style format as well.

https://docs.vmware.com/en/VMware-RabbitMQ-for-Tanzu-Application-Service/2.2/tanzu-rmq/GUID-expert-override-config.html?hWord=N4IghgNiBcIKYA8AOcBOAXABAWwPYBM4QBfIA


Environment

Product Version: 2.1

Resolution

Normally, we used the advanced.config file for the LDAP authentication for the Open Source RabbitMQ.

Below is the sample file of the advanced.config:
 
[
  {rabbit, [{auth_backends, [rabbit_auth_backend_ldap]}]},
  {rabbitmq_auth_backend_ldap, [
  {servers, ["1.2.3.4"]},
{user_dn_pattern, "uid=${username},ou=people,dc=example,dc=com"},
{tag_queries, [{administrator, {constant, true}},{management, {constant, true}}]},
{log, network}
  ]}

].


But for the RabbitMQ for TAS product, we can not use this file directly and we must convert it to the base64 format file without the newline char. The base64 format is only applicable to the old type override configuration. 
# base64 -w 0 advanced.config
WwogIHtyYWJiaXQsIFt7YXV0aF9iYWNrZW5kcywgW3JhYmJpdF9hdXRoX2JhY2tlbmRfbGRhcF19XX0sCiAge3JhYmJpdG1xX2F1dGhfYmFja2VuZF9sZGFwLCBbCiAge3NlcnZlcnMsIFsiMjAuNjIuMTcwLjQ1Il19LAp7dXNlcl9kbl9wYXR0ZXJuLCAidWlkPSR7dXNlcm5hbWV9LG91PXBlb3BsZSxkYz1leGFtcGxlLGRjPWNvbSJ9LAp7dGFnX3F1ZXJpZXMsIFt7YWRtaW5pc3RyYXRvciwge2NvbnN0YW50LCB0cnVlfX0se21hbmFnZW1lbnQsIHtjb25zdGFudCwgdHJ1ZX19XX0sCntsb2csIG5ldHdvcmt9CiAgXX0KCl0uCg==
#

We should copy and paste as below:

Snipaste_2023-08-24_08-58-27.jpg

Upon finishing above configuration, you should login the RabbitMQ dashboard with LDAP user successfully. 
Snipaste_2023-08-23_19-32-55.jpg