[Cosmos] Disable key authentication in AAD live-test lanes
Los mantenedores suelen responder en 1 día
@simorenoh ya está trabajando en esto.
Desde el 15/9/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 5.6k
- Forks
- 3.4k
- Merge medio
- 1 d 22 h
- PR fusionados (30 d)
- 189
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Azure/azure-sdk-for-python
-
needs-triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
Azure/azure-sdk-for-python#50155 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
[Teams Chatbot]: next-mypy install 404s should point to CFS auth or --pypi workaroundPosiblemente ocupada @jianingwang123 la tomó hace 17 días. Abiertoneeds-triage
Dificultad 1/5 1-3 horas Aptitud para principiantes 72/100
Azure/azure-sdk-for-python#49886 · 1 comentario · 2 reacciones · 2 asignados ·
Los mantenedores suelen responder en 1 día
-
[AI Projects] AIProjectInstrumentor: non-streamed responses.create raises AttributeError ('NonRecordingSpan' object has no attribute 'attributes') when the span is not sampledPosiblemente ocupada @14H034160212 la tomó hace 19 días. AbiertoAI Projects Client customer-reported question
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Azure/azure-sdk-for-python#49854 · 2 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
azure-eventhub migration guide: legacy checkpoint sample writes "None" metadata for partitions that were never checkpointedPosiblemente ocupada @hidingmyname la tomó hace 27 días. AbiertoClient customer-reported Event Hubs needs-team-attention question Service Attention
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Azure/azure-sdk-for-python#49723 · 2 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Scheduled test pipelines fail at the Analyze_Test stage due to date formattingPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. AbiertoEngSys
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Azure/azure-sdk-for-python#49614 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
Todos los issues de Azure/azure-sdk-for-python
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
vllm-project/vllm#70030 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
TigreGotico/tugaphone#408 ·
Los mantenedores suelen responder en 1 día
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
gke-labs/kube-agents#7308 ·
Los mantenedores suelen responder en 1 día
-
t: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 3 días
-
chore
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
lugassawan/swe-workbench#841 ·