Skip to content

Add providers for signing config and legacy helper #967

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

Merged
merged 1 commit into from
May 29, 2025
Merged

Conversation

loosebazooka
Copy link
Member

And some other minor associated changes as part #954

aaronlew02
aaronlew02 previously approved these changes May 23, 2025
return () -> {
try {
SigstoreTufClient tufClient = tufClientBuilder.build();
tufClient.update();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering, does this always have to be called after building a tuf client? Could it be automatic based on if the timestamp is expired?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its because your local cache can be erased in between runs, you can't guarantee that state. So you have to validate it.


// Temporary while the tuf repos catches up, this will still fail if the remove TUF isn't
// available to check for signing config
static SigningConfigProvider fromOrDefault(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the advantage of this method over catching if from(tuf) fails and initializing a SigstoreSigningConfig?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This more mirrors the final expected workflow, while still allowing us to be very explicit that this will be removed once the signing config is finalized.

var fromTuf = tufClient.getSigstoreSigningConfig();
return fromTuf == null ? defaultConfig : fromTuf;
} catch (IOException ex) {
throw new SigstoreConfigurationException(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could return defaultConfig if not null on error?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and error may happen for other reasons that are issues with the tuf client. I would still like to fail if the error is unrelated to singingConfig missing from the repo.

And some other minor associated changes

Signed-off-by: Appu Goundan <[email protected]>
@loosebazooka loosebazooka merged commit 964d134 into main May 29, 2025
26 checks passed
@loosebazooka loosebazooka deleted the addproviders branch May 29, 2025 19:44
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 this pull request may close these issues.

3 participants