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

Implement basic authentication for the rover's web ui and web socket api #22

Open
Ezward opened this issue May 1, 2023 · 0 comments
Open
Assignees

Comments

@Ezward
Copy link
Owner

Ezward commented May 1, 2023

Currently any one can control the robot if they have or can guess its IP address. We want to add optional basic authentication such that the user can configure username and password that is compiled into the firmware and is used for basic authentication. If either the username or the password is empty then no authentication is done. If both the username and password are not empty then they are used as the credentials for the web ui and web socket api as follows:

  • The use is challenged for a username and password using the browser's default basic authentication dialog when the user opens the web ui.
  • The web server checks the Authorization header for the web ui GET and the web socket GET as follows;
    • If the Authorization header is missing then the request fails with a 401 Not Authorized response
    • If the Authorization header exists but does not match the configured username and password then the request fails with a 403 Forbidden response.
    • If valid of the Authorization header matches the configured username and password then the requests succeed.
@Ezward Ezward self-assigned this May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant