Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[azure-core-amqp] Preserve structured CBS failures through token refresh retries

Aperta
#7,379 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
32/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
azure, cpp

Direzione di ricerca

Inizia tracciando RefreshTokenForAudience attraverso l’acquisizione delle credenziali, l’apertura di CBS, PutTokenForAudience e la pulizia, quindi esamina come il livello Event Hubs utilizza il risultato. Usa la checklist di convalida per definire il completamento: risultati distinti, conservazione dello stato CBS, decisioni sui tentativi non basate sul testo, gestione corretta dell’annullamento e test per ogni percorso di errore elencato, senza registrare il materiale dei token.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

needs-triage

Summary

RefreshTokenForAudience catches every standard exception and retains only what(). The refresh scheduler therefore cannot distinguish credential acquisition, CBS open, put-token refusal, transport failure, timeout, and shutdown cancellation. It can only retry every failure with the same policy and write an unstructured warning.

Issue #7330 covers the low-level ambiguity where PutTokenForAudience raises AuthenticationException for every non-Ok CBS result. This issue carries structured failure information through the refresh worker after the low-level result has been classified. Rust transport parity is outside this issue.

Proposal

Introduce an internal refresh outcome that records:

  • The failed stage: credential acquisition, CBS open, put-token, or cleanup.
  • The CBS operation result and service status when available.
  • Whether the failure is retryable on the same connection.
  • Whether a fresh connection is required.
  • Whether the operation ended because of caller cancellation or connection shutdown.

Use the outcome rather than exception text to select the next refresh action. Transport errors, timeouts, throttling, and retryable service failures may retain the current authorization and schedule another attempt. An explicit credential or claim rejection remains a permanent authentication result after the bounded fresh-connection probe in the Event Hubs layer.

Preserve exception text for diagnostics, but do not parse it to make a retry decision. Logs may include the audience, connection instance, failure stage, attempt number, remaining token lifetime, and next delay. They must never include the token.

Validation

  • Each credential and CBS failure stage produces a distinct internal outcome.
  • Cancellation and shutdown are not logged or scheduled as ordinary retryable failures.
  • CBS service status and description survive to the final actionable exception when available.
  • Retry decisions do not inspect exception text.
  • Logs state the retry decision and next delay without exposing token material.
  • Tests cover transient transport failure, explicit authorization refusal, timeout, cancellation, and unknown exception paths.

This issue changes authentication failure handling and requires explicit security-focused review.

Lingua principale
C++
Stelle
207
Fork
173
Merge medio
1g 10h
PR unite (30g)
30

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Azure/azure-sdk-for-cpp

Tutte le issue di Azure/azure-sdk-for-cpp

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.