You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/util/winutil
Aaron Klotz da078b4c09 util/winutil: add package for logging into Windows via Service-for-User (S4U)
This PR ties together pseudoconsoles, user profiles, s4u logons, and
process creation into what is (hopefully) a simple API for various
Tailscale services to obtain Windows access tokens without requiring
knowledge of any Windows passwords. It works both for domain-joined
machines (Kerberos) and non-domain-joined machines. The former case
is fairly straightforward as it is fully documented. OTOH, the latter
case is not documented, though it is fully defined in the C headers in
the Windows SDK. The documentation blanks were filled in by reading
the source code of Microsoft's Win32 port of OpenSSH.

We need to do a bit of acrobatics to make conpty work correctly while
creating a child process with an s4u token; see the doc comments above
startProcessInternal for details.

Updates #12383

Signed-off-by: Aaron Klotz <aaron@tailscale.com>
1 week ago
..
authenticode util/winutil/authenticode: add missing docs for CertSubjectError 11 months ago
conpty util/winutil: add conpty package and helper for building windows.StartupInfoEx 4 weeks ago
policy winutil: refactor methods to get values from registry to also return (#9536) 9 months ago
s4u util/winutil: add package for logging into Windows via Service-for-User (S4U) 1 week ago
testdata/testrestartableprocesses all: use Go 1.22 range-over-int 3 months ago
winenv util/winutil/winenv: add package for current Windows environment details 3 months ago
mksyscall.go util/winutil: update UserProfile to ensure any environment variables in the roaming profile path are expanded 3 weeks ago
restartmgr_windows.go util/winutil: add package for logging into Windows via Service-for-User (S4U) 1 week ago
restartmgr_windows_test.go all: use Go 1.22 range-over-int 3 months ago
startupinfo_windows.go util/winutil: add conpty package and helper for building windows.StartupInfoEx 4 weeks ago
subprocess_windows_test.go all: cleanup unused code, part 2 (#10670) 7 months ago
svcdiag_windows.go util/winutil: publicize existing functions for opening read-only connections to the Windows Service Control Manager 7 months ago
userprofile_windows.go util/winutil: update UserProfile to ensure any environment variables in the roaming profile path are expanded 3 weeks ago
winutil.go util/syspolicy: add ReadStringArray interface (#11857) 2 months ago
winutil_notwindows.go util/syspolicy: add ReadStringArray interface (#11857) 2 months ago
winutil_windows.go util/winutil: add AllocateContiguousBuffer and SetNTString helper funcs 4 weeks ago
winutil_windows_test.go util/winutil: add AllocateContiguousBuffer and SetNTString helper funcs 4 weeks ago
zsyscall_windows.go util/winutil: update UserProfile to ensure any environment variables in the roaming profile path are expanded 3 weeks ago