feat(confidentialhttp): Go SDK builders for AuthConfig#132
Draft
wentzeld wants to merge 1 commit into
Draft
Conversation
Adds ergonomic builders (WithApiKey, WithBasicAuth, WithBearerToken, WithHmacSha256, WithAwsSigV4, WithHmacCustom, WithOAuth2ClientCredentials, WithOAuth2RefreshToken) plus a Send() convenience wrapper over SendRequest. // remove before merge: replace directive pinning local chainlink-protos
nolag
reviewed
Apr 20, 2026
| @@ -0,0 +1,354 @@ | |||
| package confidentialhttp | |||
Contributor
There was a problem hiding this comment.
This can be made a lot more ergonomic. For example, looking at basic auth, I would want to do
WithBasicAuth(name: string, password: *SecretIdentifier)
or
WithBasicAuth(name: *SecretIdentifier, password: *SecretIdentifier)
Maybe it can be generic for the name to allow either type.
Then, I would want it to template in a new name and automatically add it to the list of secrets to fetch for me.
nolag
reviewed
Apr 21, 2026
| // WithAwsSigV4("aws_ak", "aws_sk", "us-east-1", "execute-api") | ||
| // WithAwsSigV4("aws_ak", "aws_sk", "us-east-1", "s3", | ||
| // WithSessionToken("aws_st"), WithUnsignedPayload(true)) | ||
| func WithAwsSigV4(accessKeyIDSecretName, secretAccessKeySecretName, region, service string, opts ...SigV4Option) *AuthConfig { |
Contributor
There was a problem hiding this comment.
If we want to make this compatible with the SDK, we can drop region and service, then extract it from the request. Since the call is made with the AWS client, it'll be fake signed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
client_helpers.gowith builders for all 8 signing methods.Send(runtime, req, opts...)convenience wrapper over generatedSendRequest.Blocked by: chainlink-protos signingExpansion PR.
Remove-before-merge
replacedirective in confidentialhttp/go.mod pointing at local chainlink-protos.