View Source ExRabbitMQAdmin.User (ex_rabbitmq_admin v0.1.1)

This module contains functions for interacting with RabbitMQ users.

Link to this section 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).

Link to this section Functions

Link to this function

bulk_delete_users(client, users)

View Source
@spec bulk_delete_users(client :: Tesla.Client.t(), users :: [String.t()]) ::
  {:ok, Tesla.Env.t()}

Delete all users in given list.

params

Params

  • client - Tesla client used to perform the request.
Link to this function

delete_user(client, user)

View Source
@spec delete_user(client :: Tesla.Client.t(), user :: String.t()) ::
  {:ok, Tesla.Env.t()}

Deletes an individual user by given name.

params

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()}

Get an individual user by name.

params

Params

  • client - Tesla client used to perform the request.
  • user - type: string, required: true
Link to this function

get_user_permissions(client, user)

View Source
@spec get_user_permissions(client :: Tesla.Client.t(), user :: String.t()) ::
  {:ok, Tesla.Env.t()}

Get all permissions for an individual user.

params

Params

  • client - Tesla client used to perform the request.
  • user - type: string, required: true
Link to this function

get_user_topic_permissions(client, user)

View Source
@spec get_user_topic_permissions(client :: Tesla.Client.t(), user :: String.t()) ::
  {:ok, Tesla.Env.t()}

Get all topic permissions for an individual user.

params

Params

  • client - Tesla client used to perform the request.
  • user - type: string, required: true
@spec hash_password(password :: String.t()) :: {:ok, String.t()}

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

Params

  • password - type: string, required: true
@spec list_users(client :: Tesla.Client.t()) :: {:ok, Telsa.Env.t()}

List all users in the RabbitMQ cluster.

params

Params

  • client - Tesla client used to perform the request.
Link to this function

list_users_without_permissions(client)

View Source
@spec list_users_without_permissions(client :: Tesla.Client.t()) ::
  {:ok, Tesla.Env.t()}

List users in the RabbitMQ cluster that have no access to any virtual host.

params

Params

  • client - Tesla client used to perform the request.
Link to this function

put_user(client, user, opts)

View Source
@spec put_user(client :: Tesla.Client.t(), user :: String.t(), opts :: Keyword.t()) ::
  {:ok, Tesla.Env.t()}

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

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 the rabbit_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 only administrator, monitoring and management are recognized.