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

Other: do not use keyid as online private key file name #642

Open
1 task done
lukpueh opened this issue Jul 15, 2024 · 0 comments
Open
1 task done

Other: do not use keyid as online private key file name #642

lukpueh opened this issue Jul 15, 2024 · 0 comments

Comments

@lukpueh
Copy link
Collaborator

lukpueh commented Jul 15, 2024

What do you want to share with us?

When adding a new online key in the ceremony (and metadata update) CLI, the default keyid is assigned as private key URI (file name) of the online key:

uri = f"fn:{new_key.keyid}"
new_key.unrecognized_fields[KEY_URI_FIELD] = uri

console.print(f"Expected private key file name is: '{new_key.keyid}'")

This assumes that the user runs the CLI, notes down the name, and then deploys the online private key file.

However, the CLI's default behavior is to ultimately send the updated metadata to the RSTUF API. This triggers online signing, which requires the online key to already be deployed. So the key file name should be known before running the CLI.

Fix

An easy fix would be to ask the user for the private key filename, under which the user has deployed the key.

kudos to @simi for pointing out the flaw in the workflow

References

See in repository-service-tuf/repository-service-tuf#580 (Option 2) for context about private key URIs.

Coordinate with #608, which adds support for HashiCorp Vault private key URIs to the CLI.

Code of Conduct

  • I agree to follow this project's Code of Conduct
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

No branches or pull requests

1 participant