[azure-ai-ml] Support Key Vault secret injection into environment variables for scheduled command and pipeline jobs
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
Línea de trabajo
Start by reading the Azure ML job configuration and environment_variables handling for YAML/CLI and the Python SDK, then check how online deployment secret injection is represented. The requested behavior requires service-side runtime identity, scheduled-run resolution, versioned and latest secret references, and safeguards for persisted definitions and logs. Done means command and pipeline jobs support the described Key Vault syntax through both interfaces and fail without exposing secret values.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Is your feature request related to a problem? Please describe.
I run multiple scheduled Azure Machine Learning jobs, each using different credentials stored in Azure Key Vault. I want the application code to consume consistent environment variable names, while each job’s configuration maps those names to the appropriate Key Vault secrets.
Currently, this requires custom code to retrieve secrets and populate environment variables at runtime. This adds Azure-specific secret retrieval logic and dependencies to jobs that would otherwise only need to read environment variables.
Azure ML online deployments already support declarative secret injection. I would like equivalent functionality for command and pipeline jobs, including scheduled runs.
Describe the solution you'd like
Support Key Vault secret references in a job’s environment_variables configuration, using syntax consistent with online deployments. For example:
environment_variables:
DATABASE_USERNAME: ${{keyvault:https://my-vault.vault.azure.net/secrets/job-a-db-user}}
DATABASE_PASSWORD: ${{keyvault:https://my-vault.vault.azure.net/secrets/job-a-db-password}}
The service should:
- Resolve references at the start of each run, including scheduled runs, using the job’s configured runtime identity.
- Support versioned references and versionless references that retrieve the latest secret version.
- Inject the resolved values into the job container before the application starts.
- Keep secret values out of persisted job definitions and service-generated logs.
- Fail with a clear error if a secret cannot be retrieved, without exposing its value.
This should work consistently through YAML/CLI and the Python SDK.
Describe alternatives you've considered
- Retrieve secrets inside each application: Works, but couples application code to Azure Key Vault and duplicates retrieval logic across jobs.
- Use a shared startup wrapper: The wrapper reads a mapping configuration, retrieves secrets, sets environment variables, and launches the application. This preserves a consistent application interface but requires maintaining custom infrastructure code.
- Retrieve secrets before submitting the job: This places resolved values in the submitted configuration and does not allow an existing schedule to retrieve rotated secrets automatically on each run.
Additional context
The intended use case is to reuse the same application or container across multiple scheduled jobs. For example, every job reads DATABASE_PASSWORD, while each job maps that variable to a different Key Vault secret.
This is a request for service-side secret injection at runtime, extending the capability already documented for online deployments:
Access secrets from online deployments using secret injection
- 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 ·