MQTT authentication & authorization in Docker

Hi,

I’ve been reading https://docs.loraserver.io/install/mqtt-auth/, where should this be applied when using docker?

Should the configuration be done on the host machine or the docker service?

I have attached the following volumes to the docker image:

volumes:
- ./mosquitto.conf:/mosquitto/config/mosquitto.conf
- /opt/mosquitto-auth-plug:/opt/mosquitto-auth-plug
- /etc/mosquitto/mosquitto-auth-plug:/etc/mosquitto/mosquitto-auth-plug
- ./mosquitto-auth-plug.conf:/etc/mosquitto/conf.d/mosquitto-auth-plug.conf

Can I somehow verify that the auth plugin is active and working? I have no problem subbing to any topic, so my guess is that the plugin is not working.

(Something to note is that the conf.d did not exists in the docker image. So I had to add it. Could that be a problem?)

Here is the log file, does not give much information (but might help):

1519637813: mosquitto version 1.4.12 (build date 2017-06-01 13:03:46+0000) starting
1519637813: Config loaded from /mosquitto/config/mosquitto.conf.
1519637813: Opening ipv4 listen socket on port 1883.
1519637813: Opening ipv6 listen socket on port 1883.
1519637813: New connection from xxx.18.0.2 on port 1883.
1519637813: New client connected from xxx.18.0.2 as 7220428b-448a-4906-b255-01e921d5bbea (c1, k30).
1519637813: New connection from xxx.18.0.3 on port 1883.
1519637813: New client connected from xxx.18.0.3 as 5f9add0d-f0d5-4a7e-95a5-c1135cc38623 (c1, k30).
1519637815: New connection from xxx.18.0.5 on port 1883.
1519637815: New client connected from xxx.18.0.5 as c2c1610a-493b-42c3-a0fb-3aa02b025e71 (c1, k30).
1519637957: New connection from xxx.228.162.12 on port 1883.

Done some changes, now I see this error message:

1519640485: Error: Unable to load auth plugin “/opt/mosquitto-auth-plug/auth-plug.so”.
1519640485: Load error: Error loading shared library libpq.so.5: No such file or directory (needed by /opt/mosquitto-auth-plug/auth-plug.so)

Did a google on the above, seems to be something with postgres (?).