Skip to content

Secure the http rest api #3

@pmqtt

Description

@pmqtt

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions