Skip to content

Conversation

Raezil
Copy link
Contributor

@Raezil Raezil commented Aug 17, 2025

Summary by cubic

Propagates GRPCProvider BasicAuth to all gRPC calls using per-RPC credentials. This fixes missing Authorization headers so servers can authenticate requests.

  • Bug Fixes
    • Send BasicAuth via grpc.WithPerRPCCredentials; sets Authorization: Basic base64(user:pass).
    • Add unit test with a server interceptor to verify the header is present and correct.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

cubic analysis

1 issue found across 2 files • Review in cubic

React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai to give feedback, ask questions, or re-run the review.

return map[string]string{"authorization": "Basic " + token}, nil
}

func (b *basicAuthCreds) RequireTransportSecurity() bool { return false }
Copy link
Contributor

Choose a reason for hiding this comment

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

PerRPC credentials declare they do NOT require transport security, allowing Basic-Auth credentials to be sent over plaintext connections. This exposes usernames and passwords whenever prov.UseSSL is false, which contradicts the usual expectation that authentication data is only transmitted over TLS. Set this to true (or make it configurable) to avoid leaking credentials.

(Based on your team's feedback about always protecting sensitive data in transit.)

Prompt for AI agents
Address the following comment on src/transports/grpc/grpc_transport.go at line 39:

<comment>PerRPC credentials declare they do NOT require transport security, allowing Basic-Auth credentials to be sent over plaintext connections. This exposes usernames and passwords whenever prov.UseSSL is false, which contradicts the usual expectation that authentication data is only transmitted over TLS. Set this to true (or make it configurable) to avoid leaking credentials.

(Based on your team&#39;s feedback about always protecting sensitive data in transit.)</comment>

<file context>
@@ -21,9 +22,22 @@ import (
 	. &quot;github.com/universal-tool-calling-protocol/go-utcp/src/providers/grpc&quot;
 	&quot;github.com/universal-tool-calling-protocol/go-utcp/src/transports&quot;
 
+	. &quot;github.com/universal-tool-calling-protocol/go-utcp/src/auth&quot;
 	. &quot;github.com/universal-tool-calling-protocol/go-utcp/src/tools&quot;
 )
 
+type basicAuthCreds struct {
+	username string
</file context>

@Raezil Raezil closed this Aug 17, 2025
@Raezil Raezil deleted the codex/fix-grpc-authentication-propagation branch August 17, 2025 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant