Changeset 9e27d64 in Klonkt for package-lock.json


Ignore:
Timestamp:
06/14/2026 07:31:23 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
6351545
Parents:
32cc601
Message:

auth: password admin + per-instance Google for listeners (no broker)

Robin's choice: every self-hoster has their own password admin account,
and can optionally let listeners log in to comment using their OWN Google
client. No central broker (that would tie every customer site to Robin's
Google Cloud -> systemic risk on abuse).

  • Admin = username/password (bcrypt). First-time setup via /auth/register (only when there are 0 users); closed afterwards. No public registration.
  • Forgot password: /auth/reset-request -> email (if SMTP configured) with reset link; CLI break-glass npm run reset-admin always works (no email needed).
  • Change password (logged in) restored in /account.
  • Google = per-instance own credentials, OPTIONAL, listeners only -> always role member, never admin (god/admin email is rejected; google_sub mismatch too).
  • config/google.js back to direct Google OAuth; config/mailer.js new (nodemailer).
  • jose removed from deps; nodemailer added.

Security review (workflow) incorporated:

  • Reset token no longer in production logs (dev only).
  • Reset link from PUBLIC_BASE_URL instead of X-Forwarded-Host (host poisoning).
  • Reset tokens stored SHA-256-hashed in the DB.
  • Same-origin check on all state-modifying POSTs (CSRF layer on top of sameSite-lax).
  • Login always runs one bcrypt comparison (no timing enumeration).

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • package-lock.json

    r32cc601 r9e27d64  
    2121        "helmet": "^7.1.0",
    2222        "htmx.org": "1.9.12",
    23         "jose": "^5.10.0",
    2423        "marked": "^11.1.1",
    2524        "multer": "^1.4.5-lts.1",
     25        "nodemailer": "^6.9.15",
    2626        "sanitize-html": "^2.17.3",
    2727        "uuid": "^9.0.1",
     
    11661166      }
    11671167    },
    1168     "node_modules/jose": {
    1169       "version": "5.10.0",
    1170       "resolved": "https://registry.npmjs.org/jose/-/jose-5.10.0.tgz",
    1171       "integrity": "sha512-s+3Al/p9g32Iq+oqXxkW//7jk2Vig6FF1CFqzVXoTUXt2qz89YWbL+OwS17NFYEvxC35n0FKeGO2LGYSxeM2Gg==",
    1172       "license": "MIT",
    1173       "funding": {
    1174         "url": "https://github.com/sponsors/panva"
    1175       }
    1176     },
    11771168    "node_modules/marked": {
    11781169      "version": "11.2.0",
     
    13751366      "engines": {
    13761367        "node": ">=10"
     1368      }
     1369    },
     1370    "node_modules/nodemailer": {
     1371      "version": "6.10.1",
     1372      "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.10.1.tgz",
     1373      "integrity": "sha512-Z+iLaBGVaSjbIzQ4pX6XV41HrooLsQ10ZWPUehGmuantvzWoDVBnmsdUcOIDM1t+yPor5pDhVlDESgOMEGxhHA==",
     1374      "license": "MIT-0",
     1375      "engines": {
     1376        "node": ">=6.0.0"
    13771377      }
    13781378    },
Note: See TracChangeset for help on using the changeset viewer.