crelay
crelay copied to clipboard
Enhancement: Add Authentication
Hi Ondrej, I have been using Your Software crelay for some time now. Is there a way to add some kind of access protection? Currently anyone on the local area network is able to switch. An access string (=password) that has to be added to any curl command, could be set in the crelay.conf file. I know this protection is definitely not "top notch", but it should be enough to stop random prank "attacks". Best regards Johannes
Hi Johannes, this has been on my Nice to have feature list for a long time, but I did not yet have time to implement it. Authentication would have to be implemented for both the Web GUI and the REST API. The latter would actually be quite easy to implement with an access token as suggested by you. This could still be sniffed on the LAN as long as the http connection is not encrypted but as you say, it would be better than nothing. It would break compatibility with the PiRelay app though, as this feature is not supported by the app, but authentication could be disabled in this case. As for the Web GUI, I have to find out how to do this.
However there is still the problem of lack of time. Therefore I would happily accept a pull request for this feature :smile: