Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#96 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
python

Direzione di ricerca

Esamina lo scambio dei token in atr/server.py:67 e src/asfquart/generics.py:14,94, quindi conferma con i maintainer di ASF OAuth se https://oauth.apache.org/token-oidc supporta i dati del modulo POST. Il lavoro è considerato completato usando POST con grant_type e code, oppure documentando il vincolo upstream e le mitigazioni, con unit test che coprano la sicurezza dello scambio.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Python
Stelle
7
Fork
13
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/infrastructure-asfquart

Tutte le issue di apache/infrastructure-asfquart

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.