Skip to content

[flare] Add regex for auth tokens#3418

Merged
zippolyte merged 3 commits intomasterfrom
hippo/flare_sanitize_token
Jul 10, 2017
Merged

[flare] Add regex for auth tokens#3418
zippolyte merged 3 commits intomasterfrom
hippo/flare_sanitize_token

Conversation

@zippolyte
Copy link
Copy Markdown
Contributor

@zippolyte zippolyte commented Jul 6, 2017

Note: Please remember to review the Datadog Contribution Guidelines
if you have not yet done so.

What does this PR do?

  • Add regex for auth tokens
  • Use re.search() instead of re.match(). re.match() only matches at the beginning of the line.
    That would prevent the replacement of password or token if it was the first option of an instance (i.e. there would be a dash - before the parameter). Noticed this while writing the tests.

Motivation

Added functionality to auth via token in the consul check: DataDog/integrations-core#521
Need to sanitize config file

Testing Guidelines

An overview on testing
is available in our contribution guidelines.

Additional Notes

Anything else we should know when reviewing?

@zippolyte zippolyte force-pushed the hippo/flare_sanitize_token branch from 3c570c4 to 57cb2bf Compare July 6, 2017 19:02
@hush-hush hush-hush added this to the 5.16 milestone Jul 10, 2017
@olivielpeau olivielpeau self-requested a review July 10, 2017 15:16
@olivielpeau olivielpeau self-assigned this Jul 10, 2017
@zippolyte zippolyte modified the milestones: 5.15, 5.16 Jul 10, 2017
@zippolyte zippolyte merged commit 35acbaf into master Jul 10, 2017
@zippolyte zippolyte deleted the hippo/flare_sanitize_token branch July 10, 2017 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants