-
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
Advertise Domainless gMSA capability on Windows #3668
Advertise Domainless gMSA capability on Windows #3668
Conversation
0dae86a
to
06c88f7
Compare
@@ -114,3 +141,42 @@ var IsWindows2016 = func() (bool, error) { | |||
|
|||
return isWS2016, nil | |||
} | |||
|
|||
var queryDomainlessGmsaPluginSubKeys = func() ([]string, error) { | |||
k, err := registry.OpenKey(registry.LOCAL_MACHINE, `SYSTEM\CurrentControlSet\Control\CCG\COMClasses\`, registry.READ) |
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.
We should make the registry keys as constants.
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.
Can I do this as a followup in a future cleanup PR? Sai is blocked on this work presently
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.
Yeah okay works for me
|
||
// This function queries all gmsa plugin subkeys to check whether the Amazon ECS Plugin GUID is present. | ||
func isDomainlessGmsaPluginInstalled() (bool, error) { | ||
subKeys, err := fnQueryDomainlessGmsaPluginSubKeys() |
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.
Should we also check for the presence of GMSA binary?
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.
I had asked Justin about this, and he had only wanted to check for the presence of registry key (which would imply plugin is installed)
Summary
This PR is advertises the new domainless gmsa capability on the Windows ECS agent. The Linux agent will be coming in a followup PR.
Implementation details
The Windows agent will advertise the gmsa capability only under the following 3 conditions
Testing
This change was unit tested as well as tested on a Windows EC2 instance and describe-container-instance was called to ensure that the capability was correctly advertised. It was also run on an old Windows EC2 instance to ensure the capability was not advertised.
New tests cover the changes: yes
Description for the changelog
Advertise gmsa domainless capability on Windows Agent
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.