Client returns a decode error when secret cannot be formatted correctly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-barbicanclient |
In Progress
|
Undecided
|
Christopher Solis |
Bug Description
In addition to original description (below), the same decode error can occur for built-in secret types, like symmetric keys.
openstack secret get -p --payload_
'utf8' codec can't decode byte 0x9f in position 0: invalid start byte
The client should have enough information that the secret payload (in this case) is a 256 bit binary value, and not try to utf-8 decode it.
<original description below>
Storing a secret using base64 seems to work fine:
barbican secret store -p '1111222233334444' --payload-
However, retrieving the secret payload fails.
barbican secret get -p http://
Starting new HTTP connection (1): localhost
Starting new HTTP connection (1): localhost
'utf8' codec can't decode byte 0xd7 in position 0: invalid continuation byte
It looks like the client is trying to use the utf8 character set even though it was not stored in as text/plain content.
description: | updated |
description: | updated |
Changed in python-barbicanclient: | |
assignee: | nobody → Laurent Luce (laurentluce49) |
Changed in python-barbicanclient: | |
assignee: | Laurent Luce (laurentluce49) → nobody |
Changed in python-barbicanclient: | |
assignee: | nobody → Christopher Solis (cnsolis) |
Changed in python-barbicanclient: | |
status: | New → In Progress |
summary: |
- Unable to return secret payload with content type application/octet- - stream + Get secret for symmetric secrets returns decode error |
description: | updated |
Changed in python-barbicanclient: | |
status: | In Progress → New |
status: | New → In Progress |
summary: |
- Get secret for symmetric secrets returns decode error + Client returns a decode error when secret cannot be formatted correctly |
After investigation the root of this bug is the same as bug 1419166.
I think it's time to deprecate manually setting the content_type and content_encoding parameters. The documentation has it marked as deprecated but it is still possible through the cli and the client to use the parameters.