-
Notifications
You must be signed in to change notification settings - Fork 23
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
TUF integration #274
TUF integration #274
Conversation
deeaac8
to
7f6a9ef
Compare
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.
Awesome! Looks broadly good, the one thing I'm wondering about is error handling in downstream users like npm. Will we be able to catch and show helpful errors or retry? Worth adding any tests around errors fetching these tuf files?
8a53f0f
to
f6fd64c
Compare
I updated things a bit so that errors thrown from our TUF client are caught and rethrown as something that will be more friendly to |
f6fd64c
to
8a994bc
Compare
8a994bc
to
2f2d2d9
Compare
Nice job 👍 |
Signed-off-by: Brian DeHamer <[email protected]>
Signed-off-by: Brian DeHamer <[email protected]>
Signed-off-by: Brian DeHamer <[email protected]>
Signed-off-by: Brian DeHamer <[email protected]>
Assembles a TrustedRoot from cert/key material in the Sigstore TUF repository. Signed-off-by: Brian DeHamer <[email protected]>
Signed-off-by: Brian DeHamer <[email protected]>
Signed-off-by: Brian DeHamer <[email protected]>
Signed-off-by: Brian DeHamer <[email protected]>
2f2d2d9
to
1a96ee1
Compare
Signed-off-by: Brian DeHamer <[email protected]>
1a96ee1
to
6ccf8d0
Compare
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.
Nice work!
function defaultCacheDir(): string { | ||
let cacheRootDir = os.homedir(); | ||
try { | ||
fs.accessSync(os.homedir(), fs.constants.W_OK | fs.constants.R_OK); |
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.
TIL about fs.access
, nice!
Awesome work getting this in! 🥳 |
Summary
Integrates the
tuf-js
library and wires it up to the Sigstore TUF repository.The current implementation queries the TUF repo for the various Rekor/Fulcio/CTFE keys/certs and assembles them into a structure which matches
TrustedRoot
protobuf. At some point, the Sigstore TUF repo will provide a serialized version of theTrustedRoot
directly and a lot of this code will go away (sigstore/root-signing#584).