Skip to content

Commit 8c09e6c

Browse files
committed
Rename web_dispatch config prefix to http_dispatch
1 parent b619e66 commit 8c09e6c

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

deps/rabbitmq_web_dispatch/priv/schema/rabbitmq_web_dispatch.schema

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
%% Select an authentication backend to use for the management plugin. RabbitMQ provides an
1111
%% internal backend in the core.
1212
%%
13-
%% {web_dispatch.auth_backends, [rabbit_auth_backend_internal]},
13+
%% {http_dispatch.auth_backends, [rabbit_auth_backend_internal]},
1414

1515
{translation, "rabbitmq_web_dispatch.auth_backends",
1616
fun(Conf) ->
17-
Settings = cuttlefish_variable:filter_by_prefix("web_dispatch.auth_backends", Conf),
17+
Settings = cuttlefish_variable:filter_by_prefix("http_dispatch.auth_backends", Conf),
1818
BackendModule = fun
1919
(internal) -> rabbit_auth_backend_internal;
2020
(ldap) -> rabbit_auth_backend_ldap;
@@ -27,9 +27,9 @@ fun(Conf) ->
2727
(Other) when is_atom(Other) -> Other;
2828
(_) -> cuttlefish:invalid("Unknown/unsupported auth backend")
2929
end,
30-
AuthBackends = [{Num, {default, BackendModule(V)}} || {["web_dispatch", "auth_backends", Num], V} <- Settings],
31-
AuthNBackends = [{Num, {authn, BackendModule(V)}} || {["web_dispatch", "auth_backends", Num, "authn"], V} <- Settings],
32-
AuthZBackends = [{Num, {authz, BackendModule(V)}} || {["web_dispatch", "auth_backends", Num, "authz"], V} <- Settings],
30+
AuthBackends = [{Num, {default, BackendModule(V)}} || {["http_dispatch", "auth_backends", Num], V} <- Settings],
31+
AuthNBackends = [{Num, {authn, BackendModule(V)}} || {["http_dispatch", "auth_backends", Num, "authn"], V} <- Settings],
32+
AuthZBackends = [{Num, {authz, BackendModule(V)}} || {["http_dispatch", "auth_backends", Num, "authz"], V} <- Settings],
3333
Backends = lists:foldl(
3434
fun({NumStr, {Type, V}}, Acc) ->
3535
Num = case catch list_to_integer(NumStr) of
@@ -84,15 +84,15 @@ fun(Conf) ->
8484
lists:keysort(1, dict:to_list(Backends)))
8585
end}.
8686

87-
{mapping, "web_dispatch.auth_backends.$num", "rabbitmq_web_dispatch.auth_backends", [
87+
{mapping, "http_dispatch.auth_backends.$num", "rabbitmq_web_dispatch.auth_backends", [
8888
{datatype, atom}
8989
]}.
9090

91-
{mapping, "web_dispatch.auth_backends.$num.authn", "rabbitmq_web_dispatch.auth_backends",[
91+
{mapping, "http_dispatch.auth_backends.$num.authn", "rabbitmq_web_dispatch.auth_backends",[
9292
{datatype, atom}
9393
]}.
9494

95-
{mapping, "web_dispatch.auth_backends.$num.authz", "rabbitmq_web_dispatch.auth_backends",[
95+
{mapping, "http_dispatch.auth_backends.$num.authz", "rabbitmq_web_dispatch.auth_backends",[
9696
{datatype, atom}
9797
]}.
9898

deps/rabbitmq_web_dispatch/test/config_schema_SUITE_data/rabbitmq_web_dispatch.snippets

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,61 +2,61 @@
22
%
33

44
[{internal_auth_backend,
5-
"web_dispatch.auth_backends.1 = internal",
5+
"http_dispatch.auth_backends.1 = internal",
66
[{rabbitmq_web_dispatch,[{auth_backends,[rabbit_auth_backend_internal]}]}],
77
[]},
88
{ldap_auth_backend,
9-
"web_dispatch.auth_backends.1 = ldap",
9+
"http_dispatch.auth_backends.1 = ldap",
1010
[{rabbitmq_web_dispatch,[{auth_backends,[rabbit_auth_backend_ldap]}]}],
1111
[]},
1212
{http_auth_backend,
13-
"web_dispatch.auth_backends.1 = http",
13+
"http_dispatch.auth_backends.1 = http",
1414
[{rabbitmq_web_dispatch,[{auth_backends,[rabbit_auth_backend_http]}]}],
1515
[]},
1616
{oauth2_auth_backend,
17-
"web_dispatch.auth_backends.1 = oauth2",
17+
"http_dispatch.auth_backends.1 = oauth2",
1818
[{rabbitmq_web_dispatch,[{auth_backends,[rabbit_auth_backend_oauth2]}]}],
1919
[]},
2020
{multiple_auth_backends,
21-
"web_dispatch.auth_backends.1 = ldap
22-
web_dispatch.auth_backends.2 = internal",
21+
"http_dispatch.auth_backends.1 = ldap
22+
http_dispatch.auth_backends.2 = internal",
2323
[{rabbitmq_web_dispatch,
2424
[{auth_backends,
2525
[rabbit_auth_backend_ldap,rabbit_auth_backend_internal]}]}],
2626
[]},
2727
{full_name_auth_backend,
28-
"web_dispatch.auth_backends.1 = ldap
28+
"http_dispatch.auth_backends.1 = ldap
2929
# uses module name instead of a short alias, \"http\"
30-
web_dispatch.auth_backends.2 = rabbit_auth_backend_http",
30+
http_dispatch.auth_backends.2 = rabbit_auth_backend_http",
3131
[{rabbitmq_web_dispatch,
3232
[{auth_backends,[rabbit_auth_backend_ldap,rabbit_auth_backend_http]}]}],
3333
[]},
3434
{third_party_auth_backend,
35-
"web_dispatch.auth_backends.1.authn = internal
35+
"http_dispatch.auth_backends.1.authn = internal
3636
# uses module name because this backend is from a 3rd party
37-
web_dispatch.auth_backends.1.authz = rabbit_auth_backend_ip_range",
37+
http_dispatch.auth_backends.1.authz = rabbit_auth_backend_ip_range",
3838
[{rabbitmq_web_dispatch,
3939
[{auth_backends,
4040
[{rabbit_auth_backend_internal,rabbit_auth_backend_ip_range}]}]}],
4141
[]},
4242
{authn_authz_backend,
43-
"web_dispatch.auth_backends.1.authn = ldap
44-
web_dispatch.auth_backends.1.authz = internal",
43+
"http_dispatch.auth_backends.1.authn = ldap
44+
http_dispatch.auth_backends.1.authz = internal",
4545
[{rabbitmq_web_dispatch,
4646
[{auth_backends,
4747
[{rabbit_auth_backend_ldap,rabbit_auth_backend_internal}]}]}],
4848
[]},
4949
{authn_authz_multiple_backends,
50-
"web_dispatch.auth_backends.1.authn = ldap
51-
web_dispatch.auth_backends.1.authz = internal
52-
web_dispatch.auth_backends.2 = internal",
50+
"http_dispatch.auth_backends.1.authn = ldap
51+
http_dispatch.auth_backends.1.authz = internal
52+
http_dispatch.auth_backends.2 = internal",
5353
[{rabbitmq_web_dispatch,
5454
[{auth_backends,
5555
[{rabbit_auth_backend_ldap,rabbit_auth_backend_internal},
5656
rabbit_auth_backend_internal]}]}],
5757
[]},
5858
{authn_backend_only,
59-
"web_dispatch.auth_backends.1.authn = ldap",
59+
"http_dispatch.auth_backends.1.authn = ldap",
6060
[{rabbitmq_web_dispatch,
6161
[{auth_backends,
6262
[{rabbit_auth_backend_ldap,rabbit_auth_backend_ldap}]}]}],

0 commit comments

Comments
 (0)