Skip to content
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

add-signature to support more formats #532

Closed
ChevronTango opened this issue Jul 30, 2023 · 2 comments · Fixed by #538
Closed

add-signature to support more formats #532

ChevronTango opened this issue Jul 30, 2023 · 2 comments · Fixed by #538

Comments

@ChevronTango
Copy link
Contributor

When coming up with my solution for AWS KMS signing in #525 I found the add-signature tool quite painful to use as it requires a file with a specific format. Instead it would be useful to be able to either pipe in that file as outlined in #529 or to instead specify the key manually.

I propose the following

# normal use
tuf add-signature targets.json \
--signature <the-signature-string>
--format "base64" # to support tools like AWS that return base64 rather than hex. normally this is "hex"
--key-id <key-id>

# reading from stdin
echo <the-signature-string> | tuf add-signature targets.json \
--format "base64"
--key-id <key-id>

the inclusion of the format will help to support users making use of tools like AWS KMS to do their signing and will give us a bit more flexibility going forward

One thing to think about would be how to support backwards compatibility with the current setup that expects a full json file as input. For this I suggest we have --format default to "json" which will then cause --key-id to be redundant and will expect the signature to be a full valid json string as it is now. That way the existing approaches will continue to work as expected.

@ChevronTango ChevronTango changed the title add-signature to be more generic add-signature to support more formats Aug 1, 2023
@ChevronTango
Copy link
Contributor Author

@rdimitrov can we get an update on when the latest changes that have been merged in are likely to make it into a release?

@rdimitrov
Copy link
Contributor

@rdimitrov can we get an update on when the latest changes that have been merged in are likely to make it into a release?

Hey, apologies. We decided to cut a release with the old code base this week which will probably happen tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants