4.0 KiB
Security
The Flamenet account service. What it is meant to protect, what it deliberately does not, and how to report a problem.
What this service protects
- The passphrase. It never arrives here. A client stretches it and sends a secret derived under a context string that is distinct from the one producing its identity key, so a fully compromised account service can impersonate somebody to itself and decrypt nothing of theirs.
- The stored credential. What is kept is a salted hash of that derived secret. Brute-forcing it still means redoing the client's 650,000-iteration stretch per guess.
- Existence of an account. Registration, sign-in, passphrase change,
recovery and deletion all run in constant time and answer an unknown handle
exactly as they answer a wrong passphrase.
GET /accounts/:handle/paramshands out a deterministic fake for handles that do not exist, derived from the service secret, so it cannot be used to enumerate who is here. - The power to mint a session. Tokens are signed with Ed25519. The public
half is published at
/.well-known/jwks.json, so a relay somebody else runs can verify a Flamenet session and cannot forge one. - Correlation between relays. A relay sees only
HMAC(service_secret, account_id || product), never the account id.
What it does not protect
- Recovery without the recovery code. There is no email column, by choice. Lose the passphrase and the recovery code and the account is unreachable. That is the cost of storing nothing that identifies anybody.
- Correlation by this service. It could link a handle to activity it mediates. That is exactly why it stores an opaque id, a handle, a verifier and nothing else.
- A compromised device. Anything holding a live token or an unlocked vault is outside what a server can defend.
Reporting
Open a confidential issue on this repository, or mail the address on flamenet.io. A first reply inside seven days. Nothing here pays a bounty.
⚠️ The lattice, and the half of it that is not enforced
Carried forward from 525d7f7, which landed on main while this branch was
open. The labels it describes moved into the messenger with everything else,
so the gap is still real and this is not the place it will finally live: see
flamenet-messenger ios#65 and android#15.
The ★-property is not enforced. What is enforced is no read up: an object your session label does not dominate is not visible, and by default writes happen at exactly the session label. What nothing enforces is the other half of Bell-LaPadula. A principal cleared to a high label may open a session at a lower one and write there, carrying down what they read above it. No client stops this, because a session label inside a principal's clearance range is a legitimate session.
🔴 This is the half the model exists for. No-read-up stops somebody reaching material above them, which most systems get right. No-write-down stops the material leaking downward through a person who is allowed to see it, which is the threat a lattice is built to contain.
⚠️ Deliberate, and not an oversight: a rule enforced on one client and not the other is worse than the gap, and strict enforcement with no downgrade path produces a workaround culture. Doing it properly means an explicit downgrade action with an audit trail. Until that exists, this is written down rather than implied away.
So "implements Bell-LaPadula" is too round a word for what exists. It implements the simple security property, not the ★-property, and naming a model is itself a claim about which of its rules hold.
Scope note
This repository was also a file service, Flamenet Files, whose security model
covered tenant separation, a label lattice, row-level security and client-side
content encryption. Files was folded into the messenger on 2026-09-21 and the
file server was removed, so none of that is in scope here any more. The
messenger's own guarantees are documented in flamenet-e2e.