ENG-1783: Hosted Connect Walrus Memory flow for web apps#193
ENG-1783: Hosted Connect Walrus Memory flow for web apps#193harrymove-ctrl wants to merge 9 commits into
Conversation
|
Security review update pushed in What changed:
Dapp registration shape after deploy: curl -X POST "https://relayer.dev.memwal.ai/api/app-auth/clients" \
-H 'content-type: application/json' \
--data '{
"display_name": "Demo App",
"redirect_uris": ["https://app-auth-demo-dev.up.railway.app/api/memwal/callback"],
"fallback_uris": ["https://app-auth-demo-dev.up.railway.app/memwal/error"]
}'Use the returned Demo link: https://app-auth-demo-dev.up.railway.app/ Test plan:
|
|
Hi @harrymove-ctrl Another point is that it seems that you have not used the case with 20 delegate keys |
|
Updated in You are right: the previous wording made the hosted registration look like production self-serve UX. That is not the right production model because without developer identity / app ownership, public create/edit/delete would be unsafe. Current model after this update:
Validation:
|
Summary
/connect/appflow for third-party backend apps, separate from/connect/mcp.APP_BASE_URLmodes.dev, including the user-facing rename to Walrus Memory. Existing code/env identifiers such asMEMWAL_*remain where the current codebase still uses them.Linear
https://linear.app/commandoss/issue/ENG-1783/hosted-connect-memwal-flow-for-web-apps
How a Deployed dApp Uses This
For this low-lift V1 there is no self-serve dApp registration UI yet. A deployed dApp registers by sending the Walrus Memory team/operator its exact HTTPS callback and fallback URLs. The operator adds one client entry to
APP_AUTH_CLIENTS_JSONin Railway/env.Example client config:
{ "client_id": "my_dapp", "client_secret_sha256": "<sha256-secret>", "display_name": "My Dapp", "allowed_redirect_uris": [ "https://my-dapp.com/api/memwal/callback" ], "fallback_uri": "https://my-dapp.com/memwal/error", "allowed_fallback_uris": [ "https://my-dapp.com/memwal/error" ] }Generate the secret hash:
The raw
client_secretstays only in the dApp backend env. It is never embedded in the frontend.dApp Frontend Embed
The dApp frontend only needs a button/link to its own backend route:
dApp Backend Redirect Route
The dApp backend creates
state, stores it in an HTTP-only cookie/session, then redirects the user to Walrus Memory:dApp Backend Callback + Token Exchange
Walrus Memory redirects the browser back with only
codeandstate. The dApp backend validates state and exchanges the one-time code server-side with HTTP Basic auth:dApp Deployed Env
Security Notes
Connect Walrus Memorybutton/link. It never seesclient_secret.codeandstateon success, orerrorandstateon failure.client_secret, token exchange, account data, anddelegate.refstay server-side.Test plan
cargo test --binspnpm --filter @memwal/app buildpnpm --filter @memwal/app-auth-demo buildAPP_BASE_URL=https://demo.example.comcallback/fallback generationhttp://localhost:3000showing local mode/callback/fallback config