Skip to content

Support channel call-credential hook for xDS transport #2702

Description

@choonkijang

Feature Request

Crates

  • xds-client
  • tonic-xds

Motivation

There is no way to attach per-stream call credentials (e.g. a bearer token) to the ADS stream. This blocks connecting to credential-gated control planes; GCP Traffic Director, whose bootstrap uses channel_creds: [{ "type": "google_default" }] and requires an Application Default Credentials (ADC) bearer token on the stream, over system-root TLS.

Related specification: gRFC A27 # XdsClient and Bootstrap File

Proposal

Briefly, mirror grpc-go's implementation

More specifically,

  1. Define CallCredentials trait type, and let TonicTransportBuilder can take it (eg, with_call_credentials(Arc<dyn CallCredentials>)
  2. Extend ChannelCredentialType to have google_default entry to follow gRFC A27.

Alternatives

  • To be fully contained for gRFC A27, bring google_cloud_auth dependency just like grpc-google crate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions