Skip to content

set GoogleAPIClientOption on GCP KMS provider#2128

Merged
bobcallaway merged 3 commits intosigstore:mainfrom
bobcallaway:google_api_client_option
Jul 29, 2025
Merged

set GoogleAPIClientOption on GCP KMS provider#2128
bobcallaway merged 3 commits intosigstore:mainfrom
bobcallaway:google_api_client_option

Conversation

@bobcallaway
Copy link
Member

this allows callers to set options when instantiating GCP KMS provider

@bobcallaway bobcallaway requested review from a team as code owners July 29, 2025 11:57
@cpanato
Copy link
Member

cpanato commented Jul 29, 2025

need a rebase

Signed-off-by: Bob Callaway <bcallaway@google.com>
Signed-off-by: Bob Callaway <bcallaway@google.com>
@bobcallaway bobcallaway force-pushed the google_api_client_option branch from 6c176ca to b993534 Compare July 29, 2025 12:03
@bobcallaway
Copy link
Member Author

by pulling in the GCP option into pkg/signature/options, it pollutes the other dependency graphs which isn't ideal.

Copy link
Contributor

@Hayden-IO Hayden-IO left a comment

Choose a reason for hiding this comment

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

I agree with you, also don't want to leak the GCP dependency into the other providers.

ApplyRemoteVerification(*bool)
ApplyRPCAuthOpts(opts *options.RPCAuth)
ApplyKeyVersion(keyVersion *string)
ApplyGoogleAPIClientOption(opt *googleoption.ClientOption)
Copy link
Contributor

Choose a reason for hiding this comment

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

Not my favorite idea, but could you have something like an ApplyKMSProviderOptions(opts []any) function and have each KMS provider type assert the options?

Signed-off-by: Bob Callaway <bcallaway@google.com>
@bobcallaway bobcallaway merged commit 181c5d3 into sigstore:main Jul 29, 2025
16 checks passed
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