GithubHelp home page GithubHelp logo

virajkanwade / mosquitto-go-auth-oauth2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gewv-tu-dresden/mosquitto-go-auth-oauth2

0.0 1.0 0.0 50 KB

Custom backend plugin for mosquitto-go-auth

License: MIT License

Dockerfile 13.94% Go 86.06%

mosquitto-go-auth-oauth2's Introduction

Mosquitto Go Auth Plugin for OAuth2

This is a custom backend for the mosquitto go auth plugin that can handle the authentification and authorization with a oauth2 server.

How to use

This plugin use oauth to authenticate and authorize users for a mqtt broker. Unfornatly is it necassary, that the oauth server response with allowed topics for the user. So the authentication is simple and possible with all kinds of oauth servers. But for the acl check, server have to answer with a special json on the userinfo endpoint. This is the structur:

{
    "mqtt": {
        "topics": {
            "read": ["sensor/+/rx"],
            "write": ["application/#", "server_log/mqtt_broker/tx"],
        },
        "superuser": false,
    },
}

We use Keycloak and there you can customize your userinfo.

How to test

The simplest way is to use the delivered dockerfile and build your own image. You can use volumes to import the configurations or copy the files in the images while you build it. If you use volumes you have to remove the COPY commands from the Dockerfile.

mosquitto-go-auth-oauth2's People

Contributors

karltga avatar virajkanwade avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.