Skip to content

Conversation

@pepeiborra
Copy link

Add support for mutual TLS (mTLS) authentication using client certificates
configured via environment variables.

Changes:

  • Add GOOGLE_CLIENT_CERT/GEMINI_CLIENT_CERT and GOOGLE_CLIENT_KEY/GEMINI_CLIENT_KEY
    environment variables for configuring client certificates
  • Extend ApiClient to use Undici agent with mTLS configuration
  • Add dispatcher field to HttpOptions interface for custom HTTP agent
  • Fix patchHttpOptions to preserve non-serializable fields like dispatcher
  • Move undici from devDependencies to dependencies
  • Add mTLS documentation section to README

Pepe Iborra and others added 4 commits December 4, 2025 08:32
Add support for mutual TLS (mTLS) authentication using client certificates
configured via environment variables.

Changes:
- Add GOOGLE_CLIENT_CERT/GEMINI_CLIENT_CERT and GOOGLE_CLIENT_KEY/GEMINI_CLIENT_KEY
  environment variables for configuring client certificates
- Extend ApiClient to use Undici agent with mTLS configuration
- Add dispatcher field to HttpOptions interface for custom HTTP agent
- Fix patchHttpOptions to preserve non-serializable fields like dispatcher
- Move undici from devDependencies to dependencies
- Add mTLS documentation section to README

The implementation automatically creates an Undici agent when both client
certificate and key are provided, enabling mTLS for all HTTP requests in
Node.js environments.
feat: Add mTLS support with client certificates
@google-cla
Copy link

google-cla bot commented Dec 4, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@shmishra99 shmishra99 self-assigned this Dec 4, 2025
@shmishra99
Copy link
Collaborator

Hi @pepeiborra ,

Can you please resolve the conflict by signing the CLA? Thank You!!

@shmishra99 shmishra99 added api:gemini-api type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. status:awaiting user response issues requiring a response from the user labels Dec 4, 2025
@pepeiborra
Copy link
Author

Signed

@shmishra99 shmishra99 removed the status:awaiting user response issues requiring a response from the user label Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api:gemini-api type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants