edison-fw / edison-oobe

MIT License
1 stars 2 forks source link

Enable/disable the web interface by external interaction #14

Closed mwallnoefer closed 5 months ago

mwallnoefer commented 3 years ago

As another enhancement I suggest to run the web interface only under certain circumstances, since it provides administrative access with no password protection. I wouldn't introduce an authentication form, since it is rather complex for little gain (in the end the Edison is an IoT device).

Please find my proposals here. I would enable it:

And then disable it again:

What do you think?

htot commented 3 years ago

I agree.web server is running as root. Even if we would have pw protection, it would be sent as clear text. But to implement https, pw protection, user creation etc. needs a lot of work.

The first 2 should (?) already be present. The 1st through systemd? The 2nd: we have the PWR button running pwr-button-handler.service So the docs has it almost right code

I think is more or less like the original fw had.

3) After activation I now redirected to the home page, but I agree it would be better to go to logoff page with notice to press PWR button again to start oobe again. 4) yes

mwallnoefer commented 3 years ago

The 1st through systemd?

Yes we could set the systemd service as disabled by default (remember as we have done it with blink-led).

after some timeout (5min?)

Couldn't this be implemented on behalf of systemd crond? But we would need to store the first timestamp to do the calculations from then on... If this works we may also drop proposal 3).

Anyway the comment under https://edison-fw.github.io/meta-intel-edison/4.6-contact.html#wifi-ap may be dropped:

Note: Pressing the Power Button runs configure_edison from the oobe (Out Of the Box Experience), which is currently not working. We intend to fix this shortly.

htot commented 3 years ago

Yes we could set the systemd service as disabled by default (remember as we have done it with blink-led).

Or run on first boot? Type=oneshot?