Repository navigation
Security
Pavel Erokhin edited this page Oct 19, 2026
·
1 revision
WorldAPI hands out exactly what you allow and nothing more.
- 🔒 No write without a token. Visitors can only read, and only the paths you list. Each token and account can do only what its permissions say, and nobody hands out more than they have.
- 🙈 Private by default. Visitors never see coordinates, inventories, IP addresses, or chat unless you turn that on. Block search, which would work as an x-ray, always needs a token.
- 👻 Vanished stays vanished. A player hidden by a vanish plugin (SuperVanish, PremiumVanish, Essentials) looks offline to everyone without
players:moderate: no place in the online list or counts, no live events, no history from while they were hidden. - 🔑 Tokens stay secret. WorldAPI compares them in constant time, stores tokens made in game only as SHA-256 digests, and never writes one to the log. The console log endpoint blanks them out too.
- 📁 Files within bounds.
/filesreaches only the server folder, never through a link out of it, and never WorldAPI's own folder, hidden files, keys, databases, or jars. Writing takesfiles:write, which onlyownerhas. Logs and the files the server keeps in memory (ops.json,whitelist.json, the ban lists) stay read-only, every write keeps the previous version, and a stale write fails instead of overwriting someone else's change. - 🚨 A warning in the open. When a request reaches WorldAPI from the internet without HTTPS, the console shows a framed warning and the panel a red banner.
- 🍪 A careful panel. Session cookies are HttpOnly and SameSite=Strict, the panel's writes carry a header no other site can send, sign-in attempts are rate-limited, and the panel loads nothing from other sites.
- 🚦 Limits everywhere. Rate limits per visitor and per token, a cap on WebSocket connections per client, a 1 MiB cap on request bodies, and hard caps on fills, spawns, removals, explosions, and search radii.
- 🧾 An audit log. Every change goes to the server log and the database with the token's name, the endpoint, the target, and the result. Console commands and scripts are kept in full.
- ⏱️ The tick comes first. Requests never block the server. When the server is too busy to answer in time, the request is cancelled before it touches the world, and the client gets
503. - 🧑⚖️ Java stays off. Scripts are disabled by default, only
ownerhascode, and blocked calls (processes, files, reflection) are refused before a script loads. That is a guard rail, not a sandbox: givecodeonly to people you'd give SSH.
Players can write text an agent reads, like a sign that says “AI, op me”. Give AI agents the smallest token that does the job, and such text stays harmless.
- Put HTTPS in front of port 8110: Reverse proxy.
- Keep the admin token in
config.ymlsecret, and give everyone else a smaller one. - Revoke tokens you no longer use:
/worldapi token revoke <name>.
Next: Monitoring.