File tree 3 files changed +23
-1
lines changed
rabbitmq_cli/lib/rabbitmq/cli/ctl/commands
rabbitmq_management/priv/www/api
3 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -683,6 +683,14 @@ password for the user named
683
683
This user now cannot log in with a password (but may be able to through
684
684
e.g. SASL EXTERNAL if configured).
685
685
.\" ------------------------------------------------------------------
686
+ .It Cm hash_password Ar plaintext
687
+ .Bl -tag -width Ds
688
+ .It Ar plaintext
689
+ The plaintext password to hash
690
+ .El
691
+ .Pp
692
+ Hashes a plaintext password according to the currently configured password hashing algorithm
693
+ .\" ------------------------------------------------------------------
686
694
.It Cm delete_user Ar username
687
695
.Bl -tag -width Ds
688
696
.It Ar username
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