|
404 | 404 |
|
405 | 405 | describe 'configuring ldap authentication' do |
406 | 406 | let :params do |
407 | | - { :config_stomp => true, |
408 | | - :ldap_auth => true, |
409 | | - :ldap_server => 'ldap.example.com', |
410 | | - :ldap_user_dn_pattern => 'ou=users,dc=example,dc=com', |
411 | | - :ldap_use_ssl => false, |
412 | | - :ldap_port => '389', |
413 | | - :ldap_log => true |
| 407 | + { :config_stomp => true, |
| 408 | + :ldap_auth => true, |
| 409 | + :ldap_server => 'ldap.example.com', |
| 410 | + :ldap_user_dn_pattern => 'ou=users,dc=example,dc=com', |
| 411 | + :ldap_other_bind => 'as_user', |
| 412 | + :ldap_use_ssl => false, |
| 413 | + :ldap_port => '389', |
| 414 | + :ldap_log => true, |
| 415 | + :ldap_config_variables => { 'foo' => 'bar' } |
414 | 416 | } |
415 | 417 | end |
416 | 418 |
|
|
419 | 421 | it 'should contain ldap parameters' do |
420 | 422 | verify_contents(subject, 'rabbitmq.config', |
421 | 423 | ['[', ' {rabbit, [', ' {auth_backends, [rabbit_auth_backend_internal, rabbit_auth_backend_ldap]},', ' ]}', |
422 | | - ' {rabbitmq_auth_backend_ldap, [', ' {other_bind, anon},', |
| 424 | + ' {rabbitmq_auth_backend_ldap, [', ' {other_bind, as_user},', |
423 | 425 | ' {servers, ["ldap.example.com"]},', |
424 | 426 | ' {user_dn_pattern, "ou=users,dc=example,dc=com"},', ' {use_ssl, false},', |
425 | | - ' {port, 389},', ' {log, true}']) |
| 427 | + ' {port, 389},', ' {foo, bar},', ' {log, true}']) |
426 | 428 | end |
427 | 429 | end |
428 | 430 |
|
|
432 | 434 | :ldap_auth => true, |
433 | 435 | :ldap_server => 'ldap.example.com', |
434 | 436 | :ldap_user_dn_pattern => 'ou=users,dc=example,dc=com', |
| 437 | + :ldap_other_bind => 'as_user', |
435 | 438 | :ldap_use_ssl => false, |
436 | 439 | :ldap_port => '389', |
437 | | - :ldap_log => true |
| 440 | + :ldap_log => true, |
| 441 | + :ldap_config_variables => { 'foo' => 'bar' } |
438 | 442 | } |
439 | 443 | end |
440 | 444 |
|
|
443 | 447 | it 'should contain ldap parameters' do |
444 | 448 | verify_contents(subject, 'rabbitmq.config', |
445 | 449 | ['[', ' {rabbit, [', ' {auth_backends, [rabbit_auth_backend_internal, rabbit_auth_backend_ldap]},', ' ]}', |
446 | | - ' {rabbitmq_auth_backend_ldap, [', ' {other_bind, anon},', |
| 450 | + ' {rabbitmq_auth_backend_ldap, [', ' {other_bind, as_user},', |
447 | 451 | ' {servers, ["ldap.example.com"]},', |
448 | 452 | ' {user_dn_pattern, "ou=users,dc=example,dc=com"},', ' {use_ssl, false},', |
449 | | - ' {port, 389},', ' {log, true}']) |
| 453 | + ' {port, 389},', ' {foo, bar},', ' {log, true}']) |
450 | 454 | end |
451 | 455 | end |
452 | 456 |
|
|
0 commit comments