'how to set up freeipa + rabbitmq

rabbitmq version 3.10.0 tell me how to write rabbitmq.conf correctly without using advanced.config

work BindDN in another server--> uid=myuserinfreeipa,cn=users,cn=accounts,dc=mydc1,dc=mydc2
work SearchFilter in another server ---> "(&(uid=%u)(memberOf=cn=mygroupinfreeipa,cn=groups,cn=accounts,dc=mydc1,dc=mydc2)(!(nsaccountlock=TRUE)))"
work BaseDN in another server --> "cn=users,cn=accounts,dc=mydc1,dc=mydc2"

rabbitmq.conf

auth_backends.1 = ldap
auth_ldap.servers.1 = my.server.com
auth_ldap.timeout = 500
auth_ldap.port = 389
auth_ldap.user_dn_pattern = CN=${username},OU=Users,dc=mydc1,dc=mydc2
auth_ldap.use_ssl = false
ssl_options.cacertfile = /etc/rabbitmq/ca.crt
auth_ldap.dn_lookup_bind.user_dn = test
auth_ldap.dn_lookup_bind.password = password
auth_ldap.dn_lookup_attribute = distinguishedName
auth_ldap.dn_lookup_base = cn=users,cn=accounts,dc=mydc1,dc=mydc2
auth_ldap.log = network

advanced.config

[
 {
   rabbitmq_auth_backend_ldap,
   [
        {
            tag_queries, [
                            {administrator,{in_group,"CN=mygroupinfreeipa,dc=mydc1,dc=mydc2","member"}},
                            {management,    {constant, true}}
                         ]
        }
    ]%% rabbitmq_auth_backend_ldap,
 }
].
tail -f /var/log/rabbitmq/[email protected]
LDAP CHECK: login for test                        
    LDAP connecting to servers: ["my.server.com"]                                                  
    LDAP network traffic: bind request = {'BindRequest',3,"xxxx",
                                          {simple,"xxxx"}}                                            
    LDAP network traffic: bind reply = {ok,       
                                        {'LDAPMessage',1,
                                         {bindResponse,
                                          {'BindResponse',invalidCredentials,                         
                                           [],[],asn1_NOVALUE,asn1_NOVALUE}},
                                         asn1_NOVALUE}}
                                                                 
    LDAP bind returned "invalid credentials": xxxx                    
    LDAP connecting to servers: ["my.server.com"] 
    LDAP network traffic: bind request = {'BindRequest',3,"xxxx",    
                                          {simple,"xxxx"}}   
                                                                          
    LDAP bind error: "xxxx" {'EXIT',                         
                             {{badmatch,                          
                               {error,          
                                {asn1,                                                                
                                 {function_clause,                                                    
                                  [{'ELDAPv3',encode_restricted_string,                              
                                    [{refused,"test",[]},[<<4>>]]


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source