Skip to content

Add authentication #47

Open
Open
@samyk

Description

John, awesome project! This has been working great so far.

As the project grows, more and more users are going to be running this on public IPs so they can reach their CNC mill at home. The day will come when someone uses shodan.io or similar to find all (publicly accessible) SPJS servers and mass-carves something bad into everyone's waste board! Especially as more people run it on RasPis and port forward so they can access their cam/mill/etc remotely.

Wanted to start considering an authentication feature to prevent this. Some requirements I think would be good:

  • on by default (config option to turn it off)
  • generates a strong, random password for the user upon first startup and provides it in the console
  • passwords are hashed using strong hash+salt (eg bcrypt)
  • stores the user/hashed password(s) in a simple text file (config file time?)
  • in web interface, remember username/password forever by default so user never needs to log in again (not part of SPJS technically)
  • optional mode (NOT on by default) to not require passwords for the same subnet (eg, their LAN, based off of ifconfig/ip settings)
  • optional mode (NOT on by default) to not require passwords at all
  • option to flush/reset passwords

Thoughts? Happy to possibly implement this myself as well but wanted to work out the requirements and get your ideas.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions