Open ShootingStarD opened 3 months ago
Instead of using get_app_client
, would it work for you to use the REST APIs instead?
If including auth in every request is too cumbersome, it should be possible to use a Session instead:
s = requests.Session
s.auth = ("admin", "password")
response = s.post(
"http://127.0.0.1:5000/api/2.0/mlflow/users/create",
json={
"username": "username",
"password": "password",
},
)
@mlflow/mlflow-team Please assign a maintainer and start triaging this issue.
I have implemented Keycloak Auth for mlflow you can check this out
Willingness to contribute
No. I cannot contribute this feature at this time.
Proposal Summary
I want to authenticate to mlflow without having to use environment variables.
Motivation
I want to make an mlflow server where some users can create/modify experiments and run. On the documentation, it is said that we can identify using UI, Environment variable, config file and request. I do not want to use envrionment variable or config file and prefer to do authentication dynamically.
Details
I tried using the following code to authenticate.
But the request response only give a response and does not automatically authenticate me on the app
With the environment variable, I can be authenticated, but for me there should be a python way to authenticate yourself in a client connection by providing username and password, without having to use environment variables
What component(s) does this bug affect?
area/artifacts
: Artifact stores and artifact loggingarea/build
: Build and test infrastructure for MLflowarea/deployments
: MLflow Deployments client APIs, server, and third-party Deployments integrationsarea/docs
: MLflow documentation pagesarea/examples
: Example codearea/model-registry
: Model Registry service, APIs, and the fluent client calls for Model Registryarea/models
: MLmodel format, model serialization/deserialization, flavorsarea/recipes
: Recipes, Recipe APIs, Recipe configs, Recipe Templatesarea/projects
: MLproject format, project running backendsarea/scoring
: MLflow Model server, model deployment tools, Spark UDFsarea/server-infra
: MLflow Tracking server backendarea/tracking
: Tracking Service, tracking client APIs, autologgingWhat interface(s) does this bug affect?
area/uiux
: Front-end, user experience, plotting, JavaScript, JavaScript dev serverarea/docker
: Docker use across MLflow's components, such as MLflow Projects and MLflow Modelsarea/sqlalchemy
: Use of SQLAlchemy in the Tracking Service or Model Registryarea/windows
: Windows supportWhat language(s) does this bug affect?
language/r
: R APIs and clientslanguage/java
: Java APIs and clientslanguage/new
: Proposals for new client languagesWhat integration(s) does this bug affect?
integrations/azure
: Azure and Azure ML integrationsintegrations/sagemaker
: SageMaker integrationsintegrations/databricks
: Databricks integrations