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

Use SSL authentication if SSL params are provided #8531

Merged
merged 7 commits into from
Feb 8, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions ibm_mq/datadog_checks/ibm_mq/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,17 @@ def __init__(self, instance):
self.tags_no_channel = tags
self.tags = tags + ["channel:{}".format(self.channel)] # type: List[str]

# SSL options
self.ssl = is_affirmative(instance.get('ssl_auth', False)) # type: bool
self.ssl_cipher_spec = instance.get('ssl_cipher_spec', 'TLS_RSA_WITH_AES_256_CBC_SHA') # type: str

self.ssl_key_repository_location = instance.get(
'ssl_key_repository_location', '/var/mqm/ssl-db/client/KeyringClient'
) # type: str

self.ssl_certificate_label = instance.get('ssl_certificate_label') # type: str
if not self.ssl and (
hithwen marked this conversation as resolved.
Show resolved Hide resolved
instance.get('ssl_cipher_spec') or instance.get('ssl_key_repository_location') or self.ssl_certificate_label
):
raise ConfigurationError("You have provided ssl connection options but ssl authentication is disabled")
hithwen marked this conversation as resolved.
Show resolved Hide resolved

self.mq_installation_dir = instance.get('mq_installation_dir', '/opt/mqm/')

Expand Down