-
Notifications
You must be signed in to change notification settings - Fork 4
feat: add authentication documentation for REANA JupyterLab extension #35
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
2b3f0bb
a008661
66db37d
6e40c68
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,39 @@ | ||||||
| # Authentication | ||||||
|
|
||||||
| ## Token Reuse | ||||||
|
|
||||||
| The REANA JupyterLab extension automatically reuses your existing VRE-issued JWT access token - the same one that authenticated your current JupyterLab session. **No additional login or authentication steps are required** to start using REANA through the extension. | ||||||
|
|
||||||
| ## Verifying Access | ||||||
|
|
||||||
| You can verify that authentication is working properly by: | ||||||
|
|
||||||
| 1. Opening the REANA sidebar tab in JupyterLab | ||||||
| 2. Checking if you can see your workflows listed | ||||||
| 3. Opening a workflow detail panel to see its contents | ||||||
|
|
||||||
| If these actions succeed, your authentication is working correctly. If you see "unauthorized" errors or empty lists where you expect content, there may be an authentication issue. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The "unauthorized" message is my assumption for an error message that could appear if something goes wrong. |
||||||
|
|
||||||
| ## Troubleshooting | ||||||
|
|
||||||
| If you encounter authentication problems: | ||||||
|
|
||||||
| - **Token expired?** Restart your JupyterLab container to get a fresh token | ||||||
| - **Still not working?** Re-login to the VRE web interface, then launch a new JupyterLab session | ||||||
| - **Need different credentials?** Use the connection configuration panel (see below) | ||||||
|
|
||||||
| ## Optional Connection Configuration | ||||||
|
|
||||||
| You can manually configure the connection to a different REANA instance by: | ||||||
|
||||||
| You can manually configure the connection to a different REANA instance by: | |
| You can still manually configure the connection to a different REANA instance by: |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Open Reana JupyterLab by clicking on the REANA icon in the JupyterLab sidebar.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Click
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 3. Entering a custom server URL and/or access token | |
| 3. Entering a custom server URL and access token |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence doesn't add any relevant information.
Please change it with the last paragraph of the page you removed:
After connecting to the REANA server, a notification will appear in the bottom right corner of the screen indicating that the connection was successful. You can now interact with the REANA server from within JupyterLab.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would move this section upper, so that we get the following order
- Verifying Access
- Authentication flow
- Troubleshooting
- Optional Connection Configuration
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -5,6 +5,28 @@ Explore Reana on the software's [official documentation](https://docs.reana.io/) | |||||||||
|
|
||||||||||
| You can find other examples of differen workflow languages on the [official Reana documentation](https://docs.reana.io/advanced-usage/access-control/rucio/). | ||||||||||
|
|
||||||||||
| # Authentication with reana-client | ||||||||||
|
|
||||||||||
| The REANA client provides a command-line interface for authenticating with the REANA server. You can use the `reana-client auth` command which initiates an OAuth 2.0 device flow authentication: | ||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add a link for oauth2.0 so that people can educate themselves, for example |
||||||||||
|
|
||||||||||
| ```bash | ||||||||||
| $ reana-client auth | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| This command will provide you with a URL to visit and a code to enter, allowing you to authenticate through your browser. You will be taken through the OAuth 2.0 device flow process where you'll need to enter the provided code on the authorization page to complete the authentication. | ||||||||||
|
|
||||||||||
| Example output: | ||||||||||
|
|
||||||||||
| ```text | ||||||||||
| $ reana-client auth | ||||||||||
| Go to: https://iam-escape.cloud.cnaf.infn.it/device | ||||||||||
| Enter code: 4HAL4G | ||||||||||
|
||||||||||
| Or open: https://iam-escape.cloud.cnaf.infn.it/device?user_code=4HAL4G | ||||||||||
| Waiting for authorization... | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| > **Important:** When using the `reana-client auth` command, please note that the VRE JupyterLab extension may not be automatically updated with your new authentication token. If you're using both the command-line client and the JupyterLab extension, you may need to restart your JupyterLab session for the extension to recognize your new authentication status. | ||||||||||
|
||||||||||
| > **Important:** When using the `reana-client auth` command, please note that the VRE JupyterLab extension may not be automatically updated with your new authentication token. If you're using both the command-line client and the JupyterLab extension, you may need to restart your JupyterLab session for the extension to recognize your new authentication status. | |
| :::warning[Important] | |
| When using the `reana-client auth` command, please note that the VRE JupyterLab extension may not be automatically updated with your new authentication token. If you're using both the command-line client and the JupyterLab extension, you may need to restart your JupyterLab session for the extension to recognize your new authentication status. | |
| ::: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, please have a look at https://github.com/vre-hub/vre-hub.github.io/actions/runs/16969223016/job/48101346774?pr=35
Just ping if you need any Docusaurus related help
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -65,3 +65,33 @@ kubectl exec -i -t deployment/reana-server -n reana -- flask reana-admin token-g | |||||
|
|
||||||
| 6. Navigate to `reana-vre.cern.ch` and log in with your IAM credentials. | ||||||
|
|
||||||
| ## JupyterLab REANA Extension Authentication | ||||||
|
|
||||||
| This section explains how the VRE-provided JWT used by the REANA JupyterLab extension is injected, accessed and refreshed (or not) during a user session. | ||||||
|
||||||
|
|
||||||
| ### Token injection at spawn time | ||||||
| During user pod creation the VRE spawner: | ||||||
| - Obtains (or reuses) the user's already validated access token. | ||||||
| - Injects it as an environment variable (`REANA_ACCESS_TOKEN`). | ||||||
| - Writes a lightweight config file with the token for `reana-client` CLI | ||||||
|
||||||
|
|
||||||
| No refresh token is stored; only the short‑lived access token is passed. | ||||||
|
|
||||||
| ### Token storage (UI extension vs CLI) | ||||||
| UI / JupyterLab extension: | ||||||
|
||||||
| UI / JupyterLab extension: | |
| The UI / JupyterLab extension: |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change it with written "during the spawning of the user session"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was unsure how to mention that the token is VRE requested. The VRE initiates the token request itself, hence I have mentioned like this, but I can see that it is incorrect. I will change it to your suggestion
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! "VRE-issued" it's definitely NOT incorrect (in a sense it is true), but in the perspective of having this documentation usable by a broader audience than the VRE one, I think it's better to generalise the fact that it doesn't matter the token provenance, the only important thing is that it's a valid token :)