Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#349 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
38/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript

調査の方向性

まず、GET /api/authn/oidc/callback ハンドラーと、AUTHN_OIDC_REDIRECT_ORIGIN を使用している OIDC 設定を見つけます。欠落しているセッション Cookie がどのように OIDC ライブラリに到達するかを追跡し、その後 OIDC 設定のドキュメントを確認します。Cookie が欠落しているコールバックが 500 以外の適切なレスポンスを受け取り、ドキュメントで Workbench アプリと同じドメインを使用することが強調されていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
JavaScript
スター
56
フォーク
18
平均マージ
21時間 14分
マージ済み PR(30日)
10

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

mitre-attack/attack-workbench-rest-api のほかの issue

mitre-attack/attack-workbench-rest-api の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。