omnigateway 0.10.3 → 0.11.1
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 +19 -2
- package/bin/omni.js +621 -333
- package/gateway.js +715 -395
- package/package.json +2 -2
- package/public/assets/{Chip-BeKVtewW.js → Chip-BBNaA-sL.js} +1 -1
- package/public/assets/{CopyValue-NTHhiCuT.js → CopyValue-DQMqneTT.js} +1 -1
- package/public/assets/{Lamp-C2Q3t5Mn.js → Lamp-CosPf-gw.js} +7 -7
- package/public/assets/Rack-BGrdPQRN.js +476 -0
- package/public/assets/RequestTable-B5pOnwDe.js +11 -0
- package/public/assets/SummaryDeck-DAvCcP_N.js +15 -0
- package/public/assets/{Toggle-DwKz1aVq.js → Toggle-ZS3zIMNF.js} +1 -1
- package/public/assets/{TokenBreakdown-DM-1HvOr.js → TokenBreakdown-VV2U0Fgv.js} +1 -1
- package/public/assets/{WindowChart-BsonO5Py.js → WindowChart-eqPzFE06.js} +2 -2
- package/public/assets/_app.accounts-wJdiS7Ue.js +59 -0
- package/public/assets/{_app.console-BQJMLRv4.js → _app.console-DPuEIJl7.js} +2 -2
- package/public/assets/{_app.database-BIiajZm6.js → _app.database-BWxxqrNy.js} +4 -4
- package/public/assets/_app.index-C_jGPDHc.js +67 -0
- package/public/assets/_app.keys-vLOZaX9s.js +92 -0
- package/public/assets/{_app.logs-AyVq3lLb.js → _app.logs-4fRTXz5H.js} +3 -3
- package/public/assets/{_app.models-CwlkGPrx.js → _app.models-BFWk7FBf.js} +4 -4
- package/public/assets/{_app.plugins._pluginId-BhvEnawY.js → _app.plugins._pluginId-B2R5TEp9.js} +1 -1
- package/public/assets/_app.settings-BKUhzFsw.js +88 -0
- package/public/assets/_app.usage-Dme4K70C.js +76 -0
- package/public/assets/{chevron-right-S84SGCvk.js → chevron-right-CL2vJUko.js} +1 -1
- package/public/assets/client-DIfYMjPd.js +39 -0
- package/public/assets/index-teScS3wF.js +13 -0
- package/public/assets/{login-CitmheGz.js → login-CCLJgPoH.js} +2 -2
- package/public/assets/plus-C3pkG04C.js +1 -0
- package/public/assets/{preload-helper-BC9bKUg1.js → preload-helper-Dv9CFok1.js} +1 -1
- package/public/assets/{shared-C47BfV_u.js → shared-5YRtk6PC.js} +12 -12
- package/public/assets/{trash-2-DmtElUHr.js → trash-2-CLOg_lJ7.js} +1 -1
- package/public/index.html +4 -4
- package/public/assets/Rack-sUGRoZUx.js +0 -476
- package/public/assets/RequestTable-C2RLARWy.js +0 -11
- package/public/assets/SummaryDeck-BHXcb_Ji.js +0 -15
- package/public/assets/_app.accounts-DUYxItf0.js +0 -59
- package/public/assets/_app.index-DagK0Pqp.js +0 -62
- package/public/assets/_app.keys-DLAG_bmt.js +0 -82
- package/public/assets/_app.settings-BKA-1YLs.js +0 -88
- package/public/assets/_app.usage-C7JEWKZM.js +0 -76
- package/public/assets/client-DCvpw0LS.js +0 -39
- package/public/assets/index-pZbadEun.js +0 -13
- package/public/assets/plus-E7qLz9CF.js +0 -1
package/README.md
CHANGED
|
@@ -174,6 +174,22 @@ pair is unlimited. Windows slide, `tokens` and `spend` are debited on
|
|
|
174
174
|
completion, and limits are editable afterwards with `omni keys limits`; the
|
|
175
175
|
semantics are in [docs/operations.md](docs/operations.md#key-limits).
|
|
176
176
|
|
|
177
|
+
A key can also carry an expiry, which is optional and off by default — a key
|
|
178
|
+
with none works until it is revoked, and no upgrade ever attaches one:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
omni keys create --label contractor --expires 2027-01-01
|
|
182
|
+
omni keys expiry <id> --at 2027-06-01T12:00:00Z # move it
|
|
183
|
+
omni keys expiry <id> --never # take it away
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Past the instant, every request the key makes is refused with the same answer a
|
|
187
|
+
revoked or unknown key gets — deliberately indistinguishable. Unlike
|
|
188
|
+
`omni keys revoke` this is reversible: a date already behind the clock is
|
|
189
|
+
accepted and means "stop it now", and `--never` brings the key back. Expired
|
|
190
|
+
keys stay listed, with their own state in `omni keys list` and on the console's
|
|
191
|
+
keys board, so a client that stopped working can be found rather than guessed at.
|
|
192
|
+
|
|
177
193
|
Now use it:
|
|
178
194
|
|
|
179
195
|
```bash
|
|
@@ -290,6 +306,7 @@ Configuration is environment variables, read from the installation's `.env`:
|
|
|
290
306
|
| `OMNI_CLUSTER_MODE` | No | unset | `true` selects [cluster mode](docs/deploying.md#running-more-than-one-gateway) and requires the two URLs below; unset is one process on SQLite, and then the URLs must be unset too |
|
|
291
307
|
| `OMNI_DATABASE_URL` | In cluster mode | — | The shared Postgres store |
|
|
292
308
|
| `OMNI_REDIS_URL` | In cluster mode | — | The coordinator every process of a cluster shares: rate-limit counters, sessions, leases, push fan-out |
|
|
309
|
+
| `OMNI_DAY_OFFSET_MINUTES` | No | host's UTC offset at boot | Fixed minutes east of UTC for daily usage buckets; set explicitly and identically on every replica |
|
|
293
310
|
|
|
294
311
|
`OMNI_ROOT` is the one variable read from your shell and never from a root's `.env`, for the
|
|
295
312
|
reason it has to be: a variable that selects the installation cannot live inside the installation
|
|
@@ -357,8 +374,8 @@ Worth knowing before you deploy it:
|
|
|
357
374
|
password and a per-key client dashboard exist; there is no multi-tenancy —
|
|
358
375
|
every provider account is the operator's, whoever is looking.
|
|
359
376
|
- **Two grains of usage history.** Detailed request logs are pruned after 30
|
|
360
|
-
days by default; a daily rollup is kept for 400 days. A day
|
|
361
|
-
|
|
377
|
+
days by default; a daily rollup is kept for 400 days. A day uses a fixed UTC
|
|
378
|
+
offset, defaulting to the host's current offset; fleets must set it explicitly.
|
|
362
379
|
- **Body capture is forensics, not an archive.** It is off unless you turn it on
|
|
363
380
|
with both keys, it expires on the request-log window, and it is capped at
|
|
364
381
|
100,000 rows. `omni bodies` reads one request's capture; nothing searches
|