<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/openstack/python-glanceclient.git/glanceclient/tests/unit/test_ssl.py, branch 3.3.0</title>
<subtitle>opendev.org: openstack/python-glanceclient.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-glanceclient.git/'/>
<entry>
<title>Do not use the six library in the tests.</title>
<updated>2020-06-15T19:04:56+00:00</updated>
<author>
<name>Cyril Roelandt</name>
<email>cyril@redhat.com</email>
</author>
<published>2020-06-15T18:58:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-glanceclient.git/commit/?id=928935e5c0b8b43827fdf08b212d59d92b660924'/>
<id>928935e5c0b8b43827fdf08b212d59d92b660924</id>
<content type='text'>
Change-Id: Ic8a2a736a733e0151ca82f19bfde428dc04cf255
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Ic8a2a736a733e0151ca82f19bfde428dc04cf255
</pre>
</div>
</content>
</entry>
<entry>
<title>Use unittest.mock instead of third party mock</title>
<updated>2020-04-18T16:58:08+00:00</updated>
<author>
<name>Sean McGinnis</name>
<email>sean.mcginnis@gmail.com</email>
</author>
<published>2020-04-18T16:58:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-glanceclient.git/commit/?id=6a045884cb090bbc1daf1af853a243452a7aab16'/>
<id>6a045884cb090bbc1daf1af853a243452a7aab16</id>
<content type='text'>
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: I446ee142c7a17446372c910f7f2a36d55df18e04
Signed-off-by: Sean McGinnis &lt;sean.mcginnis@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: I446ee142c7a17446372c910f7f2a36d55df18e04
Signed-off-by: Sean McGinnis &lt;sean.mcginnis@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>allow unhandled exceptions to cause test errors</title>
<updated>2017-06-26T14:59:29+00:00</updated>
<author>
<name>Doug Hellmann</name>
<email>doug@doughellmann.com</email>
</author>
<published>2017-06-26T14:57:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-glanceclient.git/commit/?id=c8a7a5d56de30cb596d21553f5dbf7ea3db866d8'/>
<id>c8a7a5d56de30cb596d21553f5dbf7ea3db866d8</id>
<content type='text'>
Hiding the unhandled exception in the test with a failure makes it
harder to debug the problem. Let them pass unhandled so the test reports
an ERROR instead of FAILURE.

Change-Id: I4e435a6d276fdf161dac28f08c2c7efedd1d6385
Signed-off-by: Doug Hellmann &lt;doug@doughellmann.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Hiding the unhandled exception in the test with a failure makes it
harder to debug the problem. Let them pass unhandled so the test reports
an ERROR instead of FAILURE.

Change-Id: I4e435a6d276fdf161dac28f08c2c7efedd1d6385
Signed-off-by: Doug Hellmann &lt;doug@doughellmann.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert IOError from requests</title>
<updated>2017-05-19T18:59:58+00:00</updated>
<author>
<name>Eric Fried</name>
<email>efried@us.ibm.com</email>
</author>
<published>2017-05-19T18:53:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-glanceclient.git/commit/?id=7df87fd4a26ebee3899fbc42d21757bf880a10d4'/>
<id>7df87fd4a26ebee3899fbc42d21757bf880a10d4</id>
<content type='text'>
This requests commit [1] changed the behavior when a nonexistent cacert
file is passed in: now it raises IOError.  This is getting through
glanceclient.common.http.HTTPClient._request, which used to raise
CommunicationError in this scenario.

Even though there is arguably a better exception than CommunicationError
to represent this condition (like maybe IOError), for backward
compatibility this change set converts IOError to CommunicationError.

We also improve the unit test to raise the original exception if the
expected conditions aren't met; this improves debugability.

[1] https://github.com/kennethreitz/requests/commit/7d8b87c37f3a5fb993fd83eda6888ac217cd108e

Change-Id: I6a2cf4c6d041b67d3509153b4cef18b459263648
Closes-Bug: #1692085
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This requests commit [1] changed the behavior when a nonexistent cacert
file is passed in: now it raises IOError.  This is getting through
glanceclient.common.http.HTTPClient._request, which used to raise
CommunicationError in this scenario.

Even though there is arguably a better exception than CommunicationError
to represent this condition (like maybe IOError), for backward
compatibility this change set converts IOError to CommunicationError.

We also improve the unit test to raise the original exception if the
expected conditions aren't met; this improves debugability.

[1] https://github.com/kennethreitz/requests/commit/7d8b87c37f3a5fb993fd83eda6888ac217cd108e

Change-Id: I6a2cf4c6d041b67d3509153b4cef18b459263648
Closes-Bug: #1692085
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed TestHTTPSVerifyCert failure messages</title>
<updated>2016-01-15T10:21:36+00:00</updated>
<author>
<name>David Sariel</name>
<email>dsariel@redhat.com</email>
</author>
<published>2016-01-15T09:56:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-glanceclient.git/commit/?id=f2eab45c33aa6838c6b2928573cc969bc55f0927'/>
<id>f2eab45c33aa6838c6b2928573cc969bc55f0927</id>
<content type='text'>
Due to the change in python versions greater then 2.7.8, messages
that SSL certificate handling module is producing are different
from the error messages produced in earlier versions of py27.

Fixed how the following test cases of TestHTTPSVerifyCert class
are handling erroneous SSL certification messages:

- test_v2_requests_valid_cert_no_key
- test_v2_requests_bad_cert
- test_v2_requests_bad_ca

Closes-Bug:1499355
Change-Id: I3b939292ba0042bced5cc91a26e2593450f9cafe
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Due to the change in python versions greater then 2.7.8, messages
that SSL certificate handling module is producing are different
from the error messages produced in earlier versions of py27.

Fixed how the following test cases of TestHTTPSVerifyCert class
are handling erroneous SSL certification messages:

- test_v2_requests_valid_cert_no_key
- test_v2_requests_bad_cert
- test_v2_requests_bad_ca

Closes-Bug:1499355
Change-Id: I3b939292ba0042bced5cc91a26e2593450f9cafe
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove custom SSL compression handling</title>
<updated>2015-08-26T12:26:21+00:00</updated>
<author>
<name>Stuart McLaren</name>
<email>stuart.mclaren@hp.com</email>
</author>
<published>2015-06-08T14:49:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-glanceclient.git/commit/?id=618637a5bd545d8271d9349b08a8e4ab2841d086'/>
<id>618637a5bd545d8271d9349b08a8e4ab2841d086</id>
<content type='text'>
Custom SSL handling was introduced because disabling SSL layer compression
provided an approximately five fold performance increase in some
cases. Without SSL layer compression disabled the image transfer would be
CPU bound -- with the CPU performing the DEFLATE algorithm.  This would
typically limit image transfers to &lt; 20 MB/s. When --no-ssl-compression
was specified the client would not negotiate any compression algorithm
during the SSL handshake with the server which would remove the CPU
bottleneck and transfers could approach wire speed.

In order to support '--no-ssl-compression' two totally separate code
paths exist depending on whether this is True or False.  When SSL
compression is disabled, rather than using the standard 'requests'
library, we enter some custom code based on pyopenssl and httplib in
order to disable compression.

This patch/spec proposes removing the custom code because:

* It is a burden to maintain

 Eg adding new code such as keystone session support is more complicated

* It can introduce additional failure modes

 We have seen some bugs related to the 'custom' certificate checking

* Newer Operating Systems disable SSL for us.

 Eg. While Debian 7 defaulted to compression 'on', Debian 8 has compression
 'off'. This makes both servers and client less likely to have compression
 enabled.

* Newer combinations of 'requests' and 'python' do this for us

 Requests disables compression when backed by a version of python which
 supports it (&gt;= 2.7.9). This makes clients more likely to disable
 compression out-of-the-box.

* It is (in principle) possible to do this on older versions too

 If pyopenssl, ndg-httpsclient and pyasn1 are installed on older
 operating system/python combinations, the requests library should
 disable SSL compression on the client side.

* Systems that have SSL compression enabled may be vulnerable to the CRIME
(https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-4929) attack.
Installations which are security conscious should be running the Glance
server with SSL disabled.

Full Spec: https://review.openstack.org/#/c/187674
Blueprint: remove-custom-client-ssl-handling

Change-Id: I7e7761fc91b0d6da03939374eeedd809534f6edf
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Custom SSL handling was introduced because disabling SSL layer compression
provided an approximately five fold performance increase in some
cases. Without SSL layer compression disabled the image transfer would be
CPU bound -- with the CPU performing the DEFLATE algorithm.  This would
typically limit image transfers to &lt; 20 MB/s. When --no-ssl-compression
was specified the client would not negotiate any compression algorithm
during the SSL handshake with the server which would remove the CPU
bottleneck and transfers could approach wire speed.

In order to support '--no-ssl-compression' two totally separate code
paths exist depending on whether this is True or False.  When SSL
compression is disabled, rather than using the standard 'requests'
library, we enter some custom code based on pyopenssl and httplib in
order to disable compression.

This patch/spec proposes removing the custom code because:

* It is a burden to maintain

 Eg adding new code such as keystone session support is more complicated

* It can introduce additional failure modes

 We have seen some bugs related to the 'custom' certificate checking

* Newer Operating Systems disable SSL for us.

 Eg. While Debian 7 defaulted to compression 'on', Debian 8 has compression
 'off'. This makes both servers and client less likely to have compression
 enabled.

* Newer combinations of 'requests' and 'python' do this for us

 Requests disables compression when backed by a version of python which
 supports it (&gt;= 2.7.9). This makes clients more likely to disable
 compression out-of-the-box.

* It is (in principle) possible to do this on older versions too

 If pyopenssl, ndg-httpsclient and pyasn1 are installed on older
 operating system/python combinations, the requests library should
 disable SSL compression on the client side.

* Systems that have SSL compression enabled may be vulnerable to the CRIME
(https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-4929) attack.
Installations which are security conscious should be running the Glance
server with SSL disabled.

Full Spec: https://review.openstack.org/#/c/187674
Blueprint: remove-custom-client-ssl-handling

Change-Id: I7e7761fc91b0d6da03939374eeedd809534f6edf
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge "Fix failure to create glance https connection pool"</title>
<updated>2015-07-29T20:39:37+00:00</updated>
<author>
<name>Jenkins</name>
<email>jenkins@review.openstack.org</email>
</author>
<published>2015-07-29T20:39:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-glanceclient.git/commit/?id=471276568908e237083c848222d3101e7b64908e'/>
<id>471276568908e237083c848222d3101e7b64908e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix failure to create glance https connection pool</title>
<updated>2015-07-28T15:53:09+00:00</updated>
<author>
<name>Haikel Guemar</name>
<email>hguemar@fedoraproject.org</email>
</author>
<published>2015-07-22T09:41:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-glanceclient.git/commit/?id=c41dcc9f4366429d952cc47853496d58d47b7511'/>
<id>c41dcc9f4366429d952cc47853496d58d47b7511</id>
<content type='text'>
Due to a typo in an attribute named, an Attribute error is raised
causing failure in connection to glance through HTTPS

Urllib3 PoolManager class has a connection_pool_kw attribute
but not connection_kw

Closes-Bug: #1479020
Change-Id: Id4d6a5bdcf971d09e80043fd2ab399e208fd931c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Due to a typo in an attribute named, an Attribute error is raised
causing failure in connection to glance through HTTPS

Urllib3 PoolManager class has a connection_pool_kw attribute
but not connection_kw

Closes-Bug: #1479020
Change-Id: Id4d6a5bdcf971d09e80043fd2ab399e208fd931c
</pre>
</div>
</content>
</entry>
<entry>
<title>Enable flake8 checks</title>
<updated>2015-07-21T14:08:27+00:00</updated>
<author>
<name>Darja Shakhray</name>
<email>dshakhray@mirantis.com</email>
</author>
<published>2015-07-20T14:29:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-glanceclient.git/commit/?id=ec0f2dfd8500d230895e286462aaf69c43777038'/>
<id>ec0f2dfd8500d230895e286462aaf69c43777038</id>
<content type='text'>
This commit enables new flake8 checks:
* E265  block comment should start with '# '
* H405  multi line docstring summary not separated with an empty line
* E123  closing bracket does not match indentation of opening bracket's line
* H238  old style class declaration, use new style (inherit from `object`)
* E128  continuation line under-indented for visual indent
and makes related changes in the code.

Change-Id: Ie993afc930f6b74d7a990bcaa9fc0e9f5ba1585c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit enables new flake8 checks:
* E265  block comment should start with '# '
* H405  multi line docstring summary not separated with an empty line
* E123  closing bracket does not match indentation of opening bracket's line
* H238  old style class declaration, use new style (inherit from `object`)
* E128  continuation line under-indented for visual indent
and makes related changes in the code.

Change-Id: Ie993afc930f6b74d7a990bcaa9fc0e9f5ba1585c
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix an issue with broken test on ci</title>
<updated>2015-07-13T14:54:41+00:00</updated>
<author>
<name>Mike Fedosin</name>
<email>mfedosin@mirantis.com</email>
</author>
<published>2015-07-07T11:46:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-glanceclient.git/commit/?id=e240bddd5accce0335256e3ccac424c52b829882'/>
<id>e240bddd5accce0335256e3ccac424c52b829882</id>
<content type='text'>
Several tests with cert verification are broken. This
code fixes it by setting right imports. Also some typos
are fixed too.

Change-Id: Ie014f90714c3dabee65459fd704dd11b1770c7de
Closed-Bug: #1472234
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Several tests with cert verification are broken. This
code fixes it by setting right imports. Also some typos
are fixed too.

Change-Id: Ie014f90714c3dabee65459fd704dd11b1770c7de
Closed-Bug: #1472234
</pre>
</div>
</content>
</entry>
</feed>
