File: rabbitmq_auth_backend_http.schema

package info (click to toggle)
rabbitmq-server 4.0.5-8
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 37,972 kB
  • sloc: erlang: 257,835; javascript: 22,466; sh: 3,037; makefile: 2,517; python: 1,966; xml: 646; cs: 335; java: 244; ruby: 212; php: 100; perl: 63; awk: 13
file content (152 lines) | stat: -rw-r--r-- 6,347 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
%% ----------------------------------------------------------------------------
%% RabbitMQ HTTP Authorization
%% ----------------------------------------------------------------------------

{mapping, "auth_http.http_method", "rabbitmq_auth_backend_http.http_method",
    [{datatype, {enum, [get,post]}}]}.

{mapping, "auth_http.user_path", "rabbitmq_auth_backend_http.user_path",
    [{datatype, string}, {validators, ["uri"]}]}.

{mapping, "auth_http.vhost_path", "rabbitmq_auth_backend_http.vhost_path",
    [{datatype, string}, {validators, ["uri"]}]}.

{mapping, "auth_http.resource_path", "rabbitmq_auth_backend_http.resource_path",
    [{datatype, string}, {validators, ["uri"]}]}.

{mapping, "auth_http.topic_path", "rabbitmq_auth_backend_http.topic_path",
    [{datatype, string}, {validators, ["uri"]}]}.

{mapping, "auth_http.request_timeout", "rabbitmq_auth_backend_http.request_timeout",
    [{datatype, integer}]}.

{mapping, "auth_http.connection_timeout", "rabbitmq_auth_backend_http.connection_timeout",
    [{datatype, integer}]}.

%% TLS options

{mapping, "auth_http.ssl_options", "rabbitmq_auth_backend_http.ssl_options", [
    {datatype, {enum, [none]}}
]}.

{translation, "rabbitmq_auth_backend_http.ssl_options",
fun(Conf) ->
    case cuttlefish:conf_get("auth_http.ssl_options", Conf, undefined) of
        none -> [];
        _    -> cuttlefish:invalid("Invalid auth_http.ssl_options")
    end
end}.

{mapping, "auth_http.ssl_options.verify", "rabbitmq_auth_backend_http.ssl_options.verify", [
    {datatype, {enum, [verify_peer, verify_none]}}]}.

{mapping, "auth_http.ssl_options.fail_if_no_peer_cert", "rabbitmq_auth_backend_http.ssl_options.fail_if_no_peer_cert", [
    {datatype, {enum, [true, false]}}]}.

{mapping, "auth_http.ssl_options.cacertfile", "rabbitmq_auth_backend_http.ssl_options.cacertfile",
    [{datatype, string}, {validators, ["file_accessible"]}]}.

{mapping, "auth_http.ssl_options.certfile", "rabbitmq_auth_backend_http.ssl_options.certfile",
    [{datatype, string}, {validators, ["file_accessible"]}]}.

{mapping, "auth_http.ssl_options.cacerts.$name", "rabbitmq_auth_backend_http.ssl_options.cacerts",
    [{datatype, string}]}.

{translation, "rabbitmq_auth_backend_http.ssl_options.cacerts",
fun(Conf) ->
    Settings = cuttlefish_variable:filter_by_prefix("auth_http.ssl_options.cacerts", Conf),
    [ list_to_binary(V) || {_, V} <- Settings ]
end}.

{mapping, "auth_http.ssl_options.cert", "rabbitmq_auth_backend_http.ssl_options.cert",
    [{datatype, string}]}.

{translation, "rabbitmq_auth_backend_http.ssl_options.cert",
fun(Conf) ->
    list_to_binary(cuttlefish:conf_get("auth_http.ssl_options.cert", Conf))
end}.

{mapping, "auth_http.ssl_options.client_renegotiation", "rabbitmq_auth_backend_http.ssl_options.client_renegotiation",
    [{datatype, {enum, [true, false]}}]}.

{mapping, "auth_http.ssl_options.crl_check", "rabbitmq_auth_backend_http.ssl_options.crl_check",
    [{datatype, [{enum, [true, false, peer, best_effort]}]}]}.

{mapping, "auth_http.ssl_options.depth", "rabbitmq_auth_backend_http.ssl_options.depth",
    [{datatype, integer}, {validators, ["byte"]}]}.

{mapping, "auth_http.ssl_options.dh", "rabbitmq_auth_backend_http.ssl_options.dh",
    [{datatype, string}]}.

{translation, "rabbitmq_auth_backend_http.ssl_options.dh",
fun(Conf) ->
    list_to_binary(cuttlefish:conf_get("auth_http.ssl_options.dh", Conf))
end}.

{mapping, "auth_http.ssl_options.dhfile", "rabbitmq_auth_backend_http.ssl_options.dhfile",
    [{datatype, string}, {validators, ["file_accessible"]}]}.

{mapping, "auth_http.ssl_options.honor_cipher_order", "rabbitmq_auth_backend_http.ssl_options.honor_cipher_order",
    [{datatype, {enum, [true, false]}}]}.

{mapping, "auth_http.ssl_options.honor_ecc_order", "rabbitmq_auth_backend_http.ssl_options.honor_ecc_order",
    [{datatype, {enum, [true, false]}}]}.

{mapping, "auth_http.ssl_options.key.RSAPrivateKey", "rabbitmq_auth_backend_http.ssl_options.key",
    [{datatype, string}]}.

{mapping, "auth_http.ssl_options.key.DSAPrivateKey", "rabbitmq_auth_backend_http.ssl_options.key",
    [{datatype, string}]}.

{mapping, "auth_http.ssl_options.key.PrivateKeyInfo", "rabbitmq_auth_backend_http.ssl_options.key",
    [{datatype, string}]}.

{translation, "rabbitmq_auth_backend_http.ssl_options.key",
fun(Conf) ->
    case cuttlefish_variable:filter_by_prefix("auth_http.ssl_options.key", Conf) of
        [{[_,_,Key], Val}|_] -> {list_to_atom(Key), list_to_binary(Val)};
        _ -> undefined
    end
end}.

{mapping, "auth_http.ssl_options.keyfile", "rabbitmq_auth_backend_http.ssl_options.keyfile",
    [{datatype, string}, {validators, ["file_accessible"]}]}.

{mapping, "auth_http.ssl_options.log_alert", "rabbitmq_auth_backend_http.ssl_options.log_alert",
    [{datatype, {enum, [true, false]}}]}.

{mapping, "auth_http.ssl_options.password", "rabbitmq_auth_backend_http.ssl_options.password",
    [{datatype, [tagged_binary, binary]}]}.

{mapping, "auth_http.ssl_options.psk_identity", "rabbitmq_auth_backend_http.ssl_options.psk_identity",
    [{datatype, string}]}.

{mapping, "auth_http.ssl_options.reuse_sessions", "rabbitmq_auth_backend_http.ssl_options.reuse_sessions",
    [{datatype, {enum, [true, false]}}]}.

{mapping, "auth_http.ssl_options.secure_renegotiate", "rabbitmq_auth_backend_http.ssl_options.secure_renegotiate",
    [{datatype, {enum, [true, false]}}]}.

{mapping, "auth_http.ssl_options.versions.$version", "rabbitmq_auth_backend_http.ssl_options.versions",
    [{datatype, atom}]}.

{translation, "rabbitmq_auth_backend_http.ssl_options.versions",
fun(Conf) ->
    Settings = cuttlefish_variable:filter_by_prefix("auth_http.ssl_options.versions", Conf),
    [ V || {_, V} <- Settings ]
end}.

{mapping, "auth_http.ssl_options.sni", "rabbitmq_auth_backend_http.ssl_options.server_name_indication",
    [{datatype, [{enum, [none]}, string]}]}.

{translation, "rabbitmq_auth_backend_http.ssl_options.server_name_indication",
fun(Conf) ->
    case cuttlefish:conf_get("auth_http.ssl_options.sni", Conf, undefined) of
        undefined -> cuttlefish:unset();
        none      -> cuttlefish:unset();
        Hostname  -> Hostname
    end
end}.

{mapping, "auth_http.ssl_options.hostname_verification", "rabbitmq_auth_backend_http.ssl_hostname_verification", [
    {datatype, {enum, [wildcard, none]}}]}.