theupdateframework / go-tuf

Go implementation of The Update Framework (TUF)
https://theupdateframework.com
Apache License 2.0
625 stars 105 forks source link

feat: Decouple signing #594

Open rdimitrov opened 8 months ago

rdimitrov commented 8 months ago

Moved from https://github.com/rdimitrov/go-tuf-metadata/issues/62, raised by @udf2457

Is your feature request related to a problem? Please describe.

From my brief reading of the metadata code, at present your library appears to make the same mistake as theupdateframework/go-tuf in that key signing is tighly coupled to primitive and crude on-disk keyfiles.

This means that real-world secure key storage such as PKCS#11 (https://github.com/theupdateframework/go-tuf/issues/427), AWS KMS (https://github.com/theupdateframework/go-tuf/issues/525) and others e.g. Yubikey are not readily supported and require hacky work-around kludges to work (e.g. manually hacking json files).

Describe the solution you'd like

Of course support for signing from local keyfiles stored on disk should remain, but integration with real world applications where the private key is stored in a non-exfilterable format should be supported.

Describe alternatives you've considered

No response

Additional context

No response