From 75e67dcbd0d185521f1657f55bd73f6093a1069c Mon Sep 17 00:00:00 2001 From: andrea Date: Wed, 20 May 2015 21:28:36 +0200 Subject: [PATCH] Minor change, documented the content of config files --- distribution/src/main/resources/acl.conf | 4 +++ distribution/src/main/resources/moquette.conf | 28 +++++++++++++++---- .../src/main/resources/password_file.conf | 7 ++++- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/distribution/src/main/resources/acl.conf b/distribution/src/main/resources/acl.conf index 8de08222..a14e8c64 100644 --- a/distribution/src/main/resources/acl.conf +++ b/distribution/src/main/resources/acl.conf @@ -1 +1,5 @@ +#********************************************* +# ACL Format: +# topic [read|write|readwrite] +#********************************************* topic write /sensors/anemometer \ No newline at end of file diff --git a/distribution/src/main/resources/moquette.conf b/distribution/src/main/resources/moquette.conf index 6e1bd393..43193e76 100644 --- a/distribution/src/main/resources/moquette.conf +++ b/distribution/src/main/resources/moquette.conf @@ -11,10 +11,26 @@ websocket_port 8080 host 0.0.0.0 -#Password file -password_file config/password_file.conf -acl_file config/acl.conf +#********************************************************************* +# acl_file: +# defines the path to the ACL file relative to moquette home dir +# contained in the moquette.path system property +#********************************************************************* +#acl_file config/acl.conf -#false to accept only client connetions with credentials -#true to accept client connection without credentails, validating only the one that provides -allow_anonymous true \ No newline at end of file +#********************************************************************* +# allow_anonymous is used to accept MQTT connections also from not +# authenticated clients. +# - false to accept ONLY client connetions with credentials. +# - true to accept client connection without credentails, validating +# only against the password_file, the ones that provides. +#********************************************************************* +allow_anonymous true + +#********************************************************************* +# password_file: +# defines the path to the file that contains the credentials for +# authenticated client connection. It's relative to moquette home dir +# defined by the system property moquette.path +#********************************************************************* +password_file config/password_file.conf \ No newline at end of file diff --git a/distribution/src/main/resources/password_file.conf b/distribution/src/main/resources/password_file.conf index de74f4d7..18237820 100644 --- a/distribution/src/main/resources/password_file.conf +++ b/distribution/src/main/resources/password_file.conf @@ -1 +1,6 @@ -testuser:passwd \ No newline at end of file +#********************************************* +# Each line define a user login in the format +# :sha256() +#********************************************* +#NB this password is sha256(passwd) +testuser:36767030e79073783c8e9b299d9f8f1d4cd66baa82cd8869caad8dbb55204099