OAuth Authorization Code Sent in URL Query String to Token Endpoint (OAuth-OIDC)
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- python
調査の方向性
atr/server.py:67 と src/asfquart/generics.py:14,94 のトークン交換を調査し、https://oauth.apache.org/token-oidc が POST のフォームデータをサポートしているか ASF OAuth のメンテナーに確認してください。完了条件は、grant_type と code を指定した POST を使用すること、または upstream の制約と緩和策を文書化することであり、交換のセキュリティをカバーする unit tests を含めることです。
索引モデルが issue の本文から書いたものです。
説明
Issue: FINDING-285 - OAuth Authorization Code Sent in URL Query String to Token Endpoint
Labels: bug, security, priority:low, asvs-level:L1
ASVS Level(s): L1
Description:
Summary
The OAuth authorization code is transmitted to the ASF token endpoint via a GET request with the code as a URL query parameter, rather than in an HTTP POST body as recommended by RFC 6749 Section 4.1.3 and OAuth 2.0 Security Best Current Practice (RFC 9700). During the OAuth login flow, after the user authenticates at oauth.apache.org and is redirected back to ATR, the authorization code is received from the OAuth redirect and then placed in the URL query string of a GET request to https://oauth.apache.org/token-oidc?code=AUTHORIZATION_CODE.
Details
In atr/server.py at line 67, src/asfquart/generics.py at line 14, and src/asfquart/generics.py at line 94, the authorization code is transmitted via GET query parameter.
This means the authorization code (a credential) appears in the URL and will be recorded in access logs on oauth.apache.org, any intermediate proxy/load balancer logs, and network monitoring tools performing TLS inspection.
Multiple mitigating factors reduce the risk:
- Server-to-server back-channel communication not exposed to browser
- HTTPS transport security
- Single-use token with 900s expiration
- Referrer-Policy headers prevent leakage
- ATR request logs exclude query strings
Recommended Remediation
Option 1 (Recommended if supported): Switch to POST method for token exchange. Replace GET request with POST request sending the authorization code in the request body using application/x-www-form-urlencoded format with grant_type=authorization_code and code parameter. Contact ASF OAuth service maintainers to confirm POST support.
Option 2 (If POST not supported): Document the accepted risk with inline code comments explaining that the OAuth authorization code is sent via GET query parameter due to upstream ASF OAuth endpoint constraint, and note the mitigating factors: server-to-server HTTPS communication, single-use codes with 900s expiration, immediate exchange, and query string exclusion from request logs.
Acceptance Criteria
- POST method used for token exchange OR risk acceptance documented
- Code comments explain implementation choice
- Unit tests verify token exchange security
References
- Source reports: L1:14.2.1.md
- Related findings: None
- ASVS sections: 14.2.1
Priority
Low
- 主要言語
- Python
- スター
- 7
- フォーク
- 13
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/infrastructure-asfquart のほかの issue
-
bug priority
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
Document OAuth callback consistency rules対応中かも @Marrshal15 が 15 日前に担当しました。 オープンdocumentation
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
apache/infrastructure-asfquart#126 · コメント 1 件 ·
-
ASVS priority
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
apache/infrastructure-asfquart#85 · コメント 1 件 ·
-
Triage and track asfquart issues対応中かも @sbp が 13 日前に担当しました。 オープン
apache/infrastructure-asfquart#134 · 担当者 1 名 ·
apache/infrastructure-asfquart の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
mohitmishra786/readprism#322 ·
メンテナーはふだん 1 日以内に返信
-
good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
API-key credentials accept a blank key: empty via the API, spaces-only via the builder's Add API key dialog対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
Significant-Gravitas/AutoGPT#15727 ·
メンテナーはふだん 1 日以内に返信