File tree 1 file changed +22
-3
lines changed
1 file changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -161,10 +161,29 @@ To do so:
161
161
162
162
## <a id =" computing-password-hash " class =" anchor " href =" #computing-password-hash " >Computing Password Hashes</a >
163
163
164
- Sometimes it is necessary to compute a user's password hash, to updated via the [ HTTP API] ( management.html )
165
- or generate a [ definitions file] ( definitions.html ) to import.
164
+ Sometimes it is necessary to compute a user's password hash for updating via the [ HTTP API] ( management.html )
165
+ or to generate a [ definitions file] ( definitions.html ) to import.
166
166
167
- This is the algorithm:
167
+ ### Hash via ` rabbitmqctl `
168
+
169
+ <pre class =" lang-bash " >
170
+ rabbitmqctl hash_password foobarbaz
171
+
172
+ # Output:
173
+ # Will hash password foobarbaz
174
+ # 27cx5+wEi8R8uwTeTr3hk5azuV3yYxxAtwPPhCyrbdsxVhqq
175
+ </pre >
176
+
177
+ ### Hash via HTTP API
178
+
179
+ <pre class =" lang-bash " >
180
+ curl -4su guest:guest -X GET localhost:15672/api/auth/hash_password/foobarbaz
181
+
182
+ # Output:
183
+ # {"ok":"TBybOvomyVw6BqBU/fHCEpVhDO7fLdQ4kxZDUpt6hagCxV8I"}
184
+ </pre >
185
+
186
+ ### This is the algorithm:
168
187
169
188
* Generate a random 32 bit salt. In this example, we will use ` 908D C60A ` . When RabbitMQ creates or updates a user, a random salt is generated.
170
189
* Concatenate the generated salt with the UTF-8 representation of the desired password.
You can’t perform that action at this time.
0 commit comments