fix: Removing overridden AWS_CONFIG_FILE path and base environment variabl… #247
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What was the problem/requirement? (What/Why)
AWS_CONFIG_FILE was overridden in vfs.py's launch environment to be the "default" config file rather than the session created config file which we want to provide the VFS.
We were passing through the base os.environ variables unnecessarily, potentially exposing things we don't intend to even though the VFS is a trusted process we own.
Using POpen with sudo requires the -E option to properly persist the environment variables we pass through to the launched process.
What was the solution? (How)
Removing overridden AWS_CONFIG_FILE and base environment variables.
Launch VFS with -E option when using sudo -u to run as job-user
What is the impact of this change?
VFS should properly pick up provided credentials through installed config file's credential_process setting.
How was this change tested?
New tests added, all unit tests pass. Reenabled BealineWorkerImageTesting tests, ran with new deadline-cloud, all tests pass.
Was this change documented?
No
Is this a breaking change?
No