mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 15:50:36 -05:00
Sign-in hardening: lockout, stronger passwords, authenticator codes
- 10 failed sign-ins in a row (password, authenticator code, or password at signing) lock an account for 15 minutes from any address; the user is emailed; admins can unlock. Same message as a wrong password. - Passwords: at least 12 characters (max 72), refused if found in Have I Been Pwned (k-anonymity range API; fails open; PWNED_PASSWORDS_CHECK=false) - Optional TOTP (authenticator app) with 10 recovery codes for password and emailed-link sign-in, and at signing (auth method password_totp); codes accepted once; admins can reset; SSO sign-in unaffected - Demo/test passwords updated; guide, README and procedures document Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a6bfe922be
commit
14316bb60f
41 files changed
+600
-45
No files matched your search
@@ -8,6 +8,8 @@ Admins see the **Admin** menu (on a phone, under ☰). Admins can see and edit e
|
||||
|
||||
- **+ New User**: name, email and a starting password. Tick **Administrator** to make them an admin. Then add them to aircraft from each aircraft's **Access & Sharing** tab (or they add their own aircraft).
|
||||
- **Edit** to change details or reset a password when email isn't set up.
|
||||
- **Locked** marks an account locked for 15 minutes after 10 failed sign-ins in a row (the user is emailed). **Unlock** clears it straight away, once you know it was really them.
|
||||
- **2FA** marks someone using an authenticator app. **Reset 2FA** turns it off for a user who lost their phone and recovery codes. Confirm it's really them first (call them); they can then set it up again.
|
||||
- **Disable** someone who no longer needs access: they're signed out and can't sign in or sign entries, and their past signatures stay. **Enable** reverses it. Users who have signed entries can't be deleted, only disabled.
|
||||
|
||||
With single sign-on, accounts can be created automatically at first sign-in, and admin rights can follow a group at the provider (see the main README).
|
||||
|
||||
@@ -8,6 +8,10 @@ Depending on how the app is set up, you can sign in with:
|
||||
- **Email me a sign-in link.** Enter your email and use the link sent to you. It works once, for a short time.
|
||||
- **Single sign-on** (for example *Sign in with Authentik*), if your organization uses it.
|
||||
|
||||
If you've set up an authenticator app (see [Your profile](profile.md#two-factor-sign-in)), signing in with a password or an emailed link then asks for its 6-digit code.
|
||||
|
||||
After 10 failed tries in a row (wrong passwords or codes), an account is locked for 15 minutes and its owner is emailed. Wait, or ask the administrator to unlock it.
|
||||
|
||||
The very first visit to a new installation asks for the administrator account instead.
|
||||
|
||||
## Roles
|
||||
|
||||
+13
-1
@@ -4,10 +4,22 @@ Open your name in the top bar (☰ → **Profile** on a phone).
|
||||
|
||||
## Details and password
|
||||
|
||||
Change your name, email and password. Leave the password blank to keep the current one.
|
||||
Change your name, email and password. Leave the password blank to keep the current one. A password needs at least 12 characters, and one that has appeared in a known data breach is refused (checked with Have I Been Pwned, which never receives the password itself).
|
||||
|
||||
**Weekly maintenance reminders**: on Mondays the app emails owners about anything overdue or coming due on their aircraft, and certificates about to expire. Untick it to stop them. (Emails need the administrator to have set up email.)
|
||||
|
||||
## Two-factor sign-in
|
||||
|
||||
**Set up** adds a code from an authenticator app on your phone (Google Authenticator, Microsoft Authenticator, 1Password, Authy…) to password and emailed-link sign-in, so a stolen password alone can't get in. It also asks for the code when you sign a logbook entry with your password.
|
||||
|
||||
1. Scan the QR code with the app (or type in the key shown under it).
|
||||
2. Enter the code the app shows and choose **Turn on**.
|
||||
3. Save the **recovery codes**: each one signs you in once if you lose your phone. They're shown only once.
|
||||
|
||||
To make new recovery codes or turn it off, enter a current code (or a recovery code) on your profile. If you've lost both your phone and your recovery codes, ask the administrator to reset it.
|
||||
|
||||
Signing in with single sign-on doesn't ask for this code: the sign-on provider handles its own second factor.
|
||||
|
||||
## Certificates
|
||||
|
||||
Add each certificate you sign maintenance records with: its kind (A&P, IA, airframe, powerplant, repairman, repair station, pilot…), its number, and for an IA, its expiry. You need one to sign a logbook entry, and the entry records which one you used. An IA expires on March 31 of each odd-numbered year unless renewed; you're reminded 60 days ahead.
|
||||
|
||||
@@ -11,7 +11,7 @@ On the aircraft's **Logbook** tab, choose **+ New Entry** (owners). Give the dat
|
||||
1. Add your certificate (kind and number) once, on your [profile](profile.md).
|
||||
2. Open the entry and choose **Sign**. Read the entry as shown: your signature covers exactly that.
|
||||
3. Pick the certificate you're signing with. The statement you'll certify is shown with it (return to service, or the inspection statement).
|
||||
4. Re-enter your password, or sign in again with single sign-on, tick the confirmation and choose **Sign entry**. You'll see a confirmation and get an email.
|
||||
4. Re-enter your password (and your authenticator code, if you've set one up), or sign in again with single sign-on, tick the confirmation and choose **Sign entry**. You'll see a confirmation and get an email.
|
||||
|
||||
Never share your password or let someone else sign while you're signed in: a signature is yours alone. If you think someone has, tell the administrator straight away.
|
||||
|
||||
|
||||
Reference in new issue
Block a user