[Spring Cloud Azure] Validate tfp/acr claim against configured user-flows in AadB2cResourceServerAutoConfiguration
メンテナーはふだん 1 日以内に返信
@domainname がすでに取り組んでいます。
2026年10月29日 から。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 76/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- azure, java, spring-boot
調査の方向性
Read AadB2cResourceServerAutoConfiguration.java and AadJwtClaimNames.java, then inspect the existing tests in AadB2cResourceServerAutoConfigurationTests.java. Trace how jwtDecoder builds its validators and how configured user flows are represented. Add coverage for matching tfp, the acr fallback, case-insensitive matching, and rejection of unconfigured flows; done when those cases pass.
索引モデルが issue の本文から書いたものです。
説明
Library name and version
com.azure.spring:spring-cloud-azure-autoconfigure 7.4.0
Describe the bug
In AadB2cTrustedIssuerRepository (AadB2cTrustedIssuerRepository.java (lines 43–60)), addB2cUserFlowIssuers() registers policy-specific issuer URIs (<baseUri>/tfp/<tenantId>/<userFlow>/v2.0/) for each configured entry in spring.cloud.azure.active-directory.b2c.user-flows, while addB2cIssuer() also registers the tenant-level issuer URI (<baseUri>/<tenantId>/v2.0/).
When Azure AD B2C tokens use the <baseUri>/<tenantId>/v2.0/ issuer format, the user flow name is carried in the tfp (or acr) claim rather than in the iss path. However, AadB2cResourceServerAutoConfiguration.jwtDecoder (AadB2cResourceServerAutoConfiguration.java (lines 93–118)) only configures validators for aud, tid, iss, and timestamps, and does not check the tfp / acr claim against the configured user-flows when user-flows is populated.
Expected behavior
When spring.cloud.azure.active-directory.b2c.user-flows is configured, AadB2cResourceServerAutoConfiguration.jwtDecoder should validate that the token's tfp (or fallback acr) claim matches one of the configured user flow names in properties.getUserFlows().values(), consistent with how addB2cUserFlowIssuers() scopes /tfp/ issuer URLs to the configured user-flows.
Actual behavior
Tokens using the <baseUri>/<tenantId>/v2.0/ issuer format are only checked against AadJwtIssuerValidator, tid, aud, and timestamps, without checking tfp or acr against properties.getUserFlows().values().
Proposed Improvement
- Add
TFP("tfp") andACR("acr") constants toAadJwtClaimNames.java. - In
AadB2cResourceServerAutoConfiguration.jwtDecoder, whenproperties.getUserFlows()is non-empty, add a validator checking thattfp(oracrwhentfpis absent) matches a configured user flow name (case-insensitively). - Add unit test coverage in
AadB2cResourceServerAutoConfigurationTests.java.
- 主要言語
- Java
- スター
- 2.6k
- フォーク
- 2.2k
- 平均マージ
- 2日 1時間
- マージ済み PR(30日)
- 225
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Azure/azure-sdk-for-java のほかの issue
-
mgmt, in track 1 migration guide, call out that file-based authentication method is not recommended再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンAzure.Identity
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
Azure/azure-sdk-for-java#48894 ·
メンテナーはふだん 1 日以内に返信
-
[FEATURE REQ] Support minor version bump in patch release process対応中かも @jairmyree が 1 日前に担当しました。 オープン
Azure/azure-sdk-for-java#51013 · リアクション 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] Service Bus Java scheduleMessage does not retry a transient server-busy response despite maxRetries=3対応中かも @EldertGrootenboer が今日担当しました。 オープンClient customer-reported needs-team-attention question Service Attention Service Bus
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
Azure/azure-sdk-for-java#51006 · コメント 3 件 · リアクション 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
ManagedIdentityCredentialBuilder.resourceId/clientId/objectId Javadoc says "user-assigned or system-assigned"; an ID always selects a user-assigned identity対応中かも @vcolin7 が今日担当しました。 オープンAzure.Identity Client customer-reported needs-team-attention question
Azure/azure-sdk-for-java#50995 · コメント 2 件 · リアクション 1 件 · 担当者 2 名 ·
メンテナーはふだん 1 日以内に返信
-
[FEATURE REQ] Update Patch Releases to Include 3P dependencies対応中かも @jairmyree が 2 日前に担当しました。 オープンblocked
Azure/azure-sdk-for-java#50993 · リアクション 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
Azure/azure-sdk-for-java の issue をすべて見る
似ている issue
-
area:core bug priority:p2
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
aomarai/minecraft-mcp#247 ·
メンテナーはふだん 1 日以内に返信
-
help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
antonyrag/ragleap-core#1062 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
Vakore/ZappierGames#232 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
constellation-app/constellation#2588 ·