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

Trap requests to the OIDC callback endpoint that are missing the cookie that identifies the session

Aperta
#349 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

Inizia individuando l’handler GET /api/authn/oidc/callback e la configurazione OIDC usando AUTHN_OIDC_REDIRECT_ORIGIN. Traccia il percorso del cookie di sessione mancante fino alla libreria OIDC, quindi esamina la documentazione sulla configurazione OIDC. Il lavoro è completato quando i callback privi di cookie ricevono una risposta appropriata diversa da 500 e la documentazione sottolinea di usare lo stesso dominio dell’app Workbench.

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

Descrizione

The Issue

Requests sent to the GET /api/authn/oidc/callback endpoint must include the cookie which identifies the server-side session for the user. Currently, requests that are missing this cookie result in a 500 Internal Error response. The server log shows the message:

[ERROR] catch all: Error: did not find expected authorization request details in session, req.session["oidc:localhost"] is undefined

This error occurs because the OIDC library expects to find the server-side session data that had been created during the initial call to start the OIDC log in process (GET /api/authn/oidc/login). The server-side session is identified by a cookie sent with the request and when the cookie is absent in the call the the callback endpoint, the REST API creates a new session, instead of accessing the one from the initial request.

The missing cookie can occur if the server can be accessed using two different domain names, and the client accesses the Workbench app using the first domain name, but the OIDC configuration includes the second domain name in the OIDC configuration (configured using the AUTHN_OIDC_REDIRECT_ORIGIN environment variable). This would result in the browser storing the cookie using the first domain name and sending it with any requests to a host with that domain name. But not sending it in requests to hosts with the second domain name.

The Fix
  1. The REST API should identify requests to the OIDC callback endpoint that do not include the session identifier and send a suitable response, instead of a 500 Internal Error response
  2. The documentation for configuring OIDC should be updated to emphasize the importance of using the same domain name as when accessing the Workbench app
Lingua principale
JavaScript
Stelle
56
Fork
18
Merge medio
21h 14m
PR unite (30g)
10

Preparare l'ambiente

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 mitre-attack/attack-workbench-rest-api

Tutte le issue di mitre-attack/attack-workbench-rest-api

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.