Skip to content
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

Merged
merged 3 commits into from
May 21, 2019

Conversation

remeh
Copy link
Contributor

@remeh remeh commented May 20, 2019

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 in 6.11.0).

Note that this PR targets v2.x and will later be cherry-picked in master for 3.x versions

@remeh remeh added the feature label May 20, 2019
@remeh remeh added this to the 2.19.0 milestone May 20, 2019
Copy link

@derekwbrown derekwbrown left a 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.

attributes/default.rb Outdated Show resolved Hide resolved
@remeh remeh merged commit d88c688 into v2.x May 21, 2019
@remeh remeh deleted the remeh/ddagentuser branch May 21, 2019 09:29
remeh added a commit that referenced this pull request May 21, 2019
Allow users to set a custom user/password to run the Windows Datadog Agent service.
Copy link
Member

@olivielpeau olivielpeau left a 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)
Copy link
Member

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?

Copy link
Contributor Author

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.

attributes/default.rb Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants