[Cosmos] Disable key authentication in AAD live-test lanes
I maintainer di solito rispondono entro 1 giorno
@simorenoh ci sta già lavorando.
Dal 15/9/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Is your feature request related to a problem? Please describe.
The Cosmos AAD live-test lanes set COSMOS_TEST_DATA_AUTH_MODE=aad, but their provisioned accounts still allow local/key authentication. This means accidental key-authenticated data-plane usage can succeed instead of exposing gaps in AAD coverage.
Simply setting disableLocalAuth today would break the test harness. Shared session setup in tests/conftest.py creates databases and containers with ACCOUNT_KEY, and TestConfig.create_test_clients() plus its async counterpart deliberately create key-authenticated setup clients. The custom AAD role in sdk/cosmos/test-resources.bicep also needs to be reviewed for the database lifecycle operations currently performed through those key clients.
This follow-up was identified while reviewing PR #48459.
Describe the solution you'd like
Make the seven AAD live-test lanes run against provisioned Cosmos accounts with local/key authentication disabled.
- Audit every test selected by the AAD markers for direct or helper-mediated key authentication.
- Convert shared database/container setup and cleanup to use AAD or an appropriate ARM control-plane path.
- Update the custom AAD role with only the additional data actions required for test-owned database lifecycle operations.
- Add a Bicep parameter for
disableLocalAuthand enable it only for AAD matrix configurations, leaving key-auth lanes unchanged. - Ensure AAD lanes do not depend on
ACCOUNT_KEYafter deployment. - Add a targeted assertion that key authentication is rejected on the AAD account so regressions are visible.
- Validate all seven AAD lanes, including long, query, split, multi-region, circuit-breaker, and per-partition automatic-failover coverage.
Describe alternatives you've considered
Leaving local authentication enabled preserves the current harness but cannot detect accidental key usage. Enabling disableLocalAuth immediately without migrating setup would fail during session initialization rather than provide meaningful AAD coverage.
Additional context
PR #48459 intentionally keeps AAD lanes on per-run provisioned accounts because their role assignments target the current test tenant's principal. This issue is separate from moving key-auth lanes to fixed rotation-friendly accounts and should be completed before considering the AAD lanes fully key-independent.
- Lingua principale
- Python
- Stelle
- 5.6k
- Fork
- 3.4k
- Merge medio
- 1g 22h
- PR unite (30g)
- 189
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Azure/azure-sdk-for-python
-
needs-triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
Azure/azure-sdk-for-python#50155 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
[Teams Chatbot]: next-mypy install 404s should point to CFS auth or --pypi workaroundForse già presa @jianingwang123 l’ha presa 17 giorni fa. Apertaneeds-triage
Difficoltà 1/5 1-3 ore Idoneità per principianti 72/100
Azure/azure-sdk-for-python#49886 · 1 commento · 2 reazioni · 2 assegnatari ·
I maintainer di solito rispondono entro 1 giorno
-
[AI Projects] AIProjectInstrumentor: non-streamed responses.create raises AttributeError ('NonRecordingSpan' object has no attribute 'attributes') when the span is not sampledForse già presa @14H034160212 l’ha presa 19 giorni fa. ApertaAI Projects Client customer-reported question
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Azure/azure-sdk-for-python#49854 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
azure-eventhub migration guide: legacy checkpoint sample writes "None" metadata for partitions that were never checkpointedForse già presa @hidingmyname l’ha presa 27 giorni fa. ApertaClient customer-reported Event Hubs needs-team-attention question Service Attention
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Azure/azure-sdk-for-python#49723 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Scheduled test pipelines fail at the Analyze_Test stage due to date formattingForse già presa Una pull request collegata a questa issue è aperta o già unita. ApertaEngSys
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Azure/azure-sdk-for-python#49614 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Azure/azure-sdk-for-python
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
vllm-project/vllm#70030 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
TigreGotico/tugaphone#408 ·
I maintainer di solito rispondono entro 1 giorno
-
needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
gke-labs/kube-agents#7308 ·
I maintainer di solito rispondono entro 1 giorno
-
t: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 3 giorni
-
chore
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
lugassawan/swe-workbench#841 ·