Fix blake2b call when fips enabled
digest_size parameter isn't available for the openssl implementation of blake2b. The openssl blake2b implementation is being used in the telemetry fips job. The job is failing at the moment due to the gnocchi publisher using the digest_size parameter. The openssl version installed on centos 9s used for fips tests in CI doesn't consider blake2b secure, so usedforsecurity=False is required. Depends-On: https://review.opendev.org/c/openstack/telemetry-tempest-plugin/+/978293/4 Change-Id: I622aca82fb4b2ba4b736a35d3c0af47297d51888 Signed-off-by: Jaromir Wysoglad <jwysogla@redhat.com>
This commit is contained in:
@@ -544,7 +544,9 @@ class GnocchiPublisher(publisher.ConfigPublisherBase):
|
||||
def _hash_resource(resource):
|
||||
data = {k: v for k, v in resource.items() if k != 'metrics'}
|
||||
payload = json.dumps(data, sort_keys=True, separators=(',', ':'))
|
||||
return hashlib.blake2b(payload.encode(), digest_size=16).hexdigest()
|
||||
return hashlib.blake2b(
|
||||
payload.encode(), usedforsecurity=False
|
||||
).hexdigest()
|
||||
|
||||
def _resource_cache_diff(self, key, attribute_hash):
|
||||
cached_hash = self.cache.get(key)
|
||||
|
||||
Reference in New Issue
Block a user