Closed damian154 closed 3 years ago
There is an ambiguity in emqx/emqx:latest. Can you see the exact version number of emqx on the dashboard?
In my case, it is emqx/emqx:v4.3-rc.4
. If you are too, your environment variables should be:
environment:
- EMQX_LOADED_PLUGINS=emqx_recon,emqx_retainer,emqx_management,emqx_dashboard,emqx_auth_mnesia
- EMQX_ALLOW_ANONYMOUS=false
- EMQX_ACL_NOMATCH=deny
- EMQX_AUTH__MNESIA__AS=username
- EMQX_AUTH__MNESIA__PASSWORD_HASH=plain
- EMQX_AUTH__USER__1__USERNAME=super
- EMQX_AUTH__USER__1__PASSWORD=secret
And, it does not support to configure a super user
I tried with the version 4.3-rc.4
with the exact same configuration you posted but still no luck.
I leave mi docker-compose file and the acl configuration. Right now i'm getting "Connection Refused: bad user name or password":
docker.compose,yml:
version: '3'
services:
broker:
image: emqx/emqx:4.3-rc.4
ports:
- 1883:1883
- 18083:18083
environment:
- EMQX_LOADED_PLUGINS=emqx_recon,emqx_retainer,emqx_management,emqx_dashboard,emqx_auth_mnesia
- EMQX_ALLOW_ANONYMOUS=false
- EMQX_ACL_NOMATCH=deny
- EMQX_AUTH__MNESIA__AS=username
- EMQX_AUTH__MNESIA__PASSWORD_HASH=plain
- EMQX_AUTH__USER__1__USERNAME=super
- EMQX_AUTH__USER__1__PASSWORD=secret
volumes:
- ./emq/acl.conf:/opt/emqx/etc/acl.conf:ro
acl.conf:
{allow, {user, "super"}, pubsub, ["t"]}.
Sorry @damian154 It is a BUG on v4.3-rc.*, As a result of this bug, we can only store the password using sha256.
I have fixed it in https://github.com/emqx/emqx/pull/4692. It will be released in v4.3-rc.5 or 6.
BTW, the EMQX_AUTH__MNESIA__AS
has removed after v4.3.
I'm running the latest docker image of emqx with the mnesia plugin enabled, and i can't correctly set a default super user. I read the documentation and i can't find where is the error in my config.
This is the docker compose file i'm using:
Am i missing something? I was able to correctly configured the mongo plugin, so i don't understand where's the issue here. Any help would be greatly appreciated.