Skip to content

Commit 15fe108

Browse files
LDAP: allow tagged values to be used for sensitive settings
Plus a drive-by Dialyzer improvement.
1 parent 23ad641 commit 15fe108

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
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 ->

0 commit comments

Comments
 (0)