mosquitto-auth-plug | Authentication plugin for Mosquitto | Authorization library

 by   jpmens C Version: 0.1.3 License: Non-SPDX

kandi X-RAY | mosquitto-auth-plug Summary

kandi X-RAY | mosquitto-auth-plug Summary

mosquitto-auth-plug is a C library typically used in Security, Authorization applications. mosquitto-auth-plug has no bugs, it has no vulnerabilities and it has medium support. However mosquitto-auth-plug has a Non-SPDX License. You can download it from GitHub.

This plugin can perform authentication (check username / password) and authorization (grant permission to subscribe and/or publish to specific topics via ACL). Currently, not all back-ends have the same capabilities (see the section on the back-end you're interested in). Multiple back-ends can be configured simultaneously for authentication, and they're attempted in the order you specify. Once a user has been authenticated, the same back-end is used to check authorization (ACLs). Superusers are checked for in all back-ends. The configuration option is called auth_opt_backends and it takes a comma-separated list of back-end names which are checked in exactly that order. Note: anonymous MQTT connections are assigned a username configured in the plugin as auth_opt_anonusername and they are handled by a so-called fallback back-end which is the first configured back-end. Passwords are obtained from the back-end as PBKDF2 strings (see Passwords below). If you store a clear-text password or any hash not generated the same way, the comparison and the authentication will fail.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              mosquitto-auth-plug has a medium active ecosystem.
              It has 767 star(s) with 476 fork(s). There are 71 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 0 open issues and 296 have been closed. On average issues are closed in 90 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of mosquitto-auth-plug is 0.1.3

            kandi-Quality Quality

              mosquitto-auth-plug has 0 bugs and 0 code smells.

            kandi-Security Security

              mosquitto-auth-plug has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              mosquitto-auth-plug code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              mosquitto-auth-plug has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              mosquitto-auth-plug releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.
              It has 441 lines of code, 29 functions and 17 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of mosquitto-auth-plug
            Get all kandi verified functions for this library.

            mosquitto-auth-plug Key Features

            No Key Features are available at this moment for mosquitto-auth-plug.

            mosquitto-auth-plug Examples and Code Snippets

            No Code Snippets are available at this moment for mosquitto-auth-plug.

            Community Discussions

            QUESTION

            Mosquitto-auth-plugin ACL for subscription
            Asked 2020-Jan-27 at 10:49

            I am currently using the mosquitto broker to see if I can build something interesting with it and I came across this plugin for authentication called mosquitto-auth-plugin.

            I followed the documentation of the plugin and I am using postgres as the back-end table. It seems to be working with respect to user authentication. When it comes to ACL I find the publish ACL is on spot but the subscription ACL is something I am not able to wrap my mind around.

            ...

            ANSWER

            Answered 2019-Jan-10 at 01:23

            Solved the issue. In the new mosquitto 1.5 release the MOSQ_ACL_SUBSCRIBE is an additional enhancement that has been introduced and an additional bit has been introduced in the ACL check. The value now varies from 0 to 7 (because of 3 bits) instead of 0-3 (owing to 2 bits).

            So now the read/write value on your ACL table in the database must vary from 0 to 7.

            1. 0: no access
            2. 1: read
            3. 2: write
            4. 3: read and write
            5. 4: subscribe
            6. 5: read & subscribe
            7. 6: write & subscribe
            8. 7: read, write and subscribe

            Hope it helps for people who are facing the same issue as I was :D!

            Source https://stackoverflow.com/questions/54080624

            QUESTION

            Mosquitto can't assign requested address inside my Kubernetes Cluster
            Asked 2019-Feb-26 at 12:49

            I'm trying to set up my mosquitto server inside a Kubernetes cluster and somehow I'm getting the following error and I can't figure out why. Could someone help me?

            Error:

            ...

            ANSWER

            Answered 2019-Feb-26 at 12:49

            The problem is with the listener on port 1883, this can be determined because the log hasn't got to the 9001 listener yet.

            The problem is most likely because mosquitto can not resolve the IP address of the hostname mosquitto. When passing a hostname the name must resolve to a valid IP address. The same problem has been discussed in this recent answer. It could also be that mosquitto is resolving to an address that is not bound to any of the interfaces on the actual machine (e.g. if Address Translation is being used).

            Also for the 9001 listener rather than passing 0.0.0.0 you can just not include a bind address and the default is to listen on all interfaces.

            Source https://stackoverflow.com/questions/54881939

            QUESTION

            Building Mosquitto MQTT auth plugin issue
            Asked 2018-Jul-29 at 11:51

            I need an advanced auth for Mosquitto. I decided to use mosquitto-auth-plug

            However, if I follow the build instructions I have the error:

            ...

            ANSWER

            Answered 2018-Jul-29 at 11:51

            As hashed out in the comments,

            You need to build and install mosquitto (or install the prebuilt version and it's dev package) before trying to build the plugin.

            The error is because ld can not find libmosquitto to link against

            Source https://stackoverflow.com/questions/51530651

            QUESTION

            Mosquitto broker deny multi-level wildcard '#' subscriptions?
            Asked 2018-Mar-06 at 13:07

            I'm running Mosquitto broker (version 1.4.14) with the mosquitto-auth-plugin (HTTP backend). Clients have to authenticate with username and password and in some cases pass acl-requirements.

            It seems that all authenticated users can subscribe to the topic '#' which shows all pubs to all topics.

            In the ACL the wildcard # seems to be already replaced with the topic-name so I cannot deny it's subscription.

            Is it possible to deny a subscription to all topics in the configuration?

            If topics start with a $ chr then the issue is solved but the MQTT-spec says: 'Applications cannot use a topic with a leading $ character for their own purposes.' (4.7.2 Topics beginning with $)

            ...

            ANSWER

            Answered 2018-Mar-06 at 13:07

            As mentioned in the comments, clients will always be able to subscribe to a topic even if it blocked by the ACL, they will just not receive any messages on those topics.

            Source https://stackoverflow.com/questions/49128555

            QUESTION

            pubsubclient can not connect to broker when using JWT authentication
            Asked 2018-Feb-21 at 15:49

            I'm using pubsubclient library.
            I used this function to connect to mosquitto broker which using mosquitto-auth-plug with JWT authentication.

            ...

            ANSWER

            Answered 2018-Feb-21 at 15:49

            I change pubsubclient.h file lib from:

            Source https://stackoverflow.com/questions/48902690

            QUESTION

            generate password for auth-plug for mosquitto in c#
            Asked 2017-Jul-21 at 18:50

            I have spent all day trying to make a usable pbkdf2 password for the mosquitto-auth-plug. This program sets it up exactly the way it should be stored in the mysql database. I have a password hash generated by the program that comes with auth-plug and mosquitto loves it. I just can't replicate it in c#, if anyone can help please let me know.

            ...

            ANSWER

            Answered 2017-Jul-04 at 08:34

            As you have already stated in your edit, the problem appears to be the difference in hash functions used between the mosquitto plugin (which only supports SHA-256, according to the source code) and the .NET implementation (which can only do SHA-1).

            A more flexible implementation of PBKDF2 is available in BouncyCastle, a more lightweight implementation can be found here. If you are not satisfied with those two, you could chose to implemnt PBKDF2 yourself, which is not really hard.

            Source https://stackoverflow.com/questions/44856267

            QUESTION

            using Xamarin Visual Studio C# using M2Mqtt to connect to Mosquitto mqtt with ssl
            Asked 2017-Jul-21 at 18:43

            I am trying to connect to my mosquitto mqtt broker in an Xamarin c# application using M2Mqtt.

            I am having a difficult time creating the x509 certificate in my program

            SEE --- My other question

            Xamarin Visual Studio createcertfromfile path no working

            But I wanted to float this question just to see if any one out there has done this. I have spent 2 days making absolutely no progress.

            My only concern is encrypting the communication between the mobile device and my mosquito broker.

            I have secured the broker with mosquitto-auth-plug and I can't be sending the credentials over the air.

            One other question -- I am not concerned with verifying the mobile user I just want to create a secure encrypted connection with my broker, so I am not going to need my users to get any certificates or anything?? correct

            -----Edit for hardilib

            I have a mosquitto broker running on a centos 7 server. I have configured the broker to accept ssl/tls connections and have used mosquitto-auth-plug for user security.

            I have a mobile application written in c# Xamarin with visual studio 2017 enterprise edition.

            I have very good non encrypted communication between my mqtt broker and mobile application using M2Mqtt client.

            I need encrypted communication between the mobile application and the broker for this to work in a real world situation.

            I have tried to follow the only information I can find at

            http://embedded101.com/Blogs/PaoloPatierno/entryid/366/MQTT-over-SSL-TLS-with-the-M2Mqtt-library-and-the-Mosquitto-broker

            I have it all complete except the part

            The CA certificate was included in a resource file (Resources.resx) and, once read as a byte stream is provided to the X509Certificate constructor class, in order to obtain a valid X.509 certificate for the MqttClient.

            Client Connection String

            ...

            ANSWER

            Answered 2017-Jul-21 at 18:43

            I figured it out you can use AssetManager class to retrieve assets from you xamarin solutions directory.

            see my other post for more complete instructions

            Xamarin Visual Studio createcertfromfile path no working

            Source https://stackoverflow.com/questions/45096212

            QUESTION

            Can't make mosquitto-auth-plug
            Asked 2017-Jun-29 at 21:00

            Not sure if you can read the picture....

            /bin/ld: cannot find -lmosquitto

            is the error.

            I'm using centos 7

            mosquitto-auth-plug config file has been updated with mosquitto src and openssl install directory and they are correct.

            My previous error was mysql_config not found which I was able to fix by installing libmysqlclient-devel

            mysql is installed and working fine

            Let me know if you can help Thanks

            ...

            ANSWER

            Answered 2017-Jun-29 at 21:00

            To fix the problem copy mosquitto.so.1 from usr/lib64 to your mosquitto source direcrory/lib as mosquitto.so

            That will fix the problem I had here.

            then add -Wl,--no-as-needed -ldl to the LDFLAG in the Makefile

            Source https://stackoverflow.com/questions/44814124

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install mosquitto-auth-plug

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/jpmens/mosquitto-auth-plug.git

          • CLI

            gh repo clone jpmens/mosquitto-auth-plug

          • sshUrl

            git@github.com:jpmens/mosquitto-auth-plug.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Authorization Libraries

            casbin

            by casbin

            RxPermissions

            by tbruyelle

            opa

            by open-policy-agent

            cancan

            by ryanb

            Try Top Libraries by jpmens

            jo

            by jpmensC

            mqttwarn

            by jpmensPython

            mqtt-launcher

            by jpmensPython

            homie-ota

            by jpmensPython