Accept header application/octet-stream is not honored while getting Asymmetric secrets

Bug #1365187 reported by Arvind Tiwari
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Barbican
Expired
Undecided
Unassigned

Bug Description

1. Create Asymmetric key using order API.
2. Get individual keys from generate container.

Response is plain text PEM serialized format output, it has to honor the Accept type ("application/octet-stream").

Changed in barbican:
assignee: nobody → Arvind Tiwari (arvind-tiwari)
Changed in barbican:
milestone: none → kilo-1
Changed in barbican:
status: New → In Progress
Revision history for this message
Arvind Tiwari (arvind-tiwari) wrote :

Issue:
1. We are serializing the keys in PEM format and storing the PEM formatted keys after encryption with KEK.
2. We are getting PEM formatted keys back for get_secret keys . The unwrapping returns PEM formatted keys.

We can convert it to DER but if private keys is passwords protected. We need to have the password in hand. We don't have handle to password. In that case serialization from PEM to DER will fail. It will be good for non password protected keys.

Need to discuss this with team, how to solve this issue.

1. Let client do that conversion and we only support PEM formatted keys. No support for "application/octet-stream"
2. Store the DER (binary) after wrapping with KEK. Client has to provide the passwork to get the key in PEM serialized format.

description: updated
Revision history for this message
John Wood (john-wood-w) wrote :

Hello Arvind, I'm not convinced the keys should be retrieved in a binary format. Since they are PEM format, it seems that the content type should be text/plain. Maybe a feature could be added to allow for retrieving as binary, in which case PEM would converted to DER perhaps, but that is a feature.

So I'm thinking the immediate issue is to set the content type to text/plain and return the PEM data as such.

Does that make sense?

Thanks,
John

Revision history for this message
Arvind Tiwari (arvind-tiwari) wrote :

Lets talk in the summit. Is that OK?

Changed in barbican:
milestone: kilo-1 → none
Changed in barbican:
assignee: Arvind Tiwari (arvind-tiwari) → nobody
status: In Progress → New
Revision history for this message
John Vrbanac (john.vrbanac) wrote :

I'm not sure this was fully discussed yet. Moving to incomplete.

Changed in barbican:
status: New → Incomplete
Revision history for this message
Juan Antonio Osorio Robles (juan-osorio-robles) wrote :

This will be addressed by the Content Types blueprint by Nathan Reller https://review.openstack.org/#/c/145073/

Revision history for this message
Juan Antonio Osorio Robles (juan-osorio-robles) wrote :

Though now I'm not sure if I should set this bug as invalid, or should I leave it as incomplete for a while.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Barbican because there has been no activity for 60 days.]

Changed in barbican:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.