# MLflow Secrets Auth
A secure MLflow plugin that automatically injects authentication headers from secret management systems into tracking requests.
[](https://github.com/hugodscarvalho/mlflow-secrets-auth/actions/workflows/ci.yml)
[](https://codecov.io/gh/hugodscarvalho/mlflow-secrets-auth)
[](https://pypi.org/project/mlflow-secrets-auth/)
[](https://pypi.org/project/mlflow-secrets-auth/)
[](LICENSE)
## 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
```bash
# 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:
```bash
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](https://hugodscarvalho.github.io/mlflow-secrets-auth/getting-started/)** - Quick setup guide
- **[Configuration](https://hugodscarvalho.github.io/mlflow-secrets-auth/configuration/)** - Complete configuration reference
- **[Providers](https://hugodscarvalho.github.io/mlflow-secrets-auth/providers/vault/)** - Provider-specific setup
- **[Troubleshooting](https://hugodscarvalho.github.io/mlflow-secrets-auth/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](LICENSE) file for details.
            
         
        Raw data
        
            {
    "_id": null,
    "home_page": null,
    "name": "mlflow-secrets-auth",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "mlflow, authentication, secrets, vault, aws, azure",
    "author": "Hugo Carvalho",
    "author_email": "hugodanielsilvacarvalho.hc@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/1f/24/2a13d8ab3339fd5567619af1bc6d54eed56035589800991e56fc61c05b21/mlflow_secrets_auth-0.2.0.tar.gz",
    "platform": null,
    "description": "# MLflow Secrets Auth\n\nA secure MLflow plugin that automatically injects authentication headers from secret management systems into tracking requests.\n\n[](https://github.com/hugodscarvalho/mlflow-secrets-auth/actions/workflows/ci.yml)\n[](https://codecov.io/gh/hugodscarvalho/mlflow-secrets-auth)\n[](https://pypi.org/project/mlflow-secrets-auth/)\n[](https://pypi.org/project/mlflow-secrets-auth/)\n[](LICENSE)\n\n## Features\n\n- **Zero Code Changes**: Works transparently with existing MLflow applications\n- **Multiple Providers**: HashiCorp Vault, AWS Secrets Manager, Azure Key Vault\n- **Security First**: Host allowlisting, credential redaction, in-memory caching only\n- **Production Ready**: Automatic retries, TTL-based caching, comprehensive logging\n\n## Quick Start\n\n```bash\n# Install with your preferred provider\npip install mlflow-secrets-auth[vault]\n\n# Configure for HashiCorp Vault\nexport VAULT_ADDR=\"https://vault.company.com\"\nexport VAULT_TOKEN=\"your-vault-token\"\nexport MLFLOW_VAULT_SECRET_PATH=\"secret/mlflow/auth\"\nexport MLFLOW_SECRETS_AUTH_ENABLE=\"vault\"\n\n# Activate the plugin in MLflow (required)\nexport MLFLOW_TRACKING_AUTH=\"mlflow_secrets_auth\"\n\n# Your MLflow code works unchanged\nimport mlflow\nmlflow.set_tracking_uri(\"https://mlflow.company.com\")\nmlflow.start_run()  # Authentication happens automatically\n```\n\n## Demo\n\nTry the complete working example with Vault + MLflow + Nginx:\n\n```bash\ngit clone https://github.com/hugodscarvalho/mlflow-secrets-auth\ncd mlflow-secrets-auth/examples/vault-nginx-mlflow\nmake demo\n```\n\nThis demo shows the plugin working end-to-end with a real MLflow server protected by authentication.\n\n## Supported Providers\n\n| Provider | Install Command | Authentication | Status |\n|----------|----------------|----------------|---------|\n| HashiCorp Vault | `pip install mlflow-secrets-auth[vault]` | Token, AppRole | \u2705 Available |\n| AWS Secrets Manager | `pip install mlflow-secrets-auth[aws]` | IAM, Access Keys | \u2705 Available |\n| Azure Key Vault | `pip install mlflow-secrets-auth[azure]` | Service Principal, Managed Identity | \u2705 Available |\n| Google Secret Manager | `pip install mlflow-secrets-auth[gcp]` | Service Account, Workload Identity | \ud83d\udea7 Planned |\n\n## Documentation\n\n- **[Getting Started](https://hugodscarvalho.github.io/mlflow-secrets-auth/getting-started/)** - Quick setup guide\n- **[Configuration](https://hugodscarvalho.github.io/mlflow-secrets-auth/configuration/)** - Complete configuration reference\n- **[Providers](https://hugodscarvalho.github.io/mlflow-secrets-auth/providers/vault/)** - Provider-specific setup\n- **[Troubleshooting](https://hugodscarvalho.github.io/mlflow-secrets-auth/troubleshooting/)** - Common issues and solutions\n\n## Requirements\n\n- Python 3.9+\n- MLflow 2.20.4+\n- Provider-specific SDKs (installed with extras)\n\n## License\n\nApache License 2.0 - see [LICENSE](LICENSE) file for details.\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "MLflow plugin that injects authentication headers from secret managers",
    "version": "0.2.0",
    "project_urls": null,
    "split_keywords": [
        "mlflow",
        " authentication",
        " secrets",
        " vault",
        " aws",
        " azure"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3f39240a212e5d7c2d79b1fadf80aa9053488208b5664d73a4d44d5e98d657a4",
                "md5": "bf6db02270f46b4715aa9c3f49168c6b",
                "sha256": "163b9dc4a5674b53deee2e35b09660fd420cae446a5ec8e1e489b719c8644591"
            },
            "downloads": -1,
            "filename": "mlflow_secrets_auth-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bf6db02270f46b4715aa9c3f49168c6b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 36965,
            "upload_time": "2025-08-20T00:24:18",
            "upload_time_iso_8601": "2025-08-20T00:24:18.375712Z",
            "url": "https://files.pythonhosted.org/packages/3f/39/240a212e5d7c2d79b1fadf80aa9053488208b5664d73a4d44d5e98d657a4/mlflow_secrets_auth-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1f242a13d8ab3339fd5567619af1bc6d54eed56035589800991e56fc61c05b21",
                "md5": "06ff9efd518958c3bec3f0cfddbd3763",
                "sha256": "bb3f1b6f292c1ac4a385b2cc8c23d699b8a8ed3427aef7809580a9dfc7f09690"
            },
            "downloads": -1,
            "filename": "mlflow_secrets_auth-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "06ff9efd518958c3bec3f0cfddbd3763",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 30450,
            "upload_time": "2025-08-20T00:24:19",
            "upload_time_iso_8601": "2025-08-20T00:24:19.320710Z",
            "url": "https://files.pythonhosted.org/packages/1f/24/2a13d8ab3339fd5567619af1bc6d54eed56035589800991e56fc61c05b21/mlflow_secrets_auth-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-20 00:24:19",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "mlflow-secrets-auth"
}