declare all OAuth scopes and enable enforce_configured_scopes

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

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

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
57/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
ruby

調査の方向性

Start with doorkeeper.rb and locate the optional_scopes declaration and the commented enforce_configured_scopes setting. Find the app's actual requested scopes and ensure they are all declared before enabling enforcement. Done means undeclared scopes are rejected at authorize time; the issue also calls for auditing registered app scopes before deployment.

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

説明

bug

problem

doorkeeper.rb declares only 4 optional scopes (openid, profile, phone, birthdate) but the app uses 12+: email, name, groups, verification_status, slack_id, legal_name, basic_info, address, set_slack_id, etc. enforce_configured_scopes is commented out.

any app can request scope=literally_anything and doorkeeper puts it on the token. the RS ignores unrecognized scopes at render time so nothing leaks, but tokens carry junk scopes. token exchange (RFC 8693) needs a canonical scope list to validate downscoping against.

fix

add all real scopes to optional_scopes and uncomment enforce_configured_scopes. apps requesting undeclared scopes get rejected at authorize time.

behavioral change: any app currently requesting an undeclared scope will start getting rejected. audit existing apps' registered scopes before deploying.

主要言語
Ruby
スター
85
フォーク
72
平均マージ
3日 12時間
マージ済み PR(30日)
22

環境構築

はじめの一歩

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

hackclub/auth のほかの issue

hackclub/auth の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

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

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