Compare commits
3 Commits
18c41231ca
...
b168c47aea
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b168c47aea | ||
| b2c27fb285 | |||
| 2b93529ef6 |
@@ -100,7 +100,13 @@ flowchart TB
|
|||||||
talks to it. Every backend→sidecar call carries `Authorization: Bearer <token>` and an
|
talks to it. Every backend→sidecar call carries `Authorization: Bearer <token>` and an
|
||||||
`X-UOLink-Version` header (a protocol mismatch fails fast with `409`). The REST client
|
`X-UOLink-Version` header (a protocol mismatch fails fast with `409`). The REST client
|
||||||
(`uoLinkClient.js`) never throws — every call returns `{ ok, data, status }` — so the site degrades
|
(`uoLinkClient.js`) never throws — every call returns `{ ok, data, status }` — so the site degrades
|
||||||
gracefully when the shard is down.
|
gracefully when the shard is down. That guarantee covers **reading the config too**: resolving the
|
||||||
|
admin-managed config decrypts the stored auth token, which throws when the ciphertext can't be
|
||||||
|
authenticated (`SECRET_ENC_KEY` rotated, or a DB dump restored under a different key). This is
|
||||||
|
handled inside the client and reported as `{ ok: false, status: 0, error: 'uo-link config
|
||||||
|
unreadable' }` plus a distinct `ERROR`-level log, so a wrong key degrades the shard surface to
|
||||||
|
"unavailable" instead of 500ing it — and `GET /admin/uo-link/config` keeps working, which is the
|
||||||
|
screen an admin needs to re-enter the token and recover.
|
||||||
- **Two ways in from the sidecar.** Live game events arrive over an outbound **WebSocket** and are
|
- **Two ways in from the sidecar.** Live game events arrive over an outbound **WebSocket** and are
|
||||||
routed by the `shardIngest.js` dispatcher (state-changing kinds update `shard_*` tables, notable
|
routed by the `shardIngest.js` dispatcher (state-changing kinds update `shard_*` tables, notable
|
||||||
kinds append to `shard_events`, high-frequency kinds only update state). Point-in-time reads and
|
kinds append to `shard_events`, high-frequency kinds only update state). Point-in-time reads and
|
||||||
|
|||||||
@@ -561,7 +561,13 @@ Public content GETs pass through the **siteMode** gate (§5).
|
|||||||
the whole gate. The ops/config capabilities — `uo-link`, `email`, `discord-bot`, `settings`, and
|
the whole gate. The ops/config capabilities — `uo-link`, `email`, `discord-bot`, `settings`, and
|
||||||
`PUT /site-mode` — are `adminOnly`; `shard` is the one mixed prefix, where self-service account
|
`PUT /site-mode` — are `adminOnly`; `shard` is the one mixed prefix, where self-service account
|
||||||
linking carries no extra gate and the in-game staff operations carry `modAccess`. There is no residual
|
linking carries no extra gate and the in-game staff operations carry `modAccess`. There is no residual
|
||||||
file: every admin route is declared in a capability router. The URLs below are unaffected by which
|
file: every admin route is declared in a capability router.
|
||||||
|
|
||||||
|
`GET /dashboard` and `PUT /site-mode` are the one place where a **single screen spans two tiers**: the
|
||||||
|
dashboard is staff-wide, but the site-mode toggle on it is `adminOnly`. The client must therefore gate
|
||||||
|
that control on its own (`Dashboard.jsx` renders it only for `role === 'admin'`) rather than relying on
|
||||||
|
the route gate that admitted them to the page — the same rule the sidebar follows, so a non-admin is
|
||||||
|
never shown a control that would 403. The URLs below are unaffected by which
|
||||||
file a route sits in — that is the property the route manifest freezes.
|
file a route sits in — that is the property the route manifest freezes.
|
||||||
| Method | Path | Purpose |
|
| Method | Path | Purpose |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|
|||||||
@@ -398,12 +398,14 @@ website/
|
|||||||
│ │ │ │ │ ├── account.router.js
|
│ │ │ │ │ ├── account.router.js
|
||||||
│ │ │ │ │ ├── activity.router.js
|
│ │ │ │ │ ├── activity.router.js
|
||||||
│ │ │ │ │ ├── admin.controller.js
|
│ │ │ │ │ ├── admin.controller.js
|
||||||
│ │ │ │ │ ├── admin.routes.js
|
|
||||||
│ │ │ │ │ ├── authProviders.controller.js
|
│ │ │ │ │ ├── authProviders.controller.js
|
||||||
│ │ │ │ │ ├── authProviders.router.js
|
│ │ │ │ │ ├── authProviders.router.js
|
||||||
│ │ │ │ │ ├── botActivity.controller.js
|
│ │ │ │ │ ├── botActivity.controller.js
|
||||||
│ │ │ │ │ ├── botActivity.router.js
|
│ │ │ │ │ ├── botActivity.router.js
|
||||||
|
│ │ │ │ │ ├── dashboard.router.js
|
||||||
│ │ │ │ │ ├── discordBot.controller.js
|
│ │ │ │ │ ├── discordBot.controller.js
|
||||||
|
│ │ │ │ │ ├── discordBot.router.js
|
||||||
|
│ │ │ │ │ ├── email.router.js
|
||||||
│ │ │ │ │ ├── emailConfig.controller.js
|
│ │ │ │ │ ├── emailConfig.controller.js
|
||||||
│ │ │ │ │ ├── imageUpload.js
|
│ │ │ │ │ ├── imageUpload.js
|
||||||
│ │ │ │ │ ├── index.js
|
│ │ │ │ │ ├── index.js
|
||||||
@@ -414,16 +416,22 @@ website/
|
|||||||
│ │ │ │ │ ├── pages.controller.js
|
│ │ │ │ │ ├── pages.controller.js
|
||||||
│ │ │ │ │ ├── pages.router.js
|
│ │ │ │ │ ├── pages.router.js
|
||||||
│ │ │ │ │ ├── posts.router.js
|
│ │ │ │ │ ├── posts.router.js
|
||||||
|
│ │ │ │ │ ├── settings.router.js
|
||||||
|
│ │ │ │ │ ├── shard.router.js
|
||||||
│ │ │ │ │ ├── shardOps.controller.js
|
│ │ │ │ │ ├── shardOps.controller.js
|
||||||
│ │ │ │ │ ├── uoLink.controller.js
|
│ │ │ │ │ ├── uoLink.controller.js
|
||||||
|
│ │ │ │ │ ├── uoLink.router.js
|
||||||
│ │ │ │ │ ├── uploads.router.js
|
│ │ │ │ │ ├── uploads.router.js
|
||||||
│ │ │ │ │ ├── users.router.js
|
│ │ │ │ │ ├── users.router.js
|
||||||
│ │ │ │ │ ├── usersShard.controller.js
|
│ │ │ │ │ ├── usersShard.controller.js
|
||||||
│ │ │ │ │ └── wiki.router.js
|
│ │ │ │ │ └── wiki.router.js
|
||||||
│ │ │ │ ├── auth/
|
│ │ │ │ ├── auth/
|
||||||
│ │ │ │ │ ├── auth.controller.js
|
│ │ │ │ │ ├── auth.controller.js
|
||||||
│ │ │ │ │ ├── auth.routes.js
|
│ │ │ │ │ ├── index.js
|
||||||
│ │ │ │ │ ├── invite.controller.js
|
│ │ │ │ │ ├── invite.controller.js
|
||||||
|
│ │ │ │ │ ├── invite.router.js
|
||||||
|
│ │ │ │ │ ├── login.router.js
|
||||||
|
│ │ │ │ │ ├── loginGuards.js
|
||||||
│ │ │ │ │ ├── me.routes.js
|
│ │ │ │ │ ├── me.routes.js
|
||||||
│ │ │ │ │ ├── mobile.controller.js
|
│ │ │ │ │ ├── mobile.controller.js
|
||||||
│ │ │ │ │ ├── mobile.routes.js
|
│ │ │ │ │ ├── mobile.routes.js
|
||||||
@@ -431,7 +439,10 @@ website/
|
|||||||
│ │ │ │ │ ├── mobileSso.routes.js
|
│ │ │ │ │ ├── mobileSso.routes.js
|
||||||
│ │ │ │ │ ├── notifications.controller.js
|
│ │ │ │ │ ├── notifications.controller.js
|
||||||
│ │ │ │ │ ├── notifications.routes.js
|
│ │ │ │ │ ├── notifications.routes.js
|
||||||
|
│ │ │ │ │ ├── password.router.js
|
||||||
│ │ │ │ │ ├── passwordReset.controller.js
|
│ │ │ │ │ ├── passwordReset.controller.js
|
||||||
|
│ │ │ │ │ ├── register.router.js
|
||||||
|
│ │ │ │ │ ├── session.router.js
|
||||||
│ │ │ │ │ ├── sso.controller.js
|
│ │ │ │ │ ├── sso.controller.js
|
||||||
│ │ │ │ │ ├── sso.routes.js
|
│ │ │ │ │ ├── sso.routes.js
|
||||||
│ │ │ │ │ └── trustDevice.helper.js
|
│ │ │ │ │ └── trustDevice.helper.js
|
||||||
@@ -439,13 +450,21 @@ website/
|
|||||||
│ │ │ │ │ ├── internal.controller.js
|
│ │ │ │ │ ├── internal.controller.js
|
||||||
│ │ │ │ │ └── internal.routes.js
|
│ │ │ │ │ └── internal.routes.js
|
||||||
│ │ │ │ ├── player/
|
│ │ │ │ ├── player/
|
||||||
|
│ │ │ │ │ ├── account.router.js
|
||||||
│ │ │ │ │ ├── appeals.controller.js
|
│ │ │ │ │ ├── appeals.controller.js
|
||||||
│ │ │ │ │ ├── player.routes.js
|
│ │ │ │ │ ├── appeals.router.js
|
||||||
│ │ │ │ │ └── shard.controller.js
|
│ │ │ │ │ ├── index.js
|
||||||
|
│ │ │ │ │ ├── shard.controller.js
|
||||||
|
│ │ │ │ │ └── shard.router.js
|
||||||
│ │ │ │ ├── public/
|
│ │ │ │ ├── public/
|
||||||
|
│ │ │ │ │ ├── index.js
|
||||||
|
│ │ │ │ │ ├── pages.router.js
|
||||||
|
│ │ │ │ │ ├── posts.router.js
|
||||||
│ │ │ │ │ ├── public.controller.js
|
│ │ │ │ │ ├── public.controller.js
|
||||||
│ │ │ │ │ ├── public.routes.js
|
│ │ │ │ │ ├── shard.controller.js
|
||||||
│ │ │ │ │ └── shard.controller.js
|
│ │ │ │ │ ├── shard.router.js
|
||||||
|
│ │ │ │ │ ├── site.router.js
|
||||||
|
│ │ │ │ │ └── wiki.router.js
|
||||||
│ │ │ │ └── v1.router.js
|
│ │ │ │ └── v1.router.js
|
||||||
│ │ │ ├── api.router.js
|
│ │ │ ├── api.router.js
|
||||||
│ │ │ ├── cspReport.controller.js
|
│ │ │ ├── cspReport.controller.js
|
||||||
@@ -531,6 +550,7 @@ website/
|
|||||||
│ │ ├── totp.test.js
|
│ │ ├── totp.test.js
|
||||||
│ │ ├── trustedDevices.test.js
|
│ │ ├── trustedDevices.test.js
|
||||||
│ │ ├── trustProxy.test.js
|
│ │ ├── trustProxy.test.js
|
||||||
|
│ │ ├── uoLinkClient.test.js
|
||||||
│ │ └── usernamePolicy.test.js
|
│ │ └── usernamePolicy.test.js
|
||||||
│ ├── .env.example
|
│ ├── .env.example
|
||||||
│ ├── package-lock.json
|
│ ├── package-lock.json
|
||||||
|
|||||||
Reference in New Issue
Block a user