-
Notifications
You must be signed in to change notification settings - Fork 619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inject domainless gmsa cred spec into Windows Container #3682
Inject domainless gmsa cred spec into Windows Container #3682
Conversation
1dd3c09
to
113ac0d
Compare
bc0f373
to
8d88030
Compare
8d88030
to
87e5301
Compare
agent/taskresource/credentialspec/credentialspec_windows_test.go
Outdated
Show resolved
Hide resolved
err := cs.handleSSMCredentialspecFile(ssmCredentialSpec, credentialSpecSSMARN, iamCredentials) | ||
assert.NoError(t, err) | ||
for _, tc := range testCases { | ||
t.Run(tc.name, func(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Not required in this PR] I think there is a lot of room to break down the credentialspec package into smaller units and test them individually. The package is juggling way too many responsibilities in its current state. The amount of set up in this test function is staggering.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will bring this up with WCT team and plan for a refactor
b628b25
to
404f9c3
Compare
1659233
to
cf402c1
Compare
Summary
This pull request injects the domainless gMSA cred spec into the Windows container runtime (docker). It also sets the plugin execution role credentials for the domainless gMSA plugin to use.
Implementation details
Domainless gMSA requires a pluginInput field in the credential spec to be populated. This change parses in the customer JSON, and modifies the pluginInput to point to the correct registry key that holds the task execution role credentials. It also sets the task execution role credentials to the aforementioned registry key.
Testing
These changes are unit tests and also manually tested by running a domainless task on a EC2 instance that is registered against gamma.
New tests cover the changes:
yes
Description for the changelog
Inject domainless gmsa cred spec into Windows Container
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.