-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add optional argument for overriding get_tls_context() parameters #8275
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ofek
reviewed
Dec 30, 2020
FlorianVeaux
reviewed
Jan 4, 2021
4 tasks
yzhan289
commented
Jan 5, 2021
FlorianVeaux
reviewed
Jan 6, 2021
FlorianVeaux
reviewed
Jan 7, 2021
FlorianVeaux
approved these changes
Jan 7, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR adds the option for
get_tls_context()
to add anoverrides
argument to set config values.This is intended to be compatible with integrations that hardcode the values of SSL context config values in their checks.
Note that the
overrides
argument takes precedent over reading the values for the respective config value.This change can affect
http_check
: https://github.com/DataDog/integrations-core/blob/master/http_check/datadog_checks/http_check/http_check.py#L309-L311proxysql
: https://github.com/DataDog/integrations-core/blob/master/proxysql/datadog_checks/proxysql/ssl_utils.py#L17.This can also be applied to recently updated SSL context checks, such as
tls
: https://github.com/DataDog/integrations-core/pull/8230/files#r550231989vertica
: https://github.com/DataDog/integrations-core/pull/8228/files#r550234204.Motivation
Some older integrations specifically set values for their SSL context without reading the config values. However the
get_tls_context()
function abstracts the creation of the SSL context away without allowing the check to manually set config values that should stay the same. This could affect the intended functionality of the check while lacking visibility.Additional Notes
SSL context and TLS context in my other PRs are referring to the same things.
Review checklist (to be filled by reviewers)
changelog/
andintegration/
labels attached