Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Secure the http rest api #3

Open
pmqtt opened this issue Jun 30, 2019 · 0 comments
Open

Secure the http rest api #3

pmqtt opened this issue Jun 30, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@pmqtt
Copy link
Owner

pmqtt commented Jun 30, 2019

Describe the bug
Currently, everybody that knows the ip address and port of the broker can send api events
To Reproduce

$ curl -d '{"user":"test", "password":"1234"}' -H 'Content-Type: application/json' -X POST http://localhost:1884/rest/api/v0.1/create_user

Steps to solve
To solve the problem, extends the rest_api class in http_rest_server.cpp to validate an authentication token. Furthermore, generate at startup the token and write them to file.

@pmqtt pmqtt added the enhancement New feature or request label Jun 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant