Skip to content

feat: Add HTTP credential exposure warnings#55

Open
stenalpjolly wants to merge 2 commits intogoogleapis:mainfrom
stenalpjolly:stenalpjolly_add_http_warnings
Open

feat: Add HTTP credential exposure warnings#55
stenalpjolly wants to merge 2 commits intogoogleapis:mainfrom
stenalpjolly:stenalpjolly_add_http_warnings

Conversation

@stenalpjolly
Copy link
Copy Markdown

@stenalpjolly stenalpjolly commented Apr 6, 2026

Context

This PR brings the Java SDK into parity with the Python and Go SDKs by introducing warnings for potential HTTP credential exposure.

Changes

  • Client Initialization: Added credential exposure checks during client setup.
  • Tool Loading: Implemented validation when loading tools to warn against insecure HTTP usage with credentials.
  • Tool Invocation: Added runtime checks during tool execution to ensure credentials are not inadvertently exposed over unencrypted HTTP connections.
  • Case-Insensitive Checks: Ensured all header and scheme validations are case-insensitive for robustness.

Design Considerations

  • Clean Interface: Maintained a clean public interface without cluttering existing methods.
  • No Duplicated Strings: Extracted warning messages and header keys into constants to avoid duplicated strings and ensure maintainability.

@stenalpjolly stenalpjolly requested a review from a team as a code owner April 6, 2026 11:57
@stenalpjolly stenalpjolly force-pushed the stenalpjolly_add_http_warnings branch 2 times, most recently from 5d4112e to df35b54 Compare April 6, 2026 12:05
@stenalpjolly stenalpjolly force-pushed the stenalpjolly_add_http_warnings branch from df35b54 to 68139fe Compare April 6, 2026 12:05
@stenalpjolly
Copy link
Copy Markdown
Author

/gcbrun

1 similar comment
@prernakakkar-google
Copy link
Copy Markdown

/gcbrun

@stenalpjolly
Copy link
Copy Markdown
Author

/gcbrun

1 similar comment
@anubhav756
Copy link
Copy Markdown
Contributor

/gcbrun

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