From eb9b982804ece6fc49d96107729988462e1dab16 Mon Sep 17 00:00:00 2001 From: Tomasmerca <32470264+Tomasmerca@users.noreply.github.com> Date: Wed, 15 Jan 2020 00:24:48 -0300 Subject: [PATCH 1/3] Added filter.acl file to mosquitto/config Route filter.acl to add the option in mosquitto/mosquitto.conf of filtering wich topics can be read or writen by defined users. --- .templates/mosquitto/service.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.templates/mosquitto/service.yml b/.templates/mosquitto/service.yml index 8a62d776..a7d80921 100644 --- a/.templates/mosquitto/service.yml +++ b/.templates/mosquitto/service.yml @@ -10,4 +10,5 @@ - ./volumes/mosquitto/data:/mosquitto/data - ./volumes/mosquitto/log:/mosquitto/log - ./services/mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf + - ./services/mosquitto/filter.acl:/mosquitto/config/filter.acl From c4adb556e757eef31bc53ffee04ff0b46bc396c9 Mon Sep 17 00:00:00 2001 From: Tomasmerca <32470264+Tomasmerca@users.noreply.github.com> Date: Wed, 15 Jan 2020 00:33:08 -0300 Subject: [PATCH 2/3] Created empty file whit example filter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added the file where the user creates filters. The example filters don“t affect usage in any way. --- .templates/mosquitto/filter.acl | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .templates/mosquitto/filter.acl diff --git a/.templates/mosquitto/filter.acl b/.templates/mosquitto/filter.acl new file mode 100644 index 00000000..e1682311 --- /dev/null +++ b/.templates/mosquitto/filter.acl @@ -0,0 +1,6 @@ +user admin +topic read # +topic write # + +pattern read # +pattern write # From 89f46478138dddcc177876c6d93ec9c0de4cb0e1 Mon Sep 17 00:00:00 2001 From: Tomasmerca <32470264+Tomasmerca@users.noreply.github.com> Date: Wed, 15 Jan 2020 00:36:48 -0300 Subject: [PATCH 3/3] Added options for password and filter config --- .templates/mosquitto/mosquitto.conf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.templates/mosquitto/mosquitto.conf b/.templates/mosquitto/mosquitto.conf index 9f63ac19..5827737d 100644 --- a/.templates/mosquitto/mosquitto.conf +++ b/.templates/mosquitto/mosquitto.conf @@ -1,4 +1,10 @@ persistence true persistence_location /mosquitto/data/ log_dest file /mosquitto/log/mosquitto.log + +#Uncomment to enable passwords #password_file /mosquitto/config/pwfile +#allow_anonymous false + +#Uncomment to enable filters +#acl_file /mosquitto/config/filter.acl