Match Group administrators is silently skipped for Entra ID administrators (keys read from per-user authorized_keys)
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
- 48/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, operating-systems, security
Hướng nghiên cứu
Reproduce the issue with the supplied Windows, sshd_config, SYSTEM-task, and debug-log steps, then trace ga_init(), generate_s4u_user_token(), and get_user_token() during Match Group evaluation. Compare the administrator’s expected group membership with the reported empty group set; done means membership rules are evaluated correctly or the failure is clearly surfaced without silently using per-user keys.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest version
- Search the existing issues.
Related: #1787 (SSH with AAD/Entra ID credentials). The behaviour below comes from PowerShell/openssh-portable#744, which made ga_init() non-fatal when no user token can be generated.
Steps to reproduce
- Entra ID–joined Windows 11 device; an Entra ID user (SID
S-1-12-1-…) who is a member of the local Administrators group. - Default
%ProgramData%\ssh\sshd_config, which contains:Match Group administrators AuthorizedKeysFile __PROGRAMDATA__/ssh/administrators_authorized_keys - Run
sshd.exe10.0.0.0p2 as SYSTEM (as the service does). For the logs below:sshd.exe -ddd -p 2223 -E log.txtfrom a SYSTEM scheduled task. - Put the user's public key in
C:\Users\<user>\.ssh\authorized_keys. ssh -p 2223 -l 'azuread\<user>' <host>
Expected behavior
The Match Group administrators block applies to an administrator, so their keys are looked up only in administrators_authorized_keys, as documented in OpenSSH key management. If group membership can't be determined, sshd should say so clearly rather than silently treating the user as a non-administrator.
Actual behavior
sshd can't create an S4U token for the Entra ID user (see #1787), so since #744 ga_init() reports the user as being in no groups. The Match Group administrators block is skipped for an Entra ID administrator, and the key is read from the per-user authorized_keys:
checking match for 'Group administrators' user azuread\\<user> host <client> ... lport 2223 on line 87
lookup_principal_name: User principal name lookup failed for user 'azuread\\<user>' (explicit: 1355, implicit: 1355)
debug1: generate_s4u_user_token: LsaLogonUser() failed. User 'azuread\\<user>' Status: 0xC0000062 SubStatus 0.
get_user_token - unable to generate token on 2nd attempt for user azuread\\<user>
ga_init, unable to resolve user azuread\\<user>
debug1: Can't Match group because user azuread\\<user> not in any group at line 87
debug3: match not found on line 87
Accepted key ED25519 SHA256:... found at C:/Users/<user>/.ssh/authorized_keys:1
Accepted publickey for azuread\\<user> from <client> port ... ssh2: ED25519 SHA256:...
(The session then fails with fork of unprivileged child failed, the S4U limitation tracked in #1787.)
Any other Match Group block an admin relies on (e.g. ForceCommand, ChrootDirectory, AllowTcpForwarding) is silently skipped for Entra ID users in the same way, because their membership always reads as "no groups".
Suggestion: when the token can't be generated, resolve membership another way (e.g. the account SID against the local group, including Entra role SIDs nested in Administrators), or at least log a warning that Match Group rules could not be evaluated for that user.
Environment data
Windows 11 Pro 25H2, build 10.0.26200, Entra ID–joined (AzureAdJoined: YES, DomainJoined: NO)
Windows PowerShell 5.1.26100
Version
OpenSSH_for_Windows_10.0p2 Win32-OpenSSH-GitHub, LibreSSL 4.2.0 (GitHub release 10.0.0.0p2-Preview, zip, run as SYSTEM)
Inbox OpenSSH_for_Windows_9.5 (sshd.exe 9.5.6.2) on the same machine fails earlier: ga_init() still calls fatal() there (pre-#744).
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 8.3k
- Fork
- 821
- Merge trung bình
- 12 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không 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 PowerShell/Win32-OpenSSH
-
Area-ssh-agent Issue-Upstream Parity
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
PowerShell/Win32-OpenSSH#2458 · 1 reaction ·
-
SSHD service not availableĐang mởArea-sshd Issue-Bug More info needed Waiting on Author
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
PowerShell/Win32-OpenSSH#2469 · 1 bình luận · 1 reaction ·
-
0 - Backlog Area-sshd Area-Terminal Investigate Issue-Bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
PowerShell/Win32-OpenSSH#2468 · 4 bình luận · 1 reaction ·
-
Area-sshd Area-Terminal Investigate Issue-Regression
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
PowerShell/Win32-OpenSSH#2465 · 1 bình luận · 1 reaction ·
-
Area-ssh-agent Issue-Enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
PowerShell/Win32-OpenSSH#2462 · 1 bình luận · 1 reaction ·
Tất cả issue của PowerShell/Win32-OpenSSH
Issue tương tự
-
bug github_actions security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
DewaldOosthuizen/tech-cheat-sheets-and-notes#388 ·
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 68/100
anthropics/anthropic-sdk-typescript#1273 ·
Maintainer thường phản hồi trong vòng 10 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
CopilotKit/OpenBot#815 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
priority: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
melodic-software/claude-code-plugins#8831 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Deleting an MCP proxy leaves its API keys in the gateway's memory and in the policy engineĐang mởAspect/API Aspect/Other Severity/Minor Type/Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
wso2/api-platform#3852 ·
Maintainer thường phản hồi trong vòng 1 ngày