IBMStreams / streamsx.utility

(Incubation) Contains utilities for IBM Streams
Other
1 stars 15 forks source link

Do not disable insecure requests warnings by default. #24

Closed ddebrunner closed 7 years ago

ddebrunner commented 7 years ago

https://github.com/IBMStreams/streamsx.utility/blob/master/python/packages/streamsx/rest.py#L13

Should be up to the app using a generic library if it wants to disable warnings or not.

ibmkendrick commented 7 years ago

I'll work on this one.

ibmkendrick commented 7 years ago

By default, Requests verifies SSL certificates for HTTPS requests (i.e. verify=True). I propose to modify StreamsConnection to accept kwargs, so user can customize the Requests session object. For example, session object can be configured with these parameters:

Assuming we want verify=True as the default Requests behaviour, then this would cause communication with a local sws service to fail, unless user explicitly specify verify=False when:

However, this modification may break some existing application. @ddebrunner , @wmarshall484 , any thoughts?

ibmkendrick commented 7 years ago

If user wants to bypass SSL verification, then:

  1. create a StreamsConnection object, specifying verify=False
  2. add it to config[ConfigPararms.STREAMS_CONNECTION]
ibmkendrick commented 7 years ago

Going to wait for the REST APIs to merge with streamsx.topology before delivering the fix, as the fix will requires changes in both modules.

ddebrunner commented 7 years ago

Replaced by:

https://github.com/IBMStreams/streamsx.topology/issues/857