@fonderie/admin 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -182,14 +182,14 @@ authenticator app, with backup codes as the fallback.
182
182
  ```ts
183
183
  new AdminModule({
184
184
  adminToken: process.env.ADMIN_TOKEN, // machines (CLI, CI) + the break-glass
185
- operatorKey: process.env.ADMIN_OPERATOR_KEY, // 64 hex — encrypts authenticator secrets at rest
185
+ // operatorKey: optional — see below
186
186
  store,
187
187
  ui: true,
188
188
  });
189
189
  ```
190
190
 
191
191
  - **No registration.** The first operator is claimed once, on the console's
192
- own sign-in page, with the root `adminToken`. Every other operator is invited
192
+ own sign-in page: paste the root `adminToken`, then create your account. Every other operator is invited
193
193
  by an Owner: a single-use link that expires, where they set a password and
194
194
  scan the QR code before anything opens.
195
195
  - **Two factors, always.** Password, then a six-digit code (RFC 6238). Ten
@@ -219,9 +219,13 @@ Access levels map to scopes: **Read only** (`read`), **Editor** (`read`,
219
219
  Operator actions are logged under `operator:<email>`, which a client header
220
220
  cannot override.
221
221
 
222
- `operatorKey` is optional but recommended; without it readiness warns.
223
- Setting it later is safe — existing secrets keep working and are sealed at
224
- the next enrollment. Changing it once set invalidates every enrolled
222
+ **Nothing to configure.** First sign-in on the console is the admin token
223
+ alone; the page then asks you to create your account and set up an
224
+ authenticator. `operatorKey` is optional hardening: it encrypts authenticator
225
+ secrets at rest so a database leak alone does not yield them (without it they
226
+ are stored as-is — a leaked one still needs the operator's password). Adding
227
+ it later is safe — existing secrets keep working and are sealed at the next
228
+ enrollment. Changing it once set invalidates every enrolled
225
229
  authenticator. `operators: false` turns the sign-in routes off and brings
226
230
  back the token gate.
227
231
 
package/dist/index.cjs CHANGED
@@ -1606,7 +1606,7 @@ var uiHtml = (scriptPath) => `<!doctype html>
1606
1606
  // src/module.ts
1607
1607
  var DEFAULT_ADMIN_PATH = "/_admin";
1608
1608
  var DEFAULT_CHECK_TIMEOUT_MS = 1e4;
1609
- var ADMIN_VERSION = "1.2.0";
1609
+ var ADMIN_VERSION = "1.2.2";
1610
1610
  function normalizeHostPattern(host) {
1611
1611
  return host.trim().replace(/^[a-z][a-z0-9+.-]*:\/\//i, "").replace(/\/.*$/, "").toLowerCase();
1612
1612
  }
@@ -1923,12 +1923,6 @@ var AdminModule = class {
1923
1923
  severity: "error",
1924
1924
  message: "operatorKey must be 64 hex characters (`openssl rand -hex 32`)"
1925
1925
  });
1926
- } else if (operatorsOn && !this.options.operatorKey) {
1927
- problems.push({
1928
- module: this.name,
1929
- severity: "warning",
1930
- message: "operatorKey is unset \u2014 operators' authenticator secrets are stored unencrypted. Set a 64-hex operatorKey."
1931
- });
1932
1926
  }
1933
1927
  return problems;
1934
1928
  }