Repository navigation
Bind MQTT user JWTs to their project; console claim for admin-mode JWTs - #13997
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…in-mode JWTs MQTT's appwrite-jwt auth decoded the same user JWT and loaded the user from the connecting project without the binding added to HTTP and realtime in #13992, so a sessionless JWT from another project still authenticated there. account.createJWT in admin mode stamped the managed project's ID on a token backed by a console session, which the admin-mode verifier then rejected; it now stamps console. Co-Authored-By: Claude Opus 5.5 <[email protected]>
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
|
@hansi-codes review |
|
@greptileai review |
🟢 Tier S · Ready to merge
The MQTT
📂 Walkthrough · 4
Reviewed |
|
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d next) Co-Authored-By: Claude Opus 5.5 <[email protected]>
This comment has been minimized.
This comment has been minimized.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@hansi-codes review |
Follow-up to #13992, from review on that PR.
What
app/init/mqtt/connection.php(appwrite-jwtauth) decodes the same user JWT but never got the project binding. It now applies the same rule as HTTP and realtime: theprojectIdclaim must match the connecting project, and a JWT without one must name a session.account.createJWTstamped the managed project's ID on a token backed by a console session, and the admin-mode verifier expectsconsole. It now stampsconsolein admin mode.Tests
MqttServerTest::testJwtFromAnotherProjectConnectRejected: a sessionless JWT connects in the project that minted it, and gets CONNACK0x87in another project that has a user with the same ID.UsersCustomServerTest::testLegacyJWTWithoutProjectClaimIsBoundBySessionsigns the payload shape used before Bind user JWTs to the project that issued them #13992 and checks:The test commit is pushed first so CI shows the MQTT case failing; the fix follows.
🤖 Generated with Claude Code