Where doeas secret_dto.secret come from?
barbican/plugin/resources.py ---------------------------- from barbican.plugin.util import translations as tr
def store_secret(unencrypted_raw, content_type_raw, content_encoding, secret_model, project_model, transport_key_needed=False, transport_key_id=None): ... unencrypted, content_type = tr.normalize_before_encryption( unencrypted_raw, content_type_raw, content_encoding, secret_model.secret_type, enforce_text_only=True) ... secret_dto = secret_store.SecretDTO(type=secret_model.secret_type, secret=unencrypted, key_spec=key_spec, content_type=content_type, transport_key=transport_key)
so secret_dto.secret = unencrypted which is set in tr.normalize_before_encryption
barbican/plugin/util/translations.py ------------------------------------ normalize_before_encryption is defined here:
https://github.com/openstack/barbican/blob/7.0.0/barbican/plugin/util/translations.py#L25
It returns:
return b64payload, normalized_media_type
It seems that b64payload may not be correctly getting encoded for py3.
Where doeas secret_dto.secret come from?
barbican/ plugin/ resources. py ------- ------- ------- plugin. util import translations as tr
-------
from barbican.
def store_secret( unencrypted_ raw, content_type_raw, content_encoding,
secret_ model, project_model,
transport_ key_needed= False,
transport_ key_id= None): before_ encryption( ed_raw, content_type_raw, content_encoding, model.secret_ type, enforce_ text_only= True) store.SecretDTO (type=secret_ model.secret_ type,
secret= unencrypted,
key_ spec=key_ spec,
content_ type=content_ type,
transport_ key=transport_ key)
...
unencrypted, content_type = tr.normalize_
unencrypt
secret_
...
secret_dto = secret_
so secret_dto.secret = unencrypted which is set in tr.normalize_ before_ encryption
barbican/ plugin/ util/translatio ns.py ------- ------- ------- ------- - before_ encryption is defined here:
-------
normalize_
https:/ /github. com/openstack/ barbican/ blob/7. 0.0/barbican/ plugin/ util/translatio ns.py#L25
It returns:
return b64payload, normalized_ media_type
It seems that b64payload may not be correctly getting encoded for py3.