Skip to content

Commit 0e1fbc3

Browse files
Merge pull request #16523 from rabbitmq/mergify/bp/v4.3.x/pr-16521
`rabbitmq.conf`: support encryption for two more keys in the Prometheus plugin (backport #16521)
2 parents 5e4c688 + a1076ce commit 0e1fbc3

2 files changed

Lines changed: 29 additions & 2 deletions

File tree

deps/rabbitmq_prometheus/priv/schema/rabbitmq_prometheus.schema

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,12 @@ end}.
112112
{mapping, "prometheus.ssl.cacertfile", "rabbitmq_prometheus.ssl_config.ssl_opts.cacertfile",
113113
[{datatype, string}, {validators, ["pem_file"]}]}.
114114
{mapping, "prometheus.ssl.password", "rabbitmq_prometheus.ssl_config.ssl_opts.password",
115-
[{datatype, string}]}.
115+
[{datatype, [tagged_string, string]}]}.
116+
117+
{translation, "rabbitmq_prometheus.ssl_config.ssl_opts.password",
118+
fun(Conf) ->
119+
rabbit_cuttlefish:optionally_tagged_string("prometheus.ssl.password", Conf)
120+
end}.
116121

117122
{mapping, "prometheus.ssl.verify", "rabbitmq_prometheus.ssl_config.ssl_opts.verify", [
118123
{datatype, {enum, [verify_peer, verify_none]}}]}.

deps/rabbitmq_prometheus/test/config_schema_SUITE_data/rabbitmq_prometheus.snippets

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,5 +341,27 @@
341341
{authentication, [{enabled, true}]}
342342
]}
343343
], [rabbitmq_prometheus]
344-
}
344+
},
345+
346+
{tls_listener_password_plain,
347+
"prometheus.ssl.password = t0p$3cr3t",
348+
[{rabbitmq_prometheus,[
349+
{ssl_config,[
350+
{ssl_opts, [
351+
{password, "t0p$3cr3t"}
352+
]}
353+
]}
354+
]}],
355+
[rabbitmq_prometheus]},
356+
357+
{tls_listener_password_encrypted,
358+
"prometheus.ssl.password = encrypted:GhC4J5lh2DUkbdyKO0aMI8aYJ54mwe4eEWzou4yRFAHMF82IbD6cRiYAiBa8UIzR",
359+
[{rabbitmq_prometheus,[
360+
{ssl_config,[
361+
{ssl_opts, [
362+
{password, {encrypted, "GhC4J5lh2DUkbdyKO0aMI8aYJ54mwe4eEWzou4yRFAHMF82IbD6cRiYAiBa8UIzR"}}
363+
]}
364+
]}
365+
]}],
366+
[rabbitmq_prometheus]}
345367
].

0 commit comments

Comments
 (0)