-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
memoissue started as noteissue started as notespeclanguage or system specificationlanguage or system specification
Description
目的
マルチテナント環境でユーザーごとのデータ分離とルーティングを Durable Objects で実現する。
前提
- 現在はシングルテナント: 1つの
GITHUB_WEBHOOK_SECRETで全 webhook を検証、単一の WebhookStore DO にイベント格納 - Durable Objects は構造的にインスタンス間のデータアクセスが不可能(強いテナント分離)
- 現在の Worker + DO + local-mcp ブリッジの構成をそのまま拡張可能
設計メモ
テナント識別
- GitHub App の場合: webhook ペイロードの
installation.idでテナント識別 installation.id→userIdのマッピングテーブルが必要
DO によるデータ分離
idFromName(userId)でテナントごとの DO インスタンスを生成- 各 DO は完全に独立したメモリとストレージを持つ
- コードにバグがあっても、テナント間のデータ漏洩は構造的に発生しない
ルーティングフロー
- Worker(入口)で webhook 受信
installation.idからテナント特定- 正しいテナントの DO にルーティング
- 認証チェックはルーティング前に実行
local-mcp ブリッジの変更
- テナントトークン付きで Worker に接続する仕組みを追加
- ユーザーは自分のテナントの DO のみアクセス可能
refs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
memoissue started as noteissue started as notespeclanguage or system specificationlanguage or system specification