feat: add ability to sign with vault transit secret engine #260
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This isn't quite ready for merge, but ready for people to look at.
Few things here:
The biggest one, though:
vault transit sends it's signatures in a peculiar format. namely it's
vault:v1:BASE64ENCODEDSIGNATURE
. sigstore handles this by just purging thevault:v1:
. this has some nice qualities because it then just becomes a regular signature that you can verify with other tooling (provided you have the public key).however, the
v1
part of the prefix is the key version that was used to create the signature. this means if you do not have the public part of the key locally and try to do remote verification, you will not know what key version to verify with. the transit engines API expects the signature sent for verification to have this prefix with the appropriate key version attached.what this means in practice is if we do not store the prefix as part of the signature and we try to do a remote verification and the key has since been rotated, verification will fail unless we ask the user to manually provide the key version.
I welcome thoughts about how to handle this.