Skip to content

Commit 1cbe373

Browse files
Merge pull request #12002 from rabbitmq/mk-ldap-password-tagging
LDAP: optional sensitive value tagging
2 parents 60ae4d4 + 4ff90b4 commit 1cbe373

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

deps/rabbitmq_auth_backend_ldap/priv/schema/rabbitmq_auth_backend_ldap.schema

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ end}.
120120
[{datatype, [string]}]}.
121121

122122
{mapping, "auth_ldap.dn_lookup_bind.password", "rabbitmq_auth_backend_ldap.dn_lookup_bind",
123-
[{datatype, [string]}]}.
123+
[{datatype, [tagged_binary, binary]}]}.
124124

125125
%% - as_user (to bind as the authenticated user - requires a password)
126126
%% - anon (to bind anonymously)
@@ -161,7 +161,7 @@ end}.
161161
[{datatype, string}]}.
162162

163163
{mapping, "auth_ldap.other_bind.password", "rabbitmq_auth_backend_ldap.other_bind",
164-
[{datatype, string}]}.
164+
[{datatype, [tagged_binary, binary]}]}.
165165

166166
{translation, "rabbitmq_auth_backend_ldap.other_bind",
167167
fun(Conf) ->

deps/rabbitmq_auth_backend_ldap/src/rabbit_auth_backend_ldap.erl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ user_login_authentication(Username, _AuthProps) ->
8585
%% Credentials (i.e. password) maybe directly in the password attribute in AuthProps
8686
%% or as a Function with the attribute rabbit_auth_backend_ldap if the user was already authenticated with http backend
8787
%% or as a Function with the attribute rabbit_auth_backend_cache if the user was already authenticated via cache backend
88+
-spec extractPassword(list()) -> rabbit_types:option(binary()).
8889
extractPassword(AuthProps) ->
8990
case proplists:get_value(password, AuthProps, none) of
9091
none ->

deps/rabbitmq_auth_backend_ldap/test/config_schema_SUITE_data/rabbitmq_auth_backend_ldap.snippets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
{db_lookup_bind,
120120
"auth_ldap.dn_lookup_bind.user_dn = username
121121
auth_ldap.dn_lookup_bind.password = password",
122-
[{rabbitmq_auth_backend_ldap,[{dn_lookup_bind,{"username","password"}}]}],
122+
[{rabbitmq_auth_backend_ldap,[{dn_lookup_bind,{"username",<<"password">>}}]}],
123123
[rabbitmq_auth_backend_ldap]},
124124

125125
{db_lookup_bind_anon,
@@ -147,7 +147,7 @@
147147
{other_bind_pass,
148148
"auth_ldap.other_bind.user_dn = username
149149
auth_ldap.other_bind.password = password",
150-
[{rabbitmq_auth_backend_ldap,[{other_bind,{"username","password"}}]}],
150+
[{rabbitmq_auth_backend_ldap,[{other_bind,{"username",<<"password">>}}]}],
151151
[rabbitmq_auth_backend_ldap]},
152152

153153
{ssl_options,

0 commit comments

Comments
 (0)