Metadata-Version: 2.1
Name: mlflow-custom-headers-plugin
Version: 1.0.1
Summary: MLFlow plugin that allows adding extra headers to requests to MLFlow in order to enable authentication and other use-cases.
Author: Yakko Majuri
Author-email: yakko.majuri@protonmail.com
License: MIT
Project-URL: Source, https://github.com/username/mlflow_custom_headers_plugin
Project-URL: Bug Tracker, https://github.com/username/mlflow_custom_headers_plugin/issues
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mlflow>=2.8.0

# MLFlow Custom Headers Plugin

> [Source code](https://github.com/yakkomajuri/mlflow_custom_headers_plugin)

A package that enables setting any number of custom headers to be passed along with requests to the MLFlow tracking server.

This is very useful for enabling proper authentication on your MLFlow instance beyond MLFlow's simplistic authentication capabilities using basic auth or one single token.

This plugin was inspired by the [mlflow-cloudflare-header-plugin](https://pypi.org/project/mlflow-cloudflare-header-plugin/) and does also provide support for using Cloudflare Access service tokens for securing your MLFlow tracking server.

## Usage

Install the plugin in your project using MLFlow:

```bash
pip install mlflow-custom-headers-plugin
```

Set all the headers you'd like passed in an environment variable called `MLFLOW_CUSTOM_HEADERS`. Key-value header pairs should be separated by commas, and header name and value should be separated by a colon (`:`) without any empty space.

```
export MLFLOW_CUSTOM_HEADERS=Header1:<Header1Value>,Header2:<Header2Value>,Header3:<Header2Value>
```

Example (using Cloudflare Access):

```
export MLFLOW_CUSTOM_HEADERS=CF-Access-Client-Id:<cf_client_id>,CF-Access-Client-Secret:<cf_client_secret>
```


