Skip to content

OAuth 2.0 Client Auth Extension design doc#3571

Open
pritishnahar95 wants to merge 6 commits into
open-telemetry:mainfrom
pritishnahar95:pnahar/oauth-extension-design-doc
Open

OAuth 2.0 Client Auth Extension design doc#3571
pritishnahar95 wants to merge 6 commits into
open-telemetry:mainfrom
pritishnahar95:pnahar/oauth-extension-design-doc

Conversation

@pritishnahar95

Copy link
Copy Markdown
Contributor

Change Summary

Adds a design doc for a proposed OAuth 2.0 Client Auth extension (urn:otel:extension:oauth2_client_auth) — the generic, provider-neutral counterpart to the Azure Identity Auth extension, modeled on the Go collector's oauth2clientauthextension.

The extension acquires and background-refreshes OAuth 2.0 access tokens (client-credentials + JWT-bearer grants) and exposes them to data-path nodes through the existing BearerTokenProvider capability — so the OTLP exporters can inject a refreshed Authorization: Bearer header without embedding static credentials or doing token work on the hot path.

Key design points covered:

  • Reuses the existing BearerTokenProvider capability (no new capability machinery).
  • Active + Shared execution, watch-based token cache, slow-path coalescing via fetch_lock, background refresh with expiry_buffer, jittered scheduling + bounded exponential-backoff retry.
  • Readiness-gated startup (blocks data-path spawn until the first token is published, bounded by startup_timeout.
  • Token-endpoint TLS via the shared otap_df_config::tls::TlsClientConfig; custom CA, mTLS client cert, SNI.
  • Config schema, telemetry, lifecycle, security/performance considerations, validation expectations, and open questions.

What issue does this PR close?

How are these changes tested?

n/a

Are there any user-facing changes?

no

Changelog

  • Added a .chloggen/*.yaml entry
  • This PR is a chore (indicated in title)
  • This is a documentation-only PR.

@pritishnahar95
pritishnahar95 requested a review from a team as a code owner July 24, 2026 01:39
Copilot AI review requested due to automatic review settings July 24, 2026 01:39
@github-actions github-actions Bot added documentation Improvements or additions to documentation lang:rust Pull requests that update Rust code size/XL labels Jul 24, 2026
@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Jul 24, 2026

Copy link
Copy Markdown

Pull request dashboard status

Status last refreshed: 2026-07-26 00:04:13 UTC.

  • Waiting on: Maintainers
  • Next step: Merge when ready.

This automated status or its linked feedback items may be incorrect. If something looks wrong, please report it with the result you expected.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a draft design document for a proposed urn:otel:extension:oauth2_client_auth extension in rust/otap-dataflow, describing a provider-neutral OAuth2 token acquisition/refresh component that would expose tokens via the existing BearerTokenProvider capability for use by OTLP exporters.

Changes:

  • Added a new design doc covering goals, architecture, configuration schema, lifecycle, telemetry, and security/performance considerations for an OAuth 2.0 client auth extension.
  • Documented intended integration points with the engine extension lifecycle (Active + Shared, readiness gating) and consumer usage patterns (fast-path cache, watch-based stream).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread rust/otap-dataflow/docs/oauth2-client-auth-extension.md Outdated
Comment thread rust/otap-dataflow/docs/oauth2-client-auth-extension.md Outdated
@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.87%. Comparing base (89b1f1b) to head (6b75e36).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3571      +/-   ##
==========================================
- Coverage   86.88%   86.87%   -0.01%     
==========================================
  Files         782      782              
  Lines      319341   319341              
==========================================
- Hits       277444   277439       -5     
- Misses      41373    41378       +5     
  Partials      524      524              
Components Coverage Δ
otap-dataflow 87.94% <ø> (-0.01%) ⬇️
query_engine 89.57% <ø> (ø)
otel-arrow-go 52.45% <ø> (ø)
quiver 92.20% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@drewrelmas drewrelmas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me! Excited to see the generic implementation coming in!

Comment thread rust/otap-dataflow/docs/oauth2-client-auth-extension.md Outdated
@pritishnahar95
pritishnahar95 force-pushed the pnahar/oauth-extension-design-doc branch from 85a6448 to 13053b1 Compare July 24, 2026 21:06
@jmacd
jmacd enabled auto-merge July 24, 2026 21:22
@jmacd
jmacd added this pull request to the merge queue Jul 24, 2026
@lalitb
lalitb removed this pull request from the merge queue due to a manual request Jul 24, 2026
@pritishnahar95
pritishnahar95 force-pushed the pnahar/oauth-extension-design-doc branch from 13053b1 to bd887de Compare July 24, 2026 23:12
Comment thread rust/otap-dataflow/docs/oauth2-client-auth-extension.md Outdated
@pritishnahar95
pritishnahar95 force-pushed the pnahar/oauth-extension-design-doc branch from bd887de to 6b75e36 Compare July 24, 2026 23:54
@lalitb

lalitb commented Jul 25, 2026

Copy link
Copy Markdown
Member

Moved out from merge queue, as @pritishnahar95 is making some updates to align the design with the Azure identity extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation lang:rust Pull requests that update Rust code size/XL

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

5 participants