-
Notifications
You must be signed in to change notification settings - Fork 260
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
Allow users to set a custom user/password to run the Windows Datadog Agent service. #618
Conversation
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.
minor change (but the \
is important). Feel free to merge after.
Allow users to set a custom user/password to run the Windows Datadog Agent service.
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.
A couple of comments/questions :)
# a specific user instead of LOCAL_SYSTEM, check whether the user has provided | ||
# custom credentials and use them if that's the case. | ||
install_options.concat(' DDAGENTUSER_NAME=').concat(Chef::Datadog.ddagentuser_name(node)) if Chef::Datadog.ddagentuser_name(node) | ||
install_options.concat(' DDAGENTUSER_PASSWORD=').concat(Chef::Datadog.ddagentuser_password(node)) if Chef::Datadog.ddagentuser_password(node) |
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.
is there a chance that there are special characters in the name or password that may need to be escaped/quoted when passed through the command line?
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've tested a password with some '"[](){}!-=/\#~.
so I think we're fine.
Let the user of the cookbook provide custom credentials for the Datadog Agent service. It only makes sense for Agents >=
6.11.0
(the feature appeared in the Agent in6.11.0
).Note that this PR targets
v2.x
and will later be cherry-picked inmaster
for 3.x versions