Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

OAuth Authorization Code Sent in URL Query String to Token Endpoint (OAuth-OIDC)

Đang mở
#96 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
python

Hướng nghiên cứu

Kiểm tra việc trao đổi token trong atr/server.py:67 và src/asfquart/generics.py:14,94, sau đó xác nhận với các maintainer của ASF OAuth xem https://oauth.apache.org/token-oidc có hỗ trợ dữ liệu biểu mẫu POST hay không. Được xem là hoàn tất khi sử dụng POST với grant_type và code, hoặc ghi lại ràng buộc từ upstream và các biện pháp giảm thiểu, với các unit test bao quát tính bảo mật của việc trao đổi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

ASVS

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:

  1. Server-to-server back-channel communication not exposed to browser
  2. HTTPS transport security
  3. Single-use token with 900s expiration
  4. Referrer-Policy headers prevent leakage
  5. 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

Ngôn ngữ chính
Python
Star
7
Fork
14
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/infrastructure-asfquart

Tất cả issue của apache/infrastructure-asfquart

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.