Comments (6)
Please show your mosquitto.conf (without passwords), as well as a description of the HTTP service you're using.
from mosquitto-auth-plug.
my mosquitto.conf:
pid_file /var/run/mosquitto.pid
persistent_client_expiration 1d
persistence true
persistence_location /var/lib/mosquitto/
log_dest stdout
log_type debug
log_type error
log_type warning
log_type notice
log_type information
connection_messages true
log_timestamp true
include_dir /etc/mosquitto/conf.d
included rmap.conf file:
auth_plugin /home/pat1/svn/mosquitto-auth-plug/trunk/auth-plug.so
auth_opt_backends http
auth_opt_http_hostname localhost
auth_opt_http_ip 127.0.0.1
auth_opt_http_port 8100
auth_opt_http_getuser_uri /auth
auth_opt_http_superuser_uri /superuser
auth_opt_http_aclcheck_uri /acl
I use for my test http-auth-be.py in example directory
the patch below solve the problem for me but I think it is not clean:
--- cache.c (revisione 125)
+++ cache.c (copia locale)
@@ -61,6 +61,9 @@
unsigned char hashdata[SHA_DIGEST_LENGTH];
int mdlen, i;
- if (username == NULL) return;
data = malloc(strlen(clientid) + strlen(username) + strlen(topic) + 20);
sprintf(data, "%s:%s:%s:%d", clientid, username, topic, access);
from mosquitto-auth-plug.
Thanks for your hints, I think you're right. I have pushed a fix which will not attempt to cache null usernames. I have also pushed a fix which sets a default for anonusername
(see README.md).
Could you test if this solves the issue for you?
from mosquitto-auth-plug.
Il giorno dom, 23/11/2014 alle 13.17 -0800, JP Mens ha scritto:
Thanks for your hints, I think you're right. I have pushed a fix which
will not attempt to cache null usernames. I have also pushed a fix
which sets a default for anonusername (see README.md).Could you test if this solves the issue for you?
Thanks, it works !
1416778024: New connection from 192.168.1.172 on port 1883.
1416778024: New client connected from 192.168.1.172 as mosqpub/6505-asus-pat1 (c1, k60).
1416778024: Sending CONNACK to mosqpub/6505-asus-pat1 (0)
1416778024: |-- mosquitto_auth_acl_check(..., mosqpub/6505-asus-pat1, anonymous, /test, MOSQ_ACL_WRITE)
1416778024: |-- url=http://127.0.0.1:8100/superuser
1416778024: |-- user anonymous was authenticated in back-end 0 (http)
1416778024: |-- url=http://127.0.0.1:8100/acl
1416778024: |-- aclcheck(anonymous, /test, 2) AUTHORIZED=0 by http
1416778024: |-- Cached [77002C9B194B464613C22FB1521CDBC2B0EBD2BB] for (mosqpub/6505-asus-pat1,anonymous,2)
1416778024: Denied PUBLISH from mosqpub/6505-asus-pat1 (d0, q0, r0, m0, '/test', ... (4 bytes))
1416778024: Received DISCONNECT from mosqpub/6505-asus-pat1
from mosquitto-auth-plug.
Glad to hear that, and thanks for reporting back.
from mosquitto-auth-plug.
what?means when publish a message,you need to check the user again and again?
why dont' just auth functions,and when publish message no need auth any more?
from mosquitto-auth-plug.
Related Issues (20)
- ACL issue with JWT backend HOT 2
- Inconsistencies between HTTP and JWT code & configuration HOT 3
- Merge be-http and be-jwt into one
- conf->hostname might be uninitialized in be_jwt_init() HOT 2
- ACL issue with %d placeholder - MySQL backend HOT 4
- Compilation Error HOT 1
- Compilation Error config.h: No such file or directory HOT 19
- problem with sizeof HOT 1
- Compile error with Mosquitto 1.5.5 and latest Auth-plug version HOT 2
- Websocket error: connection was lost (verbose output) HOT 4
- given the current vesion of Auth-plug, what version of mosquitto and libwebsockets should I install? HOT 1
- Fact that a user is superuser is not cached HOT 1
- mysql problem acl SUB/PUB HOT 1
- Cannot Load Auth plug-Error HOT 8
- mosquitto_client_id: symbol not found HOT 5
- Failed to create file named auth-plug.so
- Segmentation fault with BE_PSK and postgres backend HOT 1
- HTTP backend doesn't connect, instead rejects subscriptions HOT 1
- HTTP backend not calling api HOT 1
- Issue subscribing with wildcard in MongoDB and maybe MySQL HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mosquitto-auth-plug.