http: classify missing token, invalid token, and insufficient scope distinctly
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- go
- 領域
- api, authentication, backend
調査の方向性
まず pkg/http/middleware/token.go、pat_scope.go、scope_challenge.go のミドルウェアパスから始め、次に pkg/errors/error.go のエラー定義と docs/error-handling.md の既存のガイダンスを確認します。資格情報がない場合、無効または期限切れの場合、および scope が不十分な場合のリクエストを使って、Go の HTTP ミドルウェアテストとエラーテストを実行します。各パスにそれぞれ異なる機械可読コードがあり、該当する WWW-Authenticate の動作が維持され、対象テストが通過し、コードが文書化されていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Problem
Authentication and authorization failures currently collapse into generic HTTP errors even though missing credentials, invalid/expired credentials, and insufficient scopes require different remediation. That weakens machine-readable diagnostics for hosts and operators.
Why now
This server sits directly on GitHub token-policy boundaries. Clients and wrappers need explicit failure classification to decide whether to prompt for auth, refresh a token, or request additional scopes.
Expected behavior
Missing token, invalid/expired token, and insufficient scope paths should each expose a distinct machine-readable error code while preserving the existing auth challenge semantics.
Claim-to-codepath map
pkg/http/middleware/token.gopkg/http/middleware/pat_scope.gopkg/http/middleware/scope_challenge.gopkg/errors/error.godocs/error-handling.md
Evidence packet
- Commit under test:
fa87e4fc9e4cd1f514cf4c236b9135987a328512 - Runtime: Go HTTP middleware tests on macOS
- Repro concept: exercise requests with no token, malformed/invalid token, and OAuth requests lacking required scopes.
Validation requirements
- Add targeted middleware/error tests for each classification.
- Preserve
WWW-Authenticatechallenge behavior where applicable. - Document the new machine-readable codes.
- 主要言語
- Go
- スター
- 33.1k
- フォーク
- 5k
- 平均マージ
- 2日 1時間
- マージ済み PR(30日)
- 25
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/github-mcp-server のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
github/github-mcp-server#3235 ·
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
github/github-mcp-server#3042 · コメント 2 件 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
github/github-mcp-server#3032 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
github/github-mcp-server#2803 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
github/github-mcp-server#2740 ·
github/github-mcp-server の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
bug group: validation priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
codecheckers/chekhov#51 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100