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

Protect jupyterhub behind twitcher authentication #358

Merged
merged 21 commits into from
Oct 31, 2023

Conversation

mishaschwartz
Copy link
Collaborator

@mishaschwartz mishaschwartz commented Jul 14, 2023

Overview

Sets magpie cookies whenever a user logs in or out through jupyterhub so that they are automatically logged in or out through magpie as well.
Ensures that the user has permission to access jupyterhub according to magpie when logging in.

Changes

Non-breaking changes

  • adds jupyterhub as a provider in magpie so that admin users can set api permissions in magpie for jupyterhub

Breaking changes

Related Issue / Discussion

Additional Information

TODO:

  • Move authenticator changes to the github.com/Ouranosinc/jupyterhub project
  • Add custom logout handler so that logout in jupyterhub also logs out of magpie

@github-actions github-actions bot added component/jupyterhub Related to JupyterHub as development frontend with notebooks component/magpie Related to https://github.com/Ouranosinc/Magpie documentation Improvements or additions to documentation labels Jul 14, 2023
@crim-jenkins-bot
Copy link
Collaborator

E2E Test Results

DACCS-iac Pipeline Results

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1825/
Result : failure

BIRDHOUSE_DEPLOY_BRANCH : jupyter-behind-twitcher-keep-magpie-login
DACCS_CONFIGS_BRANCH : master
PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master
PAVICS_SDI_BRANCH : master

DESTROY_INFRA_ON_EXIT : true
PAVICS_HOST : https://host-140-133.rdext.crim.ca

PAVICS-e2e-workflow-tests Pipeline Results

Tests URL : http://daccs-jenkins.crim.ca:80/job/PAVICS-e2e-workflow-tests/job/master/1219/

NOTEBOOK TEST RESULTS
    
[2023-07-14T20:06:25.473Z] ============================= test session starts ==============================
[2023-07-14T20:06:25.473Z] platform linux -- Python 3.9.16, pytest-7.3.1, pluggy-1.0.0
[2023-07-14T20:06:25.473Z] rootdir: /home/jenkins/agent/workspace/PAVICS-e2e-workflow-tests_master
[2023-07-14T20:06:25.473Z] plugins: anyio-3.6.1, dash-2.10.0, nbval-0.9.6, tornasync-0.6.0.post2, xdist-3.3.1
[2023-07-14T20:06:25.473Z] collected 236 items
[2023-07-14T20:06:25.473Z] 
[2023-07-14T20:06:33.496Z] notebooks-auth/test_thredds.ipynb ...........                            [  4%]
[2023-07-14T20:06:38.013Z] pavics-sdi-master/docs/source/notebooks/WCS_example.ipynb .FFFFF.        [  7%]
[2023-07-14T20:06:47.953Z] pavics-sdi-master/docs/source/notebooks/WFS_example.ipynb ......         [ 10%]
[2023-07-14T20:06:56.197Z] pavics-sdi-master/docs/source/notebooks/WMS_example.ipynb ........       [ 13%]
[2023-07-14T20:14:19.940Z] pavics-sdi-master/docs/source/notebooks/climex.ipynb ............        [ 18%]
[2023-07-14T20:14:24.155Z] pavics-sdi-master/docs/source/notebooks/eccc-geoapi-climate-stations.ipynb . [ 19%]
[2023-07-14T20:14:52.089Z] ...............                                                          [ 25%]
[2023-07-14T20:15:04.255Z] pavics-sdi-master/docs/source/notebooks/eccc-geoapi-xclim.ipynb .....    [ 27%]
[2023-07-14T20:15:13.222Z] pavics-sdi-master/docs/source/notebooks/esgf-dap.ipynb ......            [ 30%]
[2023-07-14T20:15:29.301Z] pavics-sdi-master/docs/source/notebooks/forecasts.ipynb ......           [ 32%]
[2023-07-14T20:15:30.688Z] pavics-sdi-master/docs/source/notebooks/jupyter_extensions.ipynb .       [ 33%]
[2023-07-14T20:15:36.340Z] pavics-sdi-master/docs/source/notebooks/opendap.ipynb .......            [ 36%]
[2023-07-14T20:15:41.507Z] pavics-sdi-master/docs/source/notebooks/pavics_thredds.ipynb .....       [ 38%]
[2023-07-14T20:20:44.320Z] pavics-sdi-master/docs/source/notebooks/regridding.ipynb ............... [ 44%]
[2023-07-14T20:22:00.015Z] .............                                                            [ 50%]
[2023-07-14T20:22:02.758Z] pavics-sdi-master/docs/source/notebooks/rendering.ipynb ....             [ 51%]
[2023-07-14T20:22:05.496Z] pavics-sdi-master/docs/source/notebooks/subset-user-input.ipynb ........ [ 55%]
[2023-07-14T20:22:23.592Z] .................                                                        [ 62%]
[2023-07-14T20:22:31.465Z] pavics-sdi-master/docs/source/notebooks/subsetting.ipynb ....F.          [ 64%]
[2023-07-14T20:22:32.910Z] pavics-sdi-master/docs/source/notebook-components/weaver_example.ipynb . [ 65%]
[2023-07-14T20:22:34.339Z] .FFFFFFFF                                                                [ 69%]
[2023-07-14T20:22:45.123Z] finch-master/docs/source/notebooks/dap_subset.ipynb ...........          [ 73%]
[2023-07-14T20:22:54.420Z] finch-master/docs/source/notebooks/finch-usage.ipynb ......              [ 76%]
[2023-07-14T20:22:56.961Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-1DataAccess.ipynb . [ 76%]
[2023-07-14T20:23:00.330Z] ......                                                                   [ 79%]
[2023-07-14T20:23:08.462Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-2Subsetting.ipynb . [ 79%]
[2023-07-14T20:23:22.527Z] .............                                                            [ 85%]
[2023-07-14T20:23:32.516Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-3Climate-Indicators.ipynb . [ 85%]
[2023-07-14T20:24:07.471Z] ....s.                                                                   [ 88%]
[2023-07-14T20:24:15.613Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-4Ensembles.ipynb . [ 88%]
[2023-07-14T20:24:28.441Z] ...                                                                      [ 89%]
[2023-07-14T20:24:43.350Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-5Visualization.ipynb . [ 90%]
[2023-07-14T20:25:06.710Z] ......                                                                   [ 92%]
[2023-07-14T20:25:08.745Z] notebooks/hummingbird.ipynb ............                                 [ 97%]
[2023-07-14T20:28:03.355Z] notebooks/stress-tests.ipynb .....                                       [100%]
[2023-07-14T20:28:03.355Z] 
[2023-07-14T20:28:03.355Z] =================================== FAILURES ===================================
    
  

@crim-jenkins-bot
Copy link
Collaborator

E2E Test Results

DACCS-iac Pipeline Results

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1870/
Result : failure

BIRDHOUSE_DEPLOY_BRANCH : jupyter-behind-twitcher-keep-magpie-login
DACCS_CONFIGS_BRANCH : master
PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master
PAVICS_SDI_BRANCH : master

DESTROY_INFRA_ON_EXIT : true
PAVICS_HOST : https://host-140-69.rdext.crim.ca

PAVICS-e2e-workflow-tests Pipeline Results

Tests URL : http://daccs-jenkins.crim.ca:80/job/PAVICS-e2e-workflow-tests/job/master/1227/

NOTEBOOK TEST RESULTS
    
[2023-07-24T18:16:47.828Z] ============================= test session starts ==============================
[2023-07-24T18:16:47.828Z] platform linux -- Python 3.9.16, pytest-7.3.1, pluggy-1.0.0
[2023-07-24T18:16:47.828Z] rootdir: /home/jenkins/agent/workspace/PAVICS-e2e-workflow-tests_master
[2023-07-24T18:16:47.828Z] plugins: anyio-3.6.1, dash-2.10.0, nbval-0.9.6, tornasync-0.6.0.post2, xdist-3.3.1
[2023-07-24T18:16:47.828Z] collected 236 items
[2023-07-24T18:16:47.828Z] 
[2023-07-24T18:16:55.569Z] notebooks-auth/test_thredds.ipynb ...........                            [  4%]
[2023-07-24T18:17:00.898Z] pavics-sdi-master/docs/source/notebooks/WCS_example.ipynb .FFFFF.        [  7%]
[2023-07-24T18:17:10.997Z] pavics-sdi-master/docs/source/notebooks/WFS_example.ipynb ......         [ 10%]
[2023-07-24T18:17:19.400Z] pavics-sdi-master/docs/source/notebooks/WMS_example.ipynb ........       [ 13%]
[2023-07-24T18:25:47.085Z] pavics-sdi-master/docs/source/notebooks/climex.ipynb ............        [ 18%]
[2023-07-24T18:25:47.085Z] pavics-sdi-master/docs/source/notebooks/eccc-geoapi-climate-stations.ipynb . [ 19%]
[2023-07-24T18:25:48.139Z] ...............                                                          [ 25%]
[2023-07-24T18:25:57.518Z] pavics-sdi-master/docs/source/notebooks/eccc-geoapi-xclim.ipynb .....    [ 27%]
[2023-07-24T18:26:05.724Z] pavics-sdi-master/docs/source/notebooks/esgf-dap.ipynb ......            [ 30%]
[2023-07-24T18:26:22.487Z] pavics-sdi-master/docs/source/notebooks/forecasts.ipynb ......           [ 32%]
[2023-07-24T18:26:23.883Z] pavics-sdi-master/docs/source/notebooks/jupyter_extensions.ipynb .       [ 33%]
[2023-07-24T18:26:29.281Z] pavics-sdi-master/docs/source/notebooks/opendap.ipynb .......            [ 36%]
[2023-07-24T18:26:33.523Z] pavics-sdi-master/docs/source/notebooks/pavics_thredds.ipynb .....       [ 38%]
[2023-07-24T18:30:16.266Z] pavics-sdi-master/docs/source/notebooks/regridding.ipynb ............... [ 44%]
[2023-07-24T18:31:23.862Z] .............                                                            [ 50%]
[2023-07-24T18:31:28.581Z] pavics-sdi-master/docs/source/notebooks/rendering.ipynb ....             [ 51%]
[2023-07-24T18:31:30.912Z] pavics-sdi-master/docs/source/notebooks/subset-user-input.ipynb ........ [ 55%]
[2023-07-24T18:31:48.271Z] .................                                                        [ 62%]
[2023-07-24T18:31:55.715Z] pavics-sdi-master/docs/source/notebooks/subsetting.ipynb ....F.          [ 64%]
[2023-07-24T18:31:57.109Z] pavics-sdi-master/docs/source/notebook-components/weaver_example.ipynb . [ 65%]
[2023-07-24T18:32:06.063Z] ..F......                                                                [ 69%]
[2023-07-24T18:32:16.666Z] finch-master/docs/source/notebooks/dap_subset.ipynb ...........          [ 73%]
[2023-07-24T18:32:26.252Z] finch-master/docs/source/notebooks/finch-usage.ipynb ......              [ 76%]
[2023-07-24T18:32:27.633Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-1DataAccess.ipynb . [ 76%]
[2023-07-24T18:32:30.700Z] ......                                                                   [ 79%]
[2023-07-24T18:32:38.850Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-2Subsetting.ipynb . [ 79%]
[2023-07-24T18:32:55.437Z] .............                                                            [ 85%]
[2023-07-24T18:33:05.438Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-3Climate-Indicators.ipynb . [ 85%]
[2023-07-24T18:33:43.963Z] ....s.                                                                   [ 88%]
[2023-07-24T18:33:52.110Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-4Ensembles.ipynb . [ 88%]
[2023-07-24T18:34:06.881Z] ...                                                                      [ 89%]
[2023-07-24T18:34:21.828Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-5Visualization.ipynb . [ 90%]
[2023-07-24T18:34:44.380Z] ......                                                                   [ 92%]
[2023-07-24T18:34:46.418Z] notebooks/hummingbird.ipynb ............                                 [ 97%]
[2023-07-24T18:37:50.864Z] notebooks/stress-tests.ipynb .....                                       [100%]
[2023-07-24T18:37:50.865Z] 
[2023-07-24T18:37:50.865Z] =================================== FAILURES ===================================
    
  

@mishaschwartz
Copy link
Collaborator Author

mishaschwartz commented Jul 25, 2023

@tlvu
I've moved the jupyterhub changes to Ouranosinc/jupyterhub#17 I'm not a member of that repo so I can't directly request a review. So can you (or the relevant person at Ouranos) please review that PR.

When that one is pulled in, I will update this one to reflect the changes.

@crim-jenkins-bot
Copy link
Collaborator

E2E Test Results

DACCS-iac Pipeline Results

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1872/
Result : failure

BIRDHOUSE_DEPLOY_BRANCH : jupyter-behind-twitcher-keep-magpie-login
DACCS_CONFIGS_BRANCH : master
PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master
PAVICS_SDI_BRANCH : master

DESTROY_INFRA_ON_EXIT : true
PAVICS_HOST : https://host-140-69.rdext.crim.ca

PAVICS-e2e-workflow-tests Pipeline Results

Tests URL : http://daccs-jenkins.crim.ca:80/job/PAVICS-e2e-workflow-tests/job/master/1228/

NOTEBOOK TEST RESULTS
    
[2023-07-25T15:16:53.244Z] ============================= test session starts ==============================
[2023-07-25T15:16:53.244Z] platform linux -- Python 3.9.16, pytest-7.3.1, pluggy-1.0.0
[2023-07-25T15:16:53.244Z] rootdir: /home/jenkins/agent/workspace/PAVICS-e2e-workflow-tests_master
[2023-07-25T15:16:53.244Z] plugins: anyio-3.6.1, dash-2.10.0, nbval-0.9.6, tornasync-0.6.0.post2, xdist-3.3.1
[2023-07-25T15:16:53.244Z] collected 236 items
[2023-07-25T15:16:53.244Z] 
[2023-07-25T15:17:01.382Z] notebooks-auth/test_thredds.ipynb ...........                            [  4%]
[2023-07-25T15:17:06.532Z] pavics-sdi-master/docs/source/notebooks/WCS_example.ipynb .FFFFF.        [  7%]
[2023-07-25T15:17:16.868Z] pavics-sdi-master/docs/source/notebooks/WFS_example.ipynb ......         [ 10%]
[2023-07-25T15:17:26.835Z] pavics-sdi-master/docs/source/notebooks/WMS_example.ipynb ........       [ 13%]
[2023-07-25T15:25:51.594Z] pavics-sdi-master/docs/source/notebooks/climex.ipynb ............        [ 18%]
[2023-07-25T15:25:51.594Z] pavics-sdi-master/docs/source/notebooks/eccc-geoapi-climate-stations.ipynb . [ 19%]
[2023-07-25T15:25:51.594Z] ...............                                                          [ 25%]
[2023-07-25T15:26:00.740Z] pavics-sdi-master/docs/source/notebooks/eccc-geoapi-xclim.ipynb .....    [ 27%]
[2023-07-25T15:26:09.670Z] pavics-sdi-master/docs/source/notebooks/esgf-dap.ipynb ......            [ 30%]
[2023-07-25T15:26:27.204Z] pavics-sdi-master/docs/source/notebooks/forecasts.ipynb ......           [ 32%]
[2023-07-25T15:26:28.856Z] pavics-sdi-master/docs/source/notebooks/jupyter_extensions.ipynb .       [ 33%]
[2023-07-25T15:26:34.263Z] pavics-sdi-master/docs/source/notebooks/opendap.ipynb .......            [ 36%]
[2023-07-25T15:26:39.031Z] pavics-sdi-master/docs/source/notebooks/pavics_thredds.ipynb .....       [ 38%]
[2023-07-25T15:30:27.548Z] pavics-sdi-master/docs/source/notebooks/regridding.ipynb ............... [ 44%]
[2023-07-25T15:31:48.318Z] .............                                                            [ 50%]
[2023-07-25T15:31:52.151Z] pavics-sdi-master/docs/source/notebooks/rendering.ipynb ....             [ 51%]
[2023-07-25T15:31:54.478Z] pavics-sdi-master/docs/source/notebooks/subset-user-input.ipynb ........ [ 55%]
[2023-07-25T15:32:13.152Z] .................                                                        [ 62%]
[2023-07-25T15:32:21.821Z] pavics-sdi-master/docs/source/notebooks/subsetting.ipynb ....F.          [ 64%]
[2023-07-25T15:32:23.731Z] pavics-sdi-master/docs/source/notebook-components/weaver_example.ipynb . [ 65%]
[2023-07-25T15:32:24.791Z] .FFFFFFFF                                                                [ 69%]
[2023-07-25T15:32:36.184Z] finch-master/docs/source/notebooks/dap_subset.ipynb ...........          [ 73%]
[2023-07-25T15:32:45.512Z] finch-master/docs/source/notebooks/finch-usage.ipynb ......              [ 76%]
[2023-07-25T15:32:46.933Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-1DataAccess.ipynb . [ 76%]
[2023-07-25T15:32:50.781Z] ......                                                                   [ 79%]
[2023-07-25T15:33:00.794Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-2Subsetting.ipynb . [ 79%]
[2023-07-25T15:33:20.444Z] .............                                                            [ 85%]
[2023-07-25T15:33:30.468Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-3Climate-Indicators.ipynb . [ 85%]
[2023-07-25T15:34:11.887Z] ....s.                                                                   [ 88%]
[2023-07-25T15:34:20.031Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-4Ensembles.ipynb . [ 88%]
[2023-07-25T15:34:35.572Z] ...                                                                      [ 89%]
[2023-07-25T15:34:53.694Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-5Visualization.ipynb . [ 90%]
[2023-07-25T15:35:16.507Z] ......                                                                   [ 92%]
[2023-07-25T15:35:19.551Z] notebooks/hummingbird.ipynb ............                                 [ 97%]
[2023-07-25T15:38:38.757Z] notebooks/stress-tests.ipynb .....                                       [100%]
[2023-07-25T15:38:38.757Z] 
[2023-07-25T15:38:38.757Z] =================================== FAILURES ===================================
    
  

mishaschwartz added a commit to Ouranosinc/jupyterhub that referenced this pull request Jul 31, 2023
This unifies the login/logout capabilities of jupyterhub and magpie so
that when logging in to jupyterhub, the user is simultaneously logged in
to magpie. Similarly, when logging out of jupyterhub, the user is also
logged out of magpie.

This change requires that one additional parameter be set:
- `c.MagpieAuthenticator.public_fqdn` which is the publicly available
FQDN where magpie is running (this is required when setting the domain
on cookies)

Note:
- the `@gen.coroutine` decorator is replaced with the (now recommended)
`async` syntax

This change was first proposed here:
bird-house/birdhouse-deploy#358
@mishaschwartz mishaschwartz marked this pull request as ready for review July 31, 2023 13:22
@crim-jenkins-bot
Copy link
Collaborator

E2E Test Results

DACCS-iac Pipeline Results

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1904/
Result : failure

BIRDHOUSE_DEPLOY_BRANCH : jupyter-behind-twitcher-keep-magpie-login
DACCS_CONFIGS_BRANCH : master
PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master
PAVICS_SDI_BRANCH : master

DESTROY_INFRA_ON_EXIT : true
PAVICS_HOST : https://host-140-216.rdext.crim.ca

PAVICS-e2e-workflow-tests Pipeline Results

Tests URL : http://daccs-jenkins.crim.ca:80/job/PAVICS-e2e-workflow-tests/job/master/1238/

NOTEBOOK TEST RESULTS
    
[2023-07-31T15:59:53.637Z] ============================= test session starts ==============================
[2023-07-31T15:59:53.637Z] platform linux -- Python 3.9.16, pytest-7.3.1, pluggy-1.0.0
[2023-07-31T15:59:53.637Z] rootdir: /home/jenkins/agent/workspace/PAVICS-e2e-workflow-tests_master@2
[2023-07-31T15:59:53.637Z] plugins: anyio-3.6.1, dash-2.10.0, nbval-0.9.6, tornasync-0.6.0.post2, xdist-3.3.1
[2023-07-31T15:59:53.637Z] collected 236 items
[2023-07-31T15:59:53.637Z] 
[2023-07-31T16:00:01.764Z] notebooks-auth/test_thredds.ipynb ...........                            [  4%]
[2023-07-31T16:00:17.315Z] pavics-sdi-master/docs/source/notebooks/WCS_example.ipynb .......        [  7%]
[2023-07-31T16:00:31.690Z] pavics-sdi-master/docs/source/notebooks/WFS_example.ipynb ......         [ 10%]
[2023-07-31T16:00:40.424Z] pavics-sdi-master/docs/source/notebooks/WMS_example.ipynb ........       [ 13%]
[2023-07-31T16:14:27.709Z] pavics-sdi-master/docs/source/notebooks/climex.ipynb ............        [ 18%]
[2023-07-31T16:14:30.244Z] pavics-sdi-master/docs/source/notebooks/eccc-geoapi-climate-stations.ipynb . [ 19%]
[2023-07-31T16:14:40.498Z] ...............                                                          [ 25%]
[2023-07-31T16:14:49.882Z] pavics-sdi-master/docs/source/notebooks/eccc-geoapi-xclim.ipynb .....    [ 27%]
[2023-07-31T16:14:56.360Z] pavics-sdi-master/docs/source/notebooks/esgf-dap.ipynb ......            [ 30%]
[2023-07-31T16:15:12.732Z] pavics-sdi-master/docs/source/notebooks/forecasts.ipynb ......           [ 32%]
[2023-07-31T16:15:14.125Z] pavics-sdi-master/docs/source/notebooks/jupyter_extensions.ipynb .       [ 33%]
[2023-07-31T16:15:19.719Z] pavics-sdi-master/docs/source/notebooks/opendap.ipynb .......            [ 36%]
[2023-07-31T16:15:24.219Z] pavics-sdi-master/docs/source/notebooks/pavics_thredds.ipynb .....       [ 38%]
[2023-07-31T16:19:37.660Z] pavics-sdi-master/docs/source/notebooks/regridding.ipynb ............... [ 44%]
[2023-07-31T16:20:57.903Z] .............                                                            [ 50%]
[2023-07-31T16:21:01.995Z] pavics-sdi-master/docs/source/notebooks/rendering.ipynb ....             [ 51%]
[2023-07-31T16:21:04.200Z] pavics-sdi-master/docs/source/notebooks/subset-user-input.ipynb ........ [ 55%]
[2023-07-31T16:21:21.032Z] .................                                                        [ 62%]
[2023-07-31T16:21:29.062Z] pavics-sdi-master/docs/source/notebooks/subsetting.ipynb ......          [ 64%]
[2023-07-31T16:21:30.455Z] pavics-sdi-master/docs/source/notebook-components/weaver_example.ipynb . [ 65%]
[2023-07-31T16:21:39.013Z] ..F......                                                                [ 69%]
[2023-07-31T16:21:49.849Z] finch-master/docs/source/notebooks/dap_subset.ipynb ...........          [ 73%]
[2023-07-31T16:21:59.198Z] finch-master/docs/source/notebooks/finch-usage.ipynb ......              [ 76%]
[2023-07-31T16:22:00.574Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-1DataAccess.ipynb . [ 76%]
[2023-07-31T16:22:03.635Z] ......                                                                   [ 79%]
[2023-07-31T16:22:11.776Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-2Subsetting.ipynb . [ 79%]
[2023-07-31T16:22:26.625Z] .............                                                            [ 85%]
[2023-07-31T16:22:36.616Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-3Climate-Indicators.ipynb . [ 85%]
[2023-07-31T16:23:14.359Z] ....s.                                                                   [ 88%]
[2023-07-31T16:23:24.568Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-4Ensembles.ipynb . [ 88%]
[2023-07-31T16:23:38.868Z] ...                                                                      [ 89%]
[2023-07-31T16:23:53.763Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-5Visualization.ipynb . [ 90%]
[2023-07-31T16:24:17.872Z] ......                                                                   [ 92%]
[2023-07-31T16:24:20.841Z] notebooks/hummingbird.ipynb ............                                 [ 97%]
[2023-07-31T16:27:24.931Z] notebooks/stress-tests.ipynb .....                                       [100%]
[2023-07-31T16:27:24.931Z] 
[2023-07-31T16:27:24.931Z] =================================== FAILURES ===================================
    
  

@github-actions github-actions bot added ci/operations Continuous Integration components ci/tests Issues or changes related to tests scripts labels Aug 16, 2023
@crim-jenkins-bot
Copy link
Collaborator

E2E Test Results

DACCS-iac Pipeline Results

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1959/
Result : failure

BIRDHOUSE_DEPLOY_BRANCH : jupyter-behind-twitcher-keep-magpie-login
DACCS_CONFIGS_BRANCH : master
PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master
PAVICS_SDI_BRANCH : master

DESTROY_INFRA_ON_EXIT : true
PAVICS_HOST : https://host-140-216.rdext.crim.ca

Infrastructure deployment failed. Instance has not been destroyed. @matprov

@crim-jenkins-bot
Copy link
Collaborator

E2E Test Results

DACCS-iac Pipeline Results

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1960/
Result : failure

BIRDHOUSE_DEPLOY_BRANCH : jupyter-behind-twitcher-keep-magpie-login
DACCS_CONFIGS_BRANCH : master
PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master
PAVICS_SDI_BRANCH : master

DESTROY_INFRA_ON_EXIT : true
PAVICS_HOST : https://host-140-133.rdext.crim.ca

Infrastructure deployment failed. Instance has not been destroyed. @matprov

@tlvu
Copy link
Collaborator

tlvu commented Sep 28, 2023

This will allow us to check whether a user is allowed to log in to jupyterhub but will no longer check at every request (by querying twitcher's ows/verify endpoint). I believe that this is a good compromise that will allow admins some control over who is allowed to access jupyterhub while simultaneously not affecting performance.

Super! I think this should fix the performance problem. Does it still set Magpie cookie as before? And the reverse scenario, someone already logged into Magpie will not need to login again for JupyterHub?

Someone could be logged in as "user1" from Magpie's point of view while being "user2" in Jupyterhub depending on own cookies were handled.

I am not sure I follow this one. Right now, before this PR, this situation can not happen? How can this situation happen now with this PR?

@mishaschwartz
Copy link
Collaborator Author

mishaschwartz commented Sep 28, 2023

Does it still set Magpie cookie as before? And the reverse scenario, someone already logged into Magpie will not need to login again for JupyterHub?

Yes it still sets the Magpie cookie.
No, even if you've logged in to Magpie, you still need to log in to jupyterhub. We decided that jupyterhub should be considered the only login screen that users should interact with.

I am not sure I follow this one. Right now, before this PR, this situation can not happen? How can this situation happen now with this PR?

It could happen before this PR as well. A user could log in to juptyerhub with one set of credentials and then go over to magpie and log in with another. This PR makes the situation slightly better because if a user logs in to Magpie first as user1 and then to jupyterhub as user2, they will be logged into magpie as user2 at the same time (because it sets the Magpie session cookie to user2's cookie).

@fmigneault
Copy link
Collaborator

fmigneault commented Sep 28, 2023

@tlvu

I am not sure I follow this one. Right now, before this PR, this situation can not happen? How can this situation happen now with this PR?

Look! (using current master). If cookies are set correctly, matching users are not enforced between Jupyterhub and the rest of the platform.

image

@mishaschwartz
Copy link
Collaborator Author

DO NOT MERGE THIS PR UNTIL Ouranosinc/jupyterhub#19 is merged and the pavics/jupyterhub version has been updated here!

This has now been updated. This PR is now ok to merge

@crim-jenkins-bot
Copy link
Collaborator

E2E Test Results

DACCS-iac Pipeline Results

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/2127/
Result : failure

BIRDHOUSE_DEPLOY_BRANCH : jupyter-behind-twitcher-keep-magpie-login
DACCS_CONFIGS_BRANCH : master
PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master
PAVICS_SDI_BRANCH : master

DESTROY_INFRA_ON_EXIT : true
PAVICS_HOST : https://host-140-216.rdext.crim.ca

PAVICS-e2e-workflow-tests Pipeline Results

Tests URL : http://daccs-jenkins.crim.ca:80/job/PAVICS-e2e-workflow-tests/job/master/1350/

NOTEBOOK TEST RESULTS
    
[2023-10-02T18:51:08.385Z] ============================= test session starts ==============================
[2023-10-02T18:51:08.385Z] platform linux -- Python 3.9.16, pytest-7.3.1, pluggy-1.0.0
[2023-10-02T18:51:08.385Z] rootdir: /home/jenkins/agent/workspace/PAVICS-e2e-workflow-tests_master
[2023-10-02T18:51:08.385Z] plugins: anyio-3.6.1, dash-2.10.0, nbval-0.9.6, tornasync-0.6.0.post2, xdist-3.3.1
[2023-10-02T18:51:08.385Z] collected 254 items
[2023-10-02T18:51:08.385Z] 
[2023-10-02T18:51:16.336Z] notebooks-auth/geoserver.ipynb ........F.F..FFF.                         [  6%]
[2023-10-02T18:51:24.153Z] notebooks-auth/test_thredds.ipynb ...........                            [ 11%]
[2023-10-02T18:51:32.882Z] pavics-sdi-master/docs/source/notebooks/WCS_example.ipynb .......        [ 13%]
[2023-10-02T18:51:42.586Z] pavics-sdi-master/docs/source/notebooks/WFS_example.ipynb ......         [ 16%]
[2023-10-02T18:51:50.107Z] pavics-sdi-master/docs/source/notebooks/WMS_example.ipynb .F......       [ 19%]
[2023-10-02T18:59:12.033Z] pavics-sdi-master/docs/source/notebooks/climex.ipynb ............        [ 24%]
[2023-10-02T18:59:14.572Z] pavics-sdi-master/docs/source/notebooks/eccc-geoapi-climate-stations.ipynb . [ 24%]
[2023-10-02T18:59:23.256Z] ...............                                                          [ 30%]
[2023-10-02T18:59:32.289Z] pavics-sdi-master/docs/source/notebooks/eccc-geoapi-xclim.ipynb F.F..    [ 32%]
[2023-10-02T19:00:22.567Z] pavics-sdi-master/docs/source/notebooks/esgf-dap.ipynb ......            [ 34%]
[2023-10-02T19:00:36.503Z] pavics-sdi-master/docs/source/notebooks/forecasts.ipynb ......           [ 37%]
[2023-10-02T19:00:37.882Z] pavics-sdi-master/docs/source/notebooks/jupyter_extensions.ipynb .       [ 37%]
[2023-10-02T19:00:43.512Z] pavics-sdi-master/docs/source/notebooks/opendap.ipynb .......            [ 40%]
[2023-10-02T19:00:47.943Z] pavics-sdi-master/docs/source/notebooks/pavics_thredds.ipynb .....       [ 42%]
[2023-10-02T19:05:13.144Z] pavics-sdi-master/docs/source/notebooks/regridding.ipynb ............... [ 48%]
[2023-10-02T19:06:30.951Z] .............                                                            [ 53%]
[2023-10-02T19:06:32.153Z] pavics-sdi-master/docs/source/notebooks/rendering.ipynb ....             [ 54%]
[2023-10-02T19:06:34.634Z] pavics-sdi-master/docs/source/notebooks/subset-user-input.ipynb ........ [ 57%]
[2023-10-02T19:06:55.500Z] .................                                                        [ 64%]
[2023-10-02T19:07:03.227Z] pavics-sdi-master/docs/source/notebooks/subsetting.ipynb ......          [ 66%]
[2023-10-02T19:07:04.612Z] pavics-sdi-master/docs/source/notebook-components/weaver_example.ipynb . [ 67%]
[2023-10-02T19:07:06.236Z] .FFFFFFFF                                                                [ 70%]
[2023-10-02T19:07:16.792Z] finch-master/docs/source/notebooks/dap_subset.ipynb ...........          [ 75%]
[2023-10-02T19:07:26.139Z] finch-master/docs/source/notebooks/finch-usage.ipynb ......              [ 77%]
[2023-10-02T19:07:27.520Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-1DataAccess.ipynb . [ 77%]
[2023-10-02T19:07:30.329Z] ......                                                                   [ 80%]
[2023-10-02T19:07:38.456Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-2Subsetting.ipynb . [ 80%]
[2023-10-02T19:07:52.390Z] .............                                                            [ 85%]
[2023-10-02T19:08:02.388Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-3Climate-Indicators.ipynb . [ 86%]
[2023-10-02T19:08:37.101Z] ....s.                                                                   [ 88%]
[2023-10-02T19:08:45.248Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-4Ensembles.ipynb . [ 88%]
[2023-10-02T19:08:57.796Z] ...                                                                      [ 90%]
[2023-10-02T19:09:12.723Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-5Visualization.ipynb . [ 90%]
[2023-10-02T19:09:36.035Z] ......                                                                   [ 92%]
[2023-10-02T19:09:38.706Z] notebooks/hummingbird.ipynb ............                                 [ 97%]
[2023-10-02T19:12:18.313Z] notebooks/stress-tests.ipynb ......                                      [100%]
[2023-10-02T19:12:18.313Z] 
[2023-10-02T19:12:18.313Z] =================================== FAILURES ===================================
    
  

@tlvu
Copy link
Collaborator

tlvu commented Oct 4, 2023

I will redo the performance test and report back.

@mishaschwartz
Copy link
Collaborator Author

I will redo the performance test and report back.

@tlvu have you had a chance to do this? I'd like to get this PR merged in soon if possible

@tlvu
Copy link
Collaborator

tlvu commented Oct 30, 2023

I will redo the performance test and report back.

@tlvu have you had a chance to do this? I'd like to get this PR merged in soon if possible

Opps, sorry, this one felt through the cracks with too many interruptions. Will try to re-test this week for you.

@tlvu
Copy link
Collaborator

tlvu commented Oct 30, 2023

@mishaschwartz

In the spirit of quickly merging this PR and to future-proof any unforeseen future problems in production because production is always full of surprises and we can never anticipate everything, can you add a toogle to disable this Jupyterhub behind Twitcher? The same kind of toogle as in PR #348.

This way, if something happen in production, we can toogle this off immediately to avoid breaking users. Then we have time for further investigations.

The toogle would allow the previous behavior before this PR.

@mishaschwartz
Copy link
Collaborator Author

@tlvu

I've added a toggle here: 1e6b98b

I have not added this variable to the env.local.example file because I believe that it shouldn't be advertised to most users since I really don't recommend disabling this functionality unless absolutely necessary.

However, you know about it now so Ouranos can always disable it if necessary.

@crim-jenkins-bot
Copy link
Collaborator

E2E Test Results

DACCS-iac Pipeline Results

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/2190/
Result : failure

BIRDHOUSE_DEPLOY_BRANCH : jupyter-behind-twitcher-keep-magpie-login
DACCS_CONFIGS_BRANCH : master
PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master
PAVICS_SDI_BRANCH : master

DESTROY_INFRA_ON_EXIT : true
PAVICS_HOST : https://host-140-90.rdext.crim.ca

Infrastructure deployment failed. Instance has not been destroyed. @matprov

@crim-jenkins-bot
Copy link
Collaborator

E2E Test Results

DACCS-iac Pipeline Results

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/2191/
Result : failure

BIRDHOUSE_DEPLOY_BRANCH : jupyter-behind-twitcher-keep-magpie-login
DACCS_CONFIGS_BRANCH : master
PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master
PAVICS_SDI_BRANCH : master

DESTROY_INFRA_ON_EXIT : true
PAVICS_HOST : https://host-140-35.rdext.crim.ca

Infrastructure deployment failed. Instance has not been destroyed. @matprov

@tlvu
Copy link
Collaborator

tlvu commented Oct 30, 2023

@tlvu

I've added a toggle here: 1e6b98b

@mishaschwartz great thanks. I do not see a change to the proxy to make the verify path always return 200 (http success), like the other Geoserver behind Twitcher PR #348

I pulled out the full diff of this PR and there is no proxy change to add the verify path either.

Could you quickly remind me how this one perform the access control differently than other Geoserver behind Twitcher PR? How come it does not need a verify path added to the proxy?

Because I won't deploy this PR for manual testing this time, I just want to make sure the deactivation works as intended the day I actually need it.

I have not added this variable to the env.local.example file because I believe that it shouldn't be advertised to most users since I really don't recommend disabling this functionality unless absolutely necessary.

That's perfect. Not every settings in default.env are exposed to env.local.example.

@mishaschwartz
Copy link
Collaborator Author

@tlvu

Could you quickly remind me how this one perform the access control differently than other Geoserver behind Twitcher PR? How come it does not need a verify path added to the proxy?

That's right. In this case, the proxy does not do any verification for us. The MagpieAuthenticator is the one that checks whether a user is authorized or not by querying twitcher's verify endpoint directly.

If the proxy does the check then every request to jupyterhub is checked which causes a bottleneck as you discovered (#358 (comment) #358 (comment))

We implemented a solution so that access is checked when the user logs in to jupyterhub (#358 (comment)) and we will add another feature in the future to check periodically as well (#358 (comment))

Copy link
Collaborator

@tlvu tlvu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@crim-jenkins-bot
Copy link
Collaborator

E2E Test Results

DACCS-iac Pipeline Results

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/2197/
Result : failure

BIRDHOUSE_DEPLOY_BRANCH : jupyter-behind-twitcher-keep-magpie-login
DACCS_CONFIGS_BRANCH : master
PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master
PAVICS_SDI_BRANCH : master

DESTROY_INFRA_ON_EXIT : true
PAVICS_HOST : https://host-140-149.rdext.crim.ca

Infrastructure deployment failed. Instance has not been destroyed. @matprov

@mishaschwartz mishaschwartz merged commit f4a70e1 into master Oct 31, 2023
4 of 5 checks passed
@mishaschwartz mishaschwartz deleted the jupyter-behind-twitcher-keep-magpie-login branch October 31, 2023 19:01
@crim-jenkins-bot
Copy link
Collaborator

E2E Test Results

DACCS-iac Pipeline Results

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/2199/
Result : failure

BIRDHOUSE_DEPLOY_BRANCH : jupyter-behind-twitcher-keep-magpie-login
DACCS_CONFIGS_BRANCH : master
PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master
PAVICS_SDI_BRANCH : master

DESTROY_INFRA_ON_EXIT : true
PAVICS_HOST : https://host-140-104.rdext.crim.ca

PAVICS-e2e-workflow-tests Pipeline Results

Tests URL : http://daccs-jenkins.crim.ca:80/job/PAVICS-e2e-workflow-tests/job/master/1388/

NOTEBOOK TEST RESULTS
    
[2023-10-31T19:08:10.449Z] ============================= test session starts ==============================
[2023-10-31T19:08:10.449Z] platform linux -- Python 3.9.16, pytest-7.3.1, pluggy-1.0.0
[2023-10-31T19:08:10.449Z] rootdir: /home/jenkins/agent/workspace/PAVICS-e2e-workflow-tests_master@2
[2023-10-31T19:08:10.449Z] plugins: anyio-3.6.1, dash-2.10.0, nbval-0.9.6, tornasync-0.6.0.post2, xdist-3.3.1
[2023-10-31T19:08:10.449Z] collected 254 items
[2023-10-31T19:08:10.449Z] 
[2023-10-31T19:08:16.943Z] notebooks-auth/geoserver.ipynb ..........F..FFF.                         [  6%]
[2023-10-31T19:08:24.791Z] notebooks-auth/test_thredds.ipynb ...........                            [ 11%]
[2023-10-31T19:08:33.010Z] pavics-sdi-master/docs/source/notebooks/WCS_example.ipynb .......        [ 13%]
[2023-10-31T19:08:42.990Z] pavics-sdi-master/docs/source/notebooks/WFS_example.ipynb ......         [ 16%]
[2023-10-31T19:08:48.616Z] pavics-sdi-master/docs/source/notebooks/WMS_example.ipynb .F......       [ 19%]
[2023-10-31T19:22:31.697Z] pavics-sdi-master/docs/source/notebooks/climex.ipynb ............        [ 24%]
[2023-10-31T19:22:33.608Z] pavics-sdi-master/docs/source/notebooks/eccc-geoapi-climate-stations.ipynb . [ 24%]
[2023-10-31T19:22:41.342Z] ...............                                                          [ 30%]
[2023-10-31T19:22:50.742Z] pavics-sdi-master/docs/source/notebooks/eccc-geoapi-xclim.ipynb F.F..    [ 32%]
[2023-10-31T19:22:58.064Z] pavics-sdi-master/docs/source/notebooks/esgf-dap.ipynb ......            [ 34%]
[2023-10-31T19:23:14.762Z] pavics-sdi-master/docs/source/notebooks/forecasts.ipynb ......           [ 37%]
[2023-10-31T19:23:16.142Z] pavics-sdi-master/docs/source/notebooks/jupyter_extensions.ipynb .       [ 37%]
[2023-10-31T19:23:23.689Z] pavics-sdi-master/docs/source/notebooks/opendap.ipynb .......            [ 40%]
[2023-10-31T19:23:27.938Z] pavics-sdi-master/docs/source/notebooks/pavics_thredds.ipynb .....       [ 42%]
[2023-10-31T19:27:42.978Z] pavics-sdi-master/docs/source/notebooks/regridding.ipynb ............... [ 48%]
[2023-10-31T19:29:01.798Z] .............                                                            [ 53%]
[2023-10-31T19:29:03.698Z] pavics-sdi-master/docs/source/notebooks/rendering.ipynb ....             [ 54%]
[2023-10-31T19:29:05.839Z] pavics-sdi-master/docs/source/notebooks/subset-user-input.ipynb ........ [ 57%]
[2023-10-31T19:29:22.800Z] .................                                                        [ 64%]
[2023-10-31T19:29:30.114Z] pavics-sdi-master/docs/source/notebooks/subsetting.ipynb ......          [ 66%]
[2023-10-31T19:29:31.499Z] pavics-sdi-master/docs/source/notebook-components/weaver_example.ipynb . [ 67%]
[2023-10-31T19:29:32.592Z] .FFFFFFFF                                                                [ 70%]
[2023-10-31T19:29:44.068Z] finch-master/docs/source/notebooks/dap_subset.ipynb ...........          [ 75%]
[2023-10-31T19:29:53.422Z] finch-master/docs/source/notebooks/finch-usage.ipynb ......              [ 77%]
[2023-10-31T19:29:55.325Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-1DataAccess.ipynb . [ 77%]
[2023-10-31T19:29:58.392Z] ......                                                                   [ 80%]
[2023-10-31T19:30:06.571Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-2Subsetting.ipynb . [ 80%]
[2023-10-31T19:30:31.696Z] .............                                                            [ 85%]
[2023-10-31T19:30:41.704Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-3Climate-Indicators.ipynb . [ 86%]
[2023-10-31T19:31:30.433Z] ....s.                                                                   [ 88%]
[2023-10-31T19:31:38.557Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-4Ensembles.ipynb . [ 88%]
[2023-10-31T19:31:51.355Z] ...                                                                      [ 90%]
[2023-10-31T19:32:06.260Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-5Visualization.ipynb . [ 90%]
[2023-10-31T19:32:30.741Z] ......                                                                   [ 92%]
[2023-10-31T19:32:33.334Z] notebooks/hummingbird.ipynb ............                                 [ 97%]
[2023-10-31T19:35:08.021Z] notebooks/stress-tests.ipynb ......                                      [100%]
[2023-10-31T19:35:08.021Z] 
[2023-10-31T19:35:08.021Z] =================================== FAILURES ===================================
    
  

@crim-jenkins-bot
Copy link
Collaborator

E2E Test Results

DACCS-iac Pipeline Results

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/2198/
Result : failure

BIRDHOUSE_DEPLOY_BRANCH : jupyter-behind-twitcher-keep-magpie-login
DACCS_CONFIGS_BRANCH : master
PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master
PAVICS_SDI_BRANCH : master

DESTROY_INFRA_ON_EXIT : true
PAVICS_HOST : https://host-140-67.rdext.crim.ca

PAVICS-e2e-workflow-tests Pipeline Results

Tests URL : http://daccs-jenkins.crim.ca:80/job/PAVICS-e2e-workflow-tests/job/master/1387/

NOTEBOOK TEST RESULTS
    
[2023-10-31T19:08:01.736Z] ============================= test session starts ==============================
[2023-10-31T19:08:01.736Z] platform linux -- Python 3.9.16, pytest-7.3.1, pluggy-1.0.0
[2023-10-31T19:08:01.736Z] rootdir: /home/jenkins/agent/workspace/PAVICS-e2e-workflow-tests_master
[2023-10-31T19:08:01.736Z] plugins: anyio-3.6.1, dash-2.10.0, nbval-0.9.6, tornasync-0.6.0.post2, xdist-3.3.1
[2023-10-31T19:08:01.736Z] collected 254 items
[2023-10-31T19:08:01.736Z] 
[2023-10-31T19:08:09.099Z] notebooks-auth/geoserver.ipynb ..........F..FFF.                         [  6%]
[2023-10-31T19:08:17.098Z] notebooks-auth/test_thredds.ipynb ...........                            [ 11%]
[2023-10-31T19:08:25.739Z] pavics-sdi-master/docs/source/notebooks/WCS_example.ipynb .......        [ 13%]
[2023-10-31T19:08:35.448Z] pavics-sdi-master/docs/source/notebooks/WFS_example.ipynb ......         [ 16%]
[2023-10-31T19:08:44.671Z] pavics-sdi-master/docs/source/notebooks/WMS_example.ipynb .F......       [ 19%]
[2023-10-31T19:22:34.959Z] pavics-sdi-master/docs/source/notebooks/climex.ipynb ............        [ 24%]
[2023-10-31T19:22:34.959Z] pavics-sdi-master/docs/source/notebooks/eccc-geoapi-climate-stations.ipynb . [ 24%]
[2023-10-31T19:22:41.041Z] ...............                                                          [ 30%]
[2023-10-31T19:22:50.741Z] pavics-sdi-master/docs/source/notebooks/eccc-geoapi-xclim.ipynb F.F..    [ 32%]
[2023-10-31T19:22:57.686Z] pavics-sdi-master/docs/source/notebooks/esgf-dap.ipynb ......            [ 34%]
[2023-10-31T19:23:14.860Z] pavics-sdi-master/docs/source/notebooks/forecasts.ipynb ......           [ 37%]
[2023-10-31T19:23:16.246Z] pavics-sdi-master/docs/source/notebooks/jupyter_extensions.ipynb .       [ 37%]
[2023-10-31T19:23:24.940Z] pavics-sdi-master/docs/source/notebooks/opendap.ipynb .......            [ 40%]
[2023-10-31T19:23:29.198Z] pavics-sdi-master/docs/source/notebooks/pavics_thredds.ipynb .....       [ 42%]
[2023-10-31T19:27:43.005Z] pavics-sdi-master/docs/source/notebooks/regridding.ipynb ............... [ 48%]
[2023-10-31T19:29:01.991Z] .............                                                            [ 53%]
[2023-10-31T19:29:05.291Z] pavics-sdi-master/docs/source/notebooks/rendering.ipynb ....             [ 54%]
[2023-10-31T19:29:07.506Z] pavics-sdi-master/docs/source/notebooks/subset-user-input.ipynb ........ [ 57%]
[2023-10-31T19:29:23.791Z] .................                                                        [ 64%]
[2023-10-31T19:29:30.785Z] pavics-sdi-master/docs/source/notebooks/subsetting.ipynb ......          [ 66%]
[2023-10-31T19:29:32.174Z] pavics-sdi-master/docs/source/notebook-components/weaver_example.ipynb . [ 67%]
[2023-10-31T19:29:33.292Z] .FFFFFFFF                                                                [ 70%]
[2023-10-31T19:29:44.397Z] finch-master/docs/source/notebooks/dap_subset.ipynb ...........          [ 75%]
[2023-10-31T19:29:53.382Z] finch-master/docs/source/notebooks/finch-usage.ipynb ......              [ 77%]
[2023-10-31T19:29:55.286Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-1DataAccess.ipynb . [ 77%]
[2023-10-31T19:29:58.837Z] ......                                                                   [ 80%]
[2023-10-31T19:30:08.834Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-2Subsetting.ipynb . [ 80%]
[2023-10-31T19:30:33.240Z] .............                                                            [ 85%]
[2023-10-31T19:30:43.255Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-3Climate-Indicators.ipynb . [ 86%]
[2023-10-31T19:31:30.170Z] ....s.                                                                   [ 88%]
[2023-10-31T19:31:38.317Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-4Ensembles.ipynb . [ 88%]
[2023-10-31T19:31:53.844Z] ...                                                                      [ 90%]
[2023-10-31T19:32:08.766Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-5Visualization.ipynb . [ 90%]
[2023-10-31T19:32:31.320Z] ......                                                                   [ 92%]
[2023-10-31T19:32:33.613Z] notebooks/hummingbird.ipynb ............                                 [ 97%]
[2023-10-31T19:35:07.710Z] notebooks/stress-tests.ipynb ......                                      [100%]
[2023-10-31T19:35:07.710Z] 
[2023-10-31T19:35:07.710Z] =================================== FAILURES ===================================
    
  

mishaschwartz added a commit that referenced this pull request Nov 30, 2023
…permission to access (#402)

## Overview

By setting the `JUPYTERHUB_CRYPT_KEY` environment variable in the
`env.local` file, jupyterhub will store user's authentication
information (session cookie) in the database. This allows jupyterhub to
periodically check whether the user still has permission to access
jupyterhub (the session cookie is not expired and the permission have
not changed).

The minimum duration between checks can be set with the
`JUPYTERHUB_AUTHENTICATOR_REFRESH_AGE` variable which is an integer (in
seconds).

Note that users who are already logged in to jupyterhub will need to log
out and log in for these changes to take effect.

To forcibly log out all users currently logged in to jupyterhub you can
run the following command to force the recreation of the cookie secret:

  ```shell
docker exec jupyterhub rm /persist/jupyterhub_cookie_secret && docker
restart jupyterhub
  ```

First discussed here:
#358 (comment)

## Changes

**Non-breaking changes**
- Adds two new environment variables to configure additional jupyterhub
authentication
- New jupyterhub version pavics/jupyterhub:4.0.2-20231024

**Breaking changes**

## Related Issue / Discussion

Related to #334

- [x] Note that this PR requires
Ouranosinc/jupyterhub#23 to be merged in first
and the jupyterhub version updated to match.

## Additional Information

<!--
The test suite can be run using a different DACCS config with
``birdhouse_daccs_configs_branch: branch_name`` in the PR description.
To globally skip the test suite regardless of the commit message use
``birdhouse_skip_ci: true`` in the PR description.
-->

birdhouse_daccs_configs_branch: master
birdhouse_skip_ci: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/operations Continuous Integration components ci/tests Issues or changes related to tests scripts component/jupyterhub Related to JupyterHub as development frontend with notebooks component/magpie Related to https://github.com/Ouranosinc/Magpie documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants