Skip to content

Commit 27c420d

Browse files
committed
Add support for multiline cuttlefish values in LDAP plugin
The cuttlefish project recently added support for multiline values. The primary motivation for this is so that LDAP settings like `vhost_access_query` could now be expressed in `rabbitmq.conf`, rather than requiring `advanced.config`. These changes require cuttlefish version `3.6.0` or later. References: * Kyorai/cuttlefish#60 * Kyorai/cuttlefish#63
1 parent 5d61564 commit 27c420d

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

deps/rabbitmq_auth_backend_ldap/test/config_schema_SUITE_data/rabbitmq_auth_backend_ldap.snippets

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
%% vim:ft=erlang:
2+
%% -*- mode: erlang; -*-
3+
14
[{ldap_servers,
25
"auth_ldap.servers.1 = DC1.domain.com
36
auth_ldap.servers.2 = DC1.eng.domain.com",
@@ -334,5 +337,16 @@
334337
{versions,['tlsv1.2','tlsv1.1']}
335338
]},
336339
{use_ssl, true}]}],
337-
[]}
340+
[]},
341+
342+
{vhost_access_query,
343+
"auth_ldap.vhost_access_query = '''
344+
{in_group,"ou=${vhost}-users,ou=vhosts,dc=example,dc=com"}
345+
'''",
346+
[
347+
{rabbitmq_auth_backend_ldap, [
348+
{vhost_access_query, {in_group,"ou=${vhost}-users,ou=vhosts,dc=example,dc=com"}}
349+
]}
350+
],
351+
[rabbitmq_auth_backend_ldap]}
338352
].

rabbitmq-components.mk

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,12 @@ dep_accept = hex 0.3.5
4343
dep_cowboy = hex 2.14.1
4444
dep_cowlib = hex 2.16.0
4545
dep_credentials_obfuscation = hex 3.5.0
46-
dep_cuttlefish = hex 3.5.0
46+
47+
# TODO LRB
48+
# dep_cuttlefish = hex 3.6.0
49+
dep_cuttlefish = git https://github.com/Kyorai/cuttlefish main
50+
# TODO LRB
51+
4752
dep_gen_batch_server = hex 0.8.8
4853
dep_jose = hex 1.11.10
4954
dep_khepri = hex 0.17.2

0 commit comments

Comments
 (0)