Skip to content

Suppress insecure request warnings when setting skip_tls to True #319

Closed
@Bobbins228

Description

@Bobbins228

WHY

Why is this change being made?
Currently when someone logs in with skip_tls=True you will receive a warning like this

warnings.warn(
/opt/app-root/lib64/python3.8/site-packages/urllib3/connectionpool.py:1045: InsecureRequestWarning: Unverified HTTPS request is being made to host <HOST>. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings

This is fine you should be warned at least once but every other action such as cluster.up() will produce this warning.
Running cluster.wait_ready() will result in your console output being flooded with this warning while waiting for the cluster to be ready.

WHAT

What is being asked for?
We should only allow this warning to show upon logging in.

HOW

Suggestions for how this may be solved. [Optional]
We can pass urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) just before the successful login message

TESTS

List of related tests

DONE

Bullet point items for what should be completed

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions