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

Add SSL Support to InfluxDB Connection #45

Merged
merged 2 commits into from
Jul 30, 2024

Conversation

pradippatil
Copy link
Contributor

@pradippatil pradippatil commented Jul 17, 2024

This pull request adds support for secure SSL connections to InfluxDB. With SSL, data transmitted to InfluxDB will be encrypted, enhancing security and protecting metrics and data in transit.

This change will unblock users who need to connect to SSL-enabled InfluxDB instances, which currently fail with an error similar to the one mentioned below:

 InsecureRequestWarning: Unverified HTTPS request is being made to host. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
---------------------------------------------------------------------------
InfluxDBClientError                       Traceback (most recent call last)

...
...

File [~/Documents/code/scripts/.venv/lib/python3.11/site-packages/influxdb/client.py:413]
in InfluxDBClient.write(self, data, params, expected_response_code, protocol)
    410         data = [data]
    411     data = ('\n'.join(data) + '\n').encode('utf-8')
--> 413 self.request(
    414     url="write",
    415     method='POST',
    416     params=params,
    417     data=data,
    418     expected_response_code=expected_response_code,
    419     headers=headers
    420 )
    421 return True

File [~/Documents/code/scripts/.venv/lib/python3.11/site-packages/influxdb/client.py:378]
in InfluxDBClient.request(self, url, method, params, data, stream, expected_response_code, headers)
    376 else:
    377     err_msg = reformat_error(response)
--> 378     raise InfluxDBClientError(err_msg, response.status_code)

InfluxDBClientError: 405: Method Not Allowed

@pradippatil pradippatil marked this pull request as ready for review July 17, 2024 19:40
README.md Show resolved Hide resolved
Copy link
Collaborator

@skezell skezell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move the default value to the attribute definition in gh_configuration.py.

@pradippatil pradippatil requested a review from skezell July 22, 2024 19:48
Copy link
Collaborator

@skezell skezell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

README.md Show resolved Hide resolved
Copy link
Collaborator

@jmfiola jmfiola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the contribution!!

@pradippatil
Copy link
Contributor Author

Curious as to why no checks were run on this PR?

@sistratton sistratton merged commit 457d03b into alteryx:main Jul 30, 2024
@jmfiola
Copy link
Collaborator

jmfiola commented Jul 30, 2024

Curious as to why no checks were run on this PR?

Hmm, great catch, not sure, but it does look like after merging, the ruff lint step failed.

I will look into this today!

EDIT: fixed in #48

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.

4 participants