snapp-incubator / soteria Goto Github PK
View Code? Open in Web Editor NEWSnapp EMQ Authentication based on EMQ HTTP Plugin
License: GNU General Public License v3.0
Snapp EMQ Authentication based on EMQ HTTP Plugin
License: GNU General Public License v3.0
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.
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:
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
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.