diff --git a/deps/rabbit/docs/rabbitmqctl.8 b/deps/rabbit/docs/rabbitmqctl.8 index 4265ce6f21d9..f99c18efe77f 100644 --- a/deps/rabbit/docs/rabbitmqctl.8 +++ b/deps/rabbit/docs/rabbitmqctl.8 @@ -683,6 +683,14 @@ password for the user named This user now cannot log in with a password (but may be able to through e.g. SASL EXTERNAL if configured). .\" ------------------------------------------------------------------ +.It Cm hash_password Ar plaintext +.Bl -tag -width Ds +.It Ar plaintext +The plaintext password to hash +.El +.Pp +Hashes a plaintext password according to the currently configured password hashing algorithm +.\" ------------------------------------------------------------------ .It Cm delete_user Ar username .Bl -tag -width Ds .It Ar username diff --git a/deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/hash_password_command.ex b/deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/hash_password_command.ex index 5e64e9514eae..b71dcef34d8c 100644 --- a/deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/hash_password_command.ex +++ b/deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/hash_password_command.ex @@ -9,7 +9,6 @@ defmodule RabbitMQ.CLI.Ctl.Commands.HashPasswordCommand do @behaviour RabbitMQ.CLI.CommandBehaviour use RabbitMQ.CLI.Core.MergesNoDefaults - use RabbitMQ.CLI.DefaultOutput def run([cleartextpassword], _opts) do hash_password(cleartextpassword) @@ -46,6 +45,9 @@ defmodule RabbitMQ.CLI.Ctl.Commands.HashPasswordCommand do :ok end + ## Use default output for all non-special case outputs + use RabbitMQ.CLI.DefaultOutput + def usage, do: "hash_password " def banner([arg], _options), @@ -53,4 +55,6 @@ defmodule RabbitMQ.CLI.Ctl.Commands.HashPasswordCommand do def banner([], _options), do: "Will hash provided password" + + def description(), do: "Hashes a plaintext password" end diff --git a/deps/rabbitmq_management/priv/www/api/index.html b/deps/rabbitmq_management/priv/www/api/index.html index 561e74c66346..3de7a792831c 100644 --- a/deps/rabbitmq_management/priv/www/api/index.html +++ b/deps/rabbitmq_management/priv/www/api/index.html @@ -1157,6 +1157,16 @@

Reference

A list of authentication attempts by remote address and username. + + X + + + + /api/auth/hash_password/plaintext-password + + Hashes plaintext-password according to the currently configured password hashing algorithm. + +