Skip to content

feat(worker): add security hardening layer for public service readiness#73

Merged
liplus-lin-lay merged 1 commit intomainfrom
62-security-hardening
Mar 26, 2026
Merged

feat(worker): add security hardening layer for public service readiness#73
liplus-lin-lay merged 1 commit intomainfrom
62-security-hardening

Conversation

@liplus-lin-lay
Copy link
Copy Markdown
Collaborator

Part of #62

セキュリティ基盤強化: マルチテナント公開サービス化の第一歩として3層の防御レイヤーを追加。
Bearer Token 認証、GitHub IP ホワイトリスト、レート制限により DDoS/Billing Attack に対応。

Refs sub #70
認証基盤の土台として Bearer Token 認証を実装。MCP_AUTH_TOKEN 未設定時はスキップで後方互換。

Refs sub #72
GitHub IP ホワイトリスト + レート制限で Billing Attack を防御。

セキュリティ基盤強化: マルチテナント公開サービス化 (#62) の第一歩として、
3層の防御レイヤーを追加。

1. Bearer Token 認証 — /events, /mcp エンドポイントに MCP_AUTH_TOKEN による認証を追加。
   未設定時はスキップ(後方互換)。WebSocket は ?token= クエリパラメータも対応。
2. GitHub IP ホワイトリスト — /webhooks/github は GitHub の IP レンジのみ許可。
   api.github.com/meta から取得し Cache API でキャッシュ。フォールバック用ハードコード IP あり。
3. レート制限 — IP ベースのスライディングウィンドウ方式。
   webhook: 300req/分、API: 120req/分。

ローカルブリッジ (local-mcp, mcp-server) も WEBHOOK_AUTH_TOKEN 環境変数で
Authorization ヘッダーを自動付与するよう対応。

Refs #62
Refs sub #70
Refs sub #72

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@liplus-lin-lay liplus-lin-lay linked an issue Mar 26, 2026 that may be closed by this pull request
@liplus-lin-lay liplus-lin-lay enabled auto-merge (squash) March 26, 2026 13:13
@liplus-lin-lay liplus-lin-lay self-assigned this Mar 26, 2026
@liplus-lin-lay liplus-lin-lay merged commit 53121bc into main Mar 26, 2026
2 checks passed
@liplus-lin-lay liplus-lin-lay deleted the 62-security-hardening branch March 26, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Explore multi-tenant public service architecture

1 participant