Coder Social home page Coder Social logo

snapp-incubator / soteria Goto Github PK

View Code? Open in Web Editor NEW
10.0 5.0 0.0 12.6 MB

Snapp EMQ Authentication based on EMQ HTTP Plugin

License: GNU General Public License v3.0

Dockerfile 0.41% Go 97.66% Smarty 1.93%
authentication authorization cloud emqx mqtt

soteria's Issues

Provide tests for auth/acl API

We have test cases for authenticators but we don't have any for APIs. APIs are internally uses authenticators but it would be great if we can cover them at least using simple hmac-based JWT token.

Support EMQX v5 authentication

In the new version of EMQX (v5), they support JSON request and response. We need to create new endpoints in which we can parse JSON
for getting username and password and then returning results as JSON. It is configurable in its user interface as follows:

image

In case of success, beside the status code,

HTTP/1.1 200 OK
Headers: Content-Type: application/json

you need to provide body as follows:

{
    "result": "allow", // options: "allow" | "deny" | "ignore"
    "is_superuser": true // options: true | fals, default value: false
}

https://www.emqx.io/docs/en/v5.2/access-control/authn/http.html#http-request-and-response

Support internal authentication

New release of EMQX (version 5) does not have a way for disabling authentication and authorization on a specific listener so we need to do the authentication and give the superuser access so we can actually reduce their future load on the system.

Because these are internal systems, we can use HMAC-based solutions for their JWT token and make the procedure easier than what we have for external services.

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.