Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authenticating via REST API #33

Open
mashu opened this issue Nov 10, 2023 · 4 comments
Open

Authenticating via REST API #33

mashu opened this issue Nov 10, 2023 · 4 comments

Comments

@mashu
Copy link

mashu commented Nov 10, 2023

Hi,
in the examples I see that it's possible to pass some dictionary with Authentication token, does that mean authentication is supported? if I dont have basic-auth set, the instance gets hacked. So it would be good to have.

@dpaetzel
Copy link
Contributor

Which examples do you refer to? I would also be very interested in authentication support; unfortunately, I can't invest a lot of time right now, though …

@mashu
Copy link
Author

mashu commented Nov 28, 2023

@dpaetzel I figured it works by just starting mlflow with authentication

mlflow server --app-name basic-auth

changing password ASAP

then logging as follow, where I use TOML file to store username and password

using Base64
using TOML
using MLFlowClient
# Create MLFlow instance
config = open("config.toml", "r") do file
    TOML.parse(read(file, String))
end
username = config["database"]["user"]
password = config["database"]["password"]
encoded_credentials = base64encode("$username:$password")
headers = Dict("Authorization" => "Basic $encoded_credentials")
mlf = MLFlow(mlflow_url, headers=headers)

@dpaetzel
Copy link
Contributor

Awesome, thank you! ☺️

@pebeto
Copy link
Member

pebeto commented Dec 25, 2023

@deyandyankov, could an authorization parameter be considered in the future? This can be an usability upgrade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants