-
Notifications
You must be signed in to change notification settings - Fork 22
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
Closes #138 IOS-XE certificate validation #139
base: main
Are you sure you want to change the base?
Conversation
I guess the pipeline fails, because Python 3.8 is EoL The runners don't support Python 3.8
Should the file |
@@ -96,6 +96,7 @@ def connect(self, | |||
log.debug("Timeout: %s" % timeout) | |||
self.content_type = default_content_type | |||
|
|||
self.verify = self.connection_info.get('verify', True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this default to False?
self.verify = self.connection_info.get('verify', True) | |
self.verify = self.connection_info.get('verify', False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As of today, it defaults to True
for the get
requests (as no verify
parameter is passed there).
Furthermore, I guess a good security practice is, to enable SSL/TLS certificate validation by default and only disable it, if there are specific reasons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't argue, even if test tools often interact with lab devices where certificate discipline is often, err, sloppy..
but in the PR description you mentioned
verify: False # <-- Disable certificate validation (default)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry @oboehmer .. my bad. I updated the PR description above
Added the option to control certificate validation, to the device connection as:
This setting is applied to the
requests.session
object once, which is applied to all following operations like GET, POST etc.