kubeflow / fairing

Python SDK for building, training, and deploying ML models
Apache License 2.0
337 stars 144 forks source link

Add auth to prediction #200

Open jlewi opened 5 years ago

jlewi commented 5 years ago

How about attaching authorization credentials to prediction requests? e.g here: https://github.com/kubeflow/fairing/blob/642530567d0255f88b0f83b0a40b3325c303bfa2/fairing/ml_tasks/tasks.py#L69

A use case would be you are developing your models locally e.g. in an IDE but deploying on your cluster and you want to send your prediction requests.

Kubeflow should be exposed through a reachable ingress that is secured (e.g. with IAP or Basic Auth). So the client library should obtain a credential (e.g. a JWT) and attach it to the request.

The pipelines SDK has an auth module https://github.com/kubeflow/pipelines/blob/master/sdk/python/kfp/_auth.py

And there is an open issue to support IAP kubeflow/pipelines#1104

jtfogarty commented 4 years ago

/kind feature