iiab / iiab-admin-console

GUI (Admin Console) to configure IIAB and install content
GNU General Public License v2.0
14 stars 17 forks source link

Admin Console should require WiFi password length >= 8 characters #577

Closed holta closed 3 months ago

holta commented 3 months ago

@avni (who also witnessed this UX problem and its serious consequences) can confirm:

image

tim-moody commented 3 months ago

At the moment Admin Console enforces the same rules as iiab (none).

Are there other rules that should be added? For example on admin password change there are complexity rules in addition a length rule.

tim-moody commented 3 months ago

From the reference above I see that they must be printable characters ('must have an encoding in the range of 32 to 126 (decimal), inclusive')

holta commented 3 months ago

From the reference above I see that they must be printable characters ('must have an encoding in the range of 32 to 126 (decimal), inclusive')

If it's easy to enforce that as well, why not?

(Certainly enforcing the 8-character minimum would be a great addition, having seen several people now fall into that trap :-)

holta commented 3 months ago

At the moment Admin Console enforces the same rules as iiab (none).

Indeed.

We should probably do better.

Whether patched at a high-level (rapid UX explanation if implementer enters an illegal Wi-Fi password) &/or at a low-level here:

tim-moody commented 3 months ago

578

tim-moody commented 3 months ago

can anyone test?

tim-moody commented 3 months ago

There are two cases

  1. The user edits as in the image above and saves to local vars. This is equivalent to manually editing local vars, where validation is up to ansible. Validating in Admin Console raises the question of how many ansible edits should be put into Admin Console.
  2. The user changes the wifi password and Admin Console applies this change directly. Admin Console should validate the password.
tim-moody commented 3 months ago

requires further study

holta commented 3 months ago

Largely solved by:

tim-moody commented 3 months ago

does not handle reported case

avni commented 3 months ago

I can help test when there's a PR ready - thank you!

avni commented 3 months ago
  1. The user edits as in the image above and saves to local vars. This is equivalent to manually editing local vars, where validation is up to ansible. Validating in Admin Console raises the question of how many ansible edits should be put into Admin Console.

Confirmed this works. TY!

  1. The user changes the wifi password and Admin Console applies this change directly. Admin Console should validate the password.

For this, do I test by changing local_vars directly?

avni commented 3 months ago

Results of changing local_vars.yml directly shared here: https://github.com/iiab/iiab-admin-console/pull/580#issuecomment-2306284322

holta commented 3 months ago
  1. The user changes the wifi password and Admin Console applies this change directly. Admin Console should validate the password.

For this, do I test by changing local_vars directly?

If you change these 2 lines in /etc/iiab/local_vars.yml — for example if installing a SMALL-sized IIAB...

hostapd_secure: False    # 2021-03-02 WiFi EAPOL fails if hotspot passwords,
hostapd_password: changeme    # espec if WiFi firmware patched below?  #2696

...it's true that IIAB's network role (i.e. Ansible playbook) will not currently validate / enforce that hostapd_password really should be 8-to-63 "printable characters"

As mentioned above :-)