Trap requests to the OIDC callback endpoint that are missing the cookie that identifies the session
メンテナーはふだん 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
- 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
- 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
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
mitre-attack/attack-workbench-rest-api のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
mitre-attack/attack-workbench-rest-api#513 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
mitre-attack/attack-workbench-rest-api#505 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
mitre-attack/attack-workbench-rest-api#499 ·
メンテナーはふだん 1 日以内に返信
-
Add ADM validation bypass for server-controlled fields on non-compliant objects対応中かも @seansica が 12 日前に担当しました。 オープン
mitre-attack/attack-workbench-rest-api#517 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 74/100
mitre-attack/attack-workbench-rest-api#512 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
mitre-attack/attack-workbench-rest-api の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
flarum/framework#5301 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
AOSSIE-Org/BabyNest#284 ·
メンテナーはふだん 1 日以内に返信
-
status:untriaged
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
midnightntwrk/servicedesk#275 ·
メンテナーはふだん 1 日以内に返信