-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#93 Add support for asymmetric keys to vault transit engine #100
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other API endpoints that also use the creation_time
attribute use the type String
. We shouldn't mix the type of the attributes.
It would be nice if you could add a test in the file https://github.com/jmgilman/vaultrs/blob/master/tests/transit.rs |
I can swap that to a I might look into whether adding a |
Will do. Thanks |
I'm a bit limited on time at the moment; but I will make sure to get round to this at some point |
…route Previously the route assumed a symmetric key's creation unix timestamp would be returned. For asymmetric keys the response differs; it returns the creation RFC3339 timestamp, public key, and key type. Mentions jmgilman#93. Signed-off-by: Matt Davis <mattdavis@cloudflare.com>
Signed-off-by: Matt Davis <mattdavis@cloudflare.com>
a351193
to
d81e9ad
Compare
Updated to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the work only one small question.
base64 = "0.21" | ||
chrono = "0.4.38" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't use this anymore right?
base64 = "0.21" | |
chrono = "0.4.38" | |
base64 = "0.21" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is used as a dev-dependency to check the creation_time
in the tests can be parsed. This differs from the symmetric route, as vault returns a unix integer timestamp for that; whereas for asymmetric keys it returns an ISO8601 timestamp. TLDR; checks that vault returns ISO8601
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Haennetz. Any chance on getting this merged? |
As described in #93 the current implementation fails to deserialize a read transit engine key response if the key is asymmetric. The asymmetric response differs as it includes the public key inside of the keys field:
My implementation follows the normal serde deserialization process using enums to define the two types of key responses. As these fields are
pub
, this will likely be a breaking change for anybody relying on theReadKeyResponse.keys
value.