Skip to content

K2GO-552 feat(auth): change, repair and reset admin passwords in Settings, warn at start - #812

Open
luisguzman-adfa wants to merge 4 commits into
mainfrom
feat/K2GO-552-auth-password-change
Open

luisguzman-adfa wants to merge 4 commits into
mainfrom
feat/K2GO-552-auth-password-change

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

What changes

  • dash-node 1.6.4: POST /credentials/:service/password, POST /credentials/:service/reset and GET /credentials/:service/status. The password changes inside Kolibri, Calibre-Web and Forgejo with each service's own admin tool, then the stored copy follows.
  • One password rule for the three services: 8+ characters with upper case, lower case, digit and symbol (Calibre-Web's policy, the strictest).
  • Status is a live sign-in (ok, mismatch, unreachable, plus factoryDefault). It is never stored.
  • Settings > Authentication > : Change password, Repair (only while the service rejects the stored password) and Reset to the factory password. The old "Use a custom sign-in" switch goes.
  • Start notice: a password changed outside the app (auto-login fails), or services that still use the factory password. "Don't show again" asks first and keeps the time of the choice; a switch in Settings > Authentication turns the reminder on again.
    • UI changes: 41 new strings (all 33 locales, machine-translated, pending human review); 13 strings of the old screen removed; k2go_auth_hint replaced by k2go_auth_list_hint. Light and dark verified.

Why

  • The factory password (Admin / changeme) is public. Before, the user had to change it in each service and type it again in Settings.

Steps to QA

  • Baseline (main): Settings > Authentication only stores a sign-in; the service keeps changeme; no notice at start.
  • Change:
    1. Open the app with factory passwords: the notice names Calibre-Web, Kolibri, Forgejo.
    2. Settings > Authentication > Read a book: change to a valid password; the state turns green; Books opens signed in.
    3. Change the password inside the service: next start shows "Automatic sign-in does not work"; the row shows "Does not match"; Repair with the real password turns it green.
    4. Reset to the factory password: the service takes changeme again.

Verifications

  • Tested on Samsung A16 (Kolibri 0.19.5, Calibre-Web 0.6.28b, Forgejo 17.0.1): two changes per service, outside change, repair, reset, notice, "Don't show again", reminder switch; English light and Spanish dark.
  • dash-node tests (185), app JVM tests and lint pass. Evidence is in the Jira ticket.
  • Deferred: the list and the service screen each run a status sign-in (one extra failed Calibre-Web sign-in per visit while it does not match).

Notes

  • Calibre-Web locks sign-in for one minute after 3 failed tries and answers it like a wrong password. A change whose tool exits 0 saves the copy and reports verified: false; the status turns ok after the minute.
  • The Forgejo CLI takes the password only in argv (inside the box, for about 1 s).
  • Removed on purpose: storing a sign-in for a service that is not running, and choosing another admin account.

… services

Kolibri, Calibre-Web and Forgejo get the new password through their own admin tool, then the
stored copy follows. Status is a live sign-in, never stored. dash-node 1.6.4.
…ings, warn at start

Settings > Authentication drives the dash-node password routes; the old custom sign-in switch
goes. A start notice names a broken auto-login, or the services that still use a factory password.
Machine-translated, pending human review. The list hint now names Host code and the in-place change.

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant