MLflow Secrets Auth
A secure MLflow plugin that automatically injects authentication headers from secret management systems into tracking requests.
Features
- Zero Code Changes: Works transparently with existing MLflow applications
- Multiple Providers: HashiCorp Vault, AWS Secrets Manager, Azure Key Vault
- Security First: Host allowlisting, credential redaction, in-memory caching only
- Production Ready: Automatic retries, TTL-based caching, comprehensive logging
Quick Start
# Install with your preferred provider
pip install mlflow-secrets-auth[vault]
# Configure for HashiCorp Vault
export VAULT_ADDR="https://vault.company.com"
export VAULT_TOKEN="your-vault-token"
export MLFLOW_VAULT_SECRET_PATH="secret/mlflow/auth"
export MLFLOW_SECRETS_AUTH_ENABLE="vault"
# Activate the plugin in MLflow (required)
export MLFLOW_TRACKING_AUTH="mlflow_secrets_auth"
# Your MLflow code works unchanged
import mlflow
mlflow.set_tracking_uri("https://mlflow.company.com")
mlflow.start_run() # Authentication happens automatically
Demo
Try the complete working example with Vault + MLflow + Nginx:
git clone https://github.com/hugodscarvalho/mlflow-secrets-auth
cd mlflow-secrets-auth/examples/vault-nginx-mlflow
make demo
This demo shows the plugin working end-to-end with a real MLflow server protected by authentication.
Supported Providers
| Provider | Install Command | Authentication | Status |
|---|---|---|---|
| HashiCorp Vault | pip install mlflow-secrets-auth[vault] |
Token, AppRole | ✅ Available |
| AWS Secrets Manager | pip install mlflow-secrets-auth[aws] |
IAM, Access Keys | ✅ Available |
| Azure Key Vault | pip install mlflow-secrets-auth[azure] |
Service Principal, Managed Identity | ✅ Available |
| Google Secret Manager | pip install mlflow-secrets-auth[gcp] |
Service Account, Workload Identity | 🚧 Planned |
Documentation
- Getting Started - Quick setup guide
- Configuration - Complete configuration reference
- Providers - Provider-specific setup
- Troubleshooting - Common issues and solutions
Requirements
- Python 3.9+
- MLflow 2.20.4+
- Provider-specific SDKs (installed with extras)
License
Apache License 2.0 - see LICENSE file for details.
Metadata
Release files for mlflow-secrets-auth 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mlflow_secrets_auth-0.2.0.tar.gz | 30.4 kB | Without provenance | Details for mlflow_secrets_auth-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mlflow_secrets_auth-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for mlflow_secrets_auth-0.2.0-py3-none-any.whl |
Total release size: 67.4 kB
Release files / mlflow_secrets_auth-0.2.0.tar.gz
| Download URL | mlflow_secrets_auth-0.2.0.tar.gz |
|---|---|
| Size | 30.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bb3f1b6f292c1ac4a385b2cc8c23d699b8a8ed3427aef7809580a9dfc7f09690
|
|
BLAKE2b-256 checksum How to use checksums |
1f242a13d8ab3339fd5567619af1bc6d54eed56035589800991e56fc61c05b21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.4 CPython/3.12.11 Linux/6.11.0-1018-azure
|
Release files / mlflow_secrets_auth-0.2.0-py3-none-any.whl
| Download URL | mlflow_secrets_auth-0.2.0-py3-none-any.whl |
|---|---|
| Size | 37.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
163b9dc4a5674b53deee2e35b09660fd420cae446a5ec8e1e489b719c8644591
|
|
BLAKE2b-256 checksum How to use checksums |
3f39240a212e5d7c2d79b1fadf80aa9053488208b5664d73a4d44d5e98d657a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.4 CPython/3.12.11 Linux/6.11.0-1018-azure
|
Security for mlflow-secrets-auth 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.