Skip to content

Fix IdentityModel shared-components source build - #8190

Merged
mthalman merged 2 commits into
dotnet:mainfrom
mthalman:mthalman-port-identitymodel-main
Aug 7, 2026
Merged

mthalman merged 2 commits into
dotnet:mainfrom
mthalman:mthalman-port-identitymodel-main

Conversation

@mthalman

@mthalman mthalman commented Aug 7, 2026 •

Copy link
Copy Markdown
Member

Backport of #8152

IdentityModel's current source-build patch stack reverts the BCL.Cryptography/ML-DSA implementation, preventing shared-components source builds from using the current runtime-built package.

This ports the fix from #8152 to main by removing the equivalent IdentityModel revert patch, carrying the coherent Microsoft.Bcl.Cryptography dependency through source-build-assets, and adding a source-build-only direct reference in dotnet-user-jwts so NuGet selects the current runtime-built package instead of the older transitive dependency.

The remaining IdentityModel patches apply cleanly against the pinned source, and the dependency versions and source SHAs are coherent with the current main mappings.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 5ebe0bfa-4e34-40a1-a595-5c68cd8084b4
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service
dotnet-policy-service Bot requested review from a team August 7, 2026 12:59
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 8baef734-4b16-4410-9754-24d3ce261b18
@mthalman
mthalman marked this pull request as ready for review August 7, 2026 17:45
Copilot AI review requested due to automatic review settings August 7, 2026 17:45
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR backports #8152 to fix shared-components source-build failures caused by IdentityModel’s patch stack reverting the BCL.Cryptography/ML-DSA implementation and pulling an older Microsoft.Bcl.Cryptography dependency than the runtime-built one.

Changes:

  • Pass an explicit MicrosoftBclCryptographyVersion into the IdentityModel external-package build so the source-build patch stack can carry a coherent Microsoft.Bcl.Cryptography version.
  • Remove the IdentityModel “revert Tokens change” patch so the upstream ML-DSA/BCL.Cryptography implementation is used.
  • Add a source-build-only direct reference to Microsoft.Bcl.Cryptography in dotnet-user-jwts, and flow Microsoft.Bcl.Cryptography as an aspnetcore dependency for restore coherency.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/source-build-assets/src/externalPackages/projects/azure-activedirectory-identitymodel-extensions-for-dotnet.proj Adds an msbuild property override so IdentityModel builds against the intended Microsoft.Bcl.Cryptography version in source-build.
src/source-build-assets/src/externalPackages/patches/azure-activedirectory-identitymodel-extensions-for-dotnet/0003-Revert-unneeded-Tokens-change.patch Removes the patch that reverted the Tokens ML-DSA/BCL.Cryptography changes, allowing upstream behavior.
src/source-build-assets/eng/Versions.props Introduces IdentityModelMicrosoftBclCryptographyVersion to drive the override used by the external package build.
src/aspnetcore/src/Tools/dotnet-user-jwts/src/dotnet-user-jwts.csproj Adds a source-build-only direct reference to Microsoft.Bcl.Cryptography to force selection of the runtime-built package.
src/aspnetcore/eng/Version.Details.xml Adds Microsoft.Bcl.Cryptography as a tracked dependency (dotnet/dotnet-sourced) for aspnetcore coherency.
src/aspnetcore/eng/Version.Details.props Adds version properties for Microsoft.Bcl.Cryptography used by aspnetcore dependency resolution.
src/aspnetcore/eng/Dependencies.props Adds Microsoft.Bcl.Cryptography to aspnetcore’s LatestPackageReference list so it can be resolved during restore when referenced.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mthalman
mthalman enabled auto-merge (squash) August 7, 2026 18:07
@mthalman
mthalman merged commit 2aca56d into dotnet:main Aug 7, 2026
11 checks passed
@mthalman
mthalman deleted the mthalman-port-identitymodel-main branch August 7, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants