ExRabbitMQAdmin.User (ex_rabbitmq_admin v0.1.4)
View SourceThis module contains functions for interacting with RabbitMQ users.
Summary
Functions
Delete all users in given list.
Deletes an individual user by given name.
Get an individual user by name.
Get all permissions for an individual user.
Get all topic permissions for an individual user.
Hash the given password using the hashing algorithm described here.
List all users in the RabbitMQ cluster.
List users in the RabbitMQ cluster that have no access to any virtual host.
Create a new user with given name. RabbitMQ currently only supports weak password hashing algorithms, and should be avoided if possible. If passing a blank password, a password-less user will be created. This user will not be able to authenticate with basic auth, and must use other means (such as TLS certificates).
Functions
@spec bulk_delete_users(client :: Tesla.Client.t(), users :: [String.t()]) :: {:ok, Tesla.Env.t()} | {:error, term()}
Delete all users in given list.
Params
client
- Tesla client used to perform the request.
@spec delete_user(client :: Tesla.Client.t(), user :: String.t()) :: {:ok, Tesla.Env.t()} | {:error, term()}
Deletes an individual user by given name.
Params
client
- Tesla client used to perform the request.user
- type:string
, required:true
@spec get_user(client :: Tesla.Client.t(), user :: String.t()) :: {:ok, Tesla.Env.t()} | {:error, term()}
Get an individual user by name.
Params
client
- Tesla client used to perform the request.user
- type:string
, required:true
@spec get_user_permissions(client :: Tesla.Client.t(), user :: String.t()) :: {:ok, Tesla.Env.t()} | {:error, term()}
Get all permissions for an individual user.
Params
client
- Tesla client used to perform the request.user
- type:string
, required:true
@spec get_user_topic_permissions(client :: Tesla.Client.t(), user :: String.t()) :: {:ok, Tesla.Env.t()} | {:error, term()}
Get all topic permissions for an individual user.
Params
client
- Tesla client used to perform the request.user
- type:string
, required:true
Hash the given password using the hashing algorithm described here.
RabbitMQ by default relies on (weak) hashed password, but we're enforcing the strongest supported hashing algorithm (sha512).
If possible, avoid using passwords and authenticate using other means such as TLS certificates.
Params
password
- type:string
, required:true
@spec list_users(client :: Tesla.Client.t()) :: {:ok, Tesla.Env.t()} | {:error, term()}
List all users in the RabbitMQ cluster.
Params
client
- Tesla client used to perform the request.
@spec list_users_without_permissions(client :: Tesla.Client.t()) :: {:ok, Tesla.Env.t()} | {:error, term()}
List users in the RabbitMQ cluster that have no access to any virtual host.
Params
client
- Tesla client used to perform the request.
@spec put_user(client :: Tesla.Client.t(), user :: String.t(), opts :: Keyword.t()) :: {:ok, Tesla.Env.t()} | no_return()
Create a new user with given name. RabbitMQ currently only supports weak password hashing algorithms, and should be avoided if possible. If passing a blank password, a password-less user will be created. This user will not be able to authenticate with basic auth, and must use other means (such as TLS certificates).
Params
client
- Tesla client used to perform the request.user
- type:string
, required:true
:password
(String.t/0
) - Required. The password that will be used for the created user. All passwords will be hashed using therabbit_password_hashing_sha512
hashing algorithm before sent to over the wire. If blank password, users will not be able to login using a password, but other mechanisms like client certificates may be used.:tags
(String.t/0
) - Required. Comma-separated list of tags for the user. Currently onlyadministrator
,monitoring
andmanagement
are recognized.