h2oai / steam

DEPRECATED Build, manage and deploy H2O's high-speed machine learning models.
http://www.h2o.ai/download/
GNU Affero General Public License v3.0
61 stars 30 forks source link

Allow registering authenticated H2O clusters. #388

Open seporaitis opened 6 years ago

seporaitis commented 6 years ago

I apologize in advance for unsolicited pull request, but if possible I would like some advice on whether this is a right approach and maybe I can contribute to the project.

Use-case

I would like to enable authentication on both - H2O and Steam. However, I was unable to find a way for Steam to connect to H2O when (hash) authentication is enabled.

This pull request

Is a proof-of-concept support for connecting to authenticated H2O cluster.

To see it in action (assuming H2O with authentication is running on 127.0.0.1:54321):

  1. make the steam binary
  2. make db
  3. ./steam serve master --superuser-name admin --superuser-password admin123
  4. ./steam login 127.0.0.1:9000 --username admin --password admin123
  5. ./steam register cluster --address 127.0.0.1:54321 --username h2ouser --password h2opass

Now opening up http://localhost:9000/ should show the cluster in the list:

screenshot from 2018-03-17 16-45-49

Upon clicking "Connect" it should show list of dataframes, retrieved from H2O cluster with authentication.

Caveats

  1. The password is stored in the database file in plain text.
  2. Currently only GetDatasetsFromCluster and RegisterCluster functions use authentication.

Questions

Does this look like a reasonable approach for the above defined use-case? If so and if this PR has a potential to be merged into master branch, I would be happy to accept your guidance on what would be needed from my side to get it done.

Looking forward to hear back from you.