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

Apply scope policy to OpenID4VP / auth-code flow token issuance

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

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
74/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
go

調査の方向性

auth/api/iam/openid4vp.go から始め、createAccessToken までの authorization-code パスを追跡します。FindCredentialProfile、および profile-only、dynamic、passthrough のケースを含めて、handleS2SAccessTokenRequest と grantedScopesForPolicy と比較します。追加のスコープが適切に拒否または評価され、発行されたトークンに付与されたスコープのみが含まれていれば完了です。

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

説明

Context

#4179 added server-side scope policy enforcement (profile-only / passthrough / dynamic) to the S2S vp_token flow in handleS2SAccessTokenRequest. The OpenID4VP / authorization-code flow takes a separate path to createAccessToken that does not invoke grantedScopesForPolicy — so scope policy is currently not enforced for that flow.

Problem

In auth/api/iam/openid4vp.go the auth-code handler uses oauthSession.Scope (the raw requested scope) and passes it directly to createAccessToken. This means:

  • profile-only: extra scopes are NOT rejected
  • dynamic: the AuthZen PDP is NOT called; extra scopes pass through without evaluation
  • passthrough: works by accident (raw scope is forwarded)

A client going through the auth-code flow can request arbitrary extra scopes and receive them in the issued access token — bypassing the policy that's enforced on the S2S path.

Expected behaviour

Same as the S2S flow:

  • Look up the credential profile via FindCredentialProfile
  • Reject profile-only + extras
  • Call the AuthZen PDP for dynamic
  • Issue token with only granted scopes

Related

  • Parent PRD: #4144
  • Introduced gap: #4179
主要言語
Go
スター
29
フォーク
24
平均マージ
2日 18時間
マージ済み PR(30日)
45

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

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

nuts-foundation/nuts-node のほかの issue

nuts-foundation/nuts-node の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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