Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Disable ADC and Pass bearer token in headers for search gRCP call

Hi,

How do I disable ADC, not look at  application_default_credentials file and pass bearer token in headers for gRCP call to search/answer endpoints? The sample code in the below URL doesn't specify that.

https://cloud.google.com/generative-ai-app-builder/docs/preview-search-results

Thanks,

Ravi

0 1 177
1 REPLY 1

Hi @Ravi9,

Welcome to Google Cloud Community!

I understand you're exploring the possibility of exclusively using a bearer token for gRPC calls to the Vertex AI Agent Builder, without relying on Application Default Credentials (ADC). Unfortunately, based on my understanding this approach is likely not feasible.

Here’s why: 

  • Google Cloud's Security Model: ADC is the primary authentication method for most Google Cloud services, including Vertex AI Agent Builder. Bypassing ADC could potentially compromise your application's security.
  • Service Integration: The Vertex AI Agent Builder is tightly integrated with Google Cloud's authentication system. Using a different method might cause unexpected errors or limitations.
  • gRPC Channel Configuration: While you can customize gRPC channels, the level of control over authentication is often restricted by the service's requirements.

For further information, you may find these resources useful:

I hope the above information is helpful.