Repository navigation
Merging internal commits for release/8.0 - #69817
Merged
Merged
Conversation
…claims to security-enabled groups
## Summary
`LdapAdapter` emitted every group in the user's `memberOf` as a role claim, including Active Directory **distribution groups**. The Windows Kerberos token carries only security-group SIDs, so a distribution group never becomes a role on Windows. On Linux the LDAP path granted it.
This breaks the documented contract in Role-based authorization ("Windows Authentication **security groups** as app roles"), which applies to `AddNegotiate()` regardless of platform.
## Fix
`GetNestedGroups` now requests `groupType` alongside `memberof` in the **existing** base-scope read, so there is **no extra LDAP round trip** (verified: `groupType` was already on the wire and being discarded). Groups without `GROUP_TYPE_SECURITY_ENABLED` (`0x80000000`) no longer produce a role claim.
Design notes:
- Bit test is done in C#, **not** via the AD-proprietary matching-rule OID `1.2.840.113556.1.4.803`, which non-AD directories do not implement.
- **Fails open** when `groupType` is absent or unparseable, so non-AD directories and foreign security principals are unaffected.
- Traversal still recurses **through** non-security groups (only the claim is skipped), so a security group nested inside a distribution group still grants its role.
- Suppressed groups are logged at `Information` with the group DN, so the resulting 403 is diagnosable.
## Breaking change / opt-out
Apps that relied on distribution groups for authorization will start receiving 403. Opt-out:
`Microsoft.AspNetCore.Authentication.Negotiate.AllowNonSecurityEnabledGroupClaims=true`
## Validation
- Unit tests added for the `groupType` bit matrix, covering all security/distribution scopes plus unparseable and missing values (fail-open).
- Reproduced end-to-end against a Samba AD DC rig: a user in a distribution group whose CN matches the role gets **200 before / 403 after**, with the legitimate `Readers` role retained. Removing the membership restores 403, confirming causality.
- Local repo build not run: the internal branch pins an unreleased servicing runtime unavailable on public feeds. Final binaries will be validated end-to-end before release.
## Scope
Does **not** address role-name (CN) collisions across OUs, which is tracked separately. Fix messaging should stay scoped to distribution groups.
Encode the underlying exception before writing it to the WebAssembly debug page. This completes output encoding for the remaining interpolated value.
…otnet-runtime build 20260902.23 On relative base path root Microsoft.Extensions.HostFactoryResolver.Sources , Microsoft.Internal.Runtime.AspNetCore.Transport , Microsoft.NETCore.BrowserDebugHost.Transport , Microsoft.NETCore.Platforms , Microsoft.SourceBuild.Intermediate.runtime.linux-x64 From Version 8.0.31-servicing.26420.15 -> To Version 8.0.32-servicing.26452.23 Microsoft.NET.Runtime.MonoAOTCompiler.Task , Microsoft.NET.Runtime.WebAssembly.Sdk , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm , Microsoft.NETCore.App.Runtime.win-x64 From Version 8.0.31 -> To Version 8.0.32
…otnet-runtime build 20260903.24 On relative base path root Microsoft.Extensions.HostFactoryResolver.Sources , Microsoft.Internal.Runtime.AspNetCore.Transport , Microsoft.NETCore.BrowserDebugHost.Transport , Microsoft.NETCore.Platforms , Microsoft.SourceBuild.Intermediate.runtime.linux-x64 From Version 8.0.31-servicing.26420.15 -> To Version 8.0.32-servicing.26453.24 Microsoft.NET.Runtime.MonoAOTCompiler.Task , Microsoft.NET.Runtime.WebAssembly.Sdk , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm , Microsoft.NETCore.App.Runtime.win-x64 From Version 8.0.31 -> To Version 8.0.32
…otnet-efcore build 20260903.18 On relative base path root dotnet-ef , Microsoft.EntityFrameworkCore , Microsoft.EntityFrameworkCore.Design , Microsoft.EntityFrameworkCore.InMemory , Microsoft.EntityFrameworkCore.Relational , Microsoft.EntityFrameworkCore.Sqlite , Microsoft.EntityFrameworkCore.SqlServer , Microsoft.EntityFrameworkCore.Tools From Version 8.0.31 -> To Version 8.0.31
…otnet-efcore build 20260904.3 On relative base path root dotnet-ef , Microsoft.EntityFrameworkCore , Microsoft.EntityFrameworkCore.Design , Microsoft.EntityFrameworkCore.InMemory , Microsoft.EntityFrameworkCore.Relational , Microsoft.EntityFrameworkCore.Sqlite , Microsoft.EntityFrameworkCore.SqlServer , Microsoft.EntityFrameworkCore.Tools From Version 8.0.31 -> To Version 8.0.32
…otnet-runtime build 20260908.19 On relative base path root Microsoft.Extensions.HostFactoryResolver.Sources , Microsoft.Internal.Runtime.AspNetCore.Transport , Microsoft.NETCore.BrowserDebugHost.Transport , Microsoft.NETCore.Platforms , Microsoft.SourceBuild.Intermediate.runtime.linux-x64 From Version 8.0.31-servicing.26420.15 -> To Version 8.0.32-servicing.26458.19 Microsoft.NET.Runtime.MonoAOTCompiler.Task , Microsoft.NET.Runtime.WebAssembly.Sdk , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm , Microsoft.NETCore.App.Runtime.win-x64 From Version 8.0.31 -> To Version 8.0.32 System.Security.Cryptography.Pkcs From Version 8.0.1 -> To Version 8.0.2
…otnet-efcore build 20260909.8 On relative base path root dotnet-ef , Microsoft.EntityFrameworkCore , Microsoft.EntityFrameworkCore.Design , Microsoft.EntityFrameworkCore.InMemory , Microsoft.EntityFrameworkCore.Relational , Microsoft.EntityFrameworkCore.Sqlite , Microsoft.EntityFrameworkCore.SqlServer , Microsoft.EntityFrameworkCore.Tools From Version 8.0.31 -> To Version 8.0.32
…otnet-runtime build 20260910.9 On relative base path root Microsoft.Extensions.HostFactoryResolver.Sources , Microsoft.Internal.Runtime.AspNetCore.Transport , Microsoft.NETCore.BrowserDebugHost.Transport , Microsoft.NETCore.Platforms , Microsoft.SourceBuild.Intermediate.runtime.linux-x64 From Version 8.0.31-servicing.26420.15 -> To Version 8.0.32-servicing.26460.9 Microsoft.NET.Runtime.MonoAOTCompiler.Task , Microsoft.NET.Runtime.WebAssembly.Sdk , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm , Microsoft.NETCore.App.Runtime.win-x64 From Version 8.0.31 -> To Version 8.0.32 System.Security.Cryptography.Pkcs From Version 8.0.1 -> To Version 8.0.2
…otnet-runtime build 20260910.29 On relative base path root Microsoft.Extensions.HostFactoryResolver.Sources , Microsoft.Internal.Runtime.AspNetCore.Transport , Microsoft.NETCore.BrowserDebugHost.Transport , Microsoft.NETCore.Platforms , Microsoft.SourceBuild.Intermediate.runtime.linux-x64 From Version 8.0.31-servicing.26420.15 -> To Version 8.0.32-servicing.26460.29 Microsoft.NET.Runtime.MonoAOTCompiler.Task , Microsoft.NET.Runtime.WebAssembly.Sdk , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm , Microsoft.NETCore.App.Runtime.win-x64 From Version 8.0.31 -> To Version 8.0.32 System.Security.Cryptography.Pkcs From Version 8.0.1 -> To Version 8.0.2
…otnet-runtime build 20260911.2 On relative base path root Microsoft.Extensions.HostFactoryResolver.Sources , Microsoft.Internal.Runtime.AspNetCore.Transport , Microsoft.NETCore.BrowserDebugHost.Transport , Microsoft.NETCore.Platforms , Microsoft.SourceBuild.Intermediate.runtime.linux-x64 From Version 8.0.31-servicing.26420.15 -> To Version 8.0.32-servicing.26461.2 Microsoft.NET.Runtime.MonoAOTCompiler.Task , Microsoft.NET.Runtime.WebAssembly.Sdk , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm , Microsoft.NETCore.App.Runtime.win-x64 From Version 8.0.31 -> To Version 8.0.32 System.Security.Cryptography.Pkcs From Version 8.0.1 -> To Version 8.0.2
…otnet-runtime build 20260911.23 On relative base path root Microsoft.Extensions.HostFactoryResolver.Sources , Microsoft.Internal.Runtime.AspNetCore.Transport , Microsoft.NETCore.BrowserDebugHost.Transport , Microsoft.NETCore.Platforms , Microsoft.SourceBuild.Intermediate.runtime.linux-x64 From Version 8.0.31-servicing.26420.15 -> To Version 8.0.32-servicing.26461.23 Microsoft.NET.Runtime.MonoAOTCompiler.Task , Microsoft.NET.Runtime.WebAssembly.Sdk , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm , Microsoft.NETCore.App.Runtime.win-x64 From Version 8.0.31 -> To Version 8.0.32 System.Security.Cryptography.Pkcs From Version 8.0.1 -> To Version 8.0.2 System.Security.Cryptography.Xml From Version 8.0.4 -> To Version 8.0.5
…otnet-runtime build 20260911.36 On relative base path root Microsoft.Extensions.HostFactoryResolver.Sources , Microsoft.Internal.Runtime.AspNetCore.Transport , Microsoft.NETCore.BrowserDebugHost.Transport , Microsoft.NETCore.Platforms , Microsoft.SourceBuild.Intermediate.runtime.linux-x64 From Version 8.0.31-servicing.26420.15 -> To Version 8.0.32-servicing.26461.36 Microsoft.NET.Runtime.MonoAOTCompiler.Task , Microsoft.NET.Runtime.WebAssembly.Sdk , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm , Microsoft.NETCore.App.Runtime.win-x64 From Version 8.0.31 -> To Version 8.0.32 System.Security.Cryptography.Pkcs From Version 8.0.1 -> To Version 8.0.2 System.Security.Cryptography.Xml From Version 8.0.4 -> To Version 8.0.5
#### AI description (iteration 1) #### PR Classification Merge from public branch into internal/release/8.0, incorporating infrastructure improvements and security enhancements. #### PR Summary This pull request merges changes from the public repository, primarily introducing GitHub App authentication for localization workflows and fixing a security issue in output caching. The changes include new infrastructure for token minting and test coverage for authenticated user scenarios. - **New GitHub App authentication**: Added `/eng/common/Get-GitHubAppToken.ps1` and `/eng/common/core-templates/steps/get-github-app-token.yml` to mint short-lived GitHub App installation tokens using Azure Key Vault RSA signing - **OneLocBuild templates**: Updated `/eng/common/templates-official/job/onelocbuild.yml` and `/eng/common/templates/job/onelocbuild.yml` to support GitHub App authentication and extended Entra token support to DevDiv projects - **Output caching security tests**: Added tests in `/src/Middleware/OutputCaching/test/OutputCachePolicyProviderTests.cs` for authenticated user scenarios, including non-primary identity authentication - **Security helper tests**: Added comprehensive tests in `/src/Shared/test/Shared.Tests/SecurityHelperTests.cs` for the `IsAuthenticated` method covering various authentication scenarios - **Arcade SDK updates**: Updated `Microsoft.DotNet.Arcade.Sdk` and related packages in `/eng/Version.Details.xml` from version 8.0.0-beta.26371.5 to 8.0.0-beta.26431.7 <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
…otnet-runtime build 20260913.7 On relative base path root Microsoft.Extensions.HostFactoryResolver.Sources , Microsoft.Internal.Runtime.AspNetCore.Transport , Microsoft.NETCore.BrowserDebugHost.Transport , Microsoft.NETCore.Platforms , Microsoft.SourceBuild.Intermediate.runtime.linux-x64 From Version 8.0.31-servicing.26420.15 -> To Version 8.0.32-servicing.26463.7 Microsoft.NET.Runtime.MonoAOTCompiler.Task , Microsoft.NET.Runtime.WebAssembly.Sdk , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm , Microsoft.NETCore.App.Runtime.win-x64 From Version 8.0.31 -> To Version 8.0.32 System.Security.Cryptography.Pkcs From Version 8.0.1 -> To Version 8.0.2 System.Security.Cryptography.Xml From Version 8.0.4 -> To Version 8.0.5
…n form data arrives incrementally Avoids rescanning full body data from pipeReader on any new incoming data
…Kerberos Principal #### AI description (iteration 1) #### PR Classification Security bug fix to prevent potential name confusion attacks by validating that LDAP-retrieved account information matches the Kerberos-authenticated principal's SID. #### PR Summary This PR adds SID verification to ensure the LDAP search result corresponds to the same security principal that was authenticated via Kerberos, preventing potential name confusion vulnerabilities. - `LdapAdapter.cs`: Added `VerifyLdapSidMatchesKerberosPrincipal()` method to compare the LDAP objectSid attribute against the Kerberos principal's PrimarySid claim before resolving group memberships - `LdapAdapter.cs`: Implemented cross-platform `ParseSidBytesToString()` helper to convert binary SID format (MS-DTYP §2.4.2) to canonical string representation without Windows-only dependencies - `LdapAdapterTests.cs`: Added comprehensive unit tests covering SID matching scenarios including null cases, matching/mismatching SIDs, case-insensitivity, and cross-platform SID parsing validation <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
Lookups a valid user email instead of using unvalidated user input. ---- #### AI description (iteration 1) #### PR Classification Bug fix to ensure password reset and email confirmation emails are sent to the stored email address rather than the user-provided input email. #### PR Summary Fixes a security issue where email lookup operations (password reset and email confirmation) were sending emails to user-provided input addresses instead of the stored canonical email addresses in the database. This prevents potential email case-sensitivity exploits. - `IdentityApiEndpointRouteBuilderExtensions.cs`: Modified forgot password and resend confirmation endpoints to retrieve and use the stored email address via `GetEmailAsync()` instead of using the request email - `ForgotPassword.cshtml.cs` (V4 and V5): Updated password reset flow to send reset links to the stored email address - `ResendEmailConfirmation.cshtml.cs` (V4 and V5): Updated confirmation email flow to send confirmation links to the stored email address - `MapIdentityApiTests.cs`: Added two new tests (`ForgotPasswordSendsToStoredEmail` and `ResendConfirmationEmailSendsToStoredEmail`) to verify emails are sent to stored addresses even when request uses different casing <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
…nt buffer FileBufferingReadStream before was pre-allocating buffer in constructor. That buffer may be much bigger than incoming data, and its better to allocate only on the input received (with approximately same size of buffer). If going over the limit, changes to `FileStream`. ---- #### AI description (iteration 1) #### PR Classification Performance optimization through lazy buffer allocation in FileBufferingReadStream. #### PR Summary This PR introduces a new `PooledMemoryStream` class that lazily rents buffers from an `ArrayPool<byte>` and integrates it with `FileBufferingReadStream` to defer memory allocation until actually needed. - **`PooledMemoryStream.cs`**: New stream implementation that defers buffer rental from the pool until capacity is needed, growing geometrically up to a maximum capacity. - **`PooledMemoryStreamTests.cs`**: Comprehensive test suite covering lazy rental, growth behavior, read/write operations, disposal, and boundary validation. - **`FileBufferingReadStream.cs`**: Updated to leverage `PooledMemoryStream.WrittenMemory` for efficient spilling to disk, eliminating the need to track `_rentedBuffer` separately. - **`FileBufferingReadStreamTests.cs`**: Added tests verifying lazy buffer rental behavior and that empty content streams don't allocate buffers. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
…tion in nuget.config #### AI description (iteration 1) #### PR Classification Bug fix to correct an incorrectly resolved merge conflict in `NuGet.config`. #### PR Summary Removes leftover Git conflict markers and restores the intended NuGet package source and disabled-source entries for dotnet-efcore and dotnet-runtime. - `NuGet.config`: Deleted `<<<<<<<`, `=======`, `>>>>>>>` conflict artifacts and kept the correct `darc-int-dotnet-efcore-4caf9ee` and `darc-int-dotnet-runtime-1219a42` package source entries. - `NuGet.config`: Cleaned the corresponding `disabledPackageSources` entries to match the restored sources. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
…-side FIN DoS ## Customer Impact Prevents malicious or abruptly disconnected stateful-reconnect clients from indefinitely blocking SignalR broadcasts and retaining server resources. Healthy reconnects remain unaffected as long as replay continues making progress. ## Regression? - [ ] Yes - [x] No ## Risk - [ ] High - [x] Medium - [ ] Low The code change is localized to the opt-in stateful reconnect path, but it modifies concurrency, cancellation, timer, and connection-abort behavior shared by both SignalR server and .NET client implementations. ## Verification - [x] Manual (required) - [x] Automated ## Packaging changes reviewed? - [ ] Yes - [ ] No - [x] N/A ---- #### AI description (iteration 1) #### PR Classification Bug fix for message resend and acknowledgment operations in SignalR to prevent denial-of-service vulnerabilities and deadlocks caused by backpressure timeout issues. #### PR Summary This PR fixes critical issues in SignalR's MessageBuffer where indefinite blocking during message resend and acknowledgment operations could lead to deadlocks and send-side FIN denial-of-service attacks. The fix introduces timeout handling for backpressure scenarios and ensures proper resource cleanup. - `MessageBuffer.cs`: Added backpressure timeout mechanism (5 seconds) with cancellation token support for `ResendAsync` and `RunTimer` methods to prevent indefinite blocking - `MessageBuffer.cs`: Implemented platform-specific `CancellationTokenSource` creation and reset logic (with `TryReset` for .NET and dispose/recreate for older frameworks) - `MessageBuffer.cs`: Added connection abort on timer failure and proper disposal tracking to prevent use-after-dispose scenarios - `MessageBufferTests.cs`: Added comprehensive tests for backpressure timeout scenarios, including timeout reset on progress and connection abort verification <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
…otnet-efcore build 20260915.5 On relative base path root dotnet-ef , Microsoft.EntityFrameworkCore , Microsoft.EntityFrameworkCore.Design , Microsoft.EntityFrameworkCore.InMemory , Microsoft.EntityFrameworkCore.Relational , Microsoft.EntityFrameworkCore.Sqlite , Microsoft.EntityFrameworkCore.SqlServer , Microsoft.EntityFrameworkCore.Tools From Version 8.0.32 -> To Version 8.0.32
This was referenced Nov 16, 2026
Open
Open
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.