-
Notifications
You must be signed in to change notification settings - Fork 22
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
base: main
Are you sure you want to change the base?
Conversation
ad36d5b
to
18b3a47
Compare
sigstore-java/src/main/java/dev/sigstore/SigningConfigProvider.java
Outdated
Show resolved
Hide resolved
And some other minor associated changes Signed-off-by: Appu Goundan <[email protected]>
18b3a47
to
b1cce2f
Compare
return () -> { | ||
try { | ||
SigstoreTufClient tufClient = tufClientBuilder.build(); | ||
tufClient.update(); |
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.
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?
|
||
// 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( |
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.
What's the advantage of this method over catching if from(tuf)
fails and initializing a SigstoreSigningConfig
?
var fromTuf = tufClient.getSigstoreSigningConfig(); | ||
return fromTuf == null ? defaultConfig : fromTuf; | ||
} catch (IOException ex) { | ||
throw new SigstoreConfigurationException( |
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.
You could return defaultConfig
if not null on error?
static final URI DEX_PUBLIC_GOOD_URI = URI.create("https://oauth2.sigstore.dev/auth"); | ||
static final URI DEX_STAGING_GOOD_URI = URI.create("https://oauth2.sigstage.dev/auth"); | ||
|
||
static final URI TSA_PUBLIC_GOOD_URI = URI.create("https://tsa.sigstore.dev"); |
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.
For the TSA, can this be the full path rather than just the host? The TSA client shouldn't assume that the path is the same for all TSAs, so that callers can use other TSAs besides the sigstore/timestamp-authority implementation.
And some other minor associated changes as part #954