mix malachi. user
(malachi v0.22.7)
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] [--role viewer]
mix malachi.user role <username> <viewer|editor|admin|none>
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 wire permissions forcreate(admin|produce|consume; default produce,consume;--perms ""for none)--role: the console role forcreate(viewer|editor|admin, nested; seeMalachi.Auth.ConsoleRole).role ... noneremoves it.
A console role is what the dashboard and the console allow; a wire permission is what the binary
protocol allows, and only the wire admin implies a console role. Setting a role on a cluster still
rolling to the release that introduced roles is refused with what to finish first.
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.