Debian Codegraph @

releasenotes/notes/multihash-download-verification-596e91bf7b68e7db.yaml

raw symbols SCIP
1 ---
2 features:
3 - |
4 This release adds verification of image data downloads using the Glance
5 "multihash" feature introduced in the OpenStack Rocky release. When
6 the ``os_hash_value`` is populated on an image, the glanceclient will
7 verify this value by computing the hexdigest of the downloaded data
8 using the algorithm specified by the image's ``os_hash_algo`` property.
9
10 Because the secure hash algorithm specified is determined by the cloud
11 provider, it is possible that the ``os_hash_algo`` may identify an
12 algorithm not available in the version of the Python ``hashlib`` library
13 used by the client. In such a case the download will fail due to an
14 unsupported hash type. In the event this occurs, a new option,
15 ``--allow-md5-fallback``, is introduced to the ``image-download`` command.
16 When present, this option will allow the glanceclient to use the legacy
17 MD5 checksum to verify the downloaded data if the secure hash algorithm
18 specified by the ``os_hash_algo`` image property is not supported.
19
20 Note that the fallback is *not* used in the case where the algorithm is
21 supported but the hexdigest of the downloaded data does not match the
22 ``os_hash_value``. In that case the download fails regardless of whether
23 the option is present or not.
24
25 Whether using the ``--allow-md5-fallback`` option is a good idea depends
26 upon the user's expectations for the verification. MD5 is an insecure
27 hashing algorithm, so if you are interested in making sure that the
28 downloaded image data has not been replaced by a datastream carefully
29 crafted to have the same MD5 checksum, then you should not use the
30 fallback. If, however, you are using Glance in a trusted environment
31 and your interest is simply to verify that no bits have flipped during
32 the data transfer, the MD5 fallback is sufficient for that purpose. That
33 being said, it is our recommendation that the multihash should be used
34 whenever possible.
35 security:
36 - |
37 This release of the glanceclient uses the Glance "multihash" feature,
38 introduced in Rocky, to use a secure hashing algorithm to verify the
39 integrity of downloaded data. Legacy images without the "multihash"
40 image properties (``os_hash_algo`` and ``os_hash_value``) are verified
41 using the MD5 ``checksum`` image property.