Comments (7)
I once ran the full loraserver stack, including mosquitto, on a Raspberry, but I can't recall if I also used the plugin and don't have access to the RPi based gateways to check right now.
If you are patient enough, I could test it on monday and let you know; if you are eager to try it, just go ahead and compile it: hopefully it will work without any issue, and if not, we can work out the solution and add it to the documentation for anyone that needs RPi support too.
In theory it should compile just fine, given that you have Go with cgo on your RPi. That's assuming you want to compile it in the Pi itself and not cross compile for ARM from another arch. That could be trickier (or not, I really have no idea because I haven't tried it). The plugin is small enough that compiling in the Pi shouldn't take that long, but again, I could try it on monday and post results here.
from mosquitto-go-auth.
Thank you @iegomez . I hope so!
I'll start the process to try to compile here as well. If I can get a result by then, I'll come back here.
Thank you again.
from mosquitto-go-auth.
Well, I can now confirm that it works on a Raspberry Pi 3. I added detailed instructions on building mosquitto in the general case and some notes for Raspberry Pi to the readme, but basically what you need is to install and/or build necessary dependencies for mosquitto (websockets, ssl, etc.), build mosquitto itself, install Go for armv6l and then build the plugin as usual.
Be sure to pull or clone the repo again, as I deleted go-auth.h which was built on Linux amd64 so it can be generated in the Pi (or any system) when building.
Two things you should consider:
-
Building things in the Pi will take long, specially dependencies for mosquitto, such as libwebsockets. So get your swords ready to have a nice time while compiling.
-
Cross compiling should in theory be possible, but you'd have to cross compile mosquitto first so that the headers are available and only then cross compile the plugin, but even then something could go wrong as I'm not sure that cgo plays well with arm. If you have the time, it'd be a nice experiment, but if you just need to work, prefer compiling on the Pi itself.
Let me know if you run into any problems.
Cheers!
from mosquitto-go-auth.
If you need any help with those or any other ideas, reach me here, at the lorserver (forum)[https://forum.loraserver.io/], or drop me a line at [email protected] / [email protected]. Of course, if you wish to contribute any implementation, just file a new PR.
Cheers!
from mosquitto-go-auth.
@iegomez, i managed to make it work (after a lot of work hehe).
Actually, this project can open many doors to other implementations. Thank you
Cheers!
from mosquitto-go-auth.
Great news!
What other implementations are you thinking about?
from mosquitto-go-auth.
With such freedom I think of 2 things:
- Adapt to more specific business rules;
- Create a log layer;
from mosquitto-go-auth.
Related Issues (20)
- Files backend issue HOT 7
- Implementing mosquitto_psk_key_get for certificate whitelisting HOT 8
- JWT backend JS mode not working HOT 1
- How to check if a client is disconnected from the broker HOT 2
- MongoDB is broken in test Docker image HOT 4
- Not authenticating with mysql db
- The plugin cannot be built HOT 1
- Request: Help in setting up Allow/Deny Access Control Rules based on Client ID HOT 4
- TARGETPLATFORM does not include linux/amd64 in Dockerfile HOT 2
- http backend: superuser check is made for every single acl check HOT 6
- Make order of plugin execution configurable
- Update/Fix dependencies with active vulnerabilities HOT 1
- error compiling on raspberry pi HOT 1
- Hasher configuration alway defaults to Base64 HOT 1
- the doc should specify which auth methods support TCP and Websocket connections HOT 1
- Container image on Dockerhub is outdated
- Inconsistent rw Permission Behavior Not Matching Documentation HOT 4
- JWT RS256 public key verification "jwt parse error: key is of invalid type"
- Backend register error: couldn't initialize js backend with error Javascript backend error: missing options: js_acl_script_path.
- Allow for clientId to be passed to postgres GetUser backend password check HOT 4
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-go-auth.