NTAccount/Sid Translation fails with RPC Endpoint Mapper Authentication policy enabled and IIS installed
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- docker, powershell
- Domain
- infrastructure, operating-systems
Research direction
Start by reproducing the failure with the Dockerfile commands, the gMSA container, and the PowerShell NTAccount-to-SID translation shown in the issue. Compare behavior with and without IIS installed while EnableAuthEpResolution is enabled; done means the Name-to-SID translation succeeds under the reported configuration.
Written by the indexing model from the issue text.
Description
Describe the bug
I am using a gMSA to authenticate a container to an Active Directory domain. When I hit this bug, the only thing that appears to fail is translating between Account Names and SIDs. Other authentication scenarios to domain resources appear to function. The error I receive is "The trust relationship between this workstation and the primary domain failed."
To Reproduce
Add these two lines to a Dockerfile. The issue only occurs when both the policy is set and IIS is installed. The issue does not occur if the policy is set but IIS is not installed.
RUN Install-WindowsFeature Web-Default-Doc,Web-Http-Errors,Web-Static-Content,Web-Http-Redirect,Web-Http-Logging,Web-Stat-Compression,Web-Filtering,Web-IP-Security,Web-Asp-Net45,Web-Windows-Auth
RUN New-Item 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Rpc' -Force; Set-ItemProperty 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Rpc' -Name 'EnableAuthEpResolution' -Type DWORD -Value 1 -Force
Run Windows container with gMSA. Then try to run a command like this within the container using powershell to lookup up the SID of a domain user/group.
$userString = "DOMAIN\Username"
$user = new-object System.Security.Principal.NTAccount($userString)
$sid = $user.Translate([System.Security.Principal.SecurityIdentifier])
$sid.Value
Expected behavior
The Name->Sid translation succeeds.
Configuration:
- Edition: Windows 11
- Base Image being used: mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2022
- Container engine: docker
- Container Engine version: 20.10.16
Additional context
We apply a script to our base container images that we also use with our Windows VMs that applies a large number of policies to follow CIS/STIG security baselines. After I ran into this issue, I was able to narrow down the policy that triggers the failure to this one: https://www.stigviewer.com/stig/windows_server_2012_member_server/2014-01-07/finding/V-14254
It is very strange though that the failure only happens when the policy is set and IIS is installed.
- Dominant language
- PowerShell
- Stars
- 551
- Forks
- 76
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/Windows-Containers
-
enhancement triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
microsoft/Windows-Containers#630 · 5 comments ·
-
bug triage
Difficulty 3/5 1-2 days Newbie friendliness 55/100
microsoft/Windows-Containers#648 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
microsoft/Windows-Containers#647 · 3 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
microsoft/Windows-Containers#646 · 2 comments · 1 reaction ·
-
bug triage
Difficulty 4/5 3-5 days Newbie friendliness 48/100
microsoft/Windows-Containers#645 · 4 comments ·
All issues in microsoft/Windows-Containers
Similar issues
-
kind/bug needs-triage
Difficulty 1/5 Under an hour Newbie friendliness 72/100
matrixorigin/matrixone#29223 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
bug ci-failure high priority
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
vllm-project/vllm-omni#7972 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
bug good first issue
Difficulty 1/5 Under an hour Newbie friendliness 88/100
amponce/archive-movie-browser#166 ·