feat: importer IMVU accounts and settings from the console #14

Merged
dhkatz merged 2 commits from feat/imports-4b into main 2026-11-07 19:00:01 +00:00
Showing only changes of commit d716aabbd2 - Show all commits
+35 -6
View File
@@ -120,17 +120,43 @@ don't keep it: the consent is gone.
## `t5de-importer` ## `t5de-importer`
A Go program (its own repository) beside a `t5de-catalog`; it stores nothing lasting but its working files. A Go program (its own repository) beside a `t5de-catalog`; it stores nothing lasting but its working files, its key
pair and the IMVU accounts' passwords.
- Configuration: `HUB_URL`, `CATALOG_ID`, `IMPORTER_KEY` (from enabling imports on the catalog), `IMPORTER_RATE` - Everything is set from the console (the catalog's Imports page) except what it needs to reach the hub:
(requests a second to IMVU, default 2), optionally an IMVU account for exact revisions (`IMVU_USERNAME`, `HUB_URL`, `CATALOG_ID`, `IMPORTER_KEY` (from turning imports on), `IMPORTER_DATA` (its folder). The rest
`IMVU_PASSWORD`; the operator's choice and risk; the hub never holds IMVU credentials). (requests a second to IMVU, jobs at a time, the IMVU accounts and their order) comes from
`GET /api/v1/importer/config`, polled every minute.
- Revisions: without an IMVU account, the CDN is probed (`HEAD productdata/<id>/<n>`) once per product; afterwards a - Revisions: without an IMVU account, the CDN is probed (`HEAD productdata/<id>/<n>`) once per product; afterwards a
recheck tries the next few numbers. With one, `authorizeProducts` gives exact revisions. recheck tries the next few numbers. With one, `authorizeProducts` gives exact revisions.
- Reads CFLs with t5de-api's `cfl` package; the conversion follows `@imvu/chkn` (dhkatz/imvu.js) as a reference. - Reads CFLs with t5de-api's `cfl` package; the conversion follows `@imvu/chkn` (dhkatz/imvu.js) as a reference.
- Validates with t5de-api's `pack` rules before uploading; a product breaking them fails with the reason. (The spike - Validates with t5de-api's `pack` rules before uploading; a product breaking them fails with the reason. (The spike
checks whether typical IMVU products fit; imports may need their own limits.) checks whether typical IMVU products fit; imports may need their own limits.)
### IMVU accounts
Signed out, IMVU shows no info for Access Pass products (see "Built"), so an importer needs an IMVU account with
Access Pass to import them, and accounts give exact revisions. The catalog's team adds them on the console; their
passwords never reach the hub readable, and are kept only by the importer.
- On first start the importer makes an RSA key pair (3072-bit, RSA-OAEP with SHA-256) in `IMPORTER_DATA` and sends
the public key with `POST /api/v1/importer/hello {version, publicKey}`. The console shows its fingerprint and
version and when it was last heard from.
- Adding an account (`import:run`): the console looks the username up on IMVU (public info: avatar, ID, Access
Pass, age verified) and asks to confirm it in a dialog showing that, with a warning if it has no Access Pass
and the importer key's fingerprint. The password is encrypted in the browser (WebCrypto) with the importer's
public key; the hub stores only that sealed blob, hands it to the importer in its config, and deletes it once the
importer confirms it has it (or after 7 days).
- Several accounts, in an order the team sets: the importer uses the first that signs in and moves to the next when
one fails. It reports each account's state (`ok`, `sign_in_failed`, `needs_password`, plus whether IMVU shows it
Access Pass) with `POST /api/v1/importer/accounts/:id`, shown on the console.
- If the importer's key pair changes (a new install), passwords sealed for the old key can't be read: those
accounts show "needs password" until re-entered.
- Removing an account tells the importer to forget it. Adding and removing are audited (`catalog.importer_account`).
- What the importer sees with an account (creator, name, rating of AP products) it reports to the hub with the job
(`POST /api/v1/importer/jobs/:id {product: {creatorId, name, rating}}`), trusted from that catalog's importer
only, for products IMVU hides from the hub.
## Hub routes ## Hub routes
| | | | | |
@@ -167,8 +193,11 @@ deleted ones and IDs that never existed (404 only for a few very old IDs), so th
(`userimages-akm.imvu.com/productdata/<id>/<n>/`) serves AP and even deleted products' files without signing in (`userimages-akm.imvu.com/productdata/<id>/<n>/`) serves AP and even deleted products' files without signing in
(made-up IDs 404), but they carry no creator, name or rating, which a grant needs to cover a product. The shop page (made-up IDs 404), but they carry no creator, name or rating, which a grant needs to cover a product. The shop page
(`www.imvu.com/shop/product.php?products_id=`) tells them apart: an AP product redirects to sign-in, a deleted one (`www.imvu.com/shop/product.php?products_id=`) tells them apart: an AP product redirects to sign-in, a deleted one
says "Not Found". For AP products, the importer's IMVU account (with Access Pass) would report the product info to says "Not Found". For AP products, the importer's IMVU account (with Access Pass) reports the product info to the
the hub: decide with the spike. hub ("IMVU accounts" above). Also signed out: `client-dynamic.imvu.com/api/shop/product.php` and
`api.imvu.com/creator/creator-<id>` need an account, and search refuses AP (`ap_search_denied`, with
`product_rating` other than `0,5`), but `api.imvu.com/product?creator=<username>` lists a shop's other products
(100 a page, `next` relation), which whole-shop grants use.
Still to do: admin-recorded grants, proofs and unclaimed creators (and claiming); `GET /imports/available` for the Still to do: admin-recorded grants, proofs and unclaimed creators (and claiming); `GET /imports/available` for the
proxy's shop button; t5de-catalog accepting `t5de-import` tokens on uploads; the spike and `t5de-importer`. proxy's shop button; t5de-catalog accepting `t5de-import` tokens on uploads; the spike and `t5de-importer`.