mix malachi. user
(malachi v0.8.13)
View Source
Administer users on a running Malachi node from the box, over Erlang distribution (RPC).
This is the operator-on-the-host surface (the counterpart to a release's bin/malachi rpc); for remote
or programmatic management use the wire ops (scripts/user.js) or the dashboard REST API. Because users
live in the replicated store, a change made through any node propagates cluster-wide.
mix malachi.user list
mix malachi.user create <username> <password> [--perms produce,consume]
mix malachi.user passwd <username> <newpassword>
mix malachi.user delete <username>Options:
--node: the target node (default$MALACHI_NODEormalachi@127.0.0.1)--cookie: the Erlang cookie (default$RELEASE_COOKIE, else~/.erlang.cookie)--perms: comma-separated permissions forcreate(admin|produce|consume; default produce,consume)
The target node must be named (a release, or iex --name ... -S mix); an unnamed mix run node is
not reachable. Passwords are passed as plain arguments, so prefer this on a trusted host.
Summary
Functions
The testable core: maps a parsed command to an Auth call through call (a (module, fun, args -> {:ok, value} | {:error, reason}) seam that in production is an RPC to the target node). Returns
{:ok, message} / {:error, message} for the caller to print.
Functions
@spec execute([String.t()], keyword(), (module(), atom(), list() -> {:ok, term()} | {:error, term()})) :: {:ok, String.t()} | {:error, String.t()}
The testable core: maps a parsed command to an Auth call through call (a (module, fun, args -> {:ok, value} | {:error, reason}) seam that in production is an RPC to the target node). Returns
{:ok, message} / {:error, message} for the caller to print.