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

Add basic authorization to the web ui and websocket api #1126

Open
Ezward opened this issue Apr 30, 2023 · 0 comments
Open

Add basic authorization to the web ui and websocket api #1126

Ezward opened this issue Apr 30, 2023 · 0 comments

Comments

@Ezward
Copy link
Contributor

Ezward commented Apr 30, 2023

We currently have no security at all on the web ui and websocket api that is served by the car. This means that anyone can, if they know or can guess the car's local name, can open the web ui and operate the car. We should add an optional username and password that must be entered in the basic auth prompt of the browser and in the initial websocket GET request's Authorization header in order to use those features.

  • Allow the use to set a username and password for basic auth in their myconfig.py configuration. The default is no username (None) in which case a basic authorization is not required.
  • If myconfig.py has a non-None username then the car's web server will require basic authorization to use the web ui and the websocket api.
  • It is ok to use the default basic auth challenge that the web server provides when opening the web page.
  • For websocket apai, if the username is non-Null in the myconfig.py, then the webserver should check the value of the Authorization header against the username and password in the myconfig.py file and return a 403 Forbidden response if they do not match. Further, if the username in myconfig.py is non-Null and the websocket request does not contain an Authorization header then the webserver should respond with a 401 Not Authorized response.
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