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

Add authorization layer for ModelClient #509

Closed
vlad-tokarev opened this issue Feb 26, 2021 · 1 comment · Fixed by #522, #556 or #578
Closed

Add authorization layer for ModelClient #509

vlad-tokarev opened this issue Feb 26, 2021 · 1 comment · Fixed by #522, #556 or #578
Assignees
Labels
1.5 WG:SDK Working Group: All about odahuflow sdk functionality

Comments

@vlad-tokarev
Copy link
Member

vlad-tokarev commented Feb 26, 2021

Is your feature request related to a problem? Please describe.
To interact with MLFlow models that were packaged and deployed to ODAHU I can use ModelClient.
But in opposite to other clients such as ModelTrainingClient or ConnectionClient, it's not inherited from RemoteAPIClient. Therefore it does not support authentication that is supported by RemoteAPIClient by using refresh token or client credentials

So even if I pass API token using when initializing ModelClient it will be expired soon but won't be renewed automatically

Describe the solution you'd like
We should support the same way of automatic authentication as RemoteAPIClient in ModelClient

Additional context
Consider re-using Authenticator for this task

@vlad-tokarev vlad-tokarev added this to Backlog in odahu-kanban via automation Feb 26, 2021
@vlad-tokarev vlad-tokarev added the WG:SDK Working Group: All about odahuflow sdk functionality label Feb 26, 2021
@karbyshevds karbyshevds added the 1.5 label Mar 3, 2021
@keshamin keshamin linked a pull request Mar 4, 2021 that will close this issue
@karbyshevds karbyshevds moved this from Backlog to In development in odahu-kanban Mar 25, 2021
@BPylypenko BPylypenko moved this from In development to In QA in odahu-kanban Apr 12, 2021
@lev-titov lev-titov reopened this Apr 16, 2021
odahu-kanban automation moved this from In QA to To Do Apr 16, 2021
@keshamin keshamin moved this from To Do to In development in odahu-kanban Apr 19, 2021
@BPylypenko BPylypenko moved this from In development to In QA in odahu-kanban May 13, 2021
@BPylypenko
Copy link
Contributor

When I use an empty config (new created), the model invoke command succeeds when the --url-prefix param is used but when --md or --mr, it fails.

export ODAHUFLOW_CONFIG=config/new_clean_config
TOKEN=<valid token>
# succeeds and returns result
odahuflowctl model invoke --url-prefix /model/airflow-wine-from-yamls --base-url https://<server-host-url> --file ~/ODAHU/data_test/request.json --jwt ${TOKEN}

# these both fail
odahuflowctl model invoke --md airflow-wine-from-yamls --base-url https://<server-host-url> --file ~/ODAHU/data_test/request.json --jwt ${TOKEN}

odahuflowctl model invoke --mr airflow-wine-from-yamls-4cf73 --base-url https://<server-host-url> --file ~/ODAHU/data_test/request.json --jwt ${TOKEN}

@BPylypenko BPylypenko moved this from In QA to To Do in odahu-kanban May 19, 2021
@keshamin keshamin moved this from To Do to In QA in odahu-kanban May 19, 2021
This was linked to pull requests May 24, 2021
@BPylypenko BPylypenko moved this from In QA to Done in odahu-kanban Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.5 WG:SDK Working Group: All about odahuflow sdk functionality
Projects
odahu-kanban
  
Done
4 participants