aws-deadline / aws-deadline/deadline-cloud-worker-agent

Feature request: Create job user's local profile on win32

Open
#409 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
19
Forks
48
Avg merge
17h 48m
Merged PRs (30d)
19

Description

Use Case

If a user is running Windows with active directory and the user that jobs are run as is a domain user, then the local profile (e.g. %LOCALAPPDATA% directory) does not seem to exist for that user until the user has done an interactive logon. So, if a job that is run by the worker agent makes use of the user's local profile (e.g. putting fonts in %LOCALAPPDATA%) then that job will fail and the root cause is unlikely to be obvious.

Proposed Solution

There does seem to be a workaround, but it would be nice if users didn't have to employ the workaround.

In the worker agent, before creating the logon token (or when creating the openjd.sessions.SessionUser for a username/password combo outside of the service context) do a call to the Win32 CreateProfile API.

Alternative solution to investigate may involve loading the domain user's roaming profile in the LoadProfileW API call; that appears to require setting the lpProfilePath property of the lpProfileInfo structure.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the worker agent's session-user creation path, especially openjd.sessions.SessionUser handling for username/password credentials outside the service context. Compare the proposed CreateProfile API with the LoadProfileW alternative; done means a domain user's local profile exists before a worker job uses it, without requiring interactive logon.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.