SwissDataScienceCenter / renku-python

A Python library for the Renku collaborative data science platform.
https://renku-python.readthedocs.io/
Apache License 2.0
37 stars 29 forks source link

Importing datasets from private/internal projects fails in the interactive session #2059

Open m-alisafaee opened 3 years ago

m-alisafaee commented 3 years ago

Once the KG security is enabled, it's not possible to import datasets from non-public project in the interactive session's terminal. The reason is that renku CLI does not have a Keycloak or a gitlab token in the interactive session to include with KG access requests.

To Reproduce Steps to reproduce the behavior:

  1. Have a KG version with secure endpoints enabled (e.g. knowledge-graph:1.34.0)
  2. Start a new interactive session and open a terminal
  3. Try to import a dataset from a private or internal project (e.g. renku dataset import https://dev.renku.ch/datasets/b568ca8c-0a4e-454b-b099-316e3a86ad11)
  4. See error

Expected behavior The dataset should be imported when a user has proper access rights.

Workaround Once #1962 is done, users can import such datasets using UI. Equally, they can clone the project on their local computer, do a renku login <endpoint> in the CLI, and then import non-public datasets.

Additional Context We need to somehow attach a gitlab or keycloak token to API requests in the notebooks. This might need to send some request through a proxy in the notebooks.

m-alisafaee commented 3 years ago

Corresponding epic: https://github.com/SwissDataScienceCenter/renku-notebooks/issues/642