File tree 3 files changed +24
-1
lines changed
rabbitmq_cli/lib/rabbitmq/cli/ctl/commands
rabbitmq_management/priv/www/api
3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -2222,6 +2222,15 @@ The name of the queue to purge.
2222
2222
.Pp
2223
2223
Purges a queue (removes all messages in it).
2224
2224
.El
2225
+ .\" ------------------------------------------------------------------
2226
+ .It Cm hash_password Ar plaintext
2227
+ .Bl -tag -width Ds
2228
+ .It Ar plaintext
2229
+ The plaintext password to hash
2230
+ .El
2231
+ .Pp
2232
+ Hashes a plaintext password according to the currently configured password hashing algorithm
2233
+ .El
2225
2234
.\" ------------------------------------------------------------------------------------------------
2226
2235
.Sh PLUGIN COMMANDS
2227
2236
.\" ------------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ defmodule RabbitMQ.CLI.Ctl.Commands.HashPasswordCommand do
9
9
10
10
@ behaviour RabbitMQ.CLI.CommandBehaviour
11
11
use RabbitMQ.CLI.Core.MergesNoDefaults
12
- use RabbitMQ.CLI.DefaultOutput
13
12
14
13
def run ( [ cleartextpassword ] , _opts ) do
15
14
hash_password ( cleartextpassword )
@@ -46,11 +45,16 @@ defmodule RabbitMQ.CLI.Ctl.Commands.HashPasswordCommand do
46
45
:ok
47
46
end
48
47
48
+ ## Use default output for all non-special case outputs
49
+ use RabbitMQ.CLI.DefaultOutput
50
+
49
51
def usage , do: "hash_password <cleartext_password>"
50
52
51
53
def banner ( [ arg ] , _options ) ,
52
54
do: "Will hash password #{ arg } "
53
55
54
56
def banner ( [ ] , _options ) ,
55
57
do: "Will hash provided password"
58
+
59
+ def description ( ) , do: "Hashes a plaintext password"
56
60
end
Original file line number Diff line number Diff line change @@ -1157,6 +1157,16 @@ <h2>Reference</h2>
1157
1157
A list of authentication attempts by remote address and username.
1158
1158
</ td >
1159
1159
</ tr >
1160
+ < tr >
1161
+ < td > X</ td >
1162
+ < td > </ td >
1163
+ < td > </ td >
1164
+ < td > </ td >
1165
+ < td class ="path "> /api/auth/hash_password/< i > plaintext-password</ i > </ td >
1166
+ < td >
1167
+ Hashes < code > plaintext-password</ code > according to the currently configured password hashing algorithm.
1168
+ </ td >
1169
+ </ tr >
1160
1170
</ table >
1161
1171
1162
1172
You can’t perform that action at this time.
0 commit comments