Files was folded into the messenger, so this repository is the account service and nothing else. The file server, its web client, its tenant schemas and the documentation for all of it are gone. Removed: EnclaveServer and its routes, EnclaveAccess, EnclaveCrypto, the browser client under client/, the Files spec and vectors, the tenant SQL under sql/, the web build and the node CI job, and the Leaf dependency that only ever rendered the file server's pages. The Dockerfile built EnclaveServer and shipped Public/ and Resources/; it now builds the account service alone. Nothing was lost. Every table in the production Files database was empty when this was written: no nodes, no blobs, no identities, no tenants. flamenetfiles.com, www.flamenetfiles.com and files.flamenet.io were served by that stack and now answer 404; the compose file, the env and a schema dump are on the box under /srv/prod/backups/, and the two docker volumes were kept rather than pruned. The service now issues pseudonyms for one product. `050_retire_files.sql` deletes the `files` rows and replaces the CHECK constraint rather than dropping it, so a container still being drained cannot write one back. Every account had a `files` pseudonym and none had a `files` identity, which is why there is no key material to migrate: the row was bookkeeping for a product nobody enrolled in. That also settles the delete endpoint added on this branch. It was built around keeping a shared account alive while another product still held an identity, and with one product that rule can never fire. `AccountRemoval` and its five tests are gone, the response no longer reports which of two outcomes happened, and a delete simply removes the account. None of it had shipped, so there is no wire compatibility to keep. Verified: the suites pass, the live delete script passes against a real Postgres and a running service, and the image builds and boots to its "DATABASE_URL is required" refusal, which is the account service and not a file server. `flamenet/files/auth/v1` stays as the authentication context string. It is a wire constant baked into every stored verifier, not a product name, and changing it would lock out every existing account. Said so in ARCHITECTURE.md so nobody tidies it later. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
9.2 KiB
Roadmap
The Flamenet account service. Flamenet Files was folded into the messenger on 2026-09-21 and its items are gone from this list.
Open items, with their real blockers rather than optimistic ones.
1. FlameNet account service — built
Runs as its own binary in its own container, with its own database role granted
nothing outside enclave_accounts. It cannot read a single file row, and a
a relay cannot read an account. The signed token is the entire interface.
- Passphrase never reaches it. The client derives an authentication secret
under
flamenet/files/auth/v1, a different context from the encryption key, so a fully compromised account service can impersonate you to itself and decrypt nothing. There is a test for exactly that. - Product-scoped pseudonyms. Each product server sees only
HMAC(service_secret, account_id || product). The Files server never learns the Messenger identifier. - No enumeration. Asking for an unknown handle's stretch parameters returns a deterministic fake derived from the service secret, indistinguishable from a real one. Registration and login give the same answer either way.
- No email column. The privacy-maximal choice, and it makes operator-side account recovery impossible by construction.
- Clearance is granted by CLI, never by an endpoint. There is no version of granting a clearance that should be reachable from a browser session.
Still open: the Messenger side of the same service, and whether flamenet.io links to it at all.
Why the line sits where it does
The cryptographic half was already settled before this was built: deriveIdentityKEK stretches the passphrase once and then derives a
separate key per product under a distinct context string, so a compromise of
the Messenger identity key yields nothing about the Files identity key. Shared
login does not mean shared key material.
What remains is entirely a metadata question: who learns that the same human uses two products.
Proposal: share across the E2E products, keep flamenet.io out
| Tier | Products | Account service |
|---|---|---|
| A | Messenger, Files | shared |
| B | flamenet.io | separate |
Three reasons the line sits there:
- flamenet.io is WordPress, and WordPress remembers everything — IPs, user agents, login times, post history, plugin logs. That install was compromised in July 2026 and the vector was never identified. Putting it in the authentication path for a zero-knowledge product means a WordPress compromise becomes a Files compromise.
- The two have opposite metadata shapes. flamenet.io is social: forum posts, buddy lists, presence — a semi-public identity. Files is private storage. Messenger and Files are both minimal-metadata by construction, so they belong together; the social site does not.
- The linkage is the leak, not the account row. "This forum handle also stores 40GB" is exactly the inference worth preventing, and it is created by the shared account itself, not by anything either product stores.
Minimising linkage inside tier A
- The account service stores an opaque account id, an authentication verifier, per-product public keys, and a creation timestamp. Nothing else. Every additional field is a field that exists in a breach, a log, and a subpoena.
- Product-scoped pseudonyms. Each product server sees only
HKDF(account_id, "<product>"). The Files server never learns the Messenger identifier and cannot correlate its users with Messenger's. The account service can, which is precisely why it should hold as little as possible. - Tokens carry the product-scoped pseudonym and the clearance. Never the account id, never a flamenet.io handle.
- An opt-in, one-way link to flamenet.io remains available: stored on the WordPress side only, user-initiated, revocable. flamenet.io may learn that an account has Files; Files never learns the flamenet.io handle.
Undecided, and the owner's call: whether email is stored at all. Omitting it maximises privacy and makes account recovery close to impossible.
4. Client crypto — remaining
Built and tested in three languages, against one set of published vectors: key hierarchy, identity protection, per-product derivation, name digests and encryption, chunked content AEAD with truncation and reorder resistance, recovery codes, and share links with an optional password as a third factor.
Not built:
Recovery phrases.Done. Crockford base32, 128 bits plus a 12-bit checksum, wrapping the same identity key under its own context so neither secret reveals the other. Rejected a word list deliberately: vendoring BIP-39 means 2,048 words that must be byte-exact, and one wrong entry silently produces codes that cannot be decoded.- Key rotation on clearance revocation. Revoking a compartment should rotate the label key and re-encrypt; today a revoked holder keeps the old key and prior content stays readable to them.
- Post-quantum wrapping. Identity keys are long-lived, so harvest-now- decrypt-later applies. A hybrid ML-KEM-768 variant takes a new version byte. No PQ claim until every client has it.
- Argon2id. PBKDF2 ships because it is dependency-free; Argon2id resists GPU attack materially better and needs a WASM bundle. The KDF id is versioned and recorded per account so it can arrive as id 2.
6. Anyone can create accounts in bulk
Registration is throttled, but not in a way that stops this. The limiter counts attempts per handle and per source address, and per-handle does nothing here: every new handle starts with a fresh budget. What is left is 40 requests per five minutes from one address — roughly eleven thousand accounts a day from a single IP, and a botnet multiplies that by however many it has.
Registration and sign-in are also not the same problem and should not share a limit. A person signs in often and registers once.
What would actually help, roughly in order of how much:
A much tighter, separate address limit for registration.Done. Registration now has its own budget on its own clock — three per address per hour by default, against forty sign-ins per five minutes — consumed before the account is written and never refunded on failure, so a rejected attempt is not a free probe. It does not stop an attacker with addresses to spare; it turns a script into a trickle, which is most of the value for a fraction of the cost of anything below.- A cost to registering — a proof-of-work challenge, or invite codes if the deployment is not meant to be open. Note that email verification, item 7, is not this: a throwaway address costs an attacker nothing.
- A cap on accounts without a clearance, since an account nobody has cleared can do nothing anyway.
Half-created accounts — fixed
An account used to exist the moment registration succeeded, while its identity was created separately, by the product server, at first use. A client that failed between the two left an account with no identity — and if a recovery code had been registered in that first step, that code was shown to nobody and could not be reissued.
This was not hypothetical; it happened during development when a client-side error landed between the two calls.
Identities now live on the account service, and the client builds its keypair before registering so the account, its pseudonyms, and its first identity are written in one transaction. Either all of it lands or none of it does, and the window is gone rather than narrowed.
Two follow-ups remain, both smaller:
- Enrolling an identity for an account that already has none is still an
ordinary path (
POST /identity), which is what an account created before a product existed needs. - Accounts that were half-created before this change still exist. Sweep the ones with no identity and no successful sign-in after, say, seven days — reporting them before deleting, because an automated delete that is wrong about what "abandoned" means destroys real accounts.
7. Email verification — decide the tradeoff first
Requested, and worth pausing on: the account service deliberately stores no email address today. That was a choice, written down in the schema — it is the privacy-maximal option and it makes operator-side account recovery impossible by construction.
Adding verified email reverses it. What it buys is real: a way to reach people, abuse control, and a recovery path that does not depend on a code written on paper. What it costs is that every account row gains a durable identifier that exists in a breach, a log, and a subpoena — for a product whose argument is that it holds as little as possible about you.
If it goes in, worth doing properly:
- Store a hash of the address for lookup, not just the plaintext, so the table alone does not enumerate your users.
- Make it optional. An account without an email should keep working, with the recovery code as its only route back.
- Say on the signup page what the address is used for and what it is never used for.
Mail goes through the existing self-hosted Hitt Hosting mail server — no ESP.
Note that local SMTP auth fails in development, so email_sent: false there is
expected rather than a bug.