[macOS] Integrated authentication no longer requests Kerberos delegation in 6.1.x
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- authentication, databases
Hướng nghiên cứu
Start by comparing the Unix SNI path in src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SNI/SNIProxy.cs at 5.1.7 with src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SSPI/NegotiateSspiContextProvider.cs at 6.1.5, then check how AllowedImpersonationLevel is configured. Reproduce with Integrated authentication and the linked-server query in the issue; the target SQL Server environment is needed. Done means confirming the cause and intended delegation behavior, then documenting or fixing it without requiring unconstrained delegation.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
On macOS, a SQL Server connection using Integrated authentication negotiates Kerberos for the first hop, but a query against a SQL Server linked server fails because the remote hop receives an anonymous identity. This appeared when the VS Code SQL Server extension moved from its SqlClient 5.1.7 bundle to SqlClient 6.1.x, although the behavior is not currently consistent across retests.
The observed SQL Server error in the extension is:
Msg 7314, Level 16, State 1
The OLE DB provider "MSOLEDBSQL" for linked server "<LINKED_SQL_SERVER>" does not contain the table ""<REMOTE_DATABASE>"."dbo"."<TABLE>"". The table either does not exist or the current user does not have permissions on that table.
A first-hop diagnostic returned auth_scheme = KERBEROS and the expected domain login. The same SQL query succeeded in an earlier run using extension 1.39.0, failed with 1.40.0 and 1.47.0, and later also failed with 1.39.0 after reinstall/reload. The extension registry reported 1.39.0 installed and pinned for that later test. Azure Data Studio had succeeded in an earlier comparison; it has not yet been retested against the latest failure.
To reproduce
The issue was observed from the VS Code mssql extension on macOS with an Integrated-auth connection to SQL Server 2019. A minimal query that exercises the failing linked-server object is:
SELECT TOP (0) MasterPersonID
FROM [<LINKED_SQL_SERVER>].<REMOTE_DATABASE>.dbo.<TABLE>;
The actual application script uses a four-part linked-server name to join a remote table. The target database environment is required to reproduce this reliably; a standalone reproduction project is not yet available.
Relevant package comparison from the extension bundles:
- mssql 1.39.0: SQL Tools Service 5.0.20260114.1, SqlClient 5.1.7, .NET 8 runtime
- mssql 1.40.0: SqlClient 6.1.3
- mssql 1.47.0: SQL Tools Service 6.0.20261002.1, SqlClient 6.1.5, .NET 10 runtime
In SqlClient 5.1.7, the Unix SNI path requests ContextFlagsPal.Delegate (source). In 6.1.5, NegotiateSspiContextProvider constructs NegotiateAuthenticationClientOptions with Package and TargetName but leaves AllowedImpersonationLevel unset (source); .NET's default is TokenImpersonationLevel.None (source). This suggests a possible delegation regression, but the inconsistent 1.39 retest means this is a hypothesis, not a confirmed root cause.
Expected behavior
Integrated authentication should preserve the documented/previous delegation behavior needed for linked-server queries when the environment is configured to allow constrained delegation. Please confirm whether omitting AllowedImpersonationLevel in the newer path is intentional, and whether SqlClient should preserve the prior behavior or provide a supported opt-in. Any fix should avoid requiring unconstrained delegation.
Further technical details
- Microsoft.Data.SqlClient versions: 5.1.7 (extension 1.39.0), 6.1.3 (extension 1.40.0), 6.1.5 (extension 1.47.0)
- .NET runtime bundled with SQL Tools Service: 8.0 for extension 1.39.0; 10.0 for extension 1.47.0
- SQL Server: 2019, first-hop auth scheme Kerberos
- Operating system: macOS (exact version and architecture not recorded)
- Authentication: Integrated
Internal server names, database names, domain names, usernames, and customer/account values have been replaced with placeholders.
- Ngôn ngữ chính
- C#
- Star
- 1k
- Fork
- 352
- Merge trung bình
- 2 ngày 18 giờ
- Pull request đã merge (30 ngày)
- 133
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của dotnet/SqlClient
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
dotnet/SqlClient#5061 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Sync ExecuteReader on an STA thread deadlocks against a StateChange handler that marshals to the UI thread (OpenAsyncRetry path)Có thể làm lại được @mdaigle đã nhận 56 ngày trước và không có pull request nào đang mở. Đang mởExternal :link:
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
dotnet/SqlClient#4534 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Tests | Additional test casesĐang mởArea\Tests
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
dotnet/SqlClient#4377 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Managed SNI: TLS handshake ignores Connect Timeout, one stalled handshake blocks every OpenAsync on the poolCó thể đã có người làm @mdaigle đã nhận 1 ngày trước. Đang mởArea\Managed SNI
dotnet/SqlClient#5045 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Cancelling `SqlBatch.ExecuteNonQueryAsync` throws `ArgumentOutOfRangeException` from `SqlCommand.GetBatchCommand` instead of a cancellation exceptionCó thể đã có người làm @cheenamalhotra đã nhận hôm nay. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 53/100
dotnet/SqlClient#5042 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của dotnet/SqlClient
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Incorrect example codeĐang mở:watch: Not Triaged dotnet-azure/svc
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug build
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
microsoft/microsoft-ui-reactor#1508 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
LuckyDucko/Mopups#202 ·
-
area:repo elsa 3 prio low triaged type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
elsa-workflows/elsa-core#9258 ·
Maintainer thường phản hồi trong vòng 1 ngày