Rename web_dispatch config prefix to http_dispatch
(cherry picked from commit 8c09e6c7dd
)
This commit is contained in:
parent
5e24a2bf9c
commit
81f780a2e9
|
@ -10,11 +10,11 @@
|
|||
%% Select an authentication backend to use for the management plugin. RabbitMQ provides an
|
||||
%% internal backend in the core.
|
||||
%%
|
||||
%% {web_dispatch.auth_backends, [rabbit_auth_backend_internal]},
|
||||
%% {http_dispatch.auth_backends, [rabbit_auth_backend_internal]},
|
||||
|
||||
{translation, "rabbitmq_web_dispatch.auth_backends",
|
||||
fun(Conf) ->
|
||||
Settings = cuttlefish_variable:filter_by_prefix("web_dispatch.auth_backends", Conf),
|
||||
Settings = cuttlefish_variable:filter_by_prefix("http_dispatch.auth_backends", Conf),
|
||||
BackendModule = fun
|
||||
(internal) -> rabbit_auth_backend_internal;
|
||||
(ldap) -> rabbit_auth_backend_ldap;
|
||||
|
@ -27,9 +27,9 @@ fun(Conf) ->
|
|||
(Other) when is_atom(Other) -> Other;
|
||||
(_) -> cuttlefish:invalid("Unknown/unsupported auth backend")
|
||||
end,
|
||||
AuthBackends = [{Num, {default, BackendModule(V)}} || {["web_dispatch", "auth_backends", Num], V} <- Settings],
|
||||
AuthNBackends = [{Num, {authn, BackendModule(V)}} || {["web_dispatch", "auth_backends", Num, "authn"], V} <- Settings],
|
||||
AuthZBackends = [{Num, {authz, BackendModule(V)}} || {["web_dispatch", "auth_backends", Num, "authz"], V} <- Settings],
|
||||
AuthBackends = [{Num, {default, BackendModule(V)}} || {["http_dispatch", "auth_backends", Num], V} <- Settings],
|
||||
AuthNBackends = [{Num, {authn, BackendModule(V)}} || {["http_dispatch", "auth_backends", Num, "authn"], V} <- Settings],
|
||||
AuthZBackends = [{Num, {authz, BackendModule(V)}} || {["http_dispatch", "auth_backends", Num, "authz"], V} <- Settings],
|
||||
Backends = lists:foldl(
|
||||
fun({NumStr, {Type, V}}, Acc) ->
|
||||
Num = case catch list_to_integer(NumStr) of
|
||||
|
@ -84,15 +84,15 @@ fun(Conf) ->
|
|||
lists:keysort(1, dict:to_list(Backends)))
|
||||
end}.
|
||||
|
||||
{mapping, "web_dispatch.auth_backends.$num", "rabbitmq_web_dispatch.auth_backends", [
|
||||
{mapping, "http_dispatch.auth_backends.$num", "rabbitmq_web_dispatch.auth_backends", [
|
||||
{datatype, atom}
|
||||
]}.
|
||||
|
||||
{mapping, "web_dispatch.auth_backends.$num.authn", "rabbitmq_web_dispatch.auth_backends",[
|
||||
{mapping, "http_dispatch.auth_backends.$num.authn", "rabbitmq_web_dispatch.auth_backends",[
|
||||
{datatype, atom}
|
||||
]}.
|
||||
|
||||
{mapping, "web_dispatch.auth_backends.$num.authz", "rabbitmq_web_dispatch.auth_backends",[
|
||||
{mapping, "http_dispatch.auth_backends.$num.authz", "rabbitmq_web_dispatch.auth_backends",[
|
||||
{datatype, atom}
|
||||
]}.
|
||||
|
||||
|
|
|
@ -2,61 +2,61 @@
|
|||
%
|
||||
|
||||
[{internal_auth_backend,
|
||||
"web_dispatch.auth_backends.1 = internal",
|
||||
"http_dispatch.auth_backends.1 = internal",
|
||||
[{rabbitmq_web_dispatch,[{auth_backends,[rabbit_auth_backend_internal]}]}],
|
||||
[]},
|
||||
{ldap_auth_backend,
|
||||
"web_dispatch.auth_backends.1 = ldap",
|
||||
"http_dispatch.auth_backends.1 = ldap",
|
||||
[{rabbitmq_web_dispatch,[{auth_backends,[rabbit_auth_backend_ldap]}]}],
|
||||
[]},
|
||||
{http_auth_backend,
|
||||
"web_dispatch.auth_backends.1 = http",
|
||||
"http_dispatch.auth_backends.1 = http",
|
||||
[{rabbitmq_web_dispatch,[{auth_backends,[rabbit_auth_backend_http]}]}],
|
||||
[]},
|
||||
{oauth2_auth_backend,
|
||||
"web_dispatch.auth_backends.1 = oauth2",
|
||||
"http_dispatch.auth_backends.1 = oauth2",
|
||||
[{rabbitmq_web_dispatch,[{auth_backends,[rabbit_auth_backend_oauth2]}]}],
|
||||
[]},
|
||||
{multiple_auth_backends,
|
||||
"web_dispatch.auth_backends.1 = ldap
|
||||
web_dispatch.auth_backends.2 = internal",
|
||||
"http_dispatch.auth_backends.1 = ldap
|
||||
http_dispatch.auth_backends.2 = internal",
|
||||
[{rabbitmq_web_dispatch,
|
||||
[{auth_backends,
|
||||
[rabbit_auth_backend_ldap,rabbit_auth_backend_internal]}]}],
|
||||
[]},
|
||||
{full_name_auth_backend,
|
||||
"web_dispatch.auth_backends.1 = ldap
|
||||
"http_dispatch.auth_backends.1 = ldap
|
||||
# uses module name instead of a short alias, \"http\"
|
||||
web_dispatch.auth_backends.2 = rabbit_auth_backend_http",
|
||||
http_dispatch.auth_backends.2 = rabbit_auth_backend_http",
|
||||
[{rabbitmq_web_dispatch,
|
||||
[{auth_backends,[rabbit_auth_backend_ldap,rabbit_auth_backend_http]}]}],
|
||||
[]},
|
||||
{third_party_auth_backend,
|
||||
"web_dispatch.auth_backends.1.authn = internal
|
||||
"http_dispatch.auth_backends.1.authn = internal
|
||||
# uses module name because this backend is from a 3rd party
|
||||
web_dispatch.auth_backends.1.authz = rabbit_auth_backend_ip_range",
|
||||
http_dispatch.auth_backends.1.authz = rabbit_auth_backend_ip_range",
|
||||
[{rabbitmq_web_dispatch,
|
||||
[{auth_backends,
|
||||
[{rabbit_auth_backend_internal,rabbit_auth_backend_ip_range}]}]}],
|
||||
[]},
|
||||
{authn_authz_backend,
|
||||
"web_dispatch.auth_backends.1.authn = ldap
|
||||
web_dispatch.auth_backends.1.authz = internal",
|
||||
"http_dispatch.auth_backends.1.authn = ldap
|
||||
http_dispatch.auth_backends.1.authz = internal",
|
||||
[{rabbitmq_web_dispatch,
|
||||
[{auth_backends,
|
||||
[{rabbit_auth_backend_ldap,rabbit_auth_backend_internal}]}]}],
|
||||
[]},
|
||||
{authn_authz_multiple_backends,
|
||||
"web_dispatch.auth_backends.1.authn = ldap
|
||||
web_dispatch.auth_backends.1.authz = internal
|
||||
web_dispatch.auth_backends.2 = internal",
|
||||
"http_dispatch.auth_backends.1.authn = ldap
|
||||
http_dispatch.auth_backends.1.authz = internal
|
||||
http_dispatch.auth_backends.2 = internal",
|
||||
[{rabbitmq_web_dispatch,
|
||||
[{auth_backends,
|
||||
[{rabbit_auth_backend_ldap,rabbit_auth_backend_internal},
|
||||
rabbit_auth_backend_internal]}]}],
|
||||
[]},
|
||||
{authn_backend_only,
|
||||
"web_dispatch.auth_backends.1.authn = ldap",
|
||||
"http_dispatch.auth_backends.1.authn = ldap",
|
||||
[{rabbitmq_web_dispatch,
|
||||
[{auth_backends,
|
||||
[{rabbit_auth_backend_ldap,rabbit_auth_backend_ldap}]}]}],
|
||||
|
|
Loading…
Reference in New Issue