mix malachi. acl
(malachi v0.8.13)
View Source
Administer per-topic ACLs 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/acl.js) or the dashboard REST API. Because ACLs live in
the replicated store, a change made through any node propagates cluster-wide.
mix malachi.acl list <username>
mix malachi.acl grant <username> <operation> <pattern>
mix malachi.acl revoke <username> <operation> <pattern>operation is produce or consume; pattern is an exact topic (orders.eu) or a *-suffixed prefix
(orders.* = every topic starting with orders.). ACLs are enforced when MALACHI_ACL_STRICT is on;
otherwise a user's global produce/consume permission already grants every topic and ACLs only add access.
Options:
--node: the target node (default$MALACHI_NODEormalachi@127.0.0.1)--cookie: the Erlang cookie (default$RELEASE_COOKIE, else~/.erlang.cookie)
The target node must be named (a release, or iex --name ... -S mix); an unnamed mix run node is not
reachable.
Summary
Functions
The testable core: maps a parsed command to an Auth ACL 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 ACL 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.