chocolatey / chocolatey/choco

Support for alternate credentials in Start-ChocolateyProcessAsAdmin

Open
#2,296 3 comments 0 reactions 0 assignees View on GitHub
0 - Triaging
Dominant language
C#
Stars
11.5k
Forks
960
PR merge metrics
No merged PRs in 30d

Description

**What you are Seeing?**
Certain custom installers will perform operations/requests to other applications across the network. For example, and application that inside of it's setup.exe, want's to confirm access to a relational database.
In some scenarios, choco is being called or executed via software orchestration tool like Puppet / Octopus Deploy / other.
Their service might be a virtual a/c (NT Service\serviceName) or a system a/c (Local Service).
Those a/c's won't have access to the network resource.

**Desired Functionality**
Because the Start-ChocolateyProcessAsAdmin.ps1 is in the background spawning a [System.Diagnostics.Process], that supports providing alternate user credentials to spawn the process as. Now, of course there's ensuring that the service a/c has the privileges to impersonate a user, and also run in a non-interactive session that will require some work with Win32API's.
However, this is quite often a requirement for packages that organizations build for distributing some of their enterprise software.

Contributor guide

Open the contributing guide

Research direction

Start with Start-ChocolateyProcessAsAdmin.ps1 and its use of System.Diagnostics.Process. Investigate the stated Win32 API requirements for alternate credentials, impersonation privileges, and non-interactive sessions; done means service accounts can launch custom installers with alternate credentials for network access.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
cli, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.