Compare commits

...

1280 Commits
4.1.3 ... 5.4.0

Author SHA1 Message Date
Min RK
bba81a856c Bump to 5.4.0 2025-10-06 09:08:01 -07:00
Min RK
ca2a98695d Merge pull request #5160 from minrk/prepare-5.4
changelog for 5.4.0
2025-10-06 09:07:40 -07:00
Min RK
cbadb454d5 last update to 5.4 changelog 2025-10-06 09:02:12 -07:00
Min RK
0e26ba9f57 Merge pull request #5164 from minrk/pycurl-internal-ssl-boogaloo
make sure internal ssl works with pycurl
2025-10-06 08:41:02 -07:00
Min RK
261e2ae13e copy pasta in singleuser extension ssl 2025-10-06 08:17:42 -07:00
Min RK
ed6c981cf7 limit pycurl in tests to recent python versions 2025-10-06 08:14:06 -07:00
Min RK
a3e642150e make sure internal ssl works with pycurl
and include it in tests!
2025-10-06 08:09:30 -07:00
Min RK
53fb794241 set date for 5.4.0
release planned for monday
2025-10-03 14:53:35 -07:00
Min RK
0e27bac90e changelog for 5.4.0 2025-10-03 09:34:42 -07:00
Min RK
a15656c1cf Merge pull request #5146 from agoose77/fix-spawn-429
set HTTP status when spawn via GET params fails
2025-10-03 09:28:04 -07:00
Min RK
f2da9774b3 Merge pull request #5161 from minrk/unpin-pytest-asyncio
unpin pytest-asyncio
2025-10-03 08:17:21 -07:00
Angus Hollands
1978c36985 fix: missing arg 2025-10-03 12:13:47 +01:00
Angus Hollands
da835fbe86 fix: fallback on to None 2025-10-03 11:57:10 +01:00
Angus Hollands
faa34044f3 fix: add default 2025-10-03 10:02:04 +01:00
pre-commit-ci[bot]
e196c93783 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-10-03 08:56:07 +00:00
Angus Hollands
26d5ee3eba feat: catch all HTTPError, format appropriately 2025-10-03 09:54:28 +01:00
Min RK
dc69ff4126 Merge pull request #5162 from minrk/linkcheck
linkcheck: npmjs 403s from CI
2025-10-02 15:19:13 -07:00
Min RK
024fe661e5 linkcheck: npmjs 403s from CI 2025-10-02 15:08:38 -07:00
Min RK
11bc5c325a avoid stopping event loop in app fixture
let pytest-asyncio do it
2025-10-02 14:54:16 -07:00
Min RK
642475f844 remove special io_loop cleanup, deprecate io_loop fixture 2025-10-02 14:37:54 -07:00
Erik Sundell
6f05534dd8 Merge pull request #5159 from minrk/internal-ssl-pycurl
don't revert asynchttp class when setting up internal ssl
2025-10-02 23:26:02 +02:00
Min RK
750df8b686 unpin pytest-asyncio
let's see what breaks
2025-10-02 14:16:18 -07:00
Min RK
485ac0df4c don't change asynchttp class when setting up internal ssl
None reverts to the default class, it doesn't not preserve the current value
2025-10-02 13:30:17 -07:00
Simon Li
b180bd0c0c Merge pull request #5156 from jupyterhub/dependabot/npm_and_yarn/jsx/react-router-7.9.3
Bump react-router from 7.8.2 to 7.9.3 in /jsx
2025-10-01 19:42:33 +01:00
Simon Li
0a6f0165b7 Merge pull request #5155 from jupyterhub/dependabot/npm_and_yarn/jsx/webpack-5.102.0
Bump webpack from 5.101.3 to 5.102.0 in /jsx
2025-10-01 19:41:55 +01:00
dependabot[bot]
21b77e2348 Bump webpack from 5.101.3 to 5.102.0 in /jsx
Bumps [webpack](https://github.com/webpack/webpack) from 5.101.3 to 5.102.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.101.3...v5.102.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-version: 5.102.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-01 18:15:04 +00:00
Simon Li
b5e43b7dfb Merge pull request #5154 from jupyterhub/dependabot/npm_and_yarn/jsx/jest-environment-jsdom-30.2.0
Bump jest-environment-jsdom from 30.1.2 to 30.2.0 in /jsx
2025-10-01 19:13:21 +01:00
Simon Li
eab7e54d3d Merge pull request #5153 from jupyterhub/dependabot/npm_and_yarn/jsx/babel-jest-30.2.0
Bump babel-jest from 30.1.2 to 30.2.0 in /jsx
2025-10-01 19:13:09 +01:00
Simon Li
2b3a9d9ab8 Merge pull request #5152 from jupyterhub/dependabot/npm_and_yarn/jsx/jsx-minor-448ac8906f
Bump the jsx-minor group in /jsx with 3 updates
2025-10-01 19:12:57 +01:00
Simon Li
fb4872f74d Merge pull request #5151 from jupyterhub/dependabot/npm_and_yarn/npm-minor-63a4549d52
Bump the npm-minor group with 2 updates
2025-10-01 19:03:47 +01:00
dependabot[bot]
efbd593113 Bump react-router from 7.8.2 to 7.9.3 in /jsx
Bumps [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) from 7.8.2 to 7.9.3.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router@7.9.3/packages/react-router)

---
updated-dependencies:
- dependency-name: react-router
  dependency-version: 7.9.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-01 17:40:02 +00:00
dependabot[bot]
e390ba0e4d Bump jest-environment-jsdom from 30.1.2 to 30.2.0 in /jsx
Bumps [jest-environment-jsdom](https://github.com/jestjs/jest/tree/HEAD/packages/jest-environment-jsdom) from 30.1.2 to 30.2.0.
- [Release notes](https://github.com/jestjs/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jestjs/jest/commits/v30.2.0/packages/jest-environment-jsdom)

---
updated-dependencies:
- dependency-name: jest-environment-jsdom
  dependency-version: 30.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-01 17:33:25 +00:00
dependabot[bot]
9c2ca005b5 Bump babel-jest from 30.1.2 to 30.2.0 in /jsx
Bumps [babel-jest](https://github.com/jestjs/jest/tree/HEAD/packages/babel-jest) from 30.1.2 to 30.2.0.
- [Release notes](https://github.com/jestjs/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jestjs/jest/commits/v30.2.0/packages/babel-jest)

---
updated-dependencies:
- dependency-name: babel-jest
  dependency-version: 30.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-01 17:29:33 +00:00
dependabot[bot]
3861163bbb Bump the jsx-minor group in /jsx with 3 updates
Bumps the jsx-minor group in /jsx with 3 updates: [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js), [eslint](https://github.com/eslint/eslint) and [globals](https://github.com/sindresorhus/globals).


Updates `@eslint/js` from 9.34.0 to 9.36.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/commits/v9.36.0/packages/js)

Updates `eslint` from 9.34.0 to 9.36.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.34.0...v9.36.0)

Updates `globals` from 16.3.0 to 16.4.0
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v16.3.0...v16.4.0)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 9.36.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: eslint
  dependency-version: 9.36.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: globals
  dependency-version: 16.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-01 17:10:54 +00:00
dependabot[bot]
b105fe14dc Bump the npm-minor group with 2 updates
Bumps the npm-minor group with 2 updates: [@fortawesome/fontawesome-free](https://github.com/FortAwesome/Font-Awesome) and [sass](https://github.com/sass/dart-sass).


Updates `@fortawesome/fontawesome-free` from 7.0.0 to 7.0.1
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/7.x/CHANGELOG.md)
- [Commits](https://github.com/FortAwesome/Font-Awesome/compare/7.0.0...7.0.1)

Updates `sass` from 1.91.0 to 1.93.2
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.91.0...1.93.2)

---
updated-dependencies:
- dependency-name: "@fortawesome/fontawesome-free"
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-minor
- dependency-name: sass
  dependency-version: 1.93.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-01 17:10:35 +00:00
Erik Sundell
950d98ee57 Merge pull request #5147 from jupyterhub/dependabot/github_actions/actions/setup-node-5
Bump actions/setup-node from 4 to 5
2025-10-01 08:17:22 +02:00
Erik Sundell
6d2f47150b Merge pull request #5148 from jupyterhub/dependabot/github_actions/actions/setup-python-6
Bump actions/setup-python from 5 to 6
2025-10-01 08:12:27 +02:00
dependabot[bot]
203cbe291e Bump actions/setup-node from 4 to 5
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 5.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-01 06:08:34 +00:00
dependabot[bot]
f22c239666 Bump actions/setup-python from 5 to 6
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-01 06:08:04 +00:00
Erik Sundell
783ddf5265 Merge pull request #5149 from jupyterhub/dependabot/github_actions/actions/checkout-5
Bump actions/checkout from 4 to 5
2025-10-01 08:04:59 +02:00
dependabot[bot]
c92ef8bd45 Bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-01 05:01:26 +00:00
Angus Hollands
ae06035711 fix: set HTTP 429 on failed spawns 2025-09-29 15:06:07 +01:00
Raniere Silva
074917d9be Merge pull request #5129 from rgaiacs/5115-windows-wsl
Add note about Windows Subsystem for Linux
2025-09-15 08:37:09 +02:00
Raniere Gaia Costa da Silva
8ae8f75516 Improve sentence based on feedback from @minrk
https://github.com/jupyterhub/jupyterhub/pull/5129#discussion_r2344866770
2025-09-15 08:02:46 +02:00
Raniere Silva
e8aef6587e Update docs/source/contributing/setup.md
Co-authored-by: Simon Li <orpheus+devel@gmail.com>
2025-09-15 07:56:40 +02:00
Simon Li
6f776053e8 Merge pull request #5140 from minrk/quickstart-allow
update quickstart, authenticator doc with 5.0 allow changes
2025-09-13 13:46:56 +01:00
Min RK
42ee0f9797 update quickstart, authenticator doc with 5.0 allow changes 2025-09-12 08:57:14 -07:00
Min RK
7090444ce4 Merge pull request #5137 from akhmerov/collaboration_sharing_docs
update the status of access sharing UI
2025-09-03 12:54:42 -07:00
Anton Akhmerov
818964fd3a update the status of access sharing UI 2025-09-02 13:50:03 +02:00
Simon Li
63383ce9db Merge pull request #5135 from jupyterhub/dependabot/npm_and_yarn/jsx/jsx-minor-f3086918b8
Bump the jsx-minor group in /jsx with 13 updates
2025-09-02 12:26:42 +01:00
dependabot[bot]
89d9e43d3c Bump the jsx-minor group in /jsx with 13 updates
Bumps the jsx-minor group in /jsx with 13 updates:

| Package | From | To |
| --- | --- | --- |
| [bootstrap](https://github.com/twbs/bootstrap) | `5.3.7` | `5.3.8` |
| [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) | `7.7.1` | `7.8.2` |
| [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) | `7.28.0` | `7.28.3` |
| [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) | `7.28.0` | `7.28.3` |
| [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) | `9.32.0` | `9.34.0` |
| [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) | `6.6.4` | `6.8.0` |
| [babel-jest](https://github.com/jestjs/jest/tree/HEAD/packages/babel-jest) | `30.0.5` | `30.1.2` |
| [eslint](https://github.com/eslint/eslint) | `9.32.0` | `9.34.0` |
| [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) | `5.5.3` | `5.5.4` |
| [eslint-plugin-unused-imports](https://github.com/sweepline/eslint-plugin-unused-imports) | `4.1.4` | `4.2.0` |
| [jest](https://github.com/jestjs/jest/tree/HEAD/packages/jest) | `30.0.5` | `30.1.2` |
| [jest-environment-jsdom](https://github.com/jestjs/jest/tree/HEAD/packages/jest-environment-jsdom) | `30.0.5` | `30.1.2` |
| [webpack](https://github.com/webpack/webpack) | `5.101.0` | `5.101.3` |


Updates `bootstrap` from 5.3.7 to 5.3.8
- [Release notes](https://github.com/twbs/bootstrap/releases)
- [Commits](https://github.com/twbs/bootstrap/compare/v5.3.7...v5.3.8)

Updates `react-router` from 7.7.1 to 7.8.2
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router@7.8.2/packages/react-router)

Updates `@babel/core` from 7.28.0 to 7.28.3
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.28.3/packages/babel-core)

Updates `@babel/preset-env` from 7.28.0 to 7.28.3
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.28.3/packages/babel-preset-env)

Updates `@eslint/js` from 9.32.0 to 9.34.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/commits/v9.34.0/packages/js)

Updates `@testing-library/jest-dom` from 6.6.4 to 6.8.0
- [Release notes](https://github.com/testing-library/jest-dom/releases)
- [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/jest-dom/compare/v6.6.4...v6.8.0)

Updates `babel-jest` from 30.0.5 to 30.1.2
- [Release notes](https://github.com/jestjs/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jestjs/jest/commits/HEAD/packages/babel-jest)

Updates `eslint` from 9.32.0 to 9.34.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.32.0...v9.34.0)

Updates `eslint-plugin-prettier` from 5.5.3 to 5.5.4
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v5.5.3...v5.5.4)

Updates `eslint-plugin-unused-imports` from 4.1.4 to 4.2.0
- [Commits](https://github.com/sweepline/eslint-plugin-unused-imports/compare/v4.1.4...v4.2.0)

Updates `jest` from 30.0.5 to 30.1.2
- [Release notes](https://github.com/jestjs/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jestjs/jest/commits/HEAD/packages/jest)

Updates `jest-environment-jsdom` from 30.0.5 to 30.1.2
- [Release notes](https://github.com/jestjs/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jestjs/jest/commits/HEAD/packages/jest-environment-jsdom)

Updates `webpack` from 5.101.0 to 5.101.3
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.101.0...v5.101.3)

---
updated-dependencies:
- dependency-name: bootstrap
  dependency-version: 5.3.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: react-router
  dependency-version: 7.8.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: "@babel/core"
  dependency-version: 7.28.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: "@babel/preset-env"
  dependency-version: 7.28.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: "@eslint/js"
  dependency-version: 9.34.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: "@testing-library/jest-dom"
  dependency-version: 6.8.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: babel-jest
  dependency-version: 30.1.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: eslint
  dependency-version: 9.34.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: eslint-plugin-prettier
  dependency-version: 5.5.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: eslint-plugin-unused-imports
  dependency-version: 4.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: jest
  dependency-version: 30.1.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: jest-environment-jsdom
  dependency-version: 30.1.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: webpack
  dependency-version: 5.101.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-02 10:53:46 +00:00
Simon Li
60944e48bf Merge pull request #5134 from jupyterhub/dependabot/npm_and_yarn/npm-minor-09bae83008
Bump the npm-minor group with 2 updates
2025-09-02 11:27:41 +01:00
Erik Sundell
a24292b54c Merge pull request #5132 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2025-09-02 12:21:20 +02:00
dependabot[bot]
a14792decd Bump the npm-minor group with 2 updates
Bumps the npm-minor group with 2 updates: [bootstrap](https://github.com/twbs/bootstrap) and [sass](https://github.com/sass/dart-sass).


Updates `bootstrap` from 5.3.7 to 5.3.8
- [Release notes](https://github.com/twbs/bootstrap/releases)
- [Commits](https://github.com/twbs/bootstrap/compare/v5.3.7...v5.3.8)

Updates `sass` from 1.90.0 to 1.91.0
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.90.0...1.91.0)

---
updated-dependencies:
- dependency-name: bootstrap
  dependency-version: 5.3.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-minor
- dependency-name: sass
  dependency-version: 1.91.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-02 09:56:43 +00:00
pre-commit-ci[bot]
ad358a9884 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.12.7 → v0.12.11](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.7...v0.12.11)
- [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v5.0.0...v6.0.0)
2025-09-01 20:44:20 +00:00
Yuvi
0e4c6c6581 Merge pull request #5130 from yuvipanda/fa-7
Upgrade to font-awesome 7
2025-08-19 12:30:05 -07:00
YuviPanda
cbace1de16 Switch to font-awesome 7 properly 2025-08-18 19:05:31 -07:00
Yuvi
af7ccfc117 Merge pull request #5128 from rgaiacs/review-contributing-section
Review contributing section from documentation
2025-08-15 08:43:50 -07:00
Raniere Gaia Costa da Silva
1ef87fb41a Fix note block 2025-08-15 08:08:25 +02:00
Raniere Gaia Costa da Silva
093dea9bcf Fix admonition block 2025-08-15 08:07:09 +02:00
pre-commit-ci[bot]
9e0c75884c [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-08-14 08:24:45 +00:00
Raniere Gaia Costa da Silva
16e5080ae9 Add note about Windows Subsystem for Linux
Closes https://github.com/jupyterhub/jupyterhub/issues/5115
2025-08-14 10:20:59 +02:00
pre-commit-ci[bot]
5abf4bdb75 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-08-14 07:59:32 +00:00
Raniere Gaia Costa da Silva
225e87d9db Review 'Testing JupyterHub and linting code' page 2025-08-14 09:55:22 +02:00
Raniere Gaia Costa da Silva
d923b9b736 Review 'Contributing Documentation' page 2025-08-14 09:43:51 +02:00
Raniere Gaia Costa da Silva
0b98bcd503 Review 'Community communication channels' page 2025-08-14 09:43:29 +02:00
Min RK
d38e41fd97 Merge pull request #5067 from kreuzert/main
Add Authenticator.refresh_pre_stop option
2025-08-13 08:48:16 -07:00
pre-commit-ci[bot]
37fd7af917 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-08-13 15:31:19 +00:00
Min RK
20895dba83 check it's a user before comparing username 2025-08-13 08:30:22 -07:00
Tim Kreuzer
2079d1e7c4 force stop when user.name != self.current_user.name (e.g. admin stopping a server) 2025-08-11 15:07:22 +02:00
Erik Sundell
1b0355b173 Merge pull request #5124 from manics/sqlite-production
Remove warnings about sqlite in production
2025-08-09 18:07:59 +02:00
Simon Li
df11d83d2c Remove warnings about sqlite in production
Closes https://github.com/jupyterhub/jupyterhub/issues/5055
2025-08-09 16:14:17 +01:00
Min RK
83db40b01f Merge pull request #5093 from kateryna-tarelkina-dd/confirm-named-server-deletion
Add confirmation dialog for named server deletion
2025-08-06 21:33:49 -07:00
Min RK
12dc3a9ff8 sync with main 2025-08-06 21:18:21 -07:00
Raniere Silva
61c48fd453 Merge pull request #5118 from minrk/doc-links
update doc links with permanent redirects
2025-08-06 13:01:10 +02:00
Raniere Silva
45294dfdc7 Merge pull request #5123 from minrk/header-dropdown-text
allow 6 items in header drop-down
2025-08-06 09:27:57 +02:00
Min RK
46ccb3cd4a allow 6 items in header drop-down
we only have 6 items, so don't put one item under More
2025-08-05 21:13:42 -07:00
Min RK
0a0b20834f don't check mediaspace.msu links
check seems to fail from CI
2025-08-05 21:04:39 -07:00
Min RK
3a26e66adc Merge pull request #5121 from jupyterhub/dependabot/npm_and_yarn/npm-minor-5b22288188
Bump sass from 1.89.2 to 1.90.0 in the npm-minor group
2025-08-05 21:02:49 -07:00
dependabot[bot]
94faddb1e0 Bump @fortawesome/fontawesome-free from 6.7.2 to 7.0.0
Bumps [@fortawesome/fontawesome-free](https://github.com/FortAwesome/Font-Awesome) from 6.7.2 to 7.0.0.
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/7.x/CHANGELOG.md)
- [Commits](https://github.com/FortAwesome/Font-Awesome/compare/6.7.2...7.0.0)

---
updated-dependencies:
- dependency-name: "@fortawesome/fontawesome-free"
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-06 03:46:25 +00:00
dependabot[bot]
d1ebd8e5bf Bump sass from 1.89.2 to 1.90.0 in the npm-minor group
Bumps the npm-minor group with 1 update: [sass](https://github.com/sass/dart-sass).


Updates `sass` from 1.89.2 to 1.90.0
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.89.2...1.90.0)

---
updated-dependencies:
- dependency-name: sass
  dependency-version: 1.90.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-06 03:46:19 +00:00
Min RK
a59b33686a Merge pull request #5119 from minrk/dependabot-jest-group
jsx: add dependabot group for jest, update everything
2025-08-05 20:45:18 -07:00
Min RK
b6d0a62c75 Merge pull request #5120 from minrk/test_singleuser_xsrf
use browser.wait_for_url instead of expect(browser).to_have_url
2025-08-05 20:44:37 -07:00
Min RK
0404ba6433 use browser.wait_for_url instead of expect(browser).to_have_url when waiting for spawns
main effect: timeout is 30 seconds instead of 5, but the principle matches better
in that we expect things to be happening behind the scenes,
rather than asserting something about the _current_ state when the expect is called
2025-08-05 13:43:19 -07:00
Min RK
f707ff372d npm upgrade 2025-08-05 13:02:41 -07:00
Min RK
370c649d61 update deprecated toBeCalledWith -> toHaveBeenCalledWith 2025-08-05 13:02:31 -07:00
Min RK
1fe10713fd update jest group 2025-08-05 13:02:11 -07:00
Min RK
ed80a8232f add jest group to dependabot 2025-08-05 10:45:32 -07:00
Min RK
0884ebc948 update docs links following permanent redirects
- make linkcheck
- apply all "permanent redirect" fixes
- manually change a couple version URLs like sudo to unversioned URLs
2025-08-05 10:39:08 -07:00
Min RK
1da7eee9ba update voila homepage link
use homepage instead of broken gallery link

new gallery URL is https://voila-gallery.github.io fwiw
2025-08-05 10:14:50 -07:00
Min RK
d92226134d Merge pull request #5099 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2025-08-05 10:04:22 -07:00
Min RK
d9f2ec0b8e Merge pull request #5104 from jupyterhub/dependabot/npm_and_yarn/jsx/multi-96c788614a
Bump on-headers and compression in /jsx
2025-08-05 09:57:18 -07:00
Min RK
90c95d5665 Merge pull request #5112 from jupyterhub/dependabot/npm_and_yarn/jsx/jsx-minor-6c008ffc99
Bump the jsx-minor group across 1 directory with 14 updates
2025-08-05 09:50:03 -07:00
Erik Sundell
1b00e49e4d Merge pull request #5116 from rgaiacs/improve-documentation-dev
Collection of small improvements to contributor documentation
2025-08-05 16:02:49 +02:00
Raniere Gaia Costa da Silva
3e09b979bc Re-write small parts of "Setting up a development install" 2025-08-05 15:29:47 +02:00
Raniere Gaia Costa da Silva
e81884fabb Use "and" instead of "&" in text 2025-08-05 15:19:18 +02:00
Raniere Gaia Costa da Silva
3f7334e960 Fix capital 's' in JavaScript 2025-08-05 15:13:41 +02:00
Raniere Gaia Costa da Silva
548744e59b Use name of tools with capital name when referencing the project 2025-08-05 15:13:09 +02:00
pre-commit-ci[bot]
015370eec7 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.11.12 → v0.12.7](https://github.com/astral-sh/ruff-pre-commit/compare/v0.11.12...v0.12.7)
2025-08-04 20:53:05 +00:00
dependabot[bot]
c0fd37cbeb Bump the jsx-minor group across 1 directory with 14 updates
Bumps the jsx-minor group with 14 updates in the /jsx directory:

| Package | From | To |
| --- | --- | --- |
| [bootstrap](https://github.com/twbs/bootstrap) | `5.3.6` | `5.3.7` |
| [react](https://github.com/facebook/react/tree/HEAD/packages/react) | `19.1.0` | `19.1.1` |
| [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom) | `19.1.0` | `19.1.1` |
| [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) | `7.6.1` | `7.7.1` |
| [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) | `7.27.4` | `7.28.0` |
| [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) | `7.27.2` | `7.28.0` |
| [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) | `9.28.0` | `9.32.0` |
| [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) | `6.6.3` | `6.6.4` |
| [eslint](https://github.com/eslint/eslint) | `9.28.0` | `9.32.0` |
| [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) | `5.4.1` | `5.5.3` |
| [globals](https://github.com/sindresorhus/globals) | `16.2.0` | `16.3.0` |
| [prettier](https://github.com/prettier/prettier) | `3.5.3` | `3.6.2` |
| [webpack](https://github.com/webpack/webpack) | `5.99.9` | `5.101.0` |
| [webpack-dev-server](https://github.com/webpack/webpack-dev-server) | `5.2.1` | `5.2.2` |



Updates `bootstrap` from 5.3.6 to 5.3.7
- [Release notes](https://github.com/twbs/bootstrap/releases)
- [Commits](https://github.com/twbs/bootstrap/compare/v5.3.6...v5.3.7)

Updates `react` from 19.1.0 to 19.1.1
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v19.1.1/packages/react)

Updates `react-dom` from 19.1.0 to 19.1.1
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v19.1.1/packages/react-dom)

Updates `react-router` from 7.6.1 to 7.7.1
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router@7.7.1/packages/react-router)

Updates `@babel/core` from 7.27.4 to 7.28.0
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.28.0/packages/babel-core)

Updates `@babel/preset-env` from 7.27.2 to 7.28.0
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.28.0/packages/babel-preset-env)

Updates `@eslint/js` from 9.28.0 to 9.32.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/commits/v9.32.0/packages/js)

Updates `@testing-library/jest-dom` from 6.6.3 to 6.6.4
- [Release notes](https://github.com/testing-library/jest-dom/releases)
- [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/jest-dom/compare/v6.6.3...v6.6.4)

Updates `eslint` from 9.28.0 to 9.32.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.28.0...v9.32.0)

Updates `eslint-plugin-prettier` from 5.4.1 to 5.5.3
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v5.4.1...v5.5.3)

Updates `globals` from 16.2.0 to 16.3.0
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v16.2.0...v16.3.0)

Updates `prettier` from 3.5.3 to 3.6.2
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.5.3...3.6.2)

Updates `webpack` from 5.99.9 to 5.101.0
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.99.9...v5.101.0)

Updates `webpack-dev-server` from 5.2.1 to 5.2.2
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v5.2.1...v5.2.2)

---
updated-dependencies:
- dependency-name: bootstrap
  dependency-version: 5.3.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: react
  dependency-version: 19.1.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: react-dom
  dependency-version: 19.1.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: react-router
  dependency-version: 7.7.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: "@babel/core"
  dependency-version: 7.28.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: "@babel/preset-env"
  dependency-version: 7.28.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: "@eslint/js"
  dependency-version: 9.32.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: "@testing-library/jest-dom"
  dependency-version: 6.6.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: eslint
  dependency-version: 9.32.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: eslint-plugin-prettier
  dependency-version: 5.5.3
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: globals
  dependency-version: 16.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: prettier
  dependency-version: 3.6.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: webpack
  dependency-version: 5.101.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: webpack-dev-server
  dependency-version: 5.2.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-01 17:58:15 +00:00
Min RK
74b5e2601d Merge pull request #5109 from agoose77/agoose77/fix-joined-load 2025-07-28 08:05:24 -07:00
Angus Hollands
a28fb9361f chore: revert users changes 2025-07-28 15:21:22 +01:00
Angus Hollands
98d13d8e74 fix: drop contains_eager for groupby-d result 2025-07-28 09:55:39 +01:00
Angus Hollands
98ef84e774 Revert "fix: drop groupby"
This reverts commit cd2a311f54.
2025-07-28 09:54:46 +01:00
Angus Hollands
cd2a311f54 fix: drop groupby 2025-07-28 09:46:03 +01:00
Angus Hollands
cd373049ed fix: populate_existing 2025-07-23 18:02:44 +01:00
Angus Hollands
8b7b7ad67e fix: use selectinload where we are accessing properties 2025-07-23 17:42:48 +01:00
Angus Hollands
76bd0a4aa2 fix: another joined load 2025-07-23 17:25:16 +01:00
Min RK
2e66cabe8d GET /users: make sure there's always a join on Spawner
needed for contains_eager
2025-07-23 09:09:33 -07:00
Angus Hollands
7819b5cc3e fix: also use contains_eager for similar join-ed query 2025-07-23 16:06:11 +01:00
Angus Hollands
6411c25c28 fix: use contains_eager instead of joinedload 2025-07-22 17:27:46 +01:00
Simon Li
de7ee551d7 Merge pull request #5108 from jupyterhub/dependabot/npm_and_yarn/jsx/form-data-4.0.4
Bump form-data from 4.0.0 to 4.0.4 in /jsx
2025-07-22 06:59:31 +01:00
dependabot[bot]
a035d7f65e Bump form-data from 4.0.0 to 4.0.4 in /jsx
Bumps [form-data](https://github.com/form-data/form-data) from 4.0.0 to 4.0.4.
- [Release notes](https://github.com/form-data/form-data/releases)
- [Changelog](https://github.com/form-data/form-data/blob/master/CHANGELOG.md)
- [Commits](https://github.com/form-data/form-data/compare/v4.0.0...v4.0.4)

---
updated-dependencies:
- dependency-name: form-data
  dependency-version: 4.0.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-21 23:05:38 +00:00
Min RK
cb998f0c0d Merge pull request #5105 from manics/test-proxy-service 2025-07-19 22:48:27 -07:00
Simon Li
9cbe5eae5b Avoid double // in test_proxy_service
`test_services::test_proxy_service` is failing in some cases because a request is being made to `/@/space%20word/services/test-service-NN//foo` (note the double `//`) and EchoHandler is returning that URL unchanged, instead of `/@/space%20word/services/test-service-NN/foo`
2025-07-19 18:52:19 +01:00
Min RK
73313fdef8 Merge pull request #5102 from joeyutong/main
Fix hub activity log to use spawner.last_activity
2025-07-18 17:38:13 -07:00
dependabot[bot]
4d5828fa8c Bump on-headers and compression in /jsx
---
updated-dependencies:
- dependency-name: on-headers
  dependency-version: 1.1.0
  dependency-type: indirect
- dependency-name: compression
  dependency-version: 1.8.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-17 21:19:34 +00:00
joeyutong
0b6500fe21 Fix hub activity log to use spawner.last_activity 2025-07-17 17:17:20 +08:00
pre-commit-ci[bot]
7ad9fee198 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-07-15 14:40:53 +00:00
Simon Li
09ead8cacc Merge pull request #5091 from kreuzert/patch-issue-5089
send event if spawn_future was cancelled and spawner not pending
2025-07-07 10:04:37 +01:00
Erik Sundell
3be375e12c Merge pull request #5097 from manics/docs-fix-broken-requests
Docs: fix broken linkcheck
2025-07-07 09:59:12 +02:00
Raniere Silva
6f71a3a5a2 Merge pull request #5096 from rgaiacs/add-zulip
Replace Gitter with Zulip in Documentation
2025-07-07 07:57:05 +02:00
Erik Sundell
f336c77166 Merge branch 'main' into docs-fix-broken-requests 2025-07-06 09:17:38 +02:00
Min RK
7c1ca033f3 Merge pull request #5092 from manics/precommit-prettier 2025-07-04 16:30:32 -07:00
Min RK
71f085fc19 Merge pull request #5094 from manics/pytest-asyncio-1 2025-07-04 15:13:07 -07:00
pre-commit-ci[bot]
e7388b4333 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-07-04 14:06:30 +00:00
Simon Li
5c4100a4d0 Ignore https://voila-gallery.org 2025-07-04 15:04:37 +01:00
pre-commit-ci[bot]
0e643ae274 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-07-04 14:03:09 +00:00
Simon Li
8423d81cf3 gallery-jhub-deployments: remove broken NERSC links 2025-07-04 15:01:45 +01:00
Simon Li
2942654f15 Fix another old requests URL 2025-07-04 15:00:13 +01:00
Raniere Gaia Costa da Silva
55aa910177 Replace Gitter with Zulip
Related to https://github.com/jupyterhub/team-compass/issues/751

Related to https://github.com/jupyterhub/team-compass/issues/765
2025-07-04 15:59:30 +02:00
pre-commit-ci[bot]
b809311582 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-07-04 13:36:05 +00:00
Kateryna Tarelkina
73b2c408e1 Add confirmation dialog 2025-07-04 15:33:15 +02:00
Simon Li
5265ff4165 Update requests URL 2025-07-04 14:27:10 +01:00
Simon Li
954ce155e0 pytest-asyncio <1.0.0 2025-07-04 14:23:38 +01:00
pre-commit-ci[bot]
1a750c0479 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-07-04 06:42:36 +00:00
Tim Kreuzer
43323d0f60 send event if spawn_future was cancelled and spawner not pending 2025-07-04 08:40:38 +02:00
pre-commit-ci[bot]
65a87bcf65 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-07-04 06:18:02 +00:00
Tim Kreuzer
0e44693819 add review comment changes 2025-07-04 06:17:43 +00:00
Simon Li
faa5e31f52 Switch to https://github.com/rbubley/mirrors-prettier
Downgrade prettier to last proper release v3.6.2
2025-07-02 22:35:00 +01:00
Erik Sundell
01a43f41f8 Merge pull request #5071 from agoose77/agoose77/docs-user-redirect
Update docs to point to `/hub/user-redirect/` instead of `/user-redirect/`
2025-06-04 10:35:31 +02:00
Min RK
d008d51b7f Merge pull request #5076 from grios-stratio/fix/verify-hostname-in-internal-ssl 2025-06-04 10:31:14 +02:00
Guillermo Ríos
68b2dbf0f5 only add passed check_hostname if it is not None 2025-06-04 09:50:19 +02:00
Erik Sundell
f07b55c289 Merge pull request #5075 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2025-06-03 08:52:12 +02:00
pre-commit-ci[bot]
e6ab7ae58d [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.11.8 → v0.11.12](https://github.com/astral-sh/ruff-pre-commit/compare/v0.11.8...v0.11.12)
2025-06-02 20:17:18 +00:00
Simon Li
fbc752e352 Merge pull request #5074 from jupyterhub/dependabot/npm_and_yarn/npm-minor-ac61a75ac8
Bump the npm-minor group with 2 updates
2025-06-01 21:40:22 +01:00
Simon Li
6b5d87da63 Merge pull request #5073 from jupyterhub/dependabot/npm_and_yarn/jsx/jsx-minor-f68f03cc0b
Bump the jsx-minor group in /jsx with 10 updates
2025-06-01 21:39:58 +01:00
dependabot[bot]
cd30074ab9 Bump the npm-minor group with 2 updates
Bumps the npm-minor group with 2 updates: [bootstrap](https://github.com/twbs/bootstrap) and [sass](https://github.com/sass/dart-sass).


Updates `bootstrap` from 5.3.5 to 5.3.6
- [Release notes](https://github.com/twbs/bootstrap/releases)
- [Commits](https://github.com/twbs/bootstrap/compare/v5.3.5...v5.3.6)

Updates `sass` from 1.87.0 to 1.89.1
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.87.0...1.89.1)

---
updated-dependencies:
- dependency-name: bootstrap
  dependency-version: 5.3.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-minor
- dependency-name: sass
  dependency-version: 1.89.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-01 17:28:23 +00:00
dependabot[bot]
4d4ded311e Bump the jsx-minor group in /jsx with 10 updates
Bumps the jsx-minor group in /jsx with 10 updates:

| Package | From | To |
| --- | --- | --- |
| [bootstrap](https://github.com/twbs/bootstrap) | `5.3.5` | `5.3.6` |
| [react-bootstrap](https://github.com/react-bootstrap/react-bootstrap) | `2.10.9` | `2.10.10` |
| [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) | `7.5.3` | `7.6.1` |
| [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) | `7.27.1` | `7.27.4` |
| [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) | `7.27.1` | `7.27.2` |
| [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) | `9.25.1` | `9.28.0` |
| [eslint](https://github.com/eslint/eslint) | `9.25.1` | `9.28.0` |
| [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) | `5.2.6` | `5.4.1` |
| [globals](https://github.com/sindresorhus/globals) | `16.0.0` | `16.2.0` |
| [webpack](https://github.com/webpack/webpack) | `5.99.7` | `5.99.9` |


Updates `bootstrap` from 5.3.5 to 5.3.6
- [Release notes](https://github.com/twbs/bootstrap/releases)
- [Commits](https://github.com/twbs/bootstrap/compare/v5.3.5...v5.3.6)

Updates `react-bootstrap` from 2.10.9 to 2.10.10
- [Release notes](https://github.com/react-bootstrap/react-bootstrap/releases)
- [Changelog](https://github.com/react-bootstrap/react-bootstrap/blob/v2.10.10/CHANGELOG.md)
- [Commits](https://github.com/react-bootstrap/react-bootstrap/compare/v2.10.9...v2.10.10)

Updates `react-router` from 7.5.3 to 7.6.1
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router@7.6.1/packages/react-router)

Updates `@babel/core` from 7.27.1 to 7.27.4
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.27.4/packages/babel-core)

Updates `@babel/preset-env` from 7.27.1 to 7.27.2
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.27.2/packages/babel-preset-env)

Updates `@eslint/js` from 9.25.1 to 9.28.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/commits/v9.28.0/packages/js)

Updates `eslint` from 9.25.1 to 9.28.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.25.1...v9.28.0)

Updates `eslint-plugin-prettier` from 5.2.6 to 5.4.1
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v5.2.6...v5.4.1)

Updates `globals` from 16.0.0 to 16.2.0
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v16.0.0...v16.2.0)

Updates `webpack` from 5.99.7 to 5.99.9
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.99.7...v5.99.9)

---
updated-dependencies:
- dependency-name: bootstrap
  dependency-version: 5.3.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: react-bootstrap
  dependency-version: 2.10.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: react-router
  dependency-version: 7.6.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: "@babel/core"
  dependency-version: 7.27.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: "@babel/preset-env"
  dependency-version: 7.27.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: "@eslint/js"
  dependency-version: 9.28.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: eslint
  dependency-version: 9.28.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: eslint-plugin-prettier
  dependency-version: 5.4.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: globals
  dependency-version: 16.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: webpack
  dependency-version: 5.99.9
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-01 17:10:49 +00:00
Erik Sundell
9f5f02aa73 Merge pull request #5072 from minrk/security-md
update security.md, security doc to point to GitHub vulnerability reporting
2025-05-31 09:28:41 +02:00
Min RK
2babc7ae83 update security.md, security doc to point to GitHub vulnerability reporting 2025-05-31 09:18:10 +02:00
Angus Hollands
27c1441baa docs: update URL 2025-05-30 11:33:27 +01:00
Erik Sundell
bc21e99e7e Merge pull request #5070 from Paul2708/patch-1
Add missing literal to code tags
2025-05-27 19:14:52 +02:00
Paul Hoger
07b6e281c4 Add missing literal to code tags 2025-05-27 18:16:33 +02:00
Min RK
5023718463 Merge pull request #5069 from krassowski/fix-link-in-changelog
Fix link in changelog
2025-05-26 13:56:03 +02:00
Michał Krassowski
4617cc10ef Update changelog.md 2025-05-26 12:37:01 +01:00
Min RK
b35d77f475 Merge pull request #5068 from jupyterhub/choldgraf-patch-1
Update team compass URL
2025-05-20 18:19:38 +02:00
Chris Holdgraf
68f784edee Update team compass URL 2025-05-19 08:23:26 -07:00
Tim Kreuzer
e3b704b83e add refresh_pre_stop attribute to authenticators 2025-05-13 21:06:28 +02:00
Erik Sundell
a8a26856b0 Merge pull request #5066 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2025-05-07 14:12:45 +02:00
pre-commit-ci[bot]
f087178171 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.11.4 → v0.11.8](https://github.com/astral-sh/ruff-pre-commit/compare/v0.11.4...v0.11.8)
2025-05-05 20:17:29 +00:00
Simon Li
3c5dd08c17 Merge pull request #5063 from jupyterhub/dependabot/npm_and_yarn/jsx/jsx-minor-3dd64f6cb4
Bump the jsx-minor group in /jsx with 7 updates
2025-05-01 22:51:45 +01:00
Simon Li
072dc29f80 Merge pull request #5064 from chilin0525/bugfix-error-username-in-fastapi-example
Fix incorrect login username in service-fastapi README.md
2025-05-01 21:44:03 +01:00
Simon Li
c9500e5b71 Merge pull request #5065 from jupyterhub/dependabot/npm_and_yarn/npm-minor-c57a224319
Bump the npm-minor group with 2 updates
2025-05-01 21:43:07 +01:00
dependabot[bot]
caae054cea Bump the npm-minor group with 2 updates
Bumps the npm-minor group with 2 updates: [bootstrap](https://github.com/twbs/bootstrap) and [sass](https://github.com/sass/dart-sass).


Updates `bootstrap` from 5.3.3 to 5.3.5
- [Release notes](https://github.com/twbs/bootstrap/releases)
- [Commits](https://github.com/twbs/bootstrap/compare/v5.3.3...v5.3.5)

Updates `sass` from 1.86.1 to 1.87.0
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.86.1...1.87.0)

---
updated-dependencies:
- dependency-name: bootstrap
  dependency-version: 5.3.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-minor
- dependency-name: sass
  dependency-version: 1.87.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-01 17:57:04 +00:00
Chilin Chiou
2c01935339 Fix error user name in fastapi service example 2025-05-02 01:21:41 +08:00
dependabot[bot]
0ef744e4c9 Bump the jsx-minor group in /jsx with 7 updates
Bumps the jsx-minor group in /jsx with 7 updates:

| Package | From | To |
| --- | --- | --- |
| [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) | `7.5.2` | `7.5.3` |
| [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) | `7.26.10` | `7.27.1` |
| [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) | `7.26.9` | `7.27.1` |
| [@babel/preset-react](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react) | `7.26.3` | `7.27.1` |
| [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) | `9.24.0` | `9.25.1` |
| [eslint](https://github.com/eslint/eslint) | `9.24.0` | `9.25.1` |
| [webpack](https://github.com/webpack/webpack) | `5.99.5` | `5.99.7` |


Updates `react-router` from 7.5.2 to 7.5.3
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router@7.5.3/packages/react-router)

Updates `@babel/core` from 7.26.10 to 7.27.1
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.27.1/packages/babel-core)

Updates `@babel/preset-env` from 7.26.9 to 7.27.1
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.27.1/packages/babel-preset-env)

Updates `@babel/preset-react` from 7.26.3 to 7.27.1
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.27.1/packages/babel-preset-react)

Updates `@eslint/js` from 9.24.0 to 9.25.1
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/commits/v9.25.1/packages/js)

Updates `eslint` from 9.24.0 to 9.25.1
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.24.0...v9.25.1)

Updates `webpack` from 5.99.5 to 5.99.7
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.99.5...v5.99.7)

---
updated-dependencies:
- dependency-name: react-router
  dependency-version: 7.5.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: "@babel/core"
  dependency-version: 7.27.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: "@babel/preset-env"
  dependency-version: 7.27.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: "@babel/preset-react"
  dependency-version: 7.27.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: "@eslint/js"
  dependency-version: 9.25.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: eslint
  dependency-version: 9.25.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: webpack
  dependency-version: 5.99.7
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-01 17:18:26 +00:00
Min RK
e405a71a19 Merge pull request #5056 from minrk/forced-login
add forced login example
2025-04-29 08:52:36 +02:00
Min RK
798faaafe8 example: fix expiration
Co-authored-by: Simon Li <orpheus+devel@gmail.com>
2025-04-26 13:24:50 +02:00
Min RK
b673fad94b fix nested list myst doesn't understand 2025-04-25 12:59:03 +02:00
Min RK
f45f7536e9 Apply suggestions from code review
Co-authored-by: Simon Li <orpheus+devel@gmail.com>
2025-04-25 12:57:33 +02:00
Simon Li
e06abc3158 Merge pull request #5059 from jupyterhub/dependabot/npm_and_yarn/jsx/http-proxy-middleware-2.0.9
Bump http-proxy-middleware from 2.0.7 to 2.0.9 in /jsx
2025-04-25 11:11:32 +01:00
dependabot[bot]
e4514725cf Bump http-proxy-middleware from 2.0.7 to 2.0.9 in /jsx
Bumps [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware) from 2.0.7 to 2.0.9.
- [Release notes](https://github.com/chimurai/http-proxy-middleware/releases)
- [Changelog](https://github.com/chimurai/http-proxy-middleware/blob/v2.0.9/CHANGELOG.md)
- [Commits](https://github.com/chimurai/http-proxy-middleware/compare/v2.0.7...v2.0.9)

---
updated-dependencies:
- dependency-name: http-proxy-middleware
  dependency-version: 2.0.9
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-25 09:57:30 +00:00
Min RK
af655f9be1 Merge pull request #5057 from jupyterhub/dependabot/npm_and_yarn/jsx/react-router-7.5.2
Bump react-router from 7.5.0 to 7.5.2 in /jsx
2025-04-25 11:56:26 +02:00
dependabot[bot]
76488db2ef Bump react-router from 7.5.0 to 7.5.2 in /jsx
Bumps [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) from 7.5.0 to 7.5.2.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router@7.5.2/packages/react-router)

---
updated-dependencies:
- dependency-name: react-router
  dependency-version: 7.5.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-25 00:49:18 +00:00
Min RK
36fd86798e add forced login example 2025-04-24 14:53:40 +02:00
Min RK
46efc3e689 Merge pull request #5052 from manics/docs-spawner-delete-forever
doc: spawner.delete_forever applies to users and named servers
2025-04-23 10:37:27 +02:00
Simon Li
71bbdf65ac doc: spawner.delete_forever also applies to named servers 2025-04-16 16:33:39 +01:00
Min RK
1bcc508e42 Bump to 5.4.0.dev 2025-04-15 14:54:53 +02:00
Min RK
84adcbec30 Bump to 5.3.0 2025-04-15 14:54:33 +02:00
Min RK
81bd5eeedb Merge pull request #5048 from minrk/530
changelog for 5.3.0
2025-04-15 14:54:08 +02:00
Min RK
6a96a9c3f4 Merge pull request #5051 from minrk/audit
npm audit fix
2025-04-15 14:53:38 +02:00
Min RK
55aa7e7819 npm audit fix 2025-04-15 14:28:30 +02:00
Min RK
20b11b26f9 latest changes 2025-04-15 14:27:14 +02:00
Min RK
b42371ded8 Merge pull request #5050 from jupyterhub/dependabot/npm_and_yarn/jsx/jsx-minor-1c71689af3
Bump the jsx-minor group in /jsx with 8 updates
2025-04-15 13:43:08 +02:00
dependabot[bot]
cfa4364549 Bump the jsx-minor group in /jsx with 8 updates
Bumps the jsx-minor group in /jsx with 8 updates:

| Package | From | To |
| --- | --- | --- |
| [bootstrap](https://github.com/twbs/bootstrap) | `5.3.3` | `5.3.5` |
| [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) | `7.4.1` | `7.5.0` |
| [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) | `9.23.0` | `9.24.0` |
| [@testing-library/react](https://github.com/testing-library/react-testing-library) | `16.2.0` | `16.3.0` |
| [eslint](https://github.com/eslint/eslint) | `9.23.0` | `9.24.0` |
| [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) | `5.2.5` | `5.2.6` |
| [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) | `7.37.4` | `7.37.5` |
| [webpack](https://github.com/webpack/webpack) | `5.98.0` | `5.99.5` |


Updates `bootstrap` from 5.3.3 to 5.3.5
- [Release notes](https://github.com/twbs/bootstrap/releases)
- [Commits](https://github.com/twbs/bootstrap/compare/v5.3.3...v5.3.5)

Updates `react-router` from 7.4.1 to 7.5.0
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router@7.5.0/packages/react-router)

Updates `@eslint/js` from 9.23.0 to 9.24.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/commits/v9.24.0/packages/js)

Updates `@testing-library/react` from 16.2.0 to 16.3.0
- [Release notes](https://github.com/testing-library/react-testing-library/releases)
- [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/react-testing-library/compare/v16.2.0...v16.3.0)

Updates `eslint` from 9.23.0 to 9.24.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.23.0...v9.24.0)

Updates `eslint-plugin-prettier` from 5.2.5 to 5.2.6
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v5.2.5...v5.2.6)

Updates `eslint-plugin-react` from 7.37.4 to 7.37.5
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.37.4...v7.37.5)

Updates `webpack` from 5.98.0 to 5.99.5
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.98.0...v5.99.5)

---
updated-dependencies:
- dependency-name: bootstrap
  dependency-version: 5.3.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: react-router
  dependency-version: 7.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: "@eslint/js"
  dependency-version: 9.24.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: "@testing-library/react"
  dependency-version: 16.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: eslint
  dependency-version: 9.24.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: eslint-plugin-prettier
  dependency-version: 5.2.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: eslint-plugin-react
  dependency-version: 7.37.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: webpack
  dependency-version: 5.99.5
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-15 11:10:30 +00:00
Min RK
1d17471e97 Merge pull request #5049 from minrk/explicit-permissions
set default permissions on workflows
2025-04-15 13:04:37 +02:00
Min RK
cb3391e2cd set default permissions on workflows
already set on others
2025-04-15 12:58:14 +02:00
Min RK
79782d01c9 Merge pull request #5047 from chilin0525/fix-outdated-wiki-link-for-less-privileged-user
Fix outdated GitHub Wiki links in documentation
2025-04-15 09:32:33 +02:00
Min RK
8e81aae517 add highlights for 5.3, including notes about new image building 2025-04-15 09:17:58 +02:00
Chilin Chiou
49be789425 Fix broken link to authenticators reference 2025-04-14 22:32:26 +08:00
Min RK
fb2a2cdf3a changelog for 5.3.0 2025-04-14 16:04:54 +02:00
ChiLin Chiu
bb423b07ae Update docs/source/tutorial/quickstart.md
Co-authored-by: Min RK <benjaminrk@gmail.com>
2025-04-14 21:10:23 +08:00
ChiLin Chiu
add7a834a5 Update README.md
Co-authored-by: Min RK <benjaminrk@gmail.com>
2025-04-14 21:10:13 +08:00
Min RK
3e5b78b32b Merge pull request #5045 from srikanthchelluri/stop-duration-buckets
Allow configuration of stop duration metric buckets
2025-04-14 12:13:35 +02:00
Chilin Chiou
cbb93c36f1 Update quickstart tutorial to replace outdated wiki link with current non-root setup instructions 2025-04-13 19:31:25 +08:00
Erik Sundell
f55ececb31 Merge pull request #5046 from chilin0525/fix-error-idleness-hyperlink
Fix broken link to `idleness` section in capacity-planning.md
2025-04-12 12:16:18 +02:00
Chilin Chiou
d0d5e84ad3 Fix broken link to idleness page in capacity-planning.md 2025-04-12 15:55:22 +08:00
pre-commit-ci[bot]
b7cd235f7b [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-04-11 14:22:17 +00:00
Srikanth Chelluri
2e5fc51b6b Allow configuration of stop duration metric buckets
Issue #4833 proposes allowing configuration of buckets for server spawn
duration. It was resolved with PR #4967

This follows a similar pattern to support the same kind of configuration
for server stop duration
2025-04-11 10:21:56 -04:00
Min RK
5f4a40324f Merge pull request #5043 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2025-04-11 08:33:27 +02:00
pre-commit-ci[bot]
9539790f29 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.9.9 → v0.11.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.9.9...v0.11.4)
2025-04-07 20:35:52 +00:00
Min RK
9fe7822098 Bump to 5.3.0rc0 2025-04-07 15:02:03 +02:00
Min RK
e70658c015 Merge pull request #5042 from minrk/53rc
changelog for 5.3.0 (RC)
2025-04-07 14:59:59 +02:00
Min RK
13ae9247f9 changelog for 5.3.0 2025-04-07 12:58:30 +02:00
Min RK
cb81f309a6 Merge pull request #5030 from minrk/eslint
jsx: update and address eslint
2025-04-07 12:37:25 +02:00
Min RK
b5359545db Merge pull request #5037 from yuvipanda/dummy-path
Add SharedPasswordAuthenticator
2025-04-07 12:25:10 +02:00
Min RK
640c688519 can't run eslint on ci for some reason
npm install hangs
2025-04-07 11:49:05 +02:00
Georgiana
ce1269c1c8 Merge pull request #5041 from ktaletsk/patch-1
Add instruction on how to select dummy authenticator
2025-04-06 20:14:53 +03:00
pre-commit-ci[bot]
d1a412b354 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-04-05 22:33:39 +00:00
Konstantin Taletskiy
fd9f86cf49 how to select dummy authenticator 2025-04-05 15:31:08 -07:00
Simon Li
4a67babe7d Merge pull request #5012 from minrk/user_options_redux
add apply_user_options hook
2025-04-05 19:31:41 +01:00
Min RK
1aa220ee2c improve user_options docs per review 2025-04-03 14:39:39 +02:00
Min RK
286b85cc78 only relay HTTPErrors to users in apply_user_options hook
don't leak arbitrary error messages
2025-04-03 14:39:11 +02:00
Min RK
8002cbb873 Apply suggestions from code review
Co-authored-by: Simon Li <orpheus+devel@gmail.com>
2025-04-03 11:29:22 +02:00
Min RK
7522d2c73a flesh out SharedPasswordAuthenticator
- add docs, tests
- deprecate DummyAuthenticator.password, pointing to new class
- accept no password as valid config (no login possible)
- log warnings for suspicious config (e.g. passwords not set, admin password set, but no admin users, etc.)
2025-04-02 12:16:22 +02:00
Simon Li
ca733312a1 Merge pull request #5040 from jupyterhub/dependabot/npm_and_yarn/jsx/jsx-minor-6866d3dd07
Bump the jsx-minor group in /jsx with 5 updates
2025-04-01 19:40:20 +01:00
Simon Li
a75e0095c9 Merge pull request #5039 from jupyterhub/dependabot/npm_and_yarn/npm-minor-db3facc306
Bump sass from 1.86.0 to 1.86.1 in the npm-minor group
2025-04-01 19:22:11 +01:00
dependabot[bot]
7fda625102 Bump the jsx-minor group in /jsx with 5 updates
Bumps the jsx-minor group in /jsx with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [react](https://github.com/facebook/react/tree/HEAD/packages/react) | `19.0.0` | `19.1.0` |
| [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom) | `19.0.0` | `19.1.0` |
| [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) | `7.4.0` | `7.4.1` |
| [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) | `5.2.4` | `5.2.5` |
| [webpack-dev-server](https://github.com/webpack/webpack-dev-server) | `5.2.0` | `5.2.1` |


Updates `react` from 19.0.0 to 19.1.0
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v19.1.0/packages/react)

Updates `react-dom` from 19.0.0 to 19.1.0
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v19.1.0/packages/react-dom)

Updates `react-router` from 7.4.0 to 7.4.1
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router@7.4.1/packages/react-router)

Updates `eslint-plugin-prettier` from 5.2.4 to 5.2.5
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v5.2.4...v5.2.5)

Updates `webpack-dev-server` from 5.2.0 to 5.2.1
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v5.2.0...v5.2.1)

---
updated-dependencies:
- dependency-name: react
  dependency-version: 19.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: react-dom
  dependency-version: 19.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: react-router
  dependency-version: 7.4.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: eslint-plugin-prettier
  dependency-version: 5.2.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: webpack-dev-server
  dependency-version: 5.2.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-01 17:39:41 +00:00
dependabot[bot]
e099579ff3 Bump sass from 1.86.0 to 1.86.1 in the npm-minor group
Bumps the npm-minor group with 1 update: [sass](https://github.com/sass/dart-sass).


Updates `sass` from 1.86.0 to 1.86.1
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.86.0...1.86.1)

---
updated-dependencies:
- dependency-name: sass
  dependency-version: 1.86.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-01 17:33:17 +00:00
pre-commit-ci[bot]
2457813432 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-03-31 18:50:17 +00:00
YuviPanda
d45472a7fc Partially move to another authenticator 2025-03-31 11:45:14 -07:00
Min RK
ca730cbed4 Merge pull request #5022 from minrk/login_xsrf
improve xsrf errors on login
2025-03-31 10:09:30 +02:00
Min RK
fd3ae8b2b6 Merge pull request #5033 from manics/urlpathjoin-trailing-empty
url_path_join: handle empty trailing components
2025-03-31 10:07:57 +02:00
YuviPanda
b7621ea82b Require different password for admins with dummyauthenticator
Currently, admin users are even more insecure than otherwise
with dummyauthenticator - anyone who knows the username of the admin
can get in if they also know the password.

This PR adds an additional layer of security - admins *must* login
using a different, more secure (longer, per NIST guidelines) password.
If they login using the regular password, no admin status for them.

This mildly helpful in local testing and improves overall security
posture. Where it really shines though, is in 'workshop' hubs. I've
been running those for years now, both at UC Berkeley and now at 2i2c
(with NASA Openscapes in particular). This was the usecase DummyAuth
was written for :D It allows an instructor to share a single password
with all the users in a secure way (they're all in a physical room,
zoom, etc). The password is then changed after the workshop. However,
admin access was not possible in this use case, as anyone guessing the
admin's username can get in as admin. With this change, admin access
is possible.
2025-03-28 09:15:05 -07:00
Simon Li
ba25ee9e9c Additional test cases
Co-authored-by: Min RK <benjaminrk@gmail.com>
2025-03-28 10:08:43 +00:00
Min RK
239902934a Merge pull request #4988 from manics/ipv6
More IPv6: Use bare IPv6 for configuration, use `[ipv6]` when displaying IPv6 outputs
2025-03-28 10:31:07 +01:00
Min RK
e63d6bfbb1 Merge pull request #5036 from minrk/rtd-no-node
skip js build on readthedocs
2025-03-28 10:28:50 +01:00
Min RK
ae434dd866 skip js build on readthedocs
don't need the frontend to build the docs

previously only skipped jsx because yarn was unavailable
but we don't use yarn anymore
2025-03-28 10:15:14 +01:00
Min RK
15efe6b7c1 don't assume url_path_join strips trailing slashes
- when adding trailing slash, do so inside url_path_join, not with `+ '/'`
- don't use url_path_join to build url for handler _outside_ prefix (AddSlash on `/hub`)
2025-03-28 10:02:33 +01:00
Simon Li
5fbf787066 Warn if Spawner.ip includes [] 2025-03-27 22:45:06 +00:00
Simon Li
b486f9465c Add versionchanged for Spawner.ip 2025-03-27 22:33:56 +00:00
Simon Li
5e77ca22e3 url_path_join: handle empty trailing components
This ensures that `url_path_join("/x/", "") returns "/x/" not "/x"
2025-03-27 18:36:50 +00:00
Min RK
cd79f17d90 jsx: update and address eslint
add script to top-level package.json to run eslint in subdir
2025-03-26 12:02:04 +01:00
Min RK
742de1311e Merge pull request #5027 from jupyterhub/dependabot/npm_and_yarn/jsx/jsx-react-7710106a89
Bump the jsx-react group in /jsx with 2 updates
2025-03-25 13:19:54 +01:00
Min RK
f76cc42363 Merge pull request #5023 from minrk/spawn-pending
try to fix flaky spawn_pending browser test
2025-03-25 12:30:37 +01:00
Min RK
7854ed56d1 update lock 2025-03-25 12:28:09 +01:00
Min RK
f2cab7c5ef vendor tiny subset of unmaintained recompose
the functions we use haven't changed in almost 10 years,
and are only a few lines

we should probably lose them eventually, but easier to vendor them first
2025-03-25 12:28:00 +01:00
dependabot[bot]
bd8bb9e5ec Bump the jsx-react group in /jsx with 2 updates
Bumps the jsx-react group in /jsx with 2 updates: [react](https://github.com/facebook/react/tree/HEAD/packages/react) and [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom).


Updates `react` from 18.3.1 to 19.0.0
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v19.0.0/packages/react)

Updates `react-dom` from 18.3.1 to 19.0.0
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v19.0.0/packages/react-dom)

---
updated-dependencies:
- dependency-name: react
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: jsx-react
- dependency-name: react-dom
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: jsx-react
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-25 11:21:37 +00:00
Min RK
25c1469658 Merge pull request #5028 from jupyterhub/dependabot/npm_and_yarn/jsx/jsx-minor-d1f509e622
Bump the jsx-minor group in /jsx with 11 updates
2025-03-25 12:20:36 +01:00
Min RK
b64b4e45c2 remove unused multi-select 2025-03-25 11:58:58 +01:00
dependabot[bot]
24d99afffd Bump the jsx-minor group in /jsx with 11 updates
Bumps the jsx-minor group in /jsx with 11 updates:

| Package | From | To |
| --- | --- | --- |
| [react-bootstrap](https://github.com/react-bootstrap/react-bootstrap) | `2.10.7` | `2.10.9` |
| [react-icons](https://github.com/react-icons/react-icons) | `5.4.0` | `5.5.0` |
| [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) | `7.1.1` | `7.4.0` |
| [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) | `7.26.0` | `7.26.10` |
| [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) | `7.26.0` | `7.26.9` |
| [@testing-library/react](https://github.com/testing-library/react-testing-library) | `16.1.0` | `16.2.0` |
| [eslint](https://github.com/eslint/eslint) | `9.21.0` | `9.23.0` |
| [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) | `5.2.3` | `5.2.4` |
| [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) | `7.37.3` | `7.37.4` |
| [prettier](https://github.com/prettier/prettier) | `3.5.2` | `3.5.3` |
| [webpack](https://github.com/webpack/webpack) | `5.97.1` | `5.98.0` |


Updates `react-bootstrap` from 2.10.7 to 2.10.9
- [Release notes](https://github.com/react-bootstrap/react-bootstrap/releases)
- [Changelog](https://github.com/react-bootstrap/react-bootstrap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/react-bootstrap/react-bootstrap/compare/v2.10.7...v2.10.9)

Updates `react-icons` from 5.4.0 to 5.5.0
- [Release notes](https://github.com/react-icons/react-icons/releases)
- [Commits](https://github.com/react-icons/react-icons/compare/v5.4.0...v5.5.0)

Updates `react-router` from 7.1.1 to 7.4.0
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router@7.4.0/packages/react-router)

Updates `@babel/core` from 7.26.0 to 7.26.10
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.26.10/packages/babel-core)

Updates `@babel/preset-env` from 7.26.0 to 7.26.9
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.26.9/packages/babel-preset-env)

Updates `@testing-library/react` from 16.1.0 to 16.2.0
- [Release notes](https://github.com/testing-library/react-testing-library/releases)
- [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/react-testing-library/compare/v16.1.0...v16.2.0)

Updates `eslint` from 9.21.0 to 9.23.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.21.0...v9.23.0)

Updates `eslint-plugin-prettier` from 5.2.3 to 5.2.4
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v5.2.3...v5.2.4)

Updates `eslint-plugin-react` from 7.37.3 to 7.37.4
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.37.3...v7.37.4)

Updates `prettier` from 3.5.2 to 3.5.3
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.5.2...3.5.3)

Updates `webpack` from 5.97.1 to 5.98.0
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.97.1...v5.98.0)

---
updated-dependencies:
- dependency-name: react-bootstrap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: react-icons
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: react-router
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: "@babel/preset-env"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: "@testing-library/react"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: eslint-plugin-prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-25 11:55:03 +01:00
Min RK
470d7624a3 show timestamps in captured logs
for easier debugging of timelines
2025-03-25 11:53:57 +01:00
Min RK
d0120ef56c don't keep waiting for log messages after we've received what we expect
avoids potential race waiting for an element on he progress page after navigating away
2025-03-25 11:53:57 +01:00
Min RK
44b81f662a Merge pull request #5025 from minrk/admin-paging
Try to improve admin paging consistency
2025-03-25 11:53:04 +01:00
Min RK
43a868d00b Apply suggestions from code review
Co-authored-by: Anton Akhmerov <anton.akhmerov@gmail.com>
2025-03-25 11:47:37 +01:00
Min RK
52e852e8f9 test_browser: wait for filter to be applied before clicking next
wait for networkidle isn't enough for debounced name filter
clock.run_for doesn't seem to work, either, unclear why

instead, make sure the first page reflects the filtered view before clicking 'next'
2025-03-25 09:00:57 +01:00
Min RK
1c5607ca1d Merge pull request #5024 from minrk/rm-docker
stop publishing images from jupyterhub/jupyterhub
2025-03-25 08:44:57 +01:00
Min RK
9c4aefc424 Merge pull request #5026 from jupyterhub/dependabot/npm_and_yarn/npm-minor-dc07ffc076
Bump sass from 1.85.1 to 1.86.0 in the npm-minor group
2025-03-24 20:36:18 +01:00
Min RK
66995952ab remove some more docker workflow remnants 2025-03-24 20:14:21 +01:00
Min RK
1b2417678b avoid calling setPagination in dispatchPageUpdate
I think this can cause a race between the requested view and the loaded state
2025-03-24 20:05:58 +01:00
dependabot[bot]
8c9e6fd82b Bump sass from 1.85.1 to 1.86.0 in the npm-minor group
Bumps the npm-minor group with 1 update: [sass](https://github.com/sass/dart-sass).


Updates `sass` from 1.85.1 to 1.86.0
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.85.1...1.86.0)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-24 18:39:21 +00:00
Min RK
325dd21845 try to fix admin pagination
- allow cancellation of outdated updates
- trigger offset changes with setOffset instead of on reply
- render pagination footer with `user_page.offset` instead of state.offset which only represents the _requested_ offset, not current view
2025-03-24 19:18:56 +01:00
Min RK
abdc3850ff Merge pull request #5016 from jupyterhub/dependabot/npm_and_yarn/jsx/jsx-webpack-09fb71a4c7
Bump the jsx-webpack group across 1 directory with 2 updates
2025-03-24 19:18:43 +01:00
Min RK
6caa969708 stop publishing images from this repo
moving to jupyterhub-container-images repo
2025-03-24 13:16:19 +01:00
Min RK
89f4385735 update webpack cli 2025-03-24 12:45:04 +01:00
Min RK
2b77b1e507 expand webpack group glob
so it accepts `@webpack-cli/...`
2025-03-24 12:44:01 +01:00
Min RK
98ad6fd4e6 apply_user_options is async now 2025-03-24 12:39:25 +01:00
Min RK
5322243367 run apply_user_options immediately prior to pre_spawn_hook
after most other things are defined
2025-03-24 12:39:25 +01:00
Min RK
17f11970bb make sure Spawner.user_options is in docs 2025-03-24 12:39:25 +01:00
Min RK
66922889c0 exercise new options_from_form, apply_user_options 2025-03-24 12:39:23 +01:00
Min RK
f820e5fde2 don't generate multiple values for xsrf token
avoids problems comparing in tests, even though the internal xsrf_id comparisons remain valid
2025-03-24 12:11:25 +01:00
Min RK
41a80e4009 don't follow redirect on logout when checking if it doesn't set cookies
login form sets fresh _xsrf
2025-03-24 08:40:45 +01:00
Min RK
1a2e5d2e9d improve xsrf errors on login
- show login form for trying again, just like a password failure
- nicer, but more vague "try again" error for expired xsrf (original error still logged)
  because users logging in don't need to know or understand xsrf stuff
- set fresh xsrf cookie when login page loads, to maximize time until expiration
2025-03-21 17:18:24 +01:00
Min RK
6619524d1f fix pre-filled username on failed login 2025-03-21 15:18:25 +01:00
Min RK
44a02299c1 Merge pull request #5020 from minrk/custom_error
make sure custom error messages are shown on regular error pages
2025-03-20 11:25:43 +01:00
Min RK
09d552ad3d Merge pull request #4950 from millenniumhand/patch-1
Fixed code formatting for implicit_spawn_seconds (#4949)
2025-03-20 10:51:33 +01:00
Min RK
721e73f433 djlint: off for implicit_spawn_seconds 2025-03-20 09:57:49 +01:00
Min RK
6c40c05166 remove unused test
folded into single parametrized test
2025-03-20 09:48:00 +01:00
Min RK
044d7ac000 Merge pull request #5021 from minrk/matching-code
add some debugging output for intermittent share code failure
2025-03-19 14:13:15 +01:00
Min RK
b74f1b1b14 add some debugging output for intermittent share code failure 2025-03-19 14:00:23 +01:00
Min RK
b9a59768d0 Merge pull request #4967 from kireetb/main
Allow configuration of bucket sizes in metrics - #4833
2025-03-19 13:29:24 +01:00
Min RK
3ce05d42b6 note version for bucket env change 2025-03-19 13:18:56 +01:00
Min RK
6a36812e4a Merge pull request #5017 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2025-03-19 13:16:36 +01:00
Min RK
b535985c25 make sure custom error messages are shown on regular error pages
not just the `not_running` page, which is only served for slow spawns
2025-03-19 12:09:12 +01:00
Simon Li
cc77b828d2 Merge pull request #5018 from ctcjab/patch-1
rm outdated claim that "copy shareable link" does not work in JupyterHub
2025-03-14 10:32:48 +00:00
ctcjab
410fa0f36a rm outdated docs
...that claim "copy shareable link" does not work in JupyterHub.

This has been working for several years.

Ref:
* https://github.com/jupyterlab/jupyterlab/issues/5388#event-1902114640
* https://jupyterhub.readthedocs.io/en/stable/faq/faq.html#:~:text=can%20use%20JupyterLab%E2%80%99s%20%E2%80%9C-,copy%20shareable%20link,-%E2%80%9D%20in%20the%20context
2025-03-11 21:20:13 -04:00
Min RK
4ec51ce0cf Merge pull request #5004 from minrk/no-block-groups-api
allow group management API when managed_groups is True
2025-03-10 09:56:26 +01:00
Simon Li
e9613bfb2f Merge pull request #4991 from minrk/remote_ip
Add $JUPYTERHUB_XSRF_ANONYMOUS_{IP_CIDRS|HEADERS} config for managing anonymous xsrf ids
2025-03-09 12:29:15 +00:00
Min RK
0a27724540 Remove managed_groups check in groups API
allow group admins to make group changes, even though manage_groups config may clobber them
2025-03-07 13:11:34 +01:00
pre-commit-ci[bot]
04121b0e3d [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.9.4 → v0.9.9](https://github.com/astral-sh/ruff-pre-commit/compare/v0.9.4...v0.9.9)
2025-03-03 20:42:07 +00:00
dependabot[bot]
e0b6c46b4f Bump the jsx-webpack group across 1 directory with 2 updates
Bumps the jsx-webpack group with 2 updates in the /jsx directory: [babel-loader](https://github.com/babel/babel-loader) and [webpack-cli](https://github.com/webpack/webpack-cli).


Updates `babel-loader` from 9.2.1 to 10.0.0
- [Release notes](https://github.com/babel/babel-loader/releases)
- [Changelog](https://github.com/babel/babel-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel-loader/compare/v9.2.1...v10.0.0)

Updates `webpack-cli` from 5.1.4 to 6.0.1
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-cli/compare/webpack-cli@5.1.4...webpack-cli@6.0.1)

---
updated-dependencies:
- dependency-name: babel-loader
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: jsx-webpack
- dependency-name: webpack-cli
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: jsx-webpack
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-03 13:24:29 +00:00
Min RK
c473a35459 Merge pull request #5011 from minrk/spawn-error
raise spawn error if spawn failed while polling
2025-03-03 14:23:33 +01:00
Min RK
27b1759f8a Merge pull request #5015 from jupyterhub/dependabot/npm_and_yarn/jsx/jsx-minor-17957fd85e
Bump the jsx-minor group in /jsx with 2 updates
2025-03-03 14:23:03 +01:00
Simon Li
7d2e416d0f Merge pull request #5014 from jupyterhub/dependabot/npm_and_yarn/npm-minor-b0ce3413d9
Bump sass from 1.83.4 to 1.85.1 in the npm-minor group
2025-03-03 10:16:09 +00:00
dependabot[bot]
6455fa13b8 Bump the jsx-minor group in /jsx with 2 updates
Bumps the jsx-minor group in /jsx with 2 updates: [eslint](https://github.com/eslint/eslint) and [prettier](https://github.com/prettier/prettier).


Updates `eslint` from 9.19.0 to 9.21.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.19.0...v9.21.0)

Updates `prettier` from 3.4.2 to 3.5.2
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.4.2...3.5.2)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-01 17:33:10 +00:00
dependabot[bot]
350cb83b7b Bump sass from 1.83.4 to 1.85.1 in the npm-minor group
Bumps the npm-minor group with 1 update: [sass](https://github.com/sass/dart-sass).


Updates `sass` from 1.83.4 to 1.85.1
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.83.4...1.85.1)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-01 17:08:29 +00:00
Min RK
a880fc4d6c add apply_user_options hook
cover more cases with config without need to subclass
2025-02-19 16:00:50 +01:00
Min RK
61577c1540 raise spawn error if spawn failed while polling 2025-02-19 14:27:11 +01:00
Min RK
3885affd68 Merge pull request #5010 from minrk/allow-docker-failure
temporarily disable docker build on ci
2025-02-19 13:52:04 +01:00
Min RK
c8317074aa if not skip 2025-02-19 13:48:37 +01:00
Min RK
29936e0d2b Merge pull request #4975 from SamuelMarks/license
Standard formatting in LICENSE
2025-02-19 13:47:29 +01:00
Min RK
5d71fbb2a2 temporarily disable docker job
while it's not working
2025-02-19 13:45:39 +01:00
Min RK
3de1145a69 move collective copyright note out of COPYING.md, into CONTRIBUTING
leaves standard LICENSE file
2025-02-19 13:32:06 +01:00
Min RK
44326bda12 Merge pull request #4979 from tlvu/allow-login-input-validation
Allow custom login input validation
2025-02-19 13:23:24 +01:00
Min RK
681a7ae840 consistent block structure for login form overrides
- `{name}_input` for overriding full input
- `{name}_input_attrs` for overriding input element attributes (not including id).
  Use `super()` to extend.
- For all `name` in username, password, otp
2025-02-19 13:07:45 +01:00
Min RK
57f4e9cb7c Merge pull request #5006 from manics/doc-scopes-read-user
doc: read:users only includes server not servers
2025-02-19 10:49:07 +01:00
Min RK
5eb1bea3b0 Merge pull request #5007 from manics/mockhub-random-api-ports
MockHub: randomize hub and proxy API ports
2025-02-19 10:48:05 +01:00
Min RK
611b91799c discuss xsrf configuration environment variables in troubleshooting 2025-02-19 10:35:03 +01:00
Min RK
6013f55ef8 switch to $JUPYTERHUB_XSRF_ANONYMOUS_IP_CIDRS and make it opt-in 2025-02-19 09:27:19 +01:00
pre-commit-ci[bot]
916a4bb784 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-02-19 08:04:13 +00:00
Min RK
befc4785b0 Merge branch 'main' into doc-scopes-read-user 2025-02-19 09:03:56 +01:00
Min RK
04175ae3bd Merge pull request #5009 from manics/scopes-precommit
Automatically generate rest-api.yml and scopes.md using pre-commit
2025-02-19 09:02:34 +01:00
pre-commit-ci[bot]
7add99c09a [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-02-18 21:07:17 +00:00
Simon Li
6be4893bfa run generate-scope-table.py in pre-commit 2025-02-18 21:04:02 +00:00
Simon Li
ee913f98fe run generate-scope-table.py without jupyterhub deps 2025-02-18 20:54:58 +00:00
Simon Li
464b5ef31f Don't linkcheck https://www.mysql.com, occasionally blocks CI 2025-02-18 19:53:38 +00:00
Simon Li
c5c4ea60fe Update rest-api.yml 2025-02-18 19:45:21 +00:00
Simon Li
cf352f8a0d Update jupyterhub/scopes.py
Co-authored-by: Min RK <benjaminrk@gmail.com>
2025-02-18 18:19:52 +00:00
Simon Li
b86734653c MockHub: randomize hub and proxy API ports
Without this MockHub uses a random public port, but it still uses fixed internal ports
2025-02-16 15:32:07 +00:00
Simon Li
6d0dc488f7 doc: read:users only includes server not servers
The `read:users` only includes whether the default server is running or not, it doesn't include any server models which are under `servers`
2025-02-16 14:09:49 +00:00
Min RK
718f01e600 Merge pull request #4999 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2025-02-11 08:38:20 +01:00
pre-commit-ci[bot]
0521270862 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-02-06 18:59:55 +00:00
Long Vu
260f5ce35b templates/login.html: allow full override of the username and password field 2025-02-06 13:57:56 -05:00
Long Vu
bf28242d9d templates/login.html: allow adding extra HTML Input Attributes for Username and Password field
With this change, if we set

```
{% block username_input_attribs %}pattern="[a-z0-9]+"
      placeholder="do not use email address, use your username"{% endblock username_input_attribs %}
```

We will get the following generated code

```
    <input
      id="username_input"
      type="text"
      autocapitalize="off"
      autocorrect="off"
      autocomplete="username"
      class="form-control"
      name="username"
      val=""
      tabindex="1"
      autofocus="autofocus"

      pattern="[a-z0-9]+"
      placeholder="do not use email address, use your username"
    />
2025-02-06 13:51:17 -05:00
pre-commit-ci[bot]
18d0270af1 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-02-04 03:51:21 +00:00
kireetb
ee4a8e593d simpler custom spawn bucket sizes
for prometheus
2025-02-03 22:50:58 -05:00
Barcafan
e65b7c3c15 Merge branch 'jupyterhub:main' into main 2025-02-03 22:10:42 -05:00
pre-commit-ci[bot]
16f07dda70 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-02-03 23:59:52 +00:00
pre-commit-ci[bot]
de461be7a9 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.8.6 → v0.9.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.8.6...v0.9.4)
2025-02-03 23:58:34 +00:00
Erik Sundell
7c71e517ef Merge pull request #4995 from minrk/rest-api-kind
make sure 'kind' shows up in rest api
2025-02-03 17:35:29 +01:00
Min RK
b9ea57a2f9 make sure 'kind' shows up in rest api
it's present in 'discriminator', but not mentioned explicitly in either model
2025-02-03 16:50:50 +01:00
dependabot[bot]
320b589037 Merge pull request #4993 from jupyterhub/dependabot/npm_and_yarn/jsx/jsx-minor-8b4a6847b1 2025-02-02 18:29:39 +00:00
Simon Li
ea7bedec49 Merge pull request #4992 from jupyterhub/dependabot/npm_and_yarn/npm-minor-d300448e1c
Bump sass from 1.83.0 to 1.83.4 in the npm-minor group
2025-02-02 18:20:57 +00:00
dependabot[bot]
49fa9e6b98 Bump the jsx-minor group in /jsx with 3 updates
Bumps the jsx-minor group in /jsx with 3 updates: [@testing-library/user-event](https://github.com/testing-library/user-event), [eslint](https://github.com/eslint/eslint) and [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier).


Updates `@testing-library/user-event` from 14.5.2 to 14.6.1
- [Release notes](https://github.com/testing-library/user-event/releases)
- [Changelog](https://github.com/testing-library/user-event/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/user-event/compare/v14.5.2...v14.6.1)

Updates `eslint` from 9.17.0 to 9.19.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.17.0...v9.19.0)

Updates `eslint-plugin-prettier` from 5.2.1 to 5.2.3
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v5.2.1...v5.2.3)

---
updated-dependencies:
- dependency-name: "@testing-library/user-event"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: eslint-plugin-prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-01 17:35:07 +00:00
dependabot[bot]
d9ce3dbe5d Bump sass from 1.83.0 to 1.83.4 in the npm-minor group
Bumps the npm-minor group with 1 update: [sass](https://github.com/sass/dart-sass).


Updates `sass` from 1.83.0 to 1.83.4
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.83.0...1.83.4)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-01 17:24:30 +00:00
Simon Li
4fbc737152 Update Spawner.ip doc 2025-01-30 22:26:39 +00:00
Simon Li
0b4c181bf7 Add IP:0:0:0:0:0:0:0:1 for internal ssl 2025-01-30 22:20:27 +00:00
Barcafan
6a10070602 Merge branch 'jupyterhub:main' into main 2025-01-30 16:03:24 -05:00
Simon Li
5b02d9c222 Add method to handle formatting of IPv6 in URLs 2025-01-30 18:44:50 +00:00
Simon Li
948e112bde Spawner.ip: IPv6 should not be wrapped with []
JUPYTERHUB_SERVICE_URL: ipv6 must be wrapped in `[]`
2025-01-30 18:28:49 +00:00
Simon Li
79af8ea264 Use ::1 for localhost if hub IP is :: 2025-01-30 18:28:49 +00:00
Simon Li
ec83356261 Wrap ipv6 in [] when displaying/logging messages 2025-01-30 18:28:49 +00:00
Simon Li
c7bb995f29 Server.bind_url_default: wrap ipv6 in [] 2025-01-30 18:28:49 +00:00
Simon Li
f887a7b547 JUPYTERHUB_SERVICE_URL: ipv6 must be wrapped in [] 2025-01-30 18:28:49 +00:00
Min RK
a2ba05d7b8 add $JUPYTERHUB_XSRF_ANONYMOUS_USE_IP and $JUPYTERHUB_XSRF_ANONYMOUS_ID_HEADERS
for influencing how anonymous xsrf tokens are computed

including fully opting out of distinguishable xsrf ids for anonymous (login) requests
2025-01-28 13:08:48 +01:00
Min RK
0cc382012e don't distinguish private ips in xsrf tokens
almost certainly proxy ips, which don't solve the problem anyway,
and can change due to replicas
2025-01-28 10:24:10 +01:00
Erik Sundell
9fc16bb3f7 Merge pull request #4990 from minrk/browser-install-less
don't install unused browsers for playwright
2025-01-28 09:41:19 +01:00
Min RK
cddeeb9da4 Merge pull request #4986 from manics/singleuser-ipv6
Singleuser: listen on IPv4 and IPv6 if ip==""
2025-01-27 10:54:57 +01:00
Min RK
d2ee8472a3 Merge pull request #4984 from minrk/rm-double-close
close tornado FDs without closing asyncio loop
2025-01-27 10:32:33 +01:00
Min RK
0563a95dc1 don't install unused browsers for playwright
tests use firefox, only install firefox on ci
2025-01-27 10:20:20 +01:00
Min RK
ff823fa8cf Merge pull request #4982 from mishaschwartz/insecure-alert-dark-mode-fix
make insecure-login-warning visible in dark mode
2025-01-27 10:15:20 +01:00
Min RK
bf09419377 prevent error when pytest-asyncio tries to cleanup a closed loop 2025-01-27 09:38:03 +01:00
Simon Li
a2a238f81d If JUPYTERHUB_SERVICE_URL host empty listen on ipv4+ipv6 2025-01-26 15:29:43 +00:00
Min RK
1ec169a8a1 avoid closing asyncio event loop when cleaning up tornado
pytest-asyncio 0.25.2 doesn't handle closed event loop

we don't need to close asyncio, but we do need to close sockets, etc. associated with tornado
2025-01-20 15:35:56 +01:00
Min RK
2550d24048 Merge pull request #4968 from oboki/feature/fix-jsx-group-edit-selected-users
Fix bug in `GroupEdit`: Users being reset when clicking the button to edit a group
2025-01-20 14:52:27 +01:00
mishaschwartz
c3bfedf0a2 make insecure-login-warning visible in dark mode 2025-01-17 09:30:53 -05:00
Barcafan
dce25e065f Merge branch 'jupyterhub:main' into main 2025-01-13 12:01:32 -05:00
Min RK
8f9723f0a7 Merge pull request #4976 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2025-01-09 09:21:52 +01:00
Min RK
8391d1d5cf Merge pull request #4978 from manics/url-tokens-5.0.0-changelog
Missing breaking change in 5.0.0 changelog: URL tokens
2025-01-09 09:21:26 +01:00
Simon Li
7a76cfd89d Missing breaking change in 5.0.0 changelog: URL tokens
b319b58a2f (diff-514e695392b67987ea4b144e522365c14062bb806eaa0bfe8f1d24175cabe072R363)
2025-01-08 22:47:29 +00:00
Angus Hollands
4d57412361 Allow CORS requests to /hub/api by default (#4966)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Min RK <benjaminrk@gmail.com>
2025-01-08 17:28:06 +01:00
Barcafan
5cc6da1421 Merge branch 'jupyterhub:main' into main 2025-01-07 20:32:06 -05:00
Min RK
3003b8482a Merge pull request #4964 from jrdnbradford/patch-1
Update `load_groups` config in collaboration-users.md
2025-01-07 09:02:48 +01:00
pre-commit-ci[bot]
2cf8681748 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-01-07 01:52:01 +00:00
pre-commit-ci[bot]
165364e752 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.8.1 → v0.8.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.8.1...v0.8.6)
- [github.com/djlint/djLint: v1.36.3 → v1.36.4](https://github.com/djlint/djLint/compare/v1.36.3...v1.36.4)
2025-01-07 01:51:02 +00:00
pre-commit-ci[bot]
4eb2d6d8a4 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-01-06 01:51:57 +00:00
kireetb
1effa17666 Merge branch 'main' of https://github.com/kireetb/jupyterhub 2025-01-05 20:51:26 -05:00
Barcafan
cab45ea60c Using Traitlets for env vars 2025-01-05 20:51:14 -05:00
Barcafan
4d1904d25f Merge branch 'jupyterhub:main' into main 2025-01-05 11:20:23 -05:00
Simon Li
8372079db4 Merge pull request #4970 from jupyterhub/dependabot/npm_and_yarn/jsx/jsx-minor-f50612d634
Bump the jsx-minor group in /jsx with 11 updates
2025-01-03 12:18:42 +00:00
Simon Li
b7002c12fa Merge pull request #4974 from jupyterhub/dependabot/npm_and_yarn/npm-minor-19a2802931
Bump the npm-minor group with 2 updates
2025-01-03 12:15:52 +00:00
Samuel Marks
d8503534c3 [LICENSE] Add LICENSE that, e.g., GitHub understands 2025-01-02 13:50:34 -06:00
dependabot[bot]
f3d96f8f60 Bump the npm-minor group with 2 updates
Bumps the npm-minor group with 2 updates: [@fortawesome/fontawesome-free](https://github.com/FortAwesome/Font-Awesome) and [sass](https://github.com/sass/dart-sass).


Updates `@fortawesome/fontawesome-free` from 6.7.1 to 6.7.2
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/6.x/CHANGELOG.md)
- [Commits](https://github.com/FortAwesome/Font-Awesome/compare/6.7.1...6.7.2)

Updates `sass` from 1.81.0 to 1.83.0
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.81.0...1.83.0)

---
updated-dependencies:
- dependency-name: "@fortawesome/fontawesome-free"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-minor
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-01 18:01:09 +00:00
dependabot[bot]
7a550e38cb Bump the jsx-minor group in /jsx with 11 updates
Bumps the jsx-minor group in /jsx with 11 updates:

| Package | From | To |
| --- | --- | --- |
| [react-bootstrap](https://github.com/react-bootstrap/react-bootstrap) | `2.10.6` | `2.10.7` |
| [react-icons](https://github.com/react-icons/react-icons) | `5.3.0` | `5.4.0` |
| [react-redux](https://github.com/reduxjs/react-redux) | `9.1.2` | `9.2.0` |
| [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) | `7.0.1` | `7.1.1` |
| [@babel/preset-react](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react) | `7.25.9` | `7.26.3` |
| [@testing-library/react](https://github.com/testing-library/react-testing-library) | `16.0.1` | `16.1.0` |
| [eslint](https://github.com/eslint/eslint) | `9.16.0` | `9.17.0` |
| [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) | `7.37.2` | `7.37.3` |
| [prettier](https://github.com/prettier/prettier) | `3.4.1` | `3.4.2` |
| [webpack](https://github.com/webpack/webpack) | `5.96.1` | `5.97.1` |
| [webpack-dev-server](https://github.com/webpack/webpack-dev-server) | `5.1.0` | `5.2.0` |


Updates `react-bootstrap` from 2.10.6 to 2.10.7
- [Release notes](https://github.com/react-bootstrap/react-bootstrap/releases)
- [Changelog](https://github.com/react-bootstrap/react-bootstrap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/react-bootstrap/react-bootstrap/compare/v2.10.6...v2.10.7)

Updates `react-icons` from 5.3.0 to 5.4.0
- [Release notes](https://github.com/react-icons/react-icons/releases)
- [Commits](https://github.com/react-icons/react-icons/compare/v5.3.0...v5.4.0)

Updates `react-redux` from 9.1.2 to 9.2.0
- [Release notes](https://github.com/reduxjs/react-redux/releases)
- [Changelog](https://github.com/reduxjs/react-redux/blob/master/CHANGELOG.md)
- [Commits](https://github.com/reduxjs/react-redux/compare/v9.1.2...v9.2.0)

Updates `react-router` from 7.0.1 to 7.1.1
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router@7.1.1/packages/react-router)

Updates `@babel/preset-react` from 7.25.9 to 7.26.3
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.26.3/packages/babel-preset-react)

Updates `@testing-library/react` from 16.0.1 to 16.1.0
- [Release notes](https://github.com/testing-library/react-testing-library/releases)
- [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/react-testing-library/compare/v16.0.1...v16.1.0)

Updates `eslint` from 9.16.0 to 9.17.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.16.0...v9.17.0)

Updates `eslint-plugin-react` from 7.37.2 to 7.37.3
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.37.2...v7.37.3)

Updates `prettier` from 3.4.1 to 3.4.2
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.4.1...3.4.2)

Updates `webpack` from 5.96.1 to 5.97.1
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.96.1...v5.97.1)

Updates `webpack-dev-server` from 5.1.0 to 5.2.0
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v5.1.0...v5.2.0)

---
updated-dependencies:
- dependency-name: react-bootstrap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: react-icons
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: react-redux
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: react-router
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: "@babel/preset-react"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: "@testing-library/react"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: webpack-dev-server
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-01 17:59:37 +00:00
oboki
ccc26d5f50 fix: initialize selected with group_data.users when GroupEdit component mounts 2024-12-24 10:32:06 +09:00
Jordan Bradford
5acb25d024 Update docs/source/tutorial/collaboration-users.md
Co-authored-by: Simon Li <orpheus+devel@gmail.com>
2024-12-21 21:32:00 -05:00
pre-commit-ci[bot]
413321beee [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-12-22 02:21:48 +00:00
kireetb
4ccf4fa4cf Allow configuration of bucket sizes in metrics - #4833 2024-12-21 21:17:56 -05:00
Jordan Bradford
df6d2cb045 Update collaboration-users.md 2024-12-06 14:44:49 -05:00
Min RK
0d57ce2e33 Merge pull request #4962 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-12-04 08:48:10 +01:00
pre-commit-ci[bot]
e0d27849b8 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-12-03 08:46:28 +00:00
Min RK
a2877c7be2 satisfy updated ruff rules
mostly f-strings, manual fixes
2024-12-03 09:45:09 +01:00
pre-commit-ci[bot]
def928f1b7 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.7.2 → v0.8.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.7.2...v0.8.1)
- [github.com/djlint/djLint: v1.35.4 → v1.36.3](https://github.com/djlint/djLint/compare/v1.35.4...v1.36.3)
2024-12-02 23:30:28 +00:00
Min RK
ed675f20e4 Merge pull request #4957 from jupyterhub/dependabot/github_actions/codecov/codecov-action-5
Bump codecov/codecov-action from 4 to 5
2024-12-02 08:54:21 +01:00
Min RK
95c551c316 Merge pull request #4961 from manics/react-router
Replace react-router-dom@6 with react-router@7
2024-12-02 08:52:54 +01:00
pre-commit-ci[bot]
ff7d37c3ab [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-12-01 22:33:19 +00:00
Simon Li
2bcb24c56e Replace react-router-dom@6 with react-router@7 2024-12-01 22:24:00 +00:00
Simon Li
ed76db02e2 Merge pull request #4960 from jupyterhub/dependabot/npm_and_yarn/npm-minor-ff86c1a6a2
Bump the npm-minor group with 2 updates
2024-12-01 21:29:06 +00:00
Simon Li
cc623cc2cb Merge pull request #4958 from jupyterhub/dependabot/npm_and_yarn/jsx/jsx-minor-cbee70d0c6
Bump the jsx-minor group in /jsx with 3 updates
2024-12-01 21:18:45 +00:00
dependabot[bot]
55e660aa3a Bump the npm-minor group with 2 updates
Bumps the npm-minor group with 2 updates: [@fortawesome/fontawesome-free](https://github.com/FortAwesome/Font-Awesome) and [sass](https://github.com/sass/dart-sass).


Updates `@fortawesome/fontawesome-free` from 6.6.0 to 6.7.1
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/6.x/CHANGELOG.md)
- [Commits](https://github.com/FortAwesome/Font-Awesome/compare/6.6.0...6.7.1)

Updates `sass` from 1.80.5 to 1.81.0
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.80.5...1.81.0)

---
updated-dependencies:
- dependency-name: "@fortawesome/fontawesome-free"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-minor
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-01 17:58:45 +00:00
dependabot[bot]
3e0588f82c Bump the jsx-minor group in /jsx with 3 updates
Bumps the jsx-minor group in /jsx with 3 updates: [react-bootstrap](https://github.com/react-bootstrap/react-bootstrap), [eslint](https://github.com/eslint/eslint) and [prettier](https://github.com/prettier/prettier).


Updates `react-bootstrap` from 2.10.5 to 2.10.6
- [Release notes](https://github.com/react-bootstrap/react-bootstrap/releases)
- [Changelog](https://github.com/react-bootstrap/react-bootstrap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/react-bootstrap/react-bootstrap/compare/v2.10.5...v2.10.6)

Updates `eslint` from 9.13.0 to 9.16.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.13.0...v9.16.0)

Updates `prettier` from 3.3.3 to 3.4.1
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.3.3...3.4.1)

---
updated-dependencies:
- dependency-name: react-bootstrap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-01 17:17:22 +00:00
dependabot[bot]
b6c7b6bf91 Bump codecov/codecov-action from 4 to 5
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-01 05:36:33 +00:00
Min RK
f10198a859 Merge pull request #4955 from manics/doc-spawner-oauth_client_allowed_scopes
Document Spawner.oauth_client_allowed_scopes always allows access
2024-11-25 16:47:59 +01:00
Simon Li
388a990928 Document Spawner.oauth_client_allowed_scopes always allows access
`access:servers!server={self.user.name}/{self.name}` is always added to oauth_client_allowed_scopes
a8500a31a9/jupyterhub/spawner.py (L440)
2024-11-25 15:31:08 +00:00
Glenn Jones
fb6fb87621 Fixed code formatting for implicit_spawn_seconds (#4949) 2024-11-13 15:46:54 +00:00
Min RK
a8500a31a9 Merge pull request #4948 from Carreau/intersphinx_registry
Use intersphinx-registry to keep intersphinx URLs up to date.
2024-11-13 10:28:58 +01:00
M Bussonnier
bffdd3969c Use intersphinx-registry to keep intersphinx URL up to date.
This allows to update the intersphinx url in a single location when
those move, an make it a tiny-bit easier to add existing packages than
having to figure out where their docs are.
2024-11-12 20:40:34 +01:00
Min RK
5941314d1e Merge pull request #4947 from minrk/auth_refresh_age 2024-11-11 14:57:36 +01:00
Min RK
296511699e mention that auth_refresh_age = 0 disables time-based refresh_user 2024-11-11 10:19:34 +01:00
Min RK
40e2ffc368 Merge pull request #4946 from kellyrowland/override-allow-all-docs-fix 2024-11-08 22:12:37 +01:00
Kelly Rowland
07fe2fcff6 add traitlets default import to auth allow_all override example for completeness 2024-11-08 11:59:47 -08:00
Min RK
886ce6cbdf Merge pull request #4944 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-11-06 13:30:41 +01:00
pre-commit-ci[bot]
3effd05f06 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.6.3 → v0.7.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.3...v0.7.2)
- [github.com/djlint/djLint: v1.35.2 → v1.35.4](https://github.com/djlint/djLint/compare/v1.35.2...v1.35.4)
- [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.6.0...v5.0.0)
2024-11-04 23:15:40 +00:00
Simon Li
183ab22018 Merge pull request #4942 from jupyterhub/dependabot/npm_and_yarn/jsx/jsx-minor-a72683db00
Bump the jsx-minor group in /jsx with 8 updates
2024-11-02 14:11:32 +00:00
dependabot[bot]
5bef758f34 Bump the jsx-minor group in /jsx with 8 updates
Bumps the jsx-minor group in /jsx with 8 updates:

| Package | From | To |
| --- | --- | --- |
| [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) | `6.26.2` | `6.27.0` |
| [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) | `7.25.2` | `7.26.0` |
| [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) | `7.25.4` | `7.26.0` |
| [@babel/preset-react](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react) | `7.24.7` | `7.25.9` |
| [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) | `6.5.0` | `6.6.3` |
| [eslint](https://github.com/eslint/eslint) | `9.11.1` | `9.13.0` |
| [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) | `7.37.1` | `7.37.2` |
| [webpack](https://github.com/webpack/webpack) | `5.95.0` | `5.96.1` |


Updates `react-router-dom` from 6.26.2 to 6.27.0
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/react-router-dom@6.27.0/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.27.0/packages/react-router-dom)

Updates `@babel/core` from 7.25.2 to 7.26.0
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.26.0/packages/babel-core)

Updates `@babel/preset-env` from 7.25.4 to 7.26.0
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.26.0/packages/babel-preset-env)

Updates `@babel/preset-react` from 7.24.7 to 7.25.9
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.25.9/packages/babel-preset-react)

Updates `@testing-library/jest-dom` from 6.5.0 to 6.6.3
- [Release notes](https://github.com/testing-library/jest-dom/releases)
- [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/jest-dom/compare/v6.5.0...v6.6.3)

Updates `eslint` from 9.11.1 to 9.13.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.11.1...v9.13.0)

Updates `eslint-plugin-react` from 7.37.1 to 7.37.2
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.37.1...v7.37.2)

Updates `webpack` from 5.95.0 to 5.96.1
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.95.0...v5.96.1)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: "@babel/preset-env"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: "@babel/preset-react"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: "@testing-library/jest-dom"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-01 17:52:36 +00:00
Simon Li
27f978807d Merge pull request #4941 from jupyterhub/dependabot/npm_and_yarn/npm-minor-df5077dc76
Bump sass from 1.79.4 to 1.80.5 in the npm-minor group
2024-11-01 17:42:35 +00:00
dependabot[bot]
2478a1ac6e Bump sass from 1.79.4 to 1.80.5 in the npm-minor group
Bumps the npm-minor group with 1 update: [sass](https://github.com/sass/dart-sass).


Updates `sass` from 1.79.4 to 1.80.5
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.79.4...1.80.5)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-01 17:27:17 +00:00
Min RK
1db1be22c5 Merge pull request #4939 from manics/stopall
Stop All: include named servers
2024-10-28 14:27:36 +01:00
Simon Li
e9002bfec9 Stop All: include named servers 2024-10-27 22:15:42 +00:00
Min RK
95a7c97052 Bump to 5.3.0.dev 2024-10-21 11:35:43 +02:00
Min RK
9749b6eb6a Bump to 5.2.1 2024-10-21 11:35:33 +02:00
Min RK
979b47d1e0 Merge pull request #4935 from consideRatio/pr/cl521
changelog for 5.2.1
2024-10-21 11:35:02 +02:00
Erik Sundell
c12ccafe22 changelog for 5.2.1 2024-10-21 11:15:33 +02:00
Erik Sundell
acc51dbe24 Merge pull request #4934 from minrk/nicer-import-error
informative error on missing dependencies for singleuser server
2024-10-21 11:11:48 +02:00
Min RK
51dcbe4c80 jupyterhub[singleuser]'s not a thing
why did I think it was?
2024-10-21 09:15:43 +02:00
Min RK
6da70e9960 informative error on missing dependencies for singleuser server
- defer jupyter_core import that caused earlier, less informative ImportError
- point to `pip install jupyterhub[singleuser]` in the error
- use `raise from` so original import error is still reported
2024-10-21 09:12:48 +02:00
Min RK
1cb98ce9ff Merge pull request #4932 from manics/subdowmain-doc
Remove out-of-date info from subdomain_hook doc
2024-10-20 09:14:56 +02:00
Min RK
f2ecf6a307 Merge pull request #4930 from consideRatio/pr/startup-service
Abort jupyterhub startup only if managed services fail
2024-10-20 09:14:36 +02:00
Min RK
0a4c3bbfd3 Remove unnecessary exc_info from log
Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2024-10-20 08:40:32 +02:00
Simon Li
e4ae7ce4fe Remove out-of-date info from subdomain_hook doc 2024-10-20 00:11:27 +01:00
Simon Li
ab43f6beb8 Merge pull request #4931 from jupyterhub/dependabot/npm_and_yarn/jsx/multi-9f37c16f8f
Bump cookie and express in /jsx
2024-10-19 17:49:10 +01:00
dependabot[bot]
e8806372c6 Bump cookie and express in /jsx
Bumps [cookie](https://github.com/jshttp/cookie) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together.

Updates `cookie` from 0.6.0 to 0.7.1
- [Release notes](https://github.com/jshttp/cookie/releases)
- [Commits](https://github.com/jshttp/cookie/compare/v0.6.0...v0.7.1)

Updates `express` from 4.21.0 to 4.21.1
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.1/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.21.0...4.21.1)

---
updated-dependencies:
- dependency-name: cookie
  dependency-type: indirect
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-19 10:34:25 +00:00
Erik Sundell
6e353df033 Abort jupyterhub startup only if managed services fail 2024-10-18 15:21:11 +02:00
Min RK
06507b426d Merge pull request #4922 from manics/entrypointtypes-help 2024-10-05 17:12:56 +02:00
Simon Li
e282205139 Use set instead of list 2024-10-04 20:23:21 +01:00
Simon Li
e4ff84b7c9 Loaded EntryPointTypes are types, not instances 2024-10-04 16:59:25 +01:00
Simon Li
8c4dbd7a32 Merge pull request #4920 from jupyterhub/dependabot/npm_and_yarn/jsx/jsx-minor-b45f950fe0
Bump the jsx-minor group in /jsx with 9 updates
2024-10-01 22:55:16 +01:00
dependabot[bot]
1336df621b Bump the jsx-minor group in /jsx with 9 updates
Bumps the jsx-minor group in /jsx with 9 updates:

| Package | From | To |
| --- | --- | --- |
| [react-bootstrap](https://github.com/react-bootstrap/react-bootstrap) | `2.10.4` | `2.10.5` |
| [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) | `6.26.1` | `6.26.2` |
| [@testing-library/react](https://github.com/testing-library/react-testing-library) | `16.0.0` | `16.0.1` |
| [babel-loader](https://github.com/babel/babel-loader) | `9.1.3` | `9.2.1` |
| [eslint](https://github.com/eslint/eslint) | `9.9.1` | `9.11.1` |
| [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) | `7.35.0` | `7.37.1` |
| [eslint-plugin-unused-imports](https://github.com/sweepline/eslint-plugin-unused-imports) | `4.1.3` | `4.1.4` |
| [webpack](https://github.com/webpack/webpack) | `5.94.0` | `5.95.0` |
| [webpack-dev-server](https://github.com/webpack/webpack-dev-server) | `5.0.4` | `5.1.0` |


Updates `react-bootstrap` from 2.10.4 to 2.10.5
- [Release notes](https://github.com/react-bootstrap/react-bootstrap/releases)
- [Changelog](https://github.com/react-bootstrap/react-bootstrap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/react-bootstrap/react-bootstrap/compare/v2.10.4...v2.10.5)

Updates `react-router-dom` from 6.26.1 to 6.26.2
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.26.2/packages/react-router-dom)

Updates `@testing-library/react` from 16.0.0 to 16.0.1
- [Release notes](https://github.com/testing-library/react-testing-library/releases)
- [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/react-testing-library/compare/v16.0.0...v16.0.1)

Updates `babel-loader` from 9.1.3 to 9.2.1
- [Release notes](https://github.com/babel/babel-loader/releases)
- [Changelog](https://github.com/babel/babel-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel-loader/compare/v9.1.3...v9.2.1)

Updates `eslint` from 9.9.1 to 9.11.1
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.9.1...v9.11.1)

Updates `eslint-plugin-react` from 7.35.0 to 7.37.1
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.35.0...v7.37.1)

Updates `eslint-plugin-unused-imports` from 4.1.3 to 4.1.4
- [Commits](https://github.com/sweepline/eslint-plugin-unused-imports/compare/v4.1.3...v4.1.4)

Updates `webpack` from 5.94.0 to 5.95.0
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.94.0...v5.95.0)

Updates `webpack-dev-server` from 5.0.4 to 5.1.0
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v5.0.4...v5.1.0)

---
updated-dependencies:
- dependency-name: react-bootstrap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: "@testing-library/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: babel-loader
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: eslint-plugin-unused-imports
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: webpack-dev-server
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-01 20:38:06 +00:00
Simon Li
b66931306e Merge pull request #4921 from jupyterhub/dependabot/npm_and_yarn/jsx/eslint-plugin-prettier-5.2.1
Bump eslint-plugin-prettier from 4.2.1 to 5.2.1 in /jsx
2024-10-01 21:36:10 +01:00
dependabot[bot]
83003c7e3d Bump eslint-plugin-prettier from 4.2.1 to 5.2.1 in /jsx
Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 4.2.1 to 5.2.1.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v4.2.1...v5.2.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-prettier
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-01 17:43:11 +00:00
Simon Li
23b9400c53 Merge pull request #4919 from jupyterhub/dependabot/npm_and_yarn/npm-minor-9181cd8b3d
Bump sass from 1.77.8 to 1.79.4 in the npm-minor group
2024-10-01 18:32:52 +01:00
dependabot[bot]
98e9117633 Bump sass from 1.77.8 to 1.79.4 in the npm-minor group
Bumps the npm-minor group with 1 update: [sass](https://github.com/sass/dart-sass).


Updates `sass` from 1.77.8 to 1.79.4
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.77.8...1.79.4)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-01 17:12:53 +00:00
Min RK
b2d9f93601 Bump to 5.3.0.dev 2024-10-01 14:13:51 +02:00
Min RK
61c39972da Bump to 5.2.0 2024-10-01 14:13:38 +02:00
Min RK
08f6ff52b0 Merge pull request #4918 from minrk/520
changelog for 5.2.0
2024-10-01 14:13:20 +02:00
Min RK
949496eb36 releasing today! 2024-10-01 14:05:09 +02:00
Min RK
7af4cc2fa9 changelog for 5.2.0 2024-10-01 13:35:32 +02:00
Erik Sundell
3d60ad3956 Merge pull request #4916 from dirtbirb/main
Fix typo in concepts.md
2024-09-26 08:36:50 +02:00
dirtbirb
689a5ba190 Fix typo in concepts.md 2024-09-25 23:14:41 -07:00
Min RK
80b9f02332 Merge pull request #4913 from emmanuel-ferdman/main
Fix incorrect rounding function
2024-09-23 01:15:50 -07:00
Emmanuel Ferdman
8bd1219b92 Fix incorrect rounding function
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
2024-09-21 18:57:00 +03:00
Simon Li
4ea74c4869 Merge pull request #4881 from manics/linkcheck-usable-results
Display Sphinx linkcheck output in a more readable format
2024-09-13 16:13:22 +01:00
Min RK
24fb08d513 Merge pull request #4911 from minrk/audit-fix
npm audit fix on devDependencies
2024-09-13 05:43:14 -07:00
Min RK
6b22599149 npm audit fix on devDependencies 2024-09-13 14:10:18 +02:00
Min RK
70ca293977 Merge pull request #4892 from jupyterhub/dependabot/npm_and_yarn/jsx/jsx-react-0625fe9078
Bump the jsx-react group in /jsx with 6 updates
2024-09-13 05:04:52 -07:00
Min RK
aeaffa654f try waiting for networkidle after clicking next
maybe that will cause it to load properly
2024-09-13 13:10:49 +02:00
Min RK
86e4f42035 simplify pagination buttons
- no custom css
- put click events on buttons instead of labels
- use standard disabled state instead of custom cursor, grey text
2024-09-13 13:10:48 +02:00
Min RK
6ccb809a2a consistent use of fakeTimers 2024-09-13 13:10:48 +02:00
Min RK
992bc98ff1 MainContainer.children is a node
not array or object
2024-09-13 13:10:48 +02:00
Min RK
43597febcb update import for React.act 2024-09-13 13:10:48 +02:00
Min RK
6464e3629c use createRoot for react 18 2024-09-13 13:10:48 +02:00
dependabot[bot]
62d2a4bec2 Bump the jsx-react group in /jsx with 6 updates
Bumps the jsx-react group in /jsx with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [react](https://github.com/facebook/react/tree/HEAD/packages/react) | `17.0.2` | `18.3.1` |
| [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom) | `17.0.2` | `18.3.1` |
| [react-icons](https://github.com/react-icons/react-icons) | `4.9.0` | `5.3.0` |
| [react-redux](https://github.com/reduxjs/react-redux) | `7.2.9` | `9.1.2` |
| [redux](https://github.com/reduxjs/redux) | `4.2.1` | `5.0.1` |
| [@testing-library/react](https://github.com/testing-library/react-testing-library) | `12.1.5` | `16.0.0` |


Updates `react` from 17.0.2 to 18.3.1
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v18.3.1/packages/react)

Updates `react-dom` from 17.0.2 to 18.3.1
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v18.3.1/packages/react-dom)

Updates `react-icons` from 4.9.0 to 5.3.0
- [Release notes](https://github.com/react-icons/react-icons/releases)
- [Commits](https://github.com/react-icons/react-icons/compare/v4.9.0...v5.3.0)

Updates `react-redux` from 7.2.9 to 9.1.2
- [Release notes](https://github.com/reduxjs/react-redux/releases)
- [Changelog](https://github.com/reduxjs/react-redux/blob/master/CHANGELOG.md)
- [Commits](https://github.com/reduxjs/react-redux/compare/v7.2.9...v9.1.2)

Updates `redux` from 4.2.1 to 5.0.1
- [Release notes](https://github.com/reduxjs/redux/releases)
- [Changelog](https://github.com/reduxjs/redux/blob/master/CHANGELOG.md)
- [Commits](https://github.com/reduxjs/redux/compare/v4.2.1...v5.0.1)

Updates `@testing-library/react` from 12.1.5 to 16.0.0
- [Release notes](https://github.com/testing-library/react-testing-library/releases)
- [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/react-testing-library/compare/v12.1.5...v16.0.0)

---
updated-dependencies:
- dependency-name: react
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: jsx-react
- dependency-name: react-dom
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: jsx-react
- dependency-name: react-icons
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: jsx-react
- dependency-name: react-redux
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: jsx-react
- dependency-name: redux
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: jsx-react
- dependency-name: "@testing-library/react"
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: jsx-react
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-13 13:10:48 +02:00
Erik Sundell
6e3913456b Merge pull request #4906 from minrk/text_content
browser tests: use text_content instead of inner_text
2024-09-13 12:15:40 +02:00
Min RK
de39fda9a7 browser tests: use text_content instead of inner_text
inner_text takes visibility into account, text_content is just what's there
2024-09-13 11:59:10 +02:00
Min RK
abca5546b7 Merge pull request #4904 from edmorley/update-spawner-env_keep
Add `LD_LIBRARY_PATH` to `LocalProcessSpawner.env_keep`, move most env_keep defaults to LocalProcessSpawner
2024-09-13 02:53:08 -07:00
Ed Morley
1b87e9c668 Use separate env_keep defaults for LocalProcessSpawner
Since none of the current defaults (except `JUPYTERHUB_SINGLEUSER_APP`)
make sense for spawners other than `LocalProcessSpawner`.
2024-09-13 09:30:50 +01:00
Ed Morley
70561c8727 Add LD_LIBRARY_PATH toSpawner.env_keep
For security reasons, only allow-listed env vars in the parent
JupyterHub process are passed to the single-user server Python process.
This allow-list is controlled by `Spawner.env_keep`, which by default
includes common env vars that are (a) both necessary for the single-user
server process to work, (b) don't contain credentials or sensitive
information that shouldn't be revealed to users of the Notebook.

However, this allow-list was missing the `LD_LIBRARY_PATH` env var,
which causes shared library errors when using a relocated Python that
has been compiled in shared mode (`--enable-shared`). This prevents
JupyterHub from working out of the box on platforms like Heroku.

Fixes #4903.
2024-09-12 09:45:03 +01:00
Min RK
b13d3afa0f Merge pull request #4897 from minrk/dark
add dark mode toggle
2024-09-04 01:14:24 -07:00
Min RK
5f6748abd4 Merge pull request #4902 from jupyterhub/pre-commit-ci-update-config 2024-09-03 06:47:31 -07:00
pre-commit-ci[bot]
8b944a3293 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-09-03 13:34:40 +00:00
pre-commit-ci[bot]
5dddd97132 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-09-02 22:21:39 +00:00
pre-commit-ci[bot]
20a600ffa0 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.5.6 → v0.6.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.5.6...v0.6.3)
- [github.com/djlint/djLint: v1.34.1 → v1.35.2](https://github.com/djlint/djLint/compare/v1.34.1...v1.35.2)
2024-09-02 22:21:17 +00:00
Simon Li
de2841e00d Merge pull request #4898 from jupyterhub/dependabot/npm_and_yarn/jsx/eslint-9.9.1
Bump eslint from 8.57.0 to 9.9.1 in /jsx
2024-09-01 22:21:37 +01:00
Simon Li
33af239911 Merge pull request #4899 from jupyterhub/dependabot/npm_and_yarn/jsx/prettier-3.3.3
Bump prettier from 2.8.8 to 3.3.3 in /jsx
2024-09-01 22:19:44 +01:00
dependabot[bot]
2aeb49690b Bump prettier from 2.8.8 to 3.3.3 in /jsx
Bumps [prettier](https://github.com/prettier/prettier) from 2.8.8 to 3.3.3.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.8...3.3.3)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-01 17:05:45 +00:00
dependabot[bot]
265fcbc874 Bump eslint from 8.57.0 to 9.9.1 in /jsx
Bumps [eslint](https://github.com/eslint/eslint) from 8.57.0 to 9.9.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.57.0...v9.9.1)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-01 17:05:36 +00:00
Min RK
98a6338247 Merge pull request #4896 from rinvii/add/university-of-portland
add University of Portland to sample orgs
2024-08-28 05:37:20 -07:00
Min RK
d519bacd8a add dark mode toggle button
- toggle in upper right
- stored in localStorage
- adds btn-contrast, btn-outline-contrast for light-on-dark / dark-on-light
2024-08-28 11:08:59 +02:00
rinvii
ad39fe3823 add University of Portland to sample orgs 2024-08-27 17:42:29 -07:00
Min RK
aca10da71d Merge pull request #4895 from jupyterhub/dependabot/npm_and_yarn/jsx/testing-library/user-event-14.5.2
Bump @testing-library/user-event from 13.5.0 to 14.5.2 in /jsx
2024-08-27 05:55:08 -07:00
Min RK
e8b2bd82c8 userEvent is async now 2024-08-27 14:52:02 +02:00
Min RK
5616ade51d audit fix 2024-08-27 14:23:10 +02:00
Min RK
b83f6d178b Merge pull request #4894 from jupyterhub/dependabot/npm_and_yarn/jsx/eslint-plugin-unused-imports-4.1.3
Bump eslint-plugin-unused-imports from 2.0.0 to 4.1.3 in /jsx
2024-08-27 03:56:20 -07:00
Min RK
3068e3911b Merge pull request #4893 from jupyterhub/dependabot/npm_and_yarn/jsx/jsx-webpack-a795b026f0
Bump the jsx-webpack group in /jsx with 3 updates
2024-08-27 03:55:20 -07:00
dependabot[bot]
6867f3b141 Bump the jsx-webpack group in /jsx with 3 updates
Bumps the jsx-webpack group in /jsx with 3 updates: [css-loader](https://github.com/webpack-contrib/css-loader), [style-loader](https://github.com/webpack-contrib/style-loader) and [webpack-dev-server](https://github.com/webpack/webpack-dev-server).


Updates `css-loader` from 6.8.1 to 7.1.2
- [Release notes](https://github.com/webpack-contrib/css-loader/releases)
- [Changelog](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/css-loader/compare/v6.8.1...v7.1.2)

Updates `style-loader` from 3.3.3 to 4.0.0
- [Release notes](https://github.com/webpack-contrib/style-loader/releases)
- [Changelog](https://github.com/webpack-contrib/style-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/style-loader/compare/v3.3.3...v4.0.0)

Updates `webpack-dev-server` from 4.15.1 to 5.0.4
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v4.15.1...v5.0.4)

---
updated-dependencies:
- dependency-name: css-loader
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: jsx-webpack
- dependency-name: style-loader
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: jsx-webpack
- dependency-name: webpack-dev-server
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: jsx-webpack
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-27 10:54:25 +00:00
dependabot[bot]
aec601dbff Bump @testing-library/user-event from 13.5.0 to 14.5.2 in /jsx
Bumps [@testing-library/user-event](https://github.com/testing-library/user-event) from 13.5.0 to 14.5.2.
- [Release notes](https://github.com/testing-library/user-event/releases)
- [Changelog](https://github.com/testing-library/user-event/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/user-event/compare/v13.5.0...v14.5.2)

---
updated-dependencies:
- dependency-name: "@testing-library/user-event"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-27 10:54:14 +00:00
dependabot[bot]
748b6c98d5 Bump eslint-plugin-unused-imports from 2.0.0 to 4.1.3 in /jsx
Bumps [eslint-plugin-unused-imports](https://github.com/sweepline/eslint-plugin-unused-imports) from 2.0.0 to 4.1.3.
- [Commits](https://github.com/sweepline/eslint-plugin-unused-imports/commits/v4.1.3)

---
updated-dependencies:
- dependency-name: eslint-plugin-unused-imports
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-27 10:54:12 +00:00
Min RK
d6d03e8e38 Merge pull request #4891 from jupyterhub/dependabot/npm_and_yarn/jsx/jsx-minor-7cb2cc7612
Bump the jsx-minor group in /jsx with 7 updates
2024-08-27 03:53:01 -07:00
dependabot[bot]
14d32c5bae Bump the jsx-minor group in /jsx with 7 updates
Bumps the jsx-minor group in /jsx with 7 updates:

| Package | From | To |
| --- | --- | --- |
| [react-bootstrap](https://github.com/react-bootstrap/react-bootstrap) | `2.10.1` | `2.10.4` |
| [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) | `6.22.2` | `6.26.1` |
| [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) | `7.22.5` | `7.25.4` |
| [@babel/preset-react](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react) | `7.22.5` | `7.24.7` |
| [babel-loader](https://github.com/babel/babel-loader) | `9.1.2` | `9.1.3` |
| [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) | `7.32.2` | `7.35.0` |
| [webpack](https://github.com/webpack/webpack) | `5.87.0` | `5.94.0` |


Updates `react-bootstrap` from 2.10.1 to 2.10.4
- [Release notes](https://github.com/react-bootstrap/react-bootstrap/releases)
- [Changelog](https://github.com/react-bootstrap/react-bootstrap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/react-bootstrap/react-bootstrap/compare/v2.10.1...v2.10.4)

Updates `react-router-dom` from 6.22.2 to 6.26.1
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.26.1/packages/react-router-dom)

Updates `@babel/preset-env` from 7.22.5 to 7.25.4
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.25.4/packages/babel-preset-env)

Updates `@babel/preset-react` from 7.22.5 to 7.24.7
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.24.7/packages/babel-preset-react)

Updates `babel-loader` from 9.1.2 to 9.1.3
- [Release notes](https://github.com/babel/babel-loader/releases)
- [Changelog](https://github.com/babel/babel-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel-loader/compare/v9.1.2...v9.1.3)

Updates `eslint-plugin-react` from 7.32.2 to 7.35.0
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.32.2...v7.35.0)

Updates `webpack` from 5.87.0 to 5.94.0
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.87.0...v5.94.0)

---
updated-dependencies:
- dependency-name: react-bootstrap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: "@babel/preset-env"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: "@babel/preset-react"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: babel-loader
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-27 10:24:49 +00:00
Min RK
653922605a Merge pull request #4890 from jupyterhub/dependabot/npm_and_yarn/jsx/jsx-minor-478ff049ae
Bump the jsx-minor group across 1 directory with 5 updates
2024-08-27 03:21:34 -07:00
dependabot[bot]
52f5aacce1 Bump the jsx-minor group across 1 directory with 5 updates
Bumps the jsx-minor group with 5 updates in the /jsx directory:

| Package | From | To |
| --- | --- | --- |
| [bootstrap](https://github.com/twbs/bootstrap) | `5.3.0` | `5.3.3` |
| [regenerator-runtime](https://github.com/facebook/regenerator) | `0.13.11` | `0.14.1` |
| [babel-jest](https://github.com/jestjs/jest/tree/HEAD/packages/babel-jest) | `29.5.0` | `29.7.0` |
| [jest](https://github.com/jestjs/jest/tree/HEAD/packages/jest) | `29.5.0` | `29.7.0` |
| [jest-environment-jsdom](https://github.com/jestjs/jest/tree/HEAD/packages/jest-environment-jsdom) | `29.5.0` | `29.7.0` |



Updates `bootstrap` from 5.3.0 to 5.3.3
- [Release notes](https://github.com/twbs/bootstrap/releases)
- [Commits](https://github.com/twbs/bootstrap/compare/v5.3.0...v5.3.3)

Updates `regenerator-runtime` from 0.13.11 to 0.14.1
- [Release notes](https://github.com/facebook/regenerator/releases)
- [Commits](https://github.com/facebook/regenerator/compare/regenerator-runtime@0.13.11...regenerator-runtime@0.14.1)

Updates `babel-jest` from 29.5.0 to 29.7.0
- [Release notes](https://github.com/jestjs/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jestjs/jest/commits/v29.7.0/packages/babel-jest)

Updates `jest` from 29.5.0 to 29.7.0
- [Release notes](https://github.com/jestjs/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jestjs/jest/commits/v29.7.0/packages/jest)

Updates `jest-environment-jsdom` from 29.5.0 to 29.7.0
- [Release notes](https://github.com/jestjs/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jestjs/jest/commits/v29.7.0/packages/jest-environment-jsdom)

---
updated-dependencies:
- dependency-name: bootstrap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: jsx-minor
- dependency-name: regenerator-runtime
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: babel-jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
- dependency-name: jest-environment-jsdom
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jsx-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-27 10:01:33 +00:00
Simon Li
e00ef75f15 Merge pull request #4888 from jupyterhub/dependabot/npm_and_yarn/jsx/testing-library/jest-dom-6.5.0
Bump @testing-library/jest-dom from 5.16.5 to 6.5.0 in /jsx
2024-08-27 11:00:52 +01:00
Simon Li
50879db41c Merge pull request #4889 from jupyterhub/dependabot/npm_and_yarn/jsx/eslint-8.57.0
Bump eslint from 8.43.0 to 8.57.0 in /jsx
2024-08-27 10:59:47 +01:00
dependabot[bot]
8c4a170f4e Bump eslint from 8.43.0 to 8.57.0 in /jsx
Bumps [eslint](https://github.com/eslint/eslint) from 8.43.0 to 8.57.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.43.0...v8.57.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-27 09:01:05 +00:00
dependabot[bot]
f36e5420f5 Bump @testing-library/jest-dom from 5.16.5 to 6.5.0 in /jsx
Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 5.16.5 to 6.5.0.
- [Release notes](https://github.com/testing-library/jest-dom/releases)
- [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/jest-dom/compare/v5.16.5...v6.5.0)

---
updated-dependencies:
- dependency-name: "@testing-library/jest-dom"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-27 09:00:56 +00:00
Min RK
27d83dd6c2 Merge pull request #4884 from minrk/main
update-types typo in dependabot.yml
2024-08-27 01:57:17 -07:00
Min RK
aa43ce85bd update-types typo in dependabot.yml 2024-08-27 10:56:36 +02:00
Min RK
53205764ca Merge pull request #4882 from minrk/dependabot-group-minor
only group minor dependencies in dependabot
2024-08-27 01:38:59 -07:00
Simon Li
a7fc94c22a Merge pull request #4883 from minrk/sphinx-links
docs: remove some outdated links
2024-08-27 09:23:19 +01:00
Min RK
9419c7f2c0 Merge pull request #4872 from jupyterhub/dependabot/npm_and_yarn/npm-d8a6477732
Bump the npm group with 4 updates
2024-08-27 00:50:14 -07:00
Min RK
73e0d7092e docs: remove some outdated links
- CURC no longer uses JupyterHub
- Remove outdated links to spark/yarn docs
2024-08-27 09:41:37 +02:00
Min RK
562f86026d only group minor dependencies in dependabot 2024-08-27 09:38:04 +02:00
Min RK
3a64eb85a8 Merge pull request #4880 from manics/faq-websockets
FAQ: websocket problems
2024-08-27 00:13:35 -07:00
Simon Li
e4340a467c Try manics/action-sphinx-linkcheck-summary@main
https://github.com/manics/action-sphinx-linkcheck-summary
2024-08-27 00:12:11 +01:00
Simon Li
f8c00092d2 FAQ: websocket problems 2024-08-26 23:51:27 +01:00
Olivier Benz
bd00f376d7 Introduce dark theme 2024-08-26 22:00:59 +02:00
Simon Li
99b32dd372 Merge pull request #4876 from minrk/mapp
fix python3 -m jupyterhub.app
2024-08-25 15:28:49 +01:00
Min RK
7a94830a29 fix python3 -m jupyterhub.app
python3 -m jupyterhub.app means _both_ jupyterhub.app and __main__ modules are defined
and are not the same, so instance/isinstance checks don't work
2024-08-23 08:30:39 +02:00
dependabot[bot]
eeb867947a Bump the npm group with 4 updates
Bumps the npm group with 4 updates: [@fortawesome/fontawesome-free](https://github.com/FortAwesome/Font-Awesome), [jquery](https://github.com/jquery/jquery), [moment](https://github.com/moment/moment) and [sass](https://github.com/sass/dart-sass).


Updates `@fortawesome/fontawesome-free` from 6.5.2 to 6.6.0
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/6.x/CHANGELOG.md)
- [Commits](https://github.com/FortAwesome/Font-Awesome/compare/6.5.2...6.6.0)

Updates `jquery` from 3.7.0 to 3.7.1
- [Release notes](https://github.com/jquery/jquery/releases)
- [Changelog](https://github.com/jquery/jquery/blob/main/changelog.md)
- [Commits](https://github.com/jquery/jquery/compare/3.7.0...3.7.1)

Updates `moment` from 2.29.4 to 2.30.1
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.4...2.30.1)

Updates `sass` from 1.74.1 to 1.77.8
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.74.1...1.77.8)

---
updated-dependencies:
- dependency-name: "@fortawesome/fontawesome-free"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: jquery
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: moment
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-21 14:34:06 +00:00
Simon Li
ccac4aa53f Merge pull request #4869 from minrk/dependabot-top
add dependabot config for npm
2024-08-21 15:33:20 +01:00
Simon Li
38c313eef7 Merge pull request #4865 from minrk/blocked_users
Revoke all permissions from Authenticator.blocked_users
2024-08-21 15:23:10 +01:00
Simon Li
251aa1f12c Merge pull request #4870 from minrk/metrics-start
start metrics collector in start
2024-08-21 14:54:37 +01:00
Min RK
b6b596cd34 start metrics collector in start
instead of initialize, which should only create objects

improves symmetry with stop, should remove some warnings about unfinished coroutines in some tests
2024-08-21 13:40:39 +02:00
Min RK
2391d0f764 fix app cleanup in test_app 2024-08-21 13:19:43 +02:00
Min RK
959cd5a6e1 add dependabot config for npm 2024-08-21 12:59:53 +02:00
Min RK
036dcb644c Merge pull request #4868 from minrk/bump-rjs
bump require.js
2024-08-20 08:29:21 +02:00
Min RK
bdc7ee40f4 bump require.js 2024-08-19 09:20:05 +02:00
Min RK
5383a60d4a test: make sure we don't lose users across temp hubs 2024-08-15 12:55:38 +02:00
Min RK
78649b9118 Merge pull request #4867 from manics/admin-pages-baseurl
Admin pages: use inherited base_url from render_template
2024-08-14 07:41:48 +02:00
Simon Li
e63ec9aedc Admin pages: use inherited base_url from render_template 2024-08-13 16:33:16 +01:00
Min RK
6be699c333 Revoke all permissions from Authenticator.blocked_users
rather than only disabling login, fully block the user from Hub operations
by removing all group membership and role assignments
2024-08-12 15:01:32 +02:00
Min RK
a377f8bc7f Merge pull request #4664 from minrk/fix-pytest-asyncio
unpin pytest-asyncio
2024-08-12 10:57:40 +02:00
Min RK
7ba36ef760 Merge pull request #4864 from oliver-sanders/singleuser-mixin-fix-shutdown
singleuser: fix shutdown mixin
2024-08-08 14:06:11 +02:00
Oliver Sanders
6f13355446 singleuser: fix shutdown mixin:
* The singleuser mixin is attempting to bypass jupyter_server's
  interactive prompt on shutdown by stopping the IO loop.
* This does disable the interactive prompt, but also causes SIGINT
  to be ignored causing SIGTERM to be issued after the timeout is hit.
* Closing the IO loop also prevents the server from closing async resources.
* This change allows jupyter_server to run its cleanup logic as
  intended.
2024-08-08 10:03:07 +01:00
Min RK
a5f08035a2 Merge pull request #4863 from Will-Shanks/main
Add PAMAuthenticator.executor_threads configurable, increase default to 4
2024-08-08 08:35:34 +02:00
Will Shanks
3d0256a757 PAMAuthenticator: set executor thread default to 4 2024-08-07 11:02:49 -07:00
Min RK
cca7cc6e92 test with prerelease dependencies 2024-08-07 13:19:47 +02:00
Min RK
3ab54e6eeb test compatibility with pytest-asyncio 0.24
- remove reference to event_loop fixture on 0.24
- add asyncio_default_fixture_loop_scope = module config
2024-08-07 13:18:56 +02:00
Min RK
ce7e532ab6 Revert "temporarily pin pytest-asyncio"
This reverts commit 8f2ad59254.
2024-08-07 12:59:40 +02:00
Will Shanks
da79a89f22 PAMAuthenticator: make executor threads configurable 2024-08-06 15:06:18 -07:00
Min RK
d75bcc03c0 Merge pull request #4862 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-08-06 08:58:47 +02:00
pre-commit-ci[bot]
a03fd54982 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.5.0 → v0.5.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.5.0...v0.5.6)
2024-08-05 23:06:43 +00:00
Min RK
f4fa229645 Bump to 5.2.0.dev 2024-07-31 11:24:12 +02:00
Min RK
cdc2151f75 Bump to 5.1.0 2024-07-31 11:10:39 +02:00
Min RK
b4a06ea53f add 4.1.6 changelog 2024-07-31 10:53:39 +02:00
Min RK
5fcaaac331 Merge pull request #4848 from minrk/prep-510
changelog for 5.1.0
2024-07-31 10:47:34 +02:00
Min RK
4ea8fcb031 regen rest-api 2024-07-31 10:38:27 +02:00
Min RK
ca7df636cb Merge commit from fork
only admins can modify admins
2024-07-31 10:28:14 +02:00
Min RK
759a4f0624 update 5.1 changelog 2024-07-30 20:30:03 +02:00
Min RK
2a89495323 Merge pull request #4856 from jfrost-mo/secure_context_for_login
Show insecure login warning when not in a secure context
2024-07-30 10:22:37 +02:00
Min RK
671c8ab78d Merge pull request #4860 from krassowski/pass-kwargs-to-server-initialize
Pass `kwargs` down to `initialize()` call of the server
2024-07-29 15:55:54 +02:00
Michał Krassowski
49aaf5050f Pass kwargs down to initialize() call of the server 2024-07-27 10:38:23 +01:00
James Frost
0c20f3e867 Show insecure login warning when not in a secure context
Secure contexts are a more robust way of checking that a browsing context
is authenticated and confidential. Compared to comparing the scheme this
covers cases where the connection is encrypted, but using a broken algorithm.

Notably, localhost is considered a secure context, even over HTTP.

For more detail on secure contexts, see:
https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts
2024-07-23 11:41:00 +01:00
Min RK
db7d0920cd add some docs on groups permissions 2024-07-03 09:27:10 +02:00
Min RK
ff2db557a8 only admins can modify admins
- if not admin, cannot set admin=True anywhere
- if not admin, cannot modify any user where admin=True
2024-07-02 11:55:54 +02:00
Min RK
0cd5e51dd4 Merge pull request #4849 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-07-02 09:07:53 +02:00
pre-commit-ci[bot]
b0fbf6a61e [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.4.7 → v0.5.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.7...v0.5.0)
2024-07-02 00:12:05 +00:00
Min RK
9c810b1436 changelog for 5.1.0
small release, a few nice things and one performance regression fix
2024-07-01 15:03:11 +02:00
Min RK
3d1f936a46 Merge pull request #4844 from minrk/allow-stop-during-start
allow stop while start is pending
2024-07-01 14:36:36 +02:00
dependabot[bot]
2c609d0936 Merge pull request #4847 from jupyterhub/dependabot/npm_and_yarn/jsx/braces-3.0.3 2024-07-01 09:07:04 +00:00
dependabot[bot]
8c3025dc4f Bump braces from 3.0.2 to 3.0.3 in /jsx
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-01 08:53:53 +00:00
Simon Li
d51f9f8998 Merge pull request #4846 from jupyterhub/dependabot/github_actions/docker/build-push-action-6
Bump docker/build-push-action from 5 to 6
2024-07-01 09:52:43 +01:00
dependabot[bot]
41583c1322 Bump docker/build-push-action from 5 to 6
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-01 05:20:37 +00:00
Min RK
c65e48b2b6 allow stop while start is pending
cancels start rather than waiting for it to finish or timeout

also fixes cancellation when start_timeout is reached, which was previously left running forever
2024-06-25 10:16:13 +02:00
dependabot[bot]
01aeb84a13 Merge pull request #4839 from jupyterhub/dependabot/npm_and_yarn/braces-3.0.3 2024-06-18 07:03:06 +00:00
dependabot[bot]
4c2e3f176a Bump braces from 3.0.2 to 3.0.3
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-18 06:49:47 +00:00
Simon Li
554248b083 Merge pull request #4838 from jupyterhub/dependabot/npm_and_yarn/jsx/ws-8.17.1
Bump ws from 8.13.0 to 8.17.1 in /jsx
2024-06-18 07:49:15 +01:00
dependabot[bot]
4a859664da Bump ws from 8.13.0 to 8.17.1 in /jsx
Bumps [ws](https://github.com/websockets/ws) from 8.13.0 to 8.17.1.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.13.0...8.17.1)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-18 06:36:09 +00:00
Yuvi Panda
00b37c9415 Merge pull request #4837 from yuvipanda/docs-2
Provide consistent myst references to documentation pages - part 1
2024-06-11 09:51:17 -07:00
YuviPanda
3a9c631526 Provide consistent myst references to documentation pages
While doing https://github.com/jupyterhub/jupyterhub/pull/2726,
I realized we don't have a consistent way to format references
inside the docs. I now have them be formatted to match the name
of the file, but using `:` to separate them instead of `/` or `-`.
`/` makes it ambiguous when using with markdown link syntax, as
it could be a reference or a file. And using `-` is ambiguous, as
that can be the name of the file itself.

This PR does about half, I can do the other half later (unless
someone else does).
2024-06-10 19:11:51 -07:00
Yuvi Panda
4c868cdfb6 Merge pull request #2726 from rkdarst/conceptual-intro
Jupyter(Hub) conceptual intro
2024-06-10 18:57:13 -07:00
YuviPanda
96e75bb4ac Point old service references to correct place 2024-06-10 18:50:10 -07:00
YuviPanda
f09fdf4761 Explicitly reference the services document 2024-06-10 18:45:32 -07:00
YuviPanda
7ef70eb74f Add note about crosslinks 2024-06-10 18:34:05 -07:00
YuviPanda
5c4eab0c15 Link to idle culler 2024-06-10 18:33:17 -07:00
YuviPanda
8ca8750b04 Remove reference to hubshare 2024-06-10 18:32:49 -07:00
YuviPanda
eb1bf1dc58 Remove TODO 2024-06-10 18:31:55 -07:00
YuviPanda
7852dbc1dc Cleanup references 2024-06-10 18:31:36 -07:00
pre-commit-ci[bot]
3caea2a463 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-06-10 18:25:53 -07:00
Richard Darst
6679c389b5 docs/source/getting-started/what-is-jupyterhub: Suggestions from code review 2024-06-10 18:25:53 -07:00
Richard Darst
954bbbe7d9 Apply suggestions from code review
Co-authored-by: Chris Holdgraf <choldgraf@gmail.com>
2024-06-10 18:25:53 -07:00
Richard Darst
3338de2619 docs/.../what-is-jupyterhub: Updates based on code review
- Thanks to @betatim for the suggestions.
2024-06-10 18:25:53 -07:00
Richard Darst
33c09daf5b Apply suggestions from code review
Thanks to @betatim

Co-authored-by: Tim Head <betatim@gmail.com>
2024-06-10 18:25:53 -07:00
Richard Darst
f3cc79e453 what-is-jupyterhub: Fix links
- Apparently recommonmark does intelligently uses links like
  sphinx+rst, and you shouldn't use `.html` on the links.
2024-06-10 18:25:53 -07:00
Richard Darst
cc0bc531d3 what-is-jupyterhub: Full revision 2024-06-10 18:25:53 -07:00
Richard Darst
fd2919b36f what-is-jupyterhub: clarifications (single-user and kernels)
- Single-user servers are same you get with `jupyter notebook`.
- Kernels by default in single-user server environment but don't have
  to be.
2024-06-10 18:25:53 -07:00
Richard Darst
b6e4225482 what-is-jupyterhub initial draft 2024-06-10 18:25:47 -07:00
Yuvi Panda
18d7003580 Merge pull request #4835 from minrk/metrics-cost
reduce cost of event_loop_interval metric
2024-06-10 13:18:44 -07:00
Yuvi Panda
873f60781c Merge pull request #4836 from minrk/group-docstrings
fix formatting of group_overrides docstring
2024-06-10 08:33:19 -07:00
Min RK
d1d8c02cb9 fix formatting of group_overrides docstring
- literals for dict keys
- use example header section
- missing `::` for code block
2024-06-10 14:36:38 +02:00
Min RK
67dd7742ef event_loop_interval: measure only delay, not tick duration
use resolution as lower bound, don't report delays lower than resolution,
since we don't really know their value
2024-06-10 11:48:27 +02:00
Min RK
3ee808e35c reduce cost of event_loop_interval metric
- use single coroutine to reduce cost of each check
- reduce default interval to 50ms and remove metric buckets below 50ms
2024-06-10 09:40:39 +02:00
Min RK
78369901b2 make sure metrics configuration is in docs 2024-06-10 09:29:39 +02:00
Simon Li
d7a7589821 Merge pull request #4831 from minrk/token-max-age
Add token_expires_in_max_seconds configuration
2024-06-04 09:07:37 +01:00
Min RK
8437e66db9 require token_expires_in_max_seconds setting 2024-06-04 08:16:06 +02:00
Erik Sundell
6ea07a7dd0 Merge pull request #4832 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-06-04 08:44:07 +03:00
pre-commit-ci[bot]
fc184c4ec7 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.4.3 → v0.4.7](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.3...v0.4.7)
2024-06-03 22:08:28 +00:00
Min RK
df4f96eaf9 Add token_expires_in_max_seconds configuration
Allows limiting max expiration of tokens created via the API

Only affects the POST /api/tokens endpoint, not tokens issued by other means or created prior to config
2024-06-03 13:04:14 +02:00
Min RK
d8bb3f4402 Merge pull request #4822 from yuvipanda/group-override
Allow overriding spawner config based on user group membership
2024-05-31 09:28:05 +02:00
Yuvi Panda
4082c2ddbc Reorder log messages
Co-authored-by: Min RK <benjaminrk@gmail.com>
2024-05-30 07:22:28 -07:00
YuviPanda
300f49d1ab Change names of groups in examples 2024-05-29 23:05:51 -07:00
Erik Sundell
6abc096cbc Merge pull request #4829 from manics/read-users-description
Fix wording for `read:users` scope description
2024-05-30 06:55:44 +02:00
Simon Li
a6aba9a7e1 python docs/source/rbac/generate-scope-table.py 2024-05-29 23:49:53 +01:00
Simon Li
8c3ff64511 Fix wording for read:users scope description 2024-05-29 23:05:45 +01:00
Simon Li
104593b9ec Merge pull request #4828 from minrk/admin_users_doc
further emphasize that admin_users config only grants permission
2024-05-29 13:48:40 +01:00
Min RK
495ebe406c further emphasize that admin_users config only grants permission 2024-05-29 10:37:16 +02:00
YuviPanda
5100c60831 add example config 2024-05-24 08:59:48 -07:00
Yuvi Panda
bec737bf27 Fix typo
Co-authored-by: Simon Li <orpheus+devel@gmail.com>
2024-05-24 08:24:48 -07:00
YuviPanda
2bb27653e2 Apply group overrides before pre_spawn hook 2024-05-24 08:23:12 -07:00
pre-commit-ci[bot]
e8fbe84ac8 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-05-24 14:56:48 +00:00
YuviPanda
8564ff015c Add test for dict merging 2024-05-24 07:56:20 -07:00
YuviPanda
fb85cfb118 Better wording for group_overrides help
Co-authored-by: ryanlovett <rylo@berkeley.edu>
2024-05-24 07:27:51 -07:00
pre-commit-ci[bot]
25384051aa [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-05-24 14:23:19 +00:00
YuviPanda
2623aa5e46 Reduce amount of logging when applying group overrides 2024-05-24 07:22:41 -07:00
YuviPanda
30ebf84bd4 Remove direct reference to KubeSpawner 2024-05-24 07:22:30 -07:00
Min RK
50466843ee Bump to 5.1.0.dev 2024-05-24 12:45:49 +02:00
Min RK
c616ab284d Bump to 5.0.0 2024-05-24 12:45:26 +02:00
Min RK
41090ceb55 Merge pull request #4820 from minrk/rel5
final changelog for 5.0.0
2024-05-24 12:31:02 +02:00
Min RK
d7939c1721 one last patch 2024-05-24 11:00:46 +02:00
Min RK
d93ca55b11 update nginx ssl url 2024-05-24 10:57:36 +02:00
Min RK
9ff11e6fa4 Merge pull request #4821 from yuvipanda/fix-bootstrap
Fix missing `form-control` classes & some padding
2024-05-24 10:54:16 +02:00
YuviPanda
5f3833bc95 Allow overriding spawner config based on user group membership
Similar to 'kubespawner_override' in KubeSpawner, this allows
admins to selectivel override spawner configuration based on
groups a user belongs to. This allows for low maintenance but
extremely powerful customization based on group membership.
This is particularly powerful when combined with
https://github.com/jupyterhub/oauthenticator/pull/735

\#\# Dictionary vs List

Ordering is important here, but still I choose to implement this
configuration as a dictionary of dictionaries vs a list. This is
primarily to allow for easy overriding in z2jh (and similar places),
where Lists are just really hard to override. Ordering is provided
by lexicographically sorting the keys, similar to how we do it in z2jh.

\#\# Merging config

The merging code is literally copied from KubeSpawner, and provides
the exact same behavior. Documentation of how it acts is also copied.
2024-05-23 19:48:25 -07:00
pre-commit-ci[bot]
66ddaebf26 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-05-24 01:55:12 +00:00
YuviPanda
2598ac2c1a Fix missing form-control classes & some padding
- Missing `form-control` on a textbox gave it weird padding,
  this fixes it.
- Add new server is set up as a [button addon](https://getbootstrap.com/docs/5.3/forms/input-group/#button-addons)
- Add a little right margin to the username in the navbar,
  just before the logout button. Otherwise they were 'stuck'
  to each other
2024-05-23 18:53:32 -07:00
Min RK
4ab36e3da6 final changelog for 5.0.0 2024-05-23 13:10:58 +02:00
Min RK
282cc020b6 Merge pull request #4815 from minrk/admin-test
admin: don't use state change to update offset
2024-05-16 08:48:22 +02:00
Min RK
6912a5a752 Merge pull request #4817 from minrk/share-code-full-url
add full URLs to share modes
2024-05-16 08:45:08 +02:00
Min RK
cedf237852 avoid offset race cycle in groups as well 2024-05-15 10:42:58 +02:00
Min RK
9ff8f3e6ec update server model docstring 2024-05-15 10:29:09 +02:00
Erik Sundell
abc9581a75 Merge pull request #4816 from minrk/share-codes
DOC: /share-codes/ url typo
2024-05-15 10:01:53 +02:00
Min RK
02df033227 add full URLs to share modes
- full_url for SharedServer
- full_accept_url for ShareCode
2024-05-15 00:02:47 +02:00
Min RK
f82097bf2e /share-codes/ typo 2024-05-14 23:47:01 +02:00
Min RK
2af252c4c3 admin: don't use state change to update offset
set offset -> request page -> response sets offset is a recipe for races

instead, send request with new offset and only update offset state

made easier by consolidating page update requests into single loadPageData
2024-05-14 15:23:46 +02:00
Min RK
06c8d22087 Merge pull request #4814 from minrk/activity-warning
quieter logging in activity-reporting when hub is temporarily unavailable
2024-05-13 10:32:48 +02:00
Min RK
95d479af88 Merge pull request #4812 from minrk/setup-python-cache
ci: enable pip cache
2024-05-13 10:31:58 +02:00
Min RK
aee92985ac set cache-dependency-path 2024-05-13 09:49:18 +02:00
Min RK
ea73931ad0 quieter logging in activity-reporting when hub is temporarily unavailable 2024-05-13 09:36:19 +02:00
Min RK
bbc3870803 Bump to 5.0.0b2 2024-05-09 09:03:55 +02:00
Min RK
212d618978 Merge pull request #4811 from minrk/5b2
Update changelog for 5.0b2
2024-05-09 09:03:39 +02:00
Min RK
b0494c203f ci: enable pip cache 2024-05-09 09:03:05 +02:00
Min RK
75673fc268 beta 2 2024-05-09 08:04:09 +02:00
Min RK
332a393083 Update changelog for 5.0b2 2024-05-08 20:15:57 +02:00
Simon Li
fa538cfc65 Merge pull request #4807 from minrk/jupyter-events
switch from jupyter-telemetry to jupyter-events
2024-05-08 11:31:11 +02:00
Min RK
29ae082399 Merge pull request #4808 from jupyterhub/pre-commit-ci-update-config
Update string formatting - from %s to f-strings
2024-05-07 15:05:59 +02:00
Min RK
463960edaf schemas are not published...YET 2024-05-07 11:40:45 +02:00
Min RK
d9c6e43508 remove unused version number from test events 2024-05-07 11:39:56 +02:00
Min RK
961d2fe878 allows_schemas config is not in jupyter-events 2024-05-07 11:38:24 +02:00
Min RK
5636472ebf apply ruff fixes for UP031 2024-05-07 11:33:59 +02:00
Erik Sundell
fc02f9e2e6 Merge pull request #4809 from consideRatio/pr/fix-internal-ref
docs: fix internal reference typo
2024-05-07 09:16:59 +02:00
Erik Sundell
fd21b2fe94 docs: fix internal reference typo 2024-05-07 09:10:28 +02:00
pre-commit-ci[bot]
6051dc9fa7 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.3.5 → v0.4.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.3.5...v0.4.3)
- [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v4.6.0)
2024-05-06 22:03:18 +00:00
Simon Li
4ee5ee4e02 Merge pull request #4806 from minrk/pam-grouplist
use os.getgrouplist to check group membership in allowed_groups
2024-05-04 17:25:19 +02:00
Min RK
745cad5058 ignore unpublished schema URLs 2024-05-03 12:32:40 +02:00
Min RK
335803d19f switch from jupyter-telemetry to jupyter-events
- id must be a URL
- change `record_event` to `emit`
2024-05-03 12:00:42 +02:00
Min RK
3924295650 use getgrouplist to check group membership in allowed_groups
gr_mem check is less reliable
2024-05-03 09:21:10 +02:00
Min RK
c135e109ab Merge pull request #4805 from minrk/user-redirect-domain
include domain in PrefixRedirectHandler
2024-05-03 09:02:28 +02:00
Min RK
7e098fa09f include domain in PrefixRedirectHandler
redirects user.domain/user/foo -> hub.domain/hub/user/foo when server is not running

ensures right cookies, etc. are available
2024-05-01 15:43:46 +02:00
Erik Sundell
49f88450d5 Merge pull request #4804 from minrk/doc-redirect_uri
document conditions for oauth_redirect_url more clearly
2024-04-30 17:57:23 +02:00
Min RK
de20379933 document conditions for oauth_redirect_url more clearly 2024-04-30 15:22:18 +02:00
Min RK
8d406c398b Merge pull request #4799 from lahwaacz/async_generator
Relax dependency on async_generator
2024-04-26 11:04:04 +02:00
Jakub Klinkovský
dbd3813a1c async_generator is needed only for python<3.10
- the asynccontextmanager object is available in the standard contextlib
  module since Pyhton 3.7
- the aclosing object is available in the standard contextlib module
  since Pyhton 3.10
- JupyterHub currently requires Python 3.8 or newer
2024-04-24 23:11:10 +02:00
Simon Li
df04596172 Merge pull request #4798 from minrk/use_public_url
add full_url, full_progress_url to server models
2024-04-24 19:24:13 +02:00
Min RK
12f96df4eb fix condition for adding public_url to full_url
check directly if it is just a path, instead of trying to check other config that means it ought to be
2024-04-24 16:18:37 +02:00
Min RK
aecb95cd26 add full_url, full_progress_url to server models
if public_url is defined
2024-04-24 14:38:00 +02:00
Min RK
5fecb71265 Merge pull request #4797 from minrk/raise-not-redirect-loop
403 instead of redirect for token-only HubAuth
2024-04-24 11:08:00 +02:00
Min RK
e0157ff5eb don't try to login redirect with token-only HubAuth class
login via redirect is an artifact of the old services cookie,
removed in 2.0
2024-04-24 09:43:36 +02:00
Min RK
5ae250506b service-whoami: don't advertise link that won't work
whoami-api is api-only, it shouldn't be in the services dropdown
2024-04-23 10:09:05 +02:00
Min RK
8d298922e5 Merge pull request #4796 from manics/fix-redoc
Fix rest API djlint auto-formatting
2024-04-23 09:38:57 +02:00
Simon Li
18707e24b3 Forcibly disable djlint-reformat-jinja for redoc.html
Possible bug, djlint doesn't respect `djlint off` comments
2024-04-22 20:10:48 +01:00
Simon Li
3580904e8a redoc.html: revert djlint changes (breaks handlebar template) 2024-04-22 20:08:46 +01:00
Min RK
bcf5f49dd6 Bump to 5.0.0b1 2024-04-22 08:40:43 +02:00
Min RK
522f9d44d9 Merge pull request #4792 from minrk/changelog-5
changelog for 5.0, add migration doc
2024-04-22 08:40:27 +02:00
Min RK
b29e35650d update changelog with latest PRs 2024-04-19 17:11:38 +02:00
Min RK
168fa5c699 Merge pull request #4794 from minrk/pagination-count 2024-04-19 16:38:44 +02:00
Erik Sundell
cca80bc284 Merge pull request #4795 from minrk/docker-timeout
increase docker build timeout to 30 minutes
2024-04-19 15:03:08 +02:00
Min RK
a49c0fdb02 Merge pull request #4793 from minrk/jinja-autofmt
adopt djlint linter/autoformatter for jinja templates
2024-04-19 14:57:20 +02:00
Min RK
f73c0cea0b increase docker build timeout
apt step is taking a super long time sometimes
2024-04-19 14:56:01 +02:00
Min RK
46df414d6e fix group by in active state filter 2024-04-19 14:26:40 +02:00
Min RK
8f4942f669 Fix counts on list users queries
we had some joins to trigger eager loading,
but then `query.count()` returns the count of (user, group) and (user, spawner) pairs, not the count of users
but the `joinedload` options added later are the right way to do that,
so these joins are unnecessary
2024-04-19 12:01:16 +02:00
Min RK
75c947be59 address djlint lint
and autoformat js in templates
2024-04-19 10:46:50 +02:00
Min RK
2556cd0691 note that 5.0 is a prerelease 2024-04-19 10:32:29 +02:00
Min RK
43fff0a280 try to clarify allow_all/allow_existing_users 2024-04-19 10:32:17 +02:00
Min RK
d9ce1b917f add and run djlint formatter 2024-04-19 10:12:57 +02:00
Min RK
bf840c65d6 apply suggestions from review 2024-04-18 17:28:58 +02:00
Min RK
9e5af6f3ca Apply suggestions from code review
Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
2024-04-18 17:21:24 +02:00
Min RK
fb1614e20a Merge pull request #4784 from manics/token-api-doc
doc: list/get token response is different from post
2024-04-18 15:02:51 +02:00
Min RK
bb09070e16 add migration doc for 5.0 2024-04-18 15:01:08 +02:00
Min RK
e72f0976f9 changelog for 5.0 2024-04-18 14:59:42 +02:00
Min RK
99b37f1f0f Merge pull request #4774 from minrk/bs5
update bootstrap to v5
2024-04-18 12:10:55 +02:00
Min RK
039d457797 update selector in test_share 2024-04-18 09:15:15 +02:00
Min RK
cc7662ec87 remove unused requirejs shim for bootstrap 2024-04-18 09:12:16 +02:00
Min RK
aa89a63117 code review
Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2024-04-18 09:10:11 +02:00
Simon Li
9c1944d946 Duplicate Token/NewToken content instead of using yaml merge/anchors 2024-04-17 20:15:06 +01:00
Min RK
8153e53fb1 Merge pull request #4790 from minrk/token_id_user_model
add token_id to `/api/user`
2024-04-17 20:26:32 +02:00
Min RK
3f5d220af4 update accept-share for bs5
make it a card, matching oauth
2024-04-17 19:53:57 +02:00
Min RK
7d7db9774f consistent submit buttons 2024-04-17 15:44:17 +02:00
Min RK
01e7d00829 update oauth page test locators 2024-04-17 15:37:22 +02:00
Min RK
3d7a3393e1 darker nav 2024-04-17 15:32:10 +02:00
Min RK
ab40f29056 remove unnecessary width on property tables 2024-04-17 14:56:02 +02:00
Min RK
6c4eba2682 avoid wrapping text on add-item button 2024-04-17 14:46:28 +02:00
Min RK
88fe734585 version footer is not a nav 2024-04-17 14:40:43 +02:00
Min RK
89fa76fae8 start using some css variables where we can 2024-04-17 14:32:54 +02:00
Min RK
2919a2b6c2 remove use of deprecated text-muted 2024-04-17 14:28:02 +02:00
Min RK
af5b3e0c31 update spawn form for bs5 2024-04-17 10:38:46 +02:00
Min RK
c94dcc435c add token_id to self model 2024-04-17 09:27:31 +02:00
Min RK
6a17797719 fix locator on token table 2024-04-17 09:08:02 +02:00
Min RK
6d7bde996b set variant on server buttons
variant determines the color
2024-04-17 08:58:30 +02:00
Min RK
fdd421bfa9 use card for authorize layout 2024-04-16 17:56:37 +02:00
Min RK
5e3b1601d7 use justify-content-center to center columns
no longer need to use offsets
2024-04-16 15:01:32 +02:00
Min RK
e766d7a885 update test expectations for some bs5 classes 2024-04-16 14:43:06 +02:00
Min RK
f13fb2f12e update services dropdown for bs5 2024-04-16 14:42:45 +02:00
Min RK
904e200daf fix testing authenticator config
wrong class
2024-04-16 09:47:35 +02:00
Min RK
1ae1e66136 update modal for bs5 2024-04-16 09:30:40 +02:00
Min RK
7ca2105b80 Merge pull request #4748 from krassowski/krassowski-manage_roles
Add authenticator-managed roles (`manage_roles`)
2024-04-16 09:05:08 +02:00
Min RK
8820d5c028 update admin for bs5
- more consistent use of react-bootstrap
- reusable MainContainer, MainCol for consistent layout
2024-04-15 13:31:35 +02:00
Min RK
a50ed507fe udpate token page for bs5 2024-04-15 11:21:02 +02:00
Min RK
4320f2aff5 document running build:watch with testing config
remove mentions of yarn - we don't use it
2024-04-15 11:20:51 +02:00
Min RK
102db113cf Merge branch 'main' into bs5 2024-04-15 10:59:53 +02:00
Min RK
528c7faf92 Merge branch 'main' into krassowski-manage_roles 2024-04-15 10:58:46 +02:00
Min RK
b06a0f29ed Merge pull request #4701 from consideRatio/pr/add-allow-existing-users
Add Authenticator config `allow_all` and `allow_existing_users`
2024-04-15 10:57:45 +02:00
Min RK
ce74fdf0a3 don't allow null in managed_by_auth 2024-04-15 10:55:46 +02:00
Min RK
48c046359f remove unnecessary test parameter
allow_all doesn't vary, so doesn't need to be a parameter
2024-04-15 10:34:30 +02:00
Min RK
dc234a79f0 Merge pull request #4782 from minrk/group-output
test: avoid producing '[group]' string in output
2024-04-15 10:33:36 +02:00
Min RK
8fd09053a2 avoid producing '[group]' string in output
GitHub Actions starts a log expansion group when it sees the string `[group]`,
which happens when that is a parametrize argument
which results in collapsing all subsequent test outputs

pytest.param lets us assign an id that is used in output, but not the value itself
2024-04-15 10:20:31 +02:00
Min RK
634d59dfd5 Merge pull request #4783 from manics/token-button-after
Token UI: move button to after form fields
2024-04-15 10:07:18 +02:00
Simon Li
50dc39b102 Reformat rest-api.yml 2024-04-14 22:35:37 +01:00
Simon Li
772c9e20b7 Fix some typos in rest-api.yml 2024-04-14 22:28:21 +01:00
Simon Li
0eac18bb22 doc: list/get token response is different from post 2024-04-14 22:22:36 +01:00
Simon Li
061d267d74 Token UI: move button to after form fields 2024-04-12 17:01:11 +01:00
krassowski
d5e9e3a632 Switch the default for reset_managed_roles_on_startup 2024-04-12 14:10:06 +01:00
Min RK
d0523f5e93 Merge pull request #4781 from minrk/template-debug
clarify error template debug log
2024-04-11 09:35:24 +02:00
krassowski
b79cb12095 Polish the documentation 2024-04-10 14:52:23 +01:00
krassowski
b486fc8abe Fix tests after making the default load_managed_roles raise
Four tests were not using a mock authenticator:
- two get `reset_managed_roles_on_startup` toggled
- two get a custom implementation of `load_managed_roles`
2024-04-10 13:41:54 +01:00
krassowski
4d8c3cbf0d Do not load non-existent managed_by_auth column
in `api_token_scopes` migration, which fixes 2.1.1 test
2024-04-10 13:19:30 +01:00
Min RK
6a93abbe1c Merge pull request #4779 from krassowski/support-allow_unauthenticated_access-false
Support forbidding unauthenticated access (`allow_unauthenticated_access = False`)
2024-04-10 13:19:45 +02:00
krassowski
84ed311902 Check for table existence in alembic migration 2024-04-10 12:02:12 +01:00
Min RK
6c0a0643e8 Merge pull request #4776 from minrk/forward-415
forward-port 4.1.5
2024-04-10 12:57:50 +02:00
Min RK
e3ea59759e clarify error template debug log
'No template for 404' looks like something's wrong, when all it means to convey is that it doesn't get _special_ treatment
and the default error page is enough.
2024-04-10 12:56:41 +02:00
krassowski
aefc8de49a Add @allow_unauthenticated decorators 2024-04-10 11:03:33 +01:00
krassowski
88189d54d9 Add a test for allow_unauthenticated_access (xfail) 2024-04-10 10:58:21 +01:00
Min RK
3fe1e9d510 update admin for bs5
- panel became card
- fix alignment of filter checkbox
- make all buttons consistently buttons
2024-04-09 13:48:41 +02:00
Min RK
93a34d9874 testing config: enable named servers
for easier testing of more features
2024-04-09 13:48:41 +02:00
krassowski
f609b00358 Fix docs warnings, add version added admonitions 2024-04-09 11:53:34 +01:00
Min RK
9d835a8670 make sure navbar, named servers table work in bs5
add test for navbar collapse
2024-04-09 12:48:59 +02:00
krassowski
1a04ecde8e Raise NotImplementedError when using reset_managed_roles_on_startup
with the default implementation of `load_managed_roles()`
2024-04-09 11:25:18 +01:00
krassowski
6b8dd277a2 Add a test for load_managed_roles() with username not in database 2024-04-09 11:17:23 +01:00
krassowski
0f1acce363 Add a test & implement keeping user assignments if users key absent 2024-04-09 11:07:15 +01:00
Min RK
044a916488 update setup.py css build step for scss 2024-04-09 11:38:06 +02:00
Min RK
47f39e7c2f changelog for 4.1.5 2024-04-09 11:18:00 +02:00
Min RK
5424108593 singleuser mixin: include check_xsrf_cookie in overrides 2024-04-09 11:18:00 +02:00
krassowski
0424f2938b Fix copy-paste mistake in a comment of a test 2024-04-09 10:15:24 +01:00
krassowski
9dc91fb707 Remove spurious conversion to a list 2024-04-09 10:15:08 +01:00
krassowski
1fa4fa32ce Add Alembic migration for managed_by_auth columns 2024-04-09 09:28:28 +01:00
krassowski
4dd36f5988 Only delete managed roles if not in load_managed_roles() 2024-04-08 15:33:04 +01:00
krassowski
0f0afa178e Do not use caplog in the test as it has multiple known issues
For example https://github.com/pytest-dev/pytest/issues/9236
Here it was passing when running this test alone but not
when run with the other tests.
2024-04-08 14:41:19 +01:00
krassowski
c52b308067 Fix tests which cause subsequent tests to fail with:
`(sqlite3.OperationalError) database is locked`
2024-04-08 14:23:40 +01:00
krassowski
8835f79bf9 Do not delete assignments if given in load_managed_roles() 2024-04-08 14:11:35 +01:00
krassowski
9d0e8e0861 Remove empty managed roles after stripping user of them 2024-04-08 11:34:13 +01:00
krassowski
66c65c93db Warn about not found users/groups/services 2024-04-08 11:04:34 +01:00
krassowski
5aa8d29913 Make role_associations private again 2024-04-07 10:00:42 +01:00
krassowski
4ec2fe3c19 Show offending roles when failing due to assignment in load_roles 2024-04-07 09:55:54 +01:00
krassowski
fcf49be5f6 Fix failing test after addition of managed_by_auth 2024-04-07 09:52:02 +01:00
krassowski
633aa69623 Implement removal of stale managed roles and role assignment 2024-04-05 16:03:14 +01:00
Michał Krassowski
45a67e2d73 Delete the role created in fixture after the test
Co-authored-by: Min RK <benjaminrk@gmail.com>
2024-04-05 14:40:44 +01:00
Min RK
2fe060861a progress toward bootstrap 5 2024-04-04 16:18:01 +02:00
Min RK
cca49486e3 build with sass 2024-04-04 15:58:57 +02:00
Min RK
dfbe7257e6 make it easier to debug static files 2024-04-04 15:58:44 +02:00
Min RK
8c5715621a work on updating to bs5 2024-04-04 12:45:34 +02:00
Min RK
b05b3a30ab autoconvert less to scss
via less2sass:

```
for f in less/*.less; do
    less2sass $f
done

rm -v less/*.less
git mv less scss
```
2024-04-04 12:39:20 +02:00
Min RK
f9fb650a7b Merge pull request #4769 from consideRatio/pr/fix-typo
Fix typo in docstring about Authenticator.blocked_users
2024-04-03 10:49:48 +02:00
Min RK
3ce2643ab7 clarify some allow docs per review 2024-04-02 10:54:17 +02:00
Min RK
3e61e46497 Apply suggestions from code review
Co-authored-by: Simon Li <orpheus+devel@gmail.com>
2024-04-02 10:50:31 +02:00
Erik Sundell
587e6cec4e Fix typo in docstring about Authenticator.blocked_users 2024-04-02 10:42:20 +02:00
Erik Sundell
a6c513c1ac Merge pull request #4767 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-04-02 08:45:59 +02:00
pre-commit-ci[bot]
b678236f87 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.3.2 → v0.3.5](https://github.com/astral-sh/ruff-pre-commit/compare/v0.3.2...v0.3.5)
2024-04-01 22:10:17 +00:00
Simon Li
11f5759fc7 Merge pull request #4763 from jupyterhub/dependabot/npm_and_yarn/jsx/express-4.19.2
Bump express from 4.18.2 to 4.19.2 in /jsx
2024-04-01 14:35:57 +02:00
Erik Sundell
95db61e613 Merge pull request #4765 from minrk/414-forward
forward-port 4.1.4
2024-03-30 11:10:15 +01:00
Min RK
ab37cd7f24 changelog for 4.1.4 2024-03-30 10:02:43 +01:00
Min RK
26a0be5103 avoid xsrf check on navigate GET requests
sevices/auth prevents calling check_xsrf_cookie,
but if the Handler itself called it the newly strict check would still be applied

this ensures the check is actually allowed for navigate GET requests
2024-03-30 10:02:43 +01:00
dependabot[bot]
9009bf2825 Bump express from 4.18.2 to 4.19.2 in /jsx
Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-29 10:03:51 +00:00
krassowski
6ce1a2dc83 Add more tests, fix two issues found by tests:
- resting of `description` and `scopes` to defaults
- resetting all users/scopes/groups for roles
2024-03-26 18:55:37 +00:00
krassowski
b7d68ca255 Implement load_managed_roles, allow to assign scopes
and update roles (but not assign them to users/groups)
by using `load_roles` when `Authenticator.manage_roles` is on.
2024-03-26 17:53:32 +00:00
Min RK
f0220c87d8 Merge pull request #4755 from minrk/forward-413 2024-03-26 17:35:46 +01:00
Min RK
7d720371c5 changelog for 4.1.3 2024-03-26 14:04:58 +01:00
Min RK
2262bab442 changelog for 4.1.2 2024-03-26 14:04:58 +01:00
Min RK
c08b582c53 respect jupyter-server disable_check_xsrf setting
allows global disable of xsrf checks in single-user servers
2024-03-26 14:04:58 +01:00
Min RK
7e56bf7e2c rework handling of multiple xsrf tokens
rather than attempting to clear multiple tokens (too complicated, breaks named servers)
look for and accept first valid token

have to do our own cookie parsing because existing cookie implementations only return a single value for each key
and default to selecting the _least_ likely to be correct, according to RFCs.

set updated xsrf cookie on login to avoid needing two requests to get the right cookie

# Conflicts:
#	jupyterhub/tests/test_services_auth.py
2024-03-26 14:04:58 +01:00
Min RK
1feb3564c1 apply suggestions from code review
Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2024-03-26 09:00:57 +01:00
Min RK
7e25dd15e6 clarify externally managed group
Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2024-03-26 09:00:01 +01:00
Min RK
f581b1a541 Merge pull request #4743 from minrk/effver
Officially adopt EffVer
2024-03-26 08:59:07 +01:00
Min RK
f253cc46ad typo in mock hub
Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2024-03-25 22:31:02 +01:00
krassowski
26906cca07 Only fetch the relevant roles 2024-03-25 14:06:19 +00:00
krassowski
baf6e03c46 Clarify the docstring for manage_roles
This is still subject to change.
2024-03-25 14:03:54 +00:00
krassowski
0d6778f955 Make the commit argument keyword-only 2024-03-25 13:55:53 +00:00
pre-commit-ci[bot]
1c02c0f2dd [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-03-24 20:20:35 +00:00
krassowski
1799b57e4b Fix tests, passing commit arg in decorator,
and extracting message from exceptions. Also, lint.
2024-03-24 20:18:59 +00:00
Min RK
b98af09df8 test: MockHub default allow_all=True
not unconditional
2024-03-24 17:24:27 +01:00
Min RK
ca6032381a Merge pull request #4747 from minrk/411-forward 2024-03-24 08:40:56 +01:00
Min RK
f4aa8a4c25 changelog for 4.1.1 2024-03-23 17:17:39 +01:00
Min RK
5831079bf6 allow subclasses to override xsrf check
need to inject our override into the base class,
rather than at the instance level,
to avoid clobbering any overrides in extensions like jupyter-server-proxy
2024-03-23 17:17:39 +01:00
krassowski
c685d4bec9 Rewrite sync_roles to always grant/strip the current user
and to update all role attributes for each rule, and
to re-use `create_role` function which checks rule name etc.
2024-03-23 16:11:21 +00:00
krassowski
8057323331 Remove print statement 2024-03-23 13:56:04 +00:00
Min RK
c3c69027fa set allow_all=False by default 2024-03-22 15:46:03 +01:00
Min RK
68f359360e Merge pull request #4742 from jupyterhub/dependabot/npm_and_yarn/jsx/webpack-dev-middleware-5.3.4
Bump webpack-dev-middleware from 5.3.3 to 5.3.4 in /jsx
2024-03-22 09:24:54 +01:00
Min RK
ca3ac3b08b Officially adopt EffVer
encodes the policy we already have, but now it has a name
2024-03-22 09:20:12 +01:00
dependabot[bot]
9b3d55ded0 Bump webpack-dev-middleware from 5.3.3 to 5.3.4 in /jsx
Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 5.3.3 to 5.3.4.
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/v5.3.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v5.3.3...v5.3.4)

---
updated-dependencies:
- dependency-name: webpack-dev-middleware
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-22 08:07:23 +00:00
Min RK
6a72ad8ca5 Merge pull request #4737 from minrk/rm-double-doc
avoid duplicate jupyterhub installation for docs
2024-03-22 09:06:55 +01:00
Min RK
4cf007b515 Merge pull request #4741 from manics/docs-py-min
Consistently use minimum Python version in docs
2024-03-22 08:55:05 +01:00
Simon Li
352826a1ec docs: fix unrelated rendering error 2024-03-21 20:08:59 +00:00
Simon Li
acf7d7daaa docs: use sphinx var for min node version 2024-03-21 20:08:56 +00:00
Simon Li
92d59cd12b docs: Consistently use minimum Python 3.8 2024-03-21 20:03:11 +00:00
Min RK
6ade08825b Merge pull request #4739 from minrk/set-login-cookie-user-changed
set login cookie if user changed
2024-03-21 11:43:32 +01:00
Min RK
ff693e82af set login cookie if user changed
not just if unset

allows login _override_ of existing user without needing to log out first
2024-03-20 14:37:54 +01:00
Min RK
d2a07aaf1b forward-port 4.1.0 2024-03-20 13:21:34 +01:00
Min RK
4a83cddb8e Merge pull request from GHSA-7r3h-4ph8-w38g
forward-port 4.1.0
2024-03-20 13:19:30 +01:00
Min RK
c110c25428 Merge pull request #4738 from minrk/browser-subdomain
run browser tests in subdomain
2024-03-20 13:05:58 +01:00
Min RK
1cd3bc1860 fix browser tests with subdomains 2024-03-20 12:51:44 +01:00
Min RK
51156a4762 avoid duplicate jupyterhub installation
almost every time installing docs/requirements.txt happens, JupyterHub is already installed
adding an `--editable` here ensures a full rebuild happens every time, which is very slow
2024-03-20 12:27:51 +01:00
Min RK
71f6cfa92b fix permission check on /hub/user/ page
needed for share redirect to work
2024-03-20 12:24:56 +01:00
Min RK
66c1600f4f run browser tests in subdomain 2024-03-20 12:24:56 +01:00
Min RK
b319b58a2f default=False for allow_token_in_url for 5.0 2024-03-19 18:46:51 +01:00
Min RK
83ce6d3f6b forward-port 4.1.0 2024-03-19 18:45:58 +01:00
krassowski
a76e62dc65 Disallow having both manage_roles and load_roles 2024-03-19 14:31:37 +00:00
krassowski
6a6c54fef5 Draft documentation specifying expected behaviour 2024-03-19 14:31:28 +00:00
krassowski
ed0a3699e7 Remove duplicated/unused test code, use snake_case
- `expected_refresh_groups` was not used in this test case,
  my guess is that it was accidentally copied over from
  `test_auth_managed_groups`
- `expected_authenticated_groups` was defined only to define
  the unused `expected_refresh_groups`
- `getRoleNames` was not following snake_case
2024-03-19 13:49:13 +00:00
krassowski
89992296ac Merge branch 'main' into krassowski-manage_roles 2024-03-19 13:06:48 +00:00
Min RK
970693ef46 Merge pull request #4736 from krassowski/bump-python-version-in-contributing
Bump required Python version in contributing setup to 3.8
2024-03-19 13:57:12 +01:00
krassowski
74455d6337 Bump required Python version in contributing setup 2024-03-19 12:52:59 +00:00
Min RK
e1e34a14a2 update docs for allow_all, allow_existing_users 2024-03-19 09:40:05 +01:00
Min RK
1db5e5e95c Merge pull request #4733 from kreuzert/main
Catch ValueError while waiting for server to be reachable
2024-03-19 09:37:20 +01:00
Tim Kreuzer
ed5b9249fe catch all exceptions, to allow a more stable wait_up. Without removing OSError specific catch 2024-03-18 18:28:27 +01:00
Tim Kreuzer
bb702abe15 Revert "except ValueError while waiting for server to be reachable"
This reverts commit 6bc3e05c6c.
2024-03-18 18:27:31 +01:00
Min RK
0d427338a1 add Authenticator.allow_all
and test coverage for allow_all and allow_existing_users interactions

PAMAuthenticator.allowed_groups is no longer mutually exclusive with allowed_users
2024-03-18 15:59:29 +01:00
Tim Kreuzer
5723746e05 catch all exceptions, to allow a more stable wait_up 2024-03-18 14:47:14 +01:00
Tim Kreuzer
6bc3e05c6c except ValueError while waiting for server to be reachable 2024-03-18 11:05:08 +01:00
Simon Li
0abe517faa Merge pull request #4731 from jupyterhub/dependabot/npm_and_yarn/jsx/follow-redirects-1.15.6
Bump follow-redirects from 1.15.4 to 1.15.6 in /jsx
2024-03-17 09:07:02 +00:00
dependabot[bot]
c9c4c3cfd7 Bump follow-redirects from 1.15.4 to 1.15.6 in /jsx
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.4 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.4...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-16 23:05:49 +00:00
Min RK
5033effffb Merge pull request #4729 from manics/manics-patch-1
services.md: idle-culler does not need admin
2024-03-15 16:32:32 +01:00
Simon Li
f83c22ea0e services.md: idle-culler does not need admin 2024-03-14 15:12:20 +00:00
Erik Sundell
b0ae97fd32 Add Authenticator.allow_existing_users
Configuring `Authenticator.allowed_users` truthy makes other existing
users in JupyterHub's database be allowed access, this could come as a
surprise. This new config is meant to help avoid such surprise. With
this new config, a JupyterHub admin is able to directly declare if the
existing users in JupyterHub's database is to be granted access or not.

If `allow_existing_users` isn't explicity set, the default value will
be computed to True or False depending on if `allowed_users` is Truthy,
which makes the introduction of this config a non-breaking change.

This configuration was initially introduced in jupyterhub/oauthenticator
via https://github.com/jupyterhub/oauthenticator/pull/631, and is with
this PR being upstreamed to the base Authenticator class.
2024-03-13 12:42:17 +01:00
Min RK
46c3548725 Merge pull request #4724 from minrk/ruff
switch to ruff for lint, format
2024-03-13 11:15:51 +01:00
Min RK
061bd7b19f remove unused linter/formatter config 2024-03-13 09:44:43 +01:00
Min RK
a587c1c91c Merge pull request #4725 from aktech/rest-api-typo
Fix typo in the `rest-api.yml`
2024-03-13 08:56:30 +01:00
Amit Kumar
d3add440ca Fix typo in the rest-api.yml 2024-03-11 16:19:34 +00:00
Min RK
52af3abedc run ruff via pre-commit 2024-03-11 09:39:10 +01:00
Min RK
25da2c2ad3 run ruff in pre-commit 2024-03-11 09:37:59 +01:00
Min RK
6d4e17c531 lint: bare exceptions
E722
2024-03-11 09:35:51 +01:00
Min RK
e15b7c2620 apply pyupgrade fixes via ruff
ruff check --fix --select UP
2024-03-11 09:16:02 +01:00
Min RK
5e166970fa easier linting in jupyterhub_config
noqa get_import satisfies most linters
2024-03-11 09:16:02 +01:00
Erik Sundell
4375c2db96 Merge pull request #4723 from minrk/admin-page-naviate
admin: update navigation for react-router v6
2024-03-08 17:28:47 +01:00
Min RK
b0235527ab fix table hierarchy in property editor
don't nest trs in trs
2024-03-08 14:34:55 +01:00
Min RK
77e625d36d update navigation for react-router v6 2024-03-08 14:29:16 +01:00
Min RK
bfe143f1ac Merge pull request #4722 from minrk/sort-order-admin-ui
server-side sorting of admin page
2024-03-08 13:10:46 +01:00
Min RK
871f747597 tst: expect count to start from 0 when no items displayed 2024-03-08 12:59:13 +01:00
Min RK
d0665a9f21 update tests for sort, state filter 2024-03-08 12:01:38 +01:00
Min RK
f47d0a1524 space all the way around action buttons
4px margin matches 8px cell padding (margin is added on both sides)

and center when buttons collapse to single column
2024-03-08 10:20:35 +01:00
Min RK
d87e2dd3ae fix GET /users?include_stopped_servers when users aren't in UserDict
server model needs high-level User object for `progress_url` (it probably shouldn't)
2024-03-08 09:50:31 +01:00
Min RK
e540963f20 admin: move active-servers filter to top
next to name filter, so it's not in the table headings

merges Running & Actions columns,
since it's really just Actions now (server actions & user actions)
2024-03-08 09:49:23 +01:00
Min RK
bc3bb47672 pagination: fix offset display when there are 0 results 2024-03-08 09:06:46 +01:00
Min RK
8cbe1eac2b use URL api to construct API url
avoids imperfect logic detecting `?`
2024-03-08 09:05:55 +01:00
Min RK
78a796cea6 server-side sorting of admin page
removes in-page sort, which removes sort by server name, sort by running

Running column switches from sort to filter, matching the `?state` query parameter in the API

needs some CSS on the column widths to avoid jumps when toggling active servers
2024-03-06 23:16:43 +01:00
Erik Sundell
943e4a7072 Merge pull request #4720 from minrk/persist-offset-limit
admin: persist page view parameters in url
2024-03-06 17:24:36 +01:00
Simon Li
af396ec8d6 Merge pull request #4700 from minrk/redocly
Use redoc for REST API
2024-03-06 16:05:16 +00:00
Erik Sundell
41379bfe8c Merge pull request #4721 from minrk/sort-order-admin
Implement sort order in GET /users
2024-03-06 14:03:52 +01:00
Min RK
eab6065a26 update rest api spec for sort
don't use enum, which is a poor fit for `-` prefix,
instead give some examples
2024-03-06 13:31:48 +01:00
Min RK
86b3d8dc79 follow jsonapi spec for sort parameter 2024-03-06 11:40:56 +01:00
Min RK
3492cebec2 fix offset display in pagination
first 50 is 1-50, not 0-50
2024-03-06 10:44:24 +01:00
Min RK
a09862cb1b restore resetting offset when name filter changes 2024-03-06 10:30:36 +01:00
Min RK
f5bfe6a773 address some eslint 2024-03-06 10:21:02 +01:00
Min RK
a6e32deeb1 refactor mock dashboard in tests
reusable mock function with overrides for props (mostly API methods), rather than duplicate invocations

makes updating to v6 way easier
2024-03-06 10:12:46 +01:00
Min RK
38dc781271 update react-router-dom to v6
don't need v5-compat
2024-03-06 10:10:04 +01:00
Min RK
f4f30db334 sinon clock doesn't seem to help
jest has what we need already
2024-03-06 02:02:15 +01:00
Min RK
f13e69b172 get most jsx tests passing 2024-03-06 02:01:49 +01:00
Min RK
87bf84d05f jsx: build directly in destination
removes `npm run place`, allows build:watch
2024-03-06 00:27:18 +01:00
Min RK
fd78a03280 move pagination state entirely to URL params
don't duplicate it state variables
2024-03-06 00:23:38 +01:00
Min RK
4d8f86fe63 mysql doesn't support NULLS FIRST
and sqlalchemy isn't magic
2024-03-05 16:11:13 +01:00
Min RK
5ac5850037 explicit null ordering required
for consistent sorting across backends
2024-03-05 15:24:14 +01:00
Min RK
8a8ccd068c Merge pull request #4682 from yuvipanda/fixxxxxxxxxxxx
Note that you can throw a 403 from check_allowed
2024-03-05 09:46:58 +01:00
Min RK
911513435b serve redoc fonts instead of cross-domain embed 2024-03-05 09:43:14 +01:00
Min RK
6dc9dccbb7 has_content typo
Co-authored-by: Simon Li <orpheus+devel@gmail.com>
2024-03-05 08:55:20 +01:00
Min RK
557e200dcf Merge pull request #4717 from kreuzert/main
allow callable values in c.JupyterHub.template_vars
2024-03-05 08:54:07 +01:00
Min RK
cabc05f7dd admin: persist page view info in url parameters
- persist offset, limit, name_filter in URL parameters,
  so they are stable across page reload
- add UI element to specify items per page

This allows specifying a URL, which will show a specific view of a page of users
2024-03-04 15:39:11 +01:00
Min RK
8303633527 Implement sort order in GET /users
support sorting by id (current, default), name, last_activity

Names and definitions match GitHub REST API
2024-03-04 12:31:14 +01:00
Tim Kreuzer
c66fca73af update helpstring for template_vars 2024-03-04 10:52:52 +01:00
Min RK
be1848fba0 clarify that web.HTTPError may be raised anywhere in the auth process 2024-03-04 10:42:41 +01:00
pre-commit-ci[bot]
e694bad314 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-03-04 09:38:32 +00:00
Tim Kreuzer
ee8d8f68ee always pass user as argument 2024-03-04 10:37:59 +01:00
Tim Kreuzer
5c18b0d450 allow current user as parameter for template_vars values 2024-03-02 21:51:50 +01:00
Tim Kreuzer
b659627044 update help text for template_vars parameter 2024-03-01 19:54:26 +01:00
Tim Kreuzer
1b88eb67a3 allow callable values in c.JupyterHub.template_vars 2024-03-01 18:43:33 +01:00
Erik Sundell
9c3f98d427 Merge pull request #4713 from minrk/resolve-exclude-home
resolve paths in disable_user_config
2024-02-27 14:04:39 +01:00
Min RK
c281c82220 resolve paths in disable_user_config
handles home directory being a symlink
2024-02-27 13:25:53 +01:00
Min RK
da128fb99b Merge pull request #4708 from rizz-sd/spawner_minor_broken_doc
Minor broken docs: reference to wiki removed, #4653 fixed
2024-02-26 11:28:57 +01:00
Min RK
58ada78dc2 apply suggestion from code review 2024-02-26 11:19:03 +01:00
Min RK
b7dffc7afc add rest-api-{operation} xref targets, so we can link to our own REST API 2024-02-22 11:03:01 +01:00
Erik Sundell
ed8a531b85 Merge pull request #4712 from Ph0tonic/patch-2
Update `black.target_version` in `pyproject.toml`
2024-02-22 08:36:47 +01:00
Bastien Wermeille
654c2c8fc1 Update target_version in pyproject.toml 2024-02-22 08:02:03 +01:00
Ritika Agrawal
7f6e501ad3 Minor broken docs: reference to wiki removed, #4653 fixed
Minor broken docs: reference to wiki removed, #4653 fixed
2024-02-15 01:50:28 +05:30
Erik Sundell
135be72470 Merge pull request #4706 from minrk/allowed_users_docstring
Update allowed_users docstring
2024-02-13 12:51:33 +01:00
Min RK
6c13c83144 Update allowed_users docstring
conflict less with Authenticator subclasses that extend allow behavior
2024-02-13 11:58:39 +01:00
Min RK
c8860649f9 Merge pull request #4679 from manics/unescape-jinja-username
Unescape jinja username
2024-02-12 12:54:03 +01:00
Erik Sundell
efd6ae357c Merge pull request #4704 from minrk/bump-pythons
bump pythons, base images on CI
2024-02-12 10:45:28 +01:00
Erik Sundell
c45f4b44d9 Merge pull request #4703 from minrk/test-312
test Python 3.12
2024-02-12 10:45:12 +01:00
Min RK
3bc9e2ff9b json_escaped_name is safe 2024-02-12 10:28:13 +01:00
Min RK
bbb3aee386 bump pythons, base images on CI
several Python 3.9->3.11
ubuntu 20.04->22.04
node 16->20
2024-02-12 10:22:01 +01:00
Min RK
80c4041036 test Python 3.12 2024-02-12 10:15:47 +01:00
Min RK
3286afd848 remove unused x-codegen-body-name 2024-02-07 16:01:21 +01:00
Min RK
e1f144ad79 update rest-api scopes
now that they are visible, some weren't quite right
2024-02-07 16:00:21 +01:00
Min RK
5cddce343d make sure types are declared in spec linter 2024-02-07 15:32:53 +01:00
Min RK
9a75622ee5 stricter api lint
error instead of warn, otherwise CI will pass
2024-02-07 14:20:06 +01:00
Min RK
a033653918 add rest-api to top-level reference index 2024-02-07 13:17:55 +01:00
Min RK
c15116c76c only download redoc.js for html builder 2024-02-07 13:16:46 +01:00
Min RK
ffa07afd80 fix nullable items found by linter 2024-02-07 13:12:03 +01:00
Min RK
c520102008 satisfly redocly lint with operationIds
operationIds don't need to be meaningful, but they are used in links, so should be stable
2024-02-07 12:54:51 +01:00
Min RK
3a8851004c use redocly lint on rest api 2024-02-07 12:54:15 +01:00
Min RK
ded7610b88 update openapi to 3.1.0
allows uncommenting our DELETE body spec
2024-02-07 12:39:20 +01:00
Min RK
829c65d76e add link back to rest of docs from rest-api
because rest-api has no nav elements
2024-02-07 12:32:13 +01:00
Min RK
0082f5b3da generate rest API with redoc
via custom template
2024-02-07 12:30:57 +01:00
Min RK
2c93299764 Merge pull request #4699 from minrk/clarify-user-security
clarify some points where users can disable security for their own servers
2024-02-07 08:35:38 +01:00
Min RK
41fff711e7 user-initiated sharing (#4594)
Squashed merge of https://github.com/jupyterhub/jupyterhub/pull/4594

Co-authored-by: Samuel Gaist <samuel.gaist@idiap.ch>
2024-02-07 08:34:39 +01:00
Min RK
a20b29fb1c clarify some points where users can disable security for their own servers 2024-02-06 13:28:59 +01:00
Min RK
4555d5bbb2 Merge pull request #4693 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-02-06 08:18:06 +01:00
pre-commit-ci[bot]
ef568e3d61 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-02-05 20:27:29 +00:00
pre-commit-ci[bot]
1171bdcef6 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/psf/black: 23.12.1 → 24.1.1](https://github.com/psf/black/compare/23.12.1...24.1.1)
- [github.com/PyCQA/flake8: 6.1.0 → 7.0.0](https://github.com/PyCQA/flake8/compare/6.1.0...7.0.0)
2024-02-05 20:26:34 +00:00
Erik Sundell
77e90051fd Merge pull request #4686 from jupyterhub/dependabot/github_actions/codecov/codecov-action-4
Bump codecov/codecov-action from 3 to 4
2024-02-01 10:20:36 +01:00
dependabot[bot]
8703df341f Bump codecov/codecov-action from 3 to 4
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-01 05:56:48 +00:00
Erik Sundell
5c91f3cad7 Merge pull request #4684 from minrk/pytest8
enable log capture in pytest, compatibility with pytest 8
2024-01-30 14:32:08 +01:00
Min RK
4712802b45 enable log capture in pytest
- better periodic callback cleanup to reduce warnings
- fix log-assertion tests to use caplog instead of pytest.warns, which wasn't correct
2024-01-30 14:10:37 +01:00
Erik Sundell
9fa196092f Merge pull request #4683 from minrk/check-allow-later
don't run check_allowed until after check_blocked_users resolves
2024-01-26 12:38:34 +01:00
Min RK
000b42bdcf don't run check_allowed until after block resolves
avoids computing an unused value if blocked_pass is going to halt authorization anyway

no change in behavior
2024-01-26 11:24:42 +01:00
YuviPanda
7f8eef5e19 Note that you can throw a 403 from check_allowed
From https://github.com/jupyterhub/oauthenticator/pull/719#pullrequestreview-1838530737
2024-01-25 14:05:21 -08:00
Erik Sundell
041acbc0bf Merge pull request #4608 from minrk/oauth-state-cookie
move service oauth state from cookies to memory
2024-01-25 10:28:01 +01:00
Min RK
2c7fe93212 clarify private oauth state persistence docstring 2024-01-25 09:54:45 +01:00
Min RK
41a2e29f27 Merge pull request #4676 from thedataincubator/whoami-scope
Add appropriate scope in examples/service-whoami-flask
2024-01-25 09:39:17 +01:00
Min RK
c9b7b9b224 sync with main
# Conflicts:
#	jupyterhub/services/auth.py
2024-01-25 09:35:31 +01:00
Erik Sundell
46fbd0465e Merge pull request #4677 from minrk/expires_in_validate
Improve validation, docs for token.expires_in
2024-01-25 00:19:33 +01:00
Erik Sundell
92da2c12fd Merge pull request #4479 from minrk/jupyterhub-public-url
add JupyterHub.public_url config
2024-01-24 23:56:58 +01:00
Min RK
47e8bbaf5e regen rest-api 2024-01-23 10:48:49 +01:00
Min RK
d3d6d0a997 document 0 for no expiration
Co-authored-by: Simon Li <orpheus+devel@gmail.com>
2024-01-23 10:47:26 +01:00
Simon Li
5663964bf4 Unescape jinja escaped username in html page 2024-01-20 21:00:59 +00:00
Simon Li
35fe5f3bd2 browser tests: use username with special chars to check escapes/unescapes 2024-01-20 21:00:57 +00:00
Simon Li
c69dcdd0ed Fix some typos in tests/browser/test_browser.py 2024-01-20 15:02:56 +00:00
Yuvi Panda
ab588c28ce Merge pull request #4678 from manics/pre_spawn_hook-doc
pre_spawn_hook doc: make example generic to all spawners
2024-01-19 18:42:32 -08:00
Robert Schroll
551c65243c Black and Prettier formatting 2024-01-19 18:11:34 -08:00
Robert Schroll
1d9182dd82 Black formatting 2024-01-19 17:26:36 -08:00
Simon Li
547543b888 pre_spawn_hook doc: make example generic to all spawners 2024-01-19 12:01:36 +00:00
Min RK
8c3596d923 Improve validation, docs for token.expires_in
- accept 0 meaning no expiration, since folks have tried to use it that way
- clear error message for invalid (e.g. negative) values
- specify example in rest api doc so it doesn't default to invalid `0`
- better error if orm token fails to be retrieved
2024-01-19 10:23:49 +01:00
Robert Schroll
e879ab18e2 examples/service-whoami-flask: Fix return types in oauth_callback
In my testing, Flask 3.0.0 doesn't accept returning only an integer
(as an error code) in a handler.  A (content, status) tuple does
work.  I don't know if this is a recent change, or if this has always
been broken, but the tuple return should be good for older Flask
versions as well.
2024-01-18 15:18:26 -08:00
Robert Schroll
8a5fc8044a examples/service-whoami-flask: Add scope to user role
For ordinary users to access the service, they need an appropriate
scope added to the user role.  This adds that role in the
jupyterhub_config.py, as well as a note about this in the README.
It also updates the ouptut that comes form the whoami service.
2024-01-18 15:15:44 -08:00
Min RK
68c12d4d32 typo
Co-authored-by: Simon Li <orpheus+devel@gmail.com>
2024-01-15 12:54:52 +01:00
Min RK
965e4a91d6 update linkcheck to ignore example.org/com 2024-01-15 12:28:30 +01:00
Min RK
1a5220d5d8 Consistent example public_url
with jupyterhub.example.org

Co-authored-by: Simon Li <orpheus+devel@gmail.com>
2024-01-15 10:04:45 +01:00
dependabot[bot]
cc9d9e435a Merge pull request #4670 from jupyterhub/dependabot/npm_and_yarn/jsx/follow-redirects-1.15.4 2024-01-11 23:29:57 +00:00
Simon Li
efb5789dea Merge pull request #4671 from minrk/nginx-http-host
use $http_host in nginx proxy header
2024-01-11 23:23:43 +00:00
Min RK
4dd430e080 Merge branch 'main' into jupyterhub-public-url 2024-01-11 10:24:44 +01:00
Min RK
2f091e5300 Merge pull request #4665 from minrk/deprecated-utc
avoid deprecated datetime.utcnow
2024-01-11 10:21:18 +01:00
Min RK
603c59a307 use $http_host in nginx proxy header
$host is the hostname, $http_host is `hostname[:port]`, which is what's needed here

$host works fine in the example because it uses the default port 80, but if it's on a different port
it will differ from the http Host header, resulting in cross-origin check errors.
2024-01-11 09:17:08 +01:00
dependabot[bot]
0758b661df Bump follow-redirects from 1.15.2 to 1.15.4 in /jsx
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.2 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.2...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-11 00:51:10 +00:00
Erik Sundell
a11816bff8 Merge pull request #4666 from jupyterhub/dependabot/github_actions/actions/upload-artifact-4
Bump actions/upload-artifact from 3 to 4
2024-01-03 07:53:20 +01:00
Erik Sundell
a5b1b02220 Merge pull request #4667 from jupyterhub/dependabot/github_actions/actions/setup-python-5
Bump actions/setup-python from 4 to 5
2024-01-03 07:52:30 +01:00
Erik Sundell
935a366fd3 Merge pull request #4652 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-01-03 07:49:43 +01:00
pre-commit-ci[bot]
00bab929fc [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pycqa/isort: 5.12.0 → 5.13.2](https://github.com/pycqa/isort/compare/5.12.0...5.13.2)
- [github.com/psf/black: 23.10.1 → 23.12.1](https://github.com/psf/black/compare/23.10.1...23.12.1)
- [github.com/pre-commit/mirrors-prettier: v3.0.3 → v4.0.0-alpha.8](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.3...v4.0.0-alpha.8)
2024-01-01 20:22:32 +00:00
dependabot[bot]
3f44c75fbc Bump actions/setup-python from 4 to 5
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-01 05:39:51 +00:00
dependabot[bot]
1f596793c6 Bump actions/upload-artifact from 3 to 4
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-01 05:39:48 +00:00
Min RK
be14baf096 avoid deprecated datetime.utcnow
deprecated in Python 3.12

replace with equivalent utils.utcnow(with_tz=False)
2023-12-20 14:23:49 +01:00
Min RK
ab82b8e492 Merge pull request #4658 from manics/hub-singleuser-versions-major-only
Compare major hub and singleuser versions only
2023-12-18 15:38:38 +01:00
Min RK
7532ba1310 Merge pull request #4663 from minrk/temp-pin-pytest-asyncio
temporarily pin pytest-asyncio
2023-12-18 15:16:41 +01:00
Min RK
8f2ad59254 temporarily pin pytest-asyncio
0.23 introduces breaking changes
2023-12-18 14:59:29 +01:00
Min RK
ebca6af1fd Merge pull request #4662 from yuvipanda/minor-change-to-contributing-docs
docs: Remove non-actionable step from developer setup
2023-12-18 08:37:28 +01:00
YuviPanda
a142876a4e docs: Remove non-actionable step from developer setup
I just went through these with @jmunroe, and found the
db step a little confusing - there is no action to really be
taken here, as pretty much everyone just uses sqlite for
development (and even production). So I've just removed that
step, as python almost always ships with sqlite built into it.
2023-12-17 13:05:19 -08:00
Simon Li
7bf4efd3f8 Merge pull request #4651 from minrk/ipython-handler-removed
avoid attempting to patch removed IPythonHandler with notebook v7
2023-12-09 14:52:06 +00:00
Simon Li
b0517a96d5 Compare major hub and singleuser versions only
JupyterHub uses semantic versioning and has been >1.0.0 for a long time. It should be fine for the hub and singleuser versions to differ in their minor component.
2023-12-09 14:24:29 +00:00
Min RK
fca5e9365c Merge pull request #4645 from minrk/manage-groups-required
explicitly require groups in auth model when Authenticator.manage_groups is enabled
2023-12-04 09:46:34 +01:00
Min RK
f7434008b4 Merge pull request #4630 from minrk/fix-redirect-403
avoid setting unused oauth state cookies on API requests
2023-12-04 08:58:13 +01:00
Simon Li
fcc0669492 Merge pull request #4650 from jupyterhub/dependabot/npm_and_yarn/jsx/adobe/css-tools-4.3.2
Bump @adobe/css-tools from 4.3.1 to 4.3.2 in /jsx
2023-12-01 12:32:46 +00:00
Min RK
377681c796 avoid attempting to patch removed IPythonHandler with notebook v7
it's been removed
2023-12-01 09:59:48 +01:00
dependabot[bot]
aea3d7c71c Bump @adobe/css-tools from 4.3.1 to 4.3.2 in /jsx
Bumps [@adobe/css-tools](https://github.com/adobe/css-tools) from 4.3.1 to 4.3.2.
- [Changelog](https://github.com/adobe/css-tools/blob/main/History.md)
- [Commits](https://github.com/adobe/css-tools/commits)

---
updated-dependencies:
- dependency-name: "@adobe/css-tools"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-01 05:47:31 +00:00
Simon Li
6ba43d06b6 Merge pull request #4648 from minrk/poll_jitter
add Spawner.poll_jitter
2023-11-30 16:41:43 +00:00
Min RK
11ea8f40d5 add Spawner.poll_jitter
to avoid alignment of poll callbacks, e.g. after Hub restart
2023-11-30 09:43:35 +01:00
Simon Li
73b2307b36 Merge pull request #4644 from minrk/better-token-logs
Log token deletions via API
2023-11-28 14:14:42 +00:00
Min RK
e81ca0b386 explicitly require groups in auth model when Authenticator.manage_groups is enabled
avoids the experience of silently ignored config for Authenticators that don't support manage_groups
2023-11-28 13:02:36 +01:00
Min RK
a110504aa7 Log token deletions via API 2023-11-28 12:53:27 +01:00
Erik Sundell
7000cea8ec Merge pull request #4643 from minrk/debug-client-id
add warning when an oauth client is used after its secret is deleted
2023-11-28 10:48:56 +01:00
Min RK
6e1b18315a add warning when an oauth client is used after its secret is deleted
the client cannot be used for much anymore, so this situation is likely caused by an error,
so we should notice it.
2023-11-28 10:26:00 +01:00
Min RK
2ecb31b1ad Merge pull request #4642 from mathbunnyru/fix_registry_overviews
Use jupyterhub repository_owner in registry-overviews
2023-11-24 16:29:08 +01:00
Ayaz Salikhov
704cec4133 Use jupyterhub repository_owner in registry-overviews 2023-11-24 16:16:17 +01:00
Min RK
3fe576eb93 Merge pull request #4632 from minrk/accept-empty
simplify, avoid errors in parsing accept headers
2023-11-24 16:16:12 +01:00
BenGig
41c5be8fbe ETHZ added to references in documentation (#4638)
Co-authored-by: Katrin Bentel <43048197+KatrinIB@users.noreply.github.com>
2023-11-24 16:15:49 +01:00
Min RK
582533527d Merge pull request #4634 from mathbunnyru/add_registry_overviews_workflow
Add workflow to update registry overviews
2023-11-24 16:13:44 +01:00
Min RK
6edd440aae Merge pull request #4640 from jupyterhub/dependabot/github_actions/dessant/support-requests-4
Bump dessant/support-requests from 3 to 4
2023-11-24 16:12:33 +01:00
Min RK
7613ba170f Merge pull request #4641 from consideRatio/dockerhub-alongside-quay
Publish to Docker Hub alongside Quay.io
2023-11-24 16:11:54 +01:00
Erik Sundell
6d91e5a4b2 Publish to Docker Hub alongside Quay.io 2023-11-24 15:26:36 +01:00
Erik Sundell
e881b9487f Merge pull request #4639 from jupyterhub/dependabot/github_actions/jupyterhub/action-major-minor-tag-calculator-3
Bump jupyterhub/action-major-minor-tag-calculator from 2 to 3
2023-11-23 21:45:36 +01:00
dependabot[bot]
2721081a51 Bump dessant/support-requests from 3 to 4
Bumps [dessant/support-requests](https://github.com/dessant/support-requests) from 3 to 4.
- [Release notes](https://github.com/dessant/support-requests/releases)
- [Changelog](https://github.com/dessant/support-requests/blob/main/CHANGELOG.md)
- [Commits](https://github.com/dessant/support-requests/compare/v3...v4)

---
updated-dependencies:
- dependency-name: dessant/support-requests
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-23 19:04:34 +00:00
dependabot[bot]
4a42d2ea01 Bump jupyterhub/action-major-minor-tag-calculator from 2 to 3
Bumps [jupyterhub/action-major-minor-tag-calculator](https://github.com/jupyterhub/action-major-minor-tag-calculator) from 2 to 3.
- [Release notes](https://github.com/jupyterhub/action-major-minor-tag-calculator/releases)
- [Changelog](https://github.com/jupyterhub/action-major-minor-tag-calculator/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jupyterhub/action-major-minor-tag-calculator/compare/v2...v3)

---
updated-dependencies:
- dependency-name: jupyterhub/action-major-minor-tag-calculator
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-23 19:04:30 +00:00
Min RK
0a32ad63f8 Merge pull request #4633 from manics/doc-auth-ref
Authenticator reference doc: update authenticate return
2023-11-21 10:12:50 +01:00
Simon Li
79e75be9f3 authenticator reference doc: mention admin and RBAC 2023-11-17 23:31:53 +00:00
Ayaz Salikhov
690b583e80 Add missing dep files 2023-11-17 14:06:58 +01:00
Ayaz Salikhov
4eedc59090 Add workflow to update registry overviews 2023-11-17 14:01:37 +01:00
Simon Li
99d72dfccf authenticator reference doc: update authenticate return 2023-11-16 19:16:54 +00:00
Min RK
96f20cf2b0 simplify, avoid errors in parsing accept headers 2023-11-16 11:14:24 +01:00
Min RK
29bb4b8032 Merge pull request #4578 from minrk/doc-token-scopes
Improve requests for tokens with scopes
2023-11-13 15:31:25 +01:00
Min RK
d2bff90f17 support specifying token permissions in UI
- add scopes field to token form
- add permissions column to token tables
- expand docs on specifying token scopes, including api example
2023-11-13 12:27:08 +01:00
Min RK
277d5a3e97 error handling in POST /api/users/:user/tokens
several invalid permissions produced 500 instead of 400
2023-11-13 12:25:49 +01:00
marcwit
e633199ea9 only show links to services users have access to (#4585) 2023-11-13 11:46:45 +01:00
Min RK
25df187e37 Merge pull request #4563 from minrk/domain-cookie
only set 'domain' field on session-id cookie
2023-11-13 11:21:58 +01:00
Min RK
6da692523c avoid setting unused oauth state cookies on API requests
get_login_url may raise 403 to short-circuit redirects,
so don't create the oauth state cookie until _after_ that has happened
2023-11-13 10:16:38 +01:00
Min RK
5e570f94b6 Merge pull request #4627 from eeeeeeeason/main
doc: Add the include_stopped_server field to the /users/name interface
2023-11-10 15:19:12 +01:00
Min RK
46a1e2b75d Merge pull request #4628 from uellue/allgroups
Include LDAP groups in local spawner gids
2023-11-10 15:18:01 +01:00
Yuvi Panda
4a12f7904f Merge pull request #4615 from minrk/event-loop-tick-metric
add event_loop_interval_seconds metric
2023-11-10 15:03:00 +05:30
Min RK
1a0fec74cf add caveats to event_loop_interval_resolution help string
explain that increasing resolution isn't worth it
2023-11-10 10:20:13 +01:00
Min RK
ac2c74e5f3 increase resolution of event-loop-tick metric to 5ms below 50ms 2023-11-09 09:26:59 +01:00
pre-commit-ci[bot]
f8d7e7f06b [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-11-08 14:13:34 +00:00
linyucheng
d5bc3856aa doc: Add the include_stopped_server field to the /users/name interface 2023-11-08 21:47:35 +08:00
Dieter Weber
e8429ad5e0 Also include LDAP groups
The original code only returned local groups, at least with a Kerberos and LDAP
setup with CentOS 7.
2023-11-08 14:30:37 +01:00
Min RK
cf69c0a4cb Merge pull request #4626 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-11-07 14:36:00 +01:00
Simon Li
76d475f152 Merge pull request #4625 from yuvipanda/setup-env
Set env.REGISTRY to be quay.io correctly
2023-11-06 22:52:34 +00:00
pre-commit-ci[bot]
36f8ad2ec3 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-11-06 20:28:09 +00:00
pre-commit-ci[bot]
b939f8af37 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v3.14.0 → v3.15.0](https://github.com/asottile/pyupgrade/compare/v3.14.0...v3.15.0)
- [github.com/psf/black: 23.9.1 → 23.10.1](https://github.com/psf/black/compare/23.9.1...23.10.1)
- [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v4.5.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v4.5.0)
2023-11-06 20:27:16 +00:00
YuviPanda
c614484ea3 Set env.REGISTRY to be quay.io correctly
Follow-up to https://github.com/jupyterhub/jupyterhub/pull/4612,
which is currently making builds fail
2023-11-06 23:05:27 +05:30
Min RK
60802b2b76 Merge pull request #4612 from yuvipanda/qack
Move from dockerhub to quay.io
2023-11-06 13:36:09 +01:00
Yuvi Panda
a8e43198a9 Fix capitalization
Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com>
2023-11-06 14:42:40 +05:30
Simon Li
b75082e1b6 Merge pull request #4623 from jupyterhub/dependabot/github_actions/actions/setup-node-4
Bump actions/setup-node from 3 to 4
2023-11-01 10:14:02 +00:00
dependabot[bot]
982e2e8e6c Bump actions/setup-node from 3 to 4
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-01 05:18:48 +00:00
Erik Sundell
70a3e5fb9c Merge pull request #4619 from varundhand/main
FIx: typo in auth.py
2023-10-29 19:01:47 +01:00
Varun Dhand
f47165b5d2 Update auth.py 2023-10-29 23:16:39 +05:30
Erik Sundell
f1a2f7d2d0 Merge pull request #4618 from minrk/flaky-browser
browser test: wait for token request to finish before reloading
2023-10-27 13:32:23 +02:00
Erik Sundell
2bde84d452 Merge pull request #4617 from minrk/flaky-external-proxy
try to improve reliability of test_external_proxy
2023-10-27 13:31:07 +02:00
Min RK
40df3cda62 browser test: wait for token request to finish before reloading
this may be the cause of flaky tests where there are no tokens to list
2023-10-27 12:57:59 +02:00
Min RK
b4d8d67c75 try to improve reliability of test_external_proxy
- use random ports instead of pre-specified numbers, which may collide
- mark test as flaky to give it a second chance to succeed
2023-10-27 12:57:01 +02:00
Erik Sundell
cafe193504 Merge pull request #4616 from minrk/fix-token-url
test: ensure test server is added to proxy before talking to it
2023-10-27 12:40:07 +02:00
Min RK
3a52b5be72 test: ensure test server is added to proxy before talking to it
this should fix some flaky test failures in test_singleuser

not sure why it doesn't _always_ fail
2023-10-27 12:21:19 +02:00
Min RK
5108a987fb fix iteration over cookie options 2023-10-27 11:25:18 +02:00
Min RK
63e3f91ee0 clear all oauth cookies on first successful oauth
prevents leftover stale state
2023-10-27 10:30:57 +02:00
Min RK
c3510d2853 move service oauth state fields to in-memory
only use a random token as the actual oauth state,
and use a local cache dict to store the extra info like cookie_name, next_url

this avoids the state field getting too big and passing local browser-server info to anyone else
2023-10-27 10:26:53 +02:00
Min RK
20c39d474a add event_loop_interval_seconds metric
measures event loop responsiveness

uses a Histogram to track how many iterations fit in a given bucket
2023-10-26 14:25:36 +02:00
YuviPanda
2a1f82d7a9 Remove non-working quay.io shield 2023-10-23 14:00:28 +05:30
YuviPanda
f5cf87d91b Don't tell people to use :latest 2023-10-23 11:30:11 +05:30
Erik Sundell
04eb9ca5ea docs: future proof example referencing version 1.4.0 by using latest 2023-10-23 00:04:45 +02:00
YuviPanda
f366b785a3 Move from dockerhub to quay.io
See https://github.com/jupyterhub/team-compass/issues/688
for context.

I've also added `QUAY_USERNAME` and `QUAY_PASSWORD` to environment
secrets, but *not* `env.REGISTRY`. I will do so once this gets
merged.
2023-10-22 10:27:42 +05:30
Min RK
26a744456b Merge pull request #4607 from jupyterhub/dependabot/npm_and_yarn/jsx/babel/traverse-7.23.2
Bump @babel/traverse from 7.22.5 to 7.23.2 in /jsx
2023-10-20 10:09:45 +02:00
dependabot[bot]
21e7cc53f9 Bump @babel/traverse from 7.22.5 to 7.23.2 in /jsx
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.22.5 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-19 10:22:55 +00:00
Erik Sundell
0d6c27ca1d Merge pull request #4603 from yuvipanda/nokpy
Remove links to okpy from docs
2023-10-16 06:58:42 +02:00
Yuvi Panda
c5e11e4d7a Merge pull request #4602 from johncf/johncf-patch-1
Change `db_url` schema in docs from `postgres` to `postgresql`
2023-10-16 09:52:25 +05:30
YuviPanda
b50fa894ad Remove links to okpy from docs
These were removed in
https://github.com/jupyterhub/oauthenticator/pull/691,
and now the link checker is not happy.
2023-10-16 09:49:50 +05:30
John Charankattu
1ed2c4d07d DOC change db_url schema from postgres to postgresql
sqlalchemy no longer supports postgres schema
2023-10-13 19:51:51 +05:30
Simon Li
70717dc9ab Merge pull request #4599 from jupyterhub/dependabot/npm_and_yarn/jsx/postcss-8.4.31
Bump postcss from 8.4.24 to 8.4.31 in /jsx
2023-10-04 09:48:08 +01:00
dependabot[bot]
f8ec54c3e0 Bump postcss from 8.4.24 to 8.4.31 in /jsx
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.24 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.24...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-04 03:13:34 +00:00
Yuvi Panda
6f0e4e1f7d Merge pull request #4598 from minrk/un-yarn
jsx: trade yarn for npm
2023-10-03 20:12:59 -07:00
Min RK
c689ec726d jsx: trade yarn for npm
we're already using npm at the top-level, using both yarn and npm complicates things

- stop excluding package-lock.json from the repo
2023-10-03 14:40:10 +02:00
Min RK
5deb594933 Merge pull request #4597 from minrk/nodesource
update nodesource installation in docker
2023-10-03 14:35:06 +02:00
Erik Sundell
671ae3c0d7 Merge pull request #4596 from minrk/fix-docker
fix package_data in docker images
2023-10-03 13:43:29 +02:00
Min RK
8a6fab9673 update nodesource installation
old script is deprecated and adds 60 second delay to builds

update build node to 20 while we're at it
2023-10-03 13:26:47 +02:00
Min RK
3baae644d6 fix setuptools-scm in docker
- needs git, .git files
- needs setuptools_scm config section in pyproject.toml
2023-10-03 13:00:59 +02:00
Min RK
00777568d0 verify installed data files in docker images 2023-10-03 13:00:42 +02:00
Erik Sundell
e5b52b9ac5 Merge pull request #4595 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-10-03 12:38:34 +02:00
pre-commit-ci[bot]
7a5a21be29 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v3.10.1 → v3.14.0](https://github.com/asottile/pyupgrade/compare/v3.10.1...v3.14.0)
- [github.com/psf/black: 23.7.0 → 23.9.1](https://github.com/psf/black/compare/23.7.0...23.9.1)
2023-10-03 10:33:36 +00:00
Min RK
29e954c407 Merge pull request #4588 from jupyterhub/dependabot/github_actions/docker/build-push-action-5
Bump docker/build-push-action from 4 to 5
2023-10-02 11:56:51 +02:00
dependabot[bot]
7e3b0008f8 Bump docker/build-push-action from 4 to 5
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4 to 5.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-01 08:52:41 +00:00
Erik Sundell
02622edcc6 Merge pull request #4589 from jupyterhub/dependabot/github_actions/docker/setup-qemu-action-3
Bump docker/setup-qemu-action from 2 to 3
2023-10-01 10:52:07 +02:00
dependabot[bot]
f89fd26d92 Bump docker/setup-qemu-action from 2 to 3
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-01 08:26:18 +00:00
Erik Sundell
f0ed10091b Merge pull request #4590 from jupyterhub/dependabot/github_actions/docker/setup-buildx-action-3
Bump docker/setup-buildx-action from 2 to 3
2023-10-01 10:25:26 +02:00
Erik Sundell
6175819f54 Merge pull request #4591 from jupyterhub/dependabot/github_actions/actions/checkout-4
Bump actions/checkout from 3 to 4
2023-10-01 10:08:07 +02:00
dependabot[bot]
9f8516d47e Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-01 05:54:39 +00:00
dependabot[bot]
c5c72cddfc Bump docker/setup-buildx-action from 2 to 3
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-01 05:54:35 +00:00
Erik Sundell
060ef8be58 Merge pull request #4586 from minrk/linux-die
skip linkcheck for linux.die.net
2023-09-29 12:06:09 +02:00
Min RK
6905c75cea skip linkcheck for linux.die.net
links work, but site seems to block linkcheck requests from CI with 403
2023-09-29 11:10:45 +02:00
Min RK
1b7ca1e5de Merge pull request #4568 from LexiJess/main
Update gallery-jhub-deployments.md
2023-09-29 11:02:28 +02:00
Yuvi Panda
be96990258 Fix link syntax
Co-authored-by: Min RK <benjaminrk@gmail.com>
2023-09-27 10:37:22 -07:00
Simon Li
be9f9b18d2 Merge pull request #4583 from minrk/go-away-dependabot
move oldest-dependencies to requirements.old
2023-09-26 09:47:22 +01:00
Min RK
4433efe14d move oldest-dependencies to requirements.old
to avoid dependabot alerts
2023-09-26 09:44:35 +02:00
Erik Sundell
f5baa7b55c Merge pull request #4571 from minrk/pin-down-oldest
TST: apply lower-bound pins during install, rather than later
2023-09-25 15:52:54 +02:00
Min RK
a1ec5bb09a support classic notebook server in test extension 2023-09-25 14:54:25 +02:00
Min RK
f7b5d8e4c5 try frozen env for oldest-dependencies
should avoid broken envs due to updates, when checking against outdated envs is the point
2023-09-25 14:09:50 +02:00
Min RK
577c93c70a Merge pull request #4570 from minrk/fix-filter-union
fix mutation of frozenset in scope intersection
2023-09-25 12:30:55 +02:00
Yuvi Panda
1df0e171d4 Merge pull request #4511 from yuvipanda/auth-model
Rename parameter for post_auth_hook to be clearer
2023-09-18 18:09:09 -07:00
Min RK
96c5c52bf9 Merge pull request #4572 from diocas/main
Don't log user model on auth by default
2023-09-15 19:50:49 +02:00
Diogo Castro
8f4764426f Don't log user model on auth by default 2023-09-15 15:56:11 +02:00
Min RK
93fc1d0efa Merge pull request #4567 from jabbera/fix-version-check
Use {base_url}/api for checking hub version
2023-09-15 12:42:48 +02:00
Min RK
01edb634ef fix mutation of frozenset in scope intersection
In the unusual situation of:

1. both sides having a filter on `servers`
2. those filters being different
3. _and_ some permissions are granted via higher-level group or user membership
2023-09-15 09:27:26 +02:00
pre-commit-ci[bot]
fd14ce2de3 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-09-14 13:26:27 +00:00
jabbera
73aa219ebe q 2023-09-13 15:30:51 -04:00
Simon Li
30ed97d153 Merge pull request #4564 from minrk/undeprecate-ip-port
undeprecate JupyterHub.ip/port/base_url
2023-09-13 19:01:17 +01:00
Jessie Hanson
f396c9910e Update gallery-jhub-deployments.md
Adding the Sirepo gateway to the list of Jupyter instances.
2023-09-13 09:53:17 -06:00
Erik Sundell
fbd28ef0fd Merge pull request #4561 from minrk/better-wait-up
Improve debugging when waiting for servers
2023-09-13 16:57:26 +02:00
Erik Sundell
d7849f0d99 Merge pull request #4560 from minrk/set-token-cookie
singleuser extension: persist token from ?token=... url in cookie
2023-09-13 16:17:50 +02:00
Min RK
23fd5bc87e call it _persist_url_token_if_set
instead of _persist_url_token, which suggests it will always do something
2023-09-13 15:21:52 +02:00
Min RK
cbc9f19d6e more detailed, verbose wait for proxy startup 2023-09-13 14:55:43 +02:00
jabbera
6c872b6621 Code review update 2023-09-13 07:56:55 -04:00
jabbera
a431edd813 use {base_url}/api for checking hub version 2023-09-13 07:15:57 -04:00
Erik Sundell
6e0e3e3bf3 Merge pull request #4562 from minrk/startup-stop
Use `user.stop` to cleanup spawners that stopped while Hub was down
2023-09-13 12:35:22 +02:00
Yuvi Panda
f4426ae0df Merge pull request #4555 from minrk/oauth-validate
fail if external oauth service lacks required oauth_redirect_uri
2023-09-12 17:04:17 -07:00
Min RK
71cac7c8f7 only set 'domain' field on session-id cookie
this is the only cookie we share with subdomains on purpose,
rather than setting it on all cookies
2023-09-12 11:20:58 +02:00
Min RK
c8acf6ce36 undeprecate JupyterHub.ip/port/base_url
Setting the full bind_url seems increasingly cumbersome,
as often one only wants to change the url prefix or the ip,
rather than setting the whole thing.
2023-09-12 11:01:09 +02:00
Min RK
27569bc97e Merge pull request #4508 from lrlunin/patch-1
Documentation for RTC for JupyterLab >= 4.0
2023-09-12 10:55:01 +02:00
Min RK
1141216758 pass public urls as JUPYTERHUB_PUBLIC_URL and JUPYTERHUB_PUBLIC_HUB_URL
to spawners and services
2023-09-12 10:45:29 +02:00
Min RK
ff51aa40a5 jupyverse doesn't implement Jupyter-standard token auth 2023-09-12 09:49:16 +02:00
Min RK
a91817280c Use user.stop to cleanup spawners that stopped while Hub was down
for more consistent behavior with failed start or crash while Hub is up
2023-09-12 09:42:50 +02:00
Min RK
550dec4cf8 service: enable oauth on any oauth config
- avoid empty values
- replace single check for redirect_uri with broader _oauth_specified
2023-09-12 09:32:48 +02:00
Min RK
ece8408381 Improve debugging when waiting for servers
Add debug messages and timers for start and end waiting for servers

and improve logic for awaiting proxy endpoints using concurrency primitives instead of a for-loop
2023-09-12 09:27:59 +02:00
Min RK
3b2af29653 singleuser extension: persist token from ?token=... url in cookie
matches pre-extension behavior
2023-09-11 14:35:31 +02:00
Min RK
dbc1585864 Merge remote-tracking branch 'origin/main' into jupyterhub-public-url 2023-09-11 10:32:28 +02:00
Min RK
e1dfc04169 specify that hook args are positional 2023-09-11 10:07:08 +02:00
Yuvi Panda
66f9034dab Merge pull request #4552 from consideRatio/pr/small-services-docs-fixes
Small fixes to services docs
2023-09-08 19:39:22 -07:00
Yuvi Panda
4fe3fe8f12 Merge branch 'main' into pr/small-services-docs-fixes 2023-09-08 19:25:53 -07:00
YuviPanda
841913a1d1 Remove ~ from .HubOAuthenticated reference 2023-09-08 19:18:29 -07:00
Erik Sundell
906d528302 Merge pull request #4556 from minrk/moar-services
add some more service credential docs
2023-09-08 23:45:24 +02:00
Erik Sundell
db39bab3fe Merge pull request #4558 from minrk/fix-doc-build
Remove broken link to BIDS video
2023-09-08 14:46:56 +02:00
Min RK
aa8d8300b1 BIDS Teaching video appears to be gone 2023-09-08 14:40:51 +02:00
Min RK
4838a5a8e5 another pass on oauth_redirect_uri 2023-09-07 18:35:09 +02:00
Min RK
77d7b88b01 Apply suggestions from code review
Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2023-09-07 18:30:08 +02:00
Min RK
d33d0f7dac further clarify Service inputs
- try to be clearer about url
- display only used with url
- doc oauth_client_id and oauth_redirect_uri
2023-09-07 17:11:55 +02:00
Min RK
2e0253197c Merge pull request #4550 from yuvipanda/fix-example-1
Fix external-oauth example jupyterhub_config.py
2023-09-07 09:08:35 +02:00
pre-commit-ci[bot]
42488fdb12 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-09-06 16:45:17 +00:00
YuviPanda
3865df7db0 Move boilerplate to the bottom 2023-09-06 09:41:24 -07:00
Min RK
85ef375cc5 add some more service credential docs 2023-09-06 13:45:59 +02:00
Min RK
effbef373f fail if external oauth service lacks required oauth_redirect_uri config
and log service creation with oauth enabled/disabled
2023-09-06 12:44:49 +02:00
Min RK
e52700e950 Merge pull request #4542 from jabbera/update-test
Fix include_stopped_servers in paginated next_url
2023-09-06 11:02:44 +02:00
Min RK
b3d03a25c0 preserve empty values in pagination next URL 2023-09-06 09:43:00 +02:00
Erik Sundell
1eda00b721 Small fixes to services docs 2023-09-06 09:41:51 +02:00
YuviPanda
53c5a5001b Fix external-oauth example jupyterhub_config.py
- Roles need to be explicitly granted, otherwise you get a
  403. This example predates roles.
- Explicitly set bind_url - without this, JupyterHub itself doesn't
  seem to bind anywhere, and so you just get a 404 when you visit
  whatever port configurable-http-proxy lands on. This is probably
  a separate bug to be investigated, but in the meantime copying
  this from testing/jupyterhub_config.py makes this example actually
  work
- Set DummyAuthenticator as the default, so users can get started
  with this example
2023-09-05 16:27:00 -07:00
Erik Sundell
f416306913 Merge pull request #4549 from yuvipanda/doc-oauth-client-id
Document `oauth_client_id` must start with service-
2023-09-06 00:25:18 +02:00
YuviPanda
6ea33fa7cc Document oauth_client_id must start with service-
Enforced here: 7f50a0a7fa/jupyterhub/services/service.py (L327)
2023-09-05 15:21:50 -07:00
Erik Sundell
7f50a0a7fa Merge pull request #4548 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-09-05 11:09:29 +02:00
pre-commit-ci[bot]
69ccd21069 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/PyCQA/autoflake: v2.2.0 → v2.2.1](https://github.com/PyCQA/autoflake/compare/v2.2.0...v2.2.1)
- [github.com/pre-commit/mirrors-prettier: v3.0.0 → v3.0.3](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.0...v3.0.3)
2023-09-05 08:09:18 +00:00
Erik Sundell
8f98075c54 Merge pull request #4546 from umka1332/patch-1
Fix typo in comment in spawner.py
2023-09-01 15:09:14 +02:00
Oleksandr Naumov
1d0c686966 Fix typo in comment in spawner.py 2023-09-01 14:44:30 +03:00
Min RK
351b5c0c90 apply suggestion from review 2023-08-30 15:33:43 +02:00
Min RK
7757dea8a4 Merge pull request #4545 from jupyterhub/dependabot/npm_and_yarn/jsx/adobe/css-tools-4.3.1
Bump @adobe/css-tools from 4.2.0 to 4.3.1 in /jsx
2023-08-30 15:33:12 +02:00
Min RK
63d222912a Merge pull request #4520 from davidbrochart/jupyverse
Support Jupyverse as a single-user server
2023-08-30 10:32:18 +02:00
dependabot[bot]
0af68d8363 Bump @adobe/css-tools from 4.2.0 to 4.3.1 in /jsx
Bumps [@adobe/css-tools](https://github.com/adobe/css-tools) from 4.2.0 to 4.3.1.
- [Changelog](https://github.com/adobe/css-tools/blob/main/History.md)
- [Commits](https://github.com/adobe/css-tools/commits)

---
updated-dependencies:
- dependency-name: "@adobe/css-tools"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-30 06:11:57 +00:00
David Brochart
803d18989b Reinstall dev version of jupyterhub after jupyverse install 2023-08-29 14:53:41 +02:00
David Brochart
664bf967e0 Update install command 2023-08-29 12:54:28 +02:00
pre-commit-ci[bot]
ec0a4eaad3 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-08-22 18:12:58 +00:00
pre-commit-ci[bot]
9f208881d9 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-08-21 14:41:52 +00:00
David Brochart
f45ad335c3 Move pytest skip to test function decorator 2023-08-21 16:38:47 +02:00
Mike Barry
9f848de395 Test that demos issue 4524 2023-08-21 03:53:47 -04:00
Min RK
862455ee56 Merge pull request #4536 from mxab/main-1
Mention NomadSpawner
2023-08-17 11:02:32 +02:00
Erik Sundell
8b28fe6265 Merge pull request #4471 from minrk/subdomain-hook
add JupyterHub.subdomain_hook
2023-08-15 11:46:31 +02:00
Min RK
e6768763b4 make idna default subdomain hook 2023-08-15 11:27:38 +02:00
Min RK
340abcc0d5 No suffix for user subdomains 2023-08-15 11:20:45 +02:00
Max Fröhlich
8c40f3207e Mention NomadSpawner
relates to https://github.com/jupyterhub/jupyterhub/issues/3860
2023-08-10 16:49:29 +02:00
Min RK
b36a44e634 reconcile subdomain-host with new services creation 2023-08-10 15:25:05 +02:00
Min RK
c59942c690 Merge origin into subdomain-hook 2023-08-10 15:20:48 +02:00
Min RK
a66801c424 Merge pull request #4525 from danilopeixoto/metrics-prefix
Add `JUPYTERHUB_METRICS_PREFIX` environment variable to customize metrics prefix
2023-08-10 12:48:14 +02:00
Min RK
baaa558a84 Merge pull request #4494 from minrk/query-performance
Improve query performance with eager loading
2023-08-10 12:47:59 +02:00
Min RK
6d1178616f Merge pull request #4534 from minrk/402
Changelog for 4.0.2
2023-08-10 11:18:49 +02:00
Min RK
4897abbd84 Changelog for 4.0.2 2023-08-10 11:02:41 +02:00
Min RK
9325d24370 add orm_user to group member list
not sure why it ever worked to add the wrapper object, but it was always wrong
2023-08-10 10:46:29 +02:00
Min RK
a5061deeee Merge main into query-performance 2023-08-09 12:54:29 +02:00
Min RK
f215324c44 Merge pull request #4381 from trungleduc/service-api
Add REST API for managing services at runtime
2023-08-09 11:41:18 +02:00
Min RK
7dbb4ce1ff check 404 error when services don't exist 2023-08-09 11:22:16 +02:00
Min RK
da144c98ce neaten service test management
- cleanup services after each test
- more fixtures for services
2023-08-09 11:22:16 +02:00
Min RK
45102b248b store what fields get persisted in trait metadata
rather than checking columns in the db

makes things more explicit
2023-08-09 11:22:16 +02:00
Min RK
94687e5215 docs for metric prefix 2023-08-09 09:06:28 +02:00
Danilo Peixoto
7ce8fb7153 Rename test 2023-08-08 13:15:59 -03:00
Danilo Peixoto
74e02b45ba Fix typo 2023-08-08 12:18:24 -03:00
Danilo Peixoto
de5b19dc6c Merge branch 'main' into metrics-prefix 2023-08-08 12:14:09 -03:00
Danilo Peixoto
73a2a50e7b Follow signature contract 2023-08-08 11:36:15 -03:00
Min RK
d9154681eb service.url must always be http[s]
no chance for undefined port
2023-08-08 13:13:23 +02:00
Min RK
3c0fab7449 remove redundant domain, host args from service methods 2023-08-08 13:12:43 +02:00
Min RK
d268633a2c Merge pull request #4516 from sgaist/improve_dev_troubleshooting
Add "address already in use" troubleshooting hints
2023-08-08 12:24:21 +02:00
Min RK
8505b49eb0 Merge pull request #4465 from opoplawski/otp
Initial support for OTP MFA
2023-08-08 10:24:11 +02:00
Samuel Gaist
09f65126d8 docs(dev): add address already in use troubleshooting hints
While it seems trivial, this can be a bit convoluted to debug on macOS
because some of the services might not be visible to the user logged in.

The solution is simple however knowing why it is needed is a good thing.
2023-08-08 09:59:44 +02:00
Min RK
051729448c remove toggle_service_health_check
leave service check always running, since it doesn't cost anything to call an empty function once a minute
2023-08-07 14:03:18 +02:00
Min RK
9cf799d05b browser test for OTP login 2023-08-07 13:39:10 +02:00
Min RK
534deaece4 OTP will be new in 5.0 2023-08-07 13:39:10 +02:00
Min RK
e8b8abac7b tweak login form html
- enable OTP autocomplete
- remove unnecessary tabindex
2023-08-07 13:39:10 +02:00
Min RK
1839a2cc1c pass authenticator to login form
not just single attributes
2023-08-07 13:39:10 +02:00
Min RK
d1786a5a9d otp field is optional 2023-08-07 13:39:10 +02:00
Orion Poplawski
107b98b964 Attempt at configuration 2023-08-07 13:39:08 +02:00
Orion Poplawski
aae5aee065 Add otp to test data 2023-08-07 13:38:28 +02:00
Orion Poplawski
a67e636830 Initial support for OTP MFA 2023-08-07 13:38:27 +02:00
Min RK
d5d9081f5b subdomain_hook will be added in 5.0 2023-08-07 12:43:14 +02:00
pre-commit-ci[bot]
dc129849dd [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-08-05 22:06:39 +00:00
Danilo Peixoto
e6e92365d2 Upgrade Prometheus client 2023-08-05 19:06:11 -03:00
Danilo Peixoto
67938581d9 Fix typo 2023-08-05 13:52:47 -03:00
Danilo Peixoto
71b1d4fa4b Add tests 2023-08-05 13:40:10 -03:00
pre-commit-ci[bot]
85c9983894 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-08-05 16:24:50 +00:00
Danilo Peixoto
bff7be6640 Format 2023-08-05 13:15:29 -03:00
Danilo Peixoto
64cc0f72b3 Add JUPYTERHUB_METRICS_PREFIX environment variable 2023-08-05 13:12:27 -03:00
David Brochart
d1cf683fff Skip some jupyter-server specific tests 2023-08-03 15:32:29 +02:00
David Brochart
9aedb50fe2 Add test matrix entry with JUPYTERHUB_SINGLEUSER_APP=jupyverse 2023-08-02 14:14:42 +02:00
David Brochart
c3641ef3f3 Opt in to Jupyverse with JUPYTERHUB_SINGLEUSER_APP=jupyverse 2023-08-01 15:22:17 +02:00
David Brochart
c6325f3d85 Support Jupyverse as a single-user server 2023-08-01 15:19:10 +02:00
Simon Li
051a941e1e Merge pull request #4522 from minrk/notebook-v7
document how to use notebook v7 with jupyterhub
2023-08-01 13:44:01 +01:00
Min RK
6ea1976b9c Apply suggestions from code review
Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2023-08-01 14:31:07 +02:00
Simon Li
4f894097d7 Merge pull request #4523 from minrk/doc-nb7-url
doc: update notebook config URL
2023-08-01 13:24:57 +01:00
Min RK
35c279f819 doc: update notebook config URL 2023-08-01 14:18:50 +02:00
Min RK
4294791e08 document how to use notebook v7 with jupyterhub
and improve error message when classic notebook is requested, but notebook v7 is found
2023-08-01 13:58:34 +02:00
Erik Sundell
42e7eb382e Merge pull request #4521 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-08-01 13:39:42 +02:00
Min RK
b6d37e70b4 Merge pull request #4509 from Ph0tonic/patch-1
Improve Auth module code documentation
2023-08-01 13:14:15 +02:00
Min RK
368f2234d1 remove unused oauth_scopes trait
replaced with property for deprecation
2023-08-01 13:13:24 +02:00
Min RK
58bbea7f57 Merge pull request #4515 from jupyterhub/dependabot/npm_and_yarn/jsx/word-wrap-1.2.4
Bump word-wrap from 1.2.3 to 1.2.4 in /jsx
2023-08-01 13:08:47 +02:00
pre-commit-ci[bot]
80f2b9015a [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v3.8.0 → v3.10.1](https://github.com/asottile/pyupgrade/compare/v3.8.0...v3.10.1)
- [github.com/psf/black: 23.3.0 → 23.7.0](https://github.com/psf/black/compare/23.3.0...23.7.0)
- [github.com/pre-commit/mirrors-prettier: v3.0.0-alpha.9-for-vscode → v3.0.0](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.0-alpha.9-for-vscode...v3.0.0)
- [github.com/PyCQA/flake8: 6.0.0 → 6.1.0](https://github.com/PyCQA/flake8/compare/6.0.0...6.1.0)
2023-08-01 08:34:42 +00:00
dependabot[bot]
9159d77ff1 Bump word-wrap from 1.2.3 to 1.2.4 in /jsx
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-19 02:51:14 +00:00
Yuvi Panda
3fbdf02cc5 Merge pull request #4496 from minrk/quicker-startup
Reduce O(N) queries during startup
2023-07-14 09:38:14 -07:00
YuviPanda
33c8f356a6 Rename parameter for post_auth_hook to be clearer
`auth_model` matches what we call this in oauthenticator,
and IMO is clearer than 'authentication'.

Ref https://github.com/2i2c-org/infrastructure/pull/2809#discussion_r1263404964
2023-07-14 09:30:45 -07:00
Bastien Wermeille
2977823a13 Improve code documentation 2023-07-13 10:46:45 +02:00
pre-commit-ci[bot]
abfa8217ec [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-07-11 13:54:29 +00:00
Lunin Leonid
f4a5c94a71 add info for jupyerlab >= 4.0 2023-07-11 15:50:12 +02:00
Simon Li
bd6148df2a Merge pull request #4507 from jupyterhub/dependabot/npm_and_yarn/jsx/semver-6.3.1
Bump semver from 6.3.0 to 6.3.1 in /jsx
2023-07-11 13:14:38 +01:00
dependabot[bot]
e5d941a3ad Bump semver from 6.3.0 to 6.3.1 in /jsx
Bumps [semver](https://github.com/npm/node-semver) from 6.3.0 to 6.3.1.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v6.3.1/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v6.3.0...v6.3.1)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-11 11:36:15 +00:00
Min RK
9473362b08 Merge pull request #4506 from jhgoebbert/patch-1
typo: defaut->default
2023-07-08 17:26:24 -07:00
Erik Sundell
b3a97de5fa Merge pull request #4503 from minrk/root-dir
set root_dir when using singleuser extension
2023-07-08 11:29:59 +02:00
Jens Henrik Goebbert
e890c3b8b2 typo: defaut->default 2023-07-07 18:00:35 +02:00
Min RK
bb2c91dd1e skip notebook dir extension test without jupyter-server 2 2023-07-07 08:17:29 -07:00
Min RK
0528a06e03 fix singleuser extension typo
Co-authored-by: Simon Li <orpheus+devel@gmail.com>
2023-07-07 08:17:29 -07:00
pre-commit-ci[bot]
81885d5c61 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-07-05 17:21:35 +02:00
Duc Trung LE
aa754a1a2c Apply suggestions 2023-07-04 15:13:40 +02:00
Duc Trung Le
9034de28f9 Lmiting runtime services to externally managed services only 2023-07-04 11:35:08 +02:00
Duc Trung LE
2823c12552 Prevent creating managed servicesat runtime 2023-07-04 11:35:08 +02:00
Duc Trung Le
9ef5978515 Apply reviewer's suggesstions 2023-07-04 11:35:08 +02:00
Duc Trung Le
33e6c0de23 Add docstring 2023-07-04 11:35:08 +02:00
Duc Trung Le
9a0d00fd69 Typo 2023-07-04 11:35:08 +02:00
Duc Trung Le
8cef59bdd7 Add documentation 2023-07-04 11:35:08 +02:00
Duc Trung Le
5870bedb3e More tests 2023-07-04 11:35:07 +02:00
Duc Trung Le
bdcf697fe9 Add tests 2023-07-04 11:33:21 +02:00
Duc Trung Le
bf565ece3b Update service table schema 2023-07-04 11:33:21 +02:00
Duc Trung Le
95781880c5 Update service table schema 2023-07-04 11:33:21 +02:00
Duc Trung Le
d251b705e8 [WIP] Update old revisions to support new table 2023-07-04 11:33:21 +02:00
Duc Trung Le
5bb4b70ab1 Handle add/remove services 2023-07-04 11:33:21 +02:00
pre-commit-ci[bot]
71fbe5e29d [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-07-04 11:33:21 +02:00
Duc Trung LE
e7defa6e12 Update api handler 2023-07-04 11:33:21 +02:00
Duc Trung Le
1314eca8ec Create service from orm 2023-07-04 11:33:21 +02:00
Duc Trung Le
7dd4e4516f Add scope 2023-07-04 11:33:21 +02:00
Duc Trung LE
e515a4b820 Add service post handler 2023-07-04 11:33:21 +02:00
Duc Trung Le
28464f9c47 WIP 2023-07-04 11:33:21 +02:00
Erik Sundell
0e437224d0 Merge pull request #4505 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-07-04 09:41:10 +02:00
pre-commit-ci[bot]
664e2d7088 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v3.4.0 → v3.8.0](https://github.com/asottile/pyupgrade/compare/v3.4.0...v3.8.0)
- [github.com/PyCQA/autoflake: v2.1.1 → v2.2.0](https://github.com/PyCQA/autoflake/compare/v2.1.1...v2.2.0)
2023-07-04 06:27:20 +00:00
Min RK
c268026cb6 Merge pull request #4476 from diocas/fix_4466
Admin server buttons depending on the status
2023-07-03 13:27:20 +02:00
Min RK
e28dbe949e set root_dir when using singleuser extension
and make sure Spawner.notebook_dir config is tested
2023-07-03 12:56:08 +02:00
Min RK
b654b5b867 Merge pull request #4501 from jupyterhub/dependabot/github_actions/docker/build-push-action-4.1.1
Bump docker/build-push-action from 4.0.0 to v4 (edited)
2023-07-03 10:12:42 +02:00
Erik Sundell
9d6751febe Apply suggestions from code review 2023-07-01 09:34:59 +02:00
dependabot[bot]
f27838cf2f Bump docker/build-push-action from 4.0.0 to 4.1.1
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.0.0 to 4.1.1.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](3b5e8027fc...2eb1c1961a)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-01 05:28:59 +00:00
Erik Sundell
b58aa2468c Merge pull request #4500 from kosmonavtus/patch-1
Fix typo in database.md
2023-06-30 18:46:21 +02:00
kosmonavtus
1ee10ef93d Update database.md
database.md fix install :)
2023-06-30 20:33:09 +04:00
Min RK
000110f5d7 OAuthCode.find won't find invalid codes 2023-06-30 12:52:06 +02:00
Min RK
617678b16e remove debug raiseload 2023-06-30 11:25:58 +02:00
Min RK
38126ecfe1 refine use of joinedload
- use it fewer places
- mostly on queries, not attributes
- add innerjoin for some backrefs
2023-06-30 11:06:34 +02:00
Min RK
90ca77194d require sqlalchemy 1.4.1
apparently 1.4.0 had a bug in relationship loading
2023-06-30 10:09:31 +02:00
Min RK
d32b57450c upgrade: avoid eager loading of not-yet-upgraded column 2023-06-29 09:35:10 +02:00
Min RK
3afb209cd7 cleanup all db users in cleanup_after
not just those in the app.users dict
2023-06-29 09:19:46 +02:00
Min RK
8cd1b57eb4 debug: rm raiseload 2023-06-28 16:39:25 +02:00
Min RK
5a48a8e1fc fix adding users to groups in tests
not sure why this ever worked
2023-06-28 16:39:25 +02:00
Min RK
1734b75d47 avoid instantiating User object wrapper in user_model 2023-06-28 15:53:50 +02:00
Min RK
e12a317e7a join some more relationships 2023-06-28 15:53:50 +02:00
Min RK
f24fbc761f reduce repeat queries in GET /api/users
add eager loading of several relationships that are ~always used when the given objects are requested
add specific eager loading of spawners to the users query

- roles, groups (always needed to resolve permissions)
- APIToken.user, service
2023-06-28 15:53:50 +02:00
Min RK
715b8f3cee add note that user_model is inefficient
I don't have time to solve this now
2023-06-28 15:53:50 +02:00
Min RK
4fb4eed5e9 add default eager loading to several relationships 2023-06-28 15:53:49 +02:00
Min RK
105f8dcb92 Merge pull request #4498 from minrk/test-monitor-query
report db query counts in test output
2023-06-28 15:53:26 +02:00
Min RK
1d9e41ef57 report db query counts in test output 2023-06-28 13:50:31 +02:00
Min RK
fc361e3aea Merge pull request #4497 from minrk/back_populates
orm: trade backref for back_populates
2023-06-28 13:49:35 +02:00
Min RK
f92af04e0e trade backref for back_populates
backref considered 'legacy', and back_populates makes it easier to specify lazy loading options
2023-06-28 12:30:11 +02:00
Min RK
d38dd92415 avoid fetching potentially large list of users to compute repr of groups 2023-06-28 12:27:19 +02:00
Min RK
de31e7f815 more efficient query for loading active spawners to check
query on users filtered by spawner, with joinedload for relationships that will be checked

gets the same results, but in a single query with more efficient lookups
2023-06-28 11:17:25 +02:00
Min RK
e50ad5f039 mismatch query is now the same, don't do it twice 2023-06-28 09:18:02 +02:00
Min RK
7ae1b0b97f Merge pull request #4495 from yuvipanda/py8
Drop support for python 3.7
2023-06-28 09:11:43 +02:00
Min RK
a3ccee3871 Bump to 5.0.0.dev 2023-06-28 09:11:14 +02:00
Min RK
55e4ed6c07 improve query performance in startup role assignment
- avoid lookup-by-name of user and admin roles when assigning them
- filter users-to-update to only those that need updating, which should usually be empty

No change in behavior
2023-06-28 09:09:32 +02:00
YuviPanda
eb1f589d60 Stop testing python 3.7 2023-06-27 15:30:11 -07:00
YuviPanda
328177d25a Drop support for python 3.7
It's EOL today! https://endoflife.date/python
2023-06-27 15:27:34 -07:00
Min RK
13dd6e402b Merge pull request #4492 from Ph0tonic/patch-1
Add missing param descriptions for `HubAuth`
2023-06-27 09:09:22 +02:00
pre-commit-ci[bot]
26068c7db8 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-06-27 05:17:24 +00:00
Wermeille Bastien
a553f97425 Update auth.py 2023-06-27 07:16:52 +02:00
Erik Sundell
6aacc33cd5 Merge pull request #4491 from minrk/424-activity
avoid counting failed requests to not-running servers as 'activity'
2023-06-26 19:24:33 +02:00
Wermeille Bastien
7d00dd9054 Add missing param descriptions for HubAuth 2023-06-26 16:30:03 +02:00
Min RK
6db762c2a7 avoid counting failed requests to not-running servers as 'activity' 2023-06-26 11:37:33 +02:00
Min RK
c5fe261530 improve public_url docstring 2023-06-26 11:32:53 +02:00
Min RK
8e8640de3e make new subdomain scheme compatible with wildcard SSL
rather than using multi-level subdomains, which are nicer,
use `--user` and `--service` so it's only one DNS level below hub.

This is not as nice, but is compatible with wildcard SSL which only allows one level of separation.
2023-06-26 11:06:29 +02:00
Min RK
f7c601ec25 expose dns_safe_name on users
so spawners (e.g. KubeSpawner) can use it.

on users, it is limited to 40 characters to allow it to be used as part of a label.
2023-06-26 11:05:02 +02:00
Min RK
58da178d30 Merge pull request #4455 from kreuzert/main
Add Spawner.progress_ready_hook for customizing the ready event
2023-06-26 10:46:26 +02:00
Min RK
b69048f08a ensure public url has trailing slash 2023-06-26 10:01:59 +02:00
Erik Sundell
2673564e66 Merge pull request #4489 from minrk/no-credential-message
improve permission-denied errors for various cases
2023-06-23 15:00:02 +02:00
Min RK
a31127ed8b improver permission-denied errors for various cases
- "Missing or invalid credentials" if no credentials at all
- fix HTTP method name on actual xsrf check failures
- show scopes if authenticated but not authorized (no change, but now tested)
2023-06-23 13:53:11 +02:00
Diogo Castro
38e1a0aed5 Tests 2023-06-21 22:55:39 +02:00
Diogo Castro
7a0b8d675a Small css and layout improvements for better consistency 2023-06-18 16:16:37 +02:00
Diogo Castro
c2e7ce52ae Admin server buttons depending on the status (pending, running or stopped)
Fixes #4466
2023-06-18 16:16:37 +02:00
Diogo Castro
6eaa3a4343 Testing UI
Built on previous work, this allows seeing the react compiled UI without having to run JH
2023-06-18 16:15:36 +02:00
Erik Sundell
161cdcd7e7 Merge pull request #4480 from minrk/implicit-allow
Remove check for allowed_users for users created via role or group config
2023-06-14 16:28:06 +02:00
Min RK
ad3266b902 Remove check for allowed_users for users created via config
adding users via config anywhere makes them allowed

previously, this was _required_, so that it was always true for working config,
but config which allowed some users but declared others in groups or roles was forbidden.

Now, declaring a user anywhere _ensures_ the user is allowed rather than _enforcing_ it.
2023-06-14 14:42:15 +02:00
Min RK
64d237a89e add JupyterHub.public_url config
When specified, removes all guesses based on the request,
which aren't always correct in proxy situations (especially Host and protocol)
2023-06-14 14:07:36 +02:00
Min RK
0e4deec714 Merge pull request #4475 from grios-stratio/fix/custom-debug-function
Allow setting custom log_function in tornado_settings in SingleUserServer
2023-06-13 12:36:11 +02:00
Erik Sundell
345f50d29c Merge pull request #4477 from minrk/build-system
Move most package config to declarative pyproject.toml
2023-06-13 12:22:42 +02:00
Tim Kreuzer
262a831af8 use dict.copy() instead of deepcopy, improve docstrings 2023-06-13 08:44:50 +02:00
Min RK
2c7d693537 MANIFEST.in only needs to handle untracked files 2023-06-12 16:05:42 +02:00
Min RK
52a08176cc add missing init for jupyterhub.tests.browser 2023-06-12 15:55:41 +02:00
Min RK
c90b190c13 Move most package config to declarative pyproject.toml
data_files still needs to be dynamic because it gets reconstructed after setup.py starts
2023-06-12 15:47:47 +02:00
Guillermo Ríos
b71d1543ca use setdefault 2023-06-09 17:28:32 +02:00
Guillermo Ríos
cf21933a1d check for log_function in tornado_settings, not in web_app.settings 2023-06-09 17:27:38 +02:00
Guillermo Ríos
9349ad52e4 Allow setting custom log_function in tornado_settings in SingleUserServer 2023-06-08 17:39:02 +02:00
Min RK
fd1dd8d1e6 clarify subdomain_hook docstring 2023-06-06 13:22:05 +02:00
Min RK
0d7c0c0f24 Fix links to services in nav when using subdomains 2023-06-06 11:23:35 +02:00
Min RK
bd06651bb0 add JupyterHub.subdomain_hook
and new opt-in 'idna' hook that should always produce valid domains
2023-06-06 11:04:21 +02:00
Tim Kreuzer
52d070835f add tests for Spawner.progress_ready_hook 2023-05-22 16:41:30 +02:00
Tim Kreuzer
e477756f27 use deepcopy, to use the original_ready_event in case of an exception. Otherwise changes made before the exception would not have been reverted 2023-05-22 16:41:15 +02:00
Tim Kreuzer
118fa9e480 move ready event to Spawner class. Implemented as hook like pre_spawn_hook 2023-05-17 14:50:35 +02:00
Vlad Vifor
44e58818af Merge branch 'jupyterhub:main' into manage_roles 2023-03-27 16:38:52 +02:00
vpopescu
eaab24d11a fixed function naming 2023-03-27 16:38:37 +02:00
Vlad Vifor
cd32aadbe8 Updated function names in jupyterhub/user.py
Co-authored-by: Min RK <benjaminrk@gmail.com>
2022-09-30 10:39:56 +02:00
pre-commit-ci[bot]
75272a8499 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-09-29 15:55:39 +00:00
vpopescu
bde3f87fb1 added tests 2022-09-29 17:55:04 +02:00
vpopescu
29208ebb08 Updated manage_roles tests 2022-09-29 17:54:10 +02:00
pre-commit-ci[bot]
464b13c9a5 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-09-22 15:23:25 +00:00
vpopescu
07fa856943 Added rolename counter 2022-09-22 17:20:51 +02:00
vpopescu
cfcf0defd0 added role fixture 2022-09-22 17:20:15 +02:00
vpopescu
e2b538b324 Added role name generator 2022-09-22 17:18:39 +02:00
vpopescu
82317692ae Added manage_roles test 2022-09-22 17:07:04 +02:00
vpopescu
261a9a5d8a Added manage_roles feature 2022-09-22 16:21:24 +02:00
304 changed files with 37606 additions and 15818 deletions

View File

@@ -5,6 +5,5 @@ jupyterhub.sqlite
jupyterhub_config.py jupyterhub_config.py
node_modules node_modules
docs docs
.git
dist dist
build build

View File

@@ -14,3 +14,51 @@ updates:
interval: monthly interval: monthly
time: "05:00" time: "05:00"
timezone: Etc/UTC timezone: Etc/UTC
- package-ecosystem: npm
directory: /
groups:
# one big pull request for minor bumps
npm-minor:
patterns:
- "*"
update-types:
- minor
- patch
schedule:
interval: monthly
- package-ecosystem: npm
directory: /jsx
groups:
# one big pull request for minor bumps
jsx-minor:
patterns:
- "*"
update-types:
- minor
- patch
# group major bumps of react-related dependencies
jsx-react:
patterns:
- "react*"
- "redux*"
- "*react"
- "recompose"
update-types:
- major
# group major bumps of webpack-related dependencies
jsx-webpack:
patterns:
- "*webpack*"
- "@babel/*"
- "*-loader"
update-types:
- major
# group major bumps of jest-related dependencies
jsx-jest:
patterns:
- "*jest*"
- "*test*"
update-types:
- major
schedule:
interval: monthly

View File

@@ -1,7 +1,7 @@
# This is a GitHub workflow defining a set of jobs with a set of steps. # This is a GitHub workflow defining a set of jobs with a set of steps.
# ref: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions # ref: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
# #
# Test build release artifacts (PyPI package, Docker images) and publish them on # Test build release artifacts (PyPI package) and publish them on
# pushed git tags. # pushed git tags.
# #
name: Release name: Release
@@ -28,18 +28,22 @@ on:
- "**" - "**"
workflow_dispatch: workflow_dispatch:
permissions:
contents: read
jobs: jobs:
build-release: build-release:
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v5
- uses: actions/setup-python@v4 - uses: actions/setup-python@v6
with: with:
python-version: "3.9" python-version: "3.11"
cache: pip
- uses: actions/setup-node@v3 - uses: actions/setup-node@v5
with: with:
node-version: "14" node-version: "20"
- name: install build requirements - name: install build requirements
run: | run: |
@@ -67,7 +71,7 @@ jobs:
docker run --rm -v $PWD/dist:/dist:ro docker.io/library/python:3.9-slim-bullseye bash -c 'pip install /dist/jupyterhub-*.tar.gz' docker run --rm -v $PWD/dist:/dist:ro docker.io/library/python:3.9-slim-bullseye bash -c 'pip install /dist/jupyterhub-*.tar.gz'
# ref: https://github.com/actions/upload-artifact#readme # ref: https://github.com/actions/upload-artifact#readme
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v4
with: with:
name: jupyterhub-${{ github.sha }} name: jupyterhub-${{ github.sha }}
path: "dist/*" path: "dist/*"
@@ -81,146 +85,3 @@ jobs:
run: | run: |
pip install twine pip install twine
twine upload --skip-existing dist/* twine upload --skip-existing dist/*
publish-docker:
runs-on: ubuntu-20.04
timeout-minutes: 20
services:
# So that we can test this in PRs/branches
local-registry:
image: registry:2
ports:
- 5000:5000
steps:
- name: Should we push this image to a public registry?
run: |
if [ "${{ startsWith(github.ref, 'refs/tags/') || (github.ref == 'refs/heads/main') }}" = "true" ]; then
# Empty => Docker Hub
echo "REGISTRY=" >> $GITHUB_ENV
else
echo "REGISTRY=localhost:5000/" >> $GITHUB_ENV
fi
- uses: actions/checkout@v3
# Setup docker to build for multiple platforms, see:
# https://github.com/docker/build-push-action/tree/v2.4.0#usage
# https://github.com/docker/build-push-action/blob/v2.4.0/docs/advanced/multi-platform.md
- name: Set up QEMU (for docker buildx)
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx (for multi-arch builds)
uses: docker/setup-buildx-action@v2
with:
# Allows pushing to registry on localhost:5000
driver-opts: network=host
- name: Setup push rights to Docker Hub
# This was setup by...
# 1. Creating a Docker Hub service account "jupyterhubbot"
# 2. Creating a access token for the service account specific to this
# repository: https://hub.docker.com/settings/security
# 3. Making the account part of the "bots" team, and granting that team
# permissions to push to the relevant images:
# https://hub.docker.com/orgs/jupyterhub/teams/bots/permissions
# 4. Registering the username and token as a secret for this repo:
# https://github.com/jupyterhub/jupyterhub/settings/secrets/actions
if: env.REGISTRY != 'localhost:5000/'
run: |
docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" -p "${{ secrets.DOCKERHUB_TOKEN }}"
# image: jupyterhub/jupyterhub
#
# https://github.com/jupyterhub/action-major-minor-tag-calculator
# If this is a tagged build this will return additional parent tags.
# E.g. 1.2.3 is expanded to Docker tags
# [{prefix}:1.2.3, {prefix}:1.2, {prefix}:1, {prefix}:latest] unless
# this is a backported tag in which case the newer tags aren't updated.
# For branches this will return the branch name.
# If GITHUB_TOKEN isn't available (e.g. in PRs) returns no tags [].
- name: Get list of jupyterhub tags
id: jupyterhubtags
uses: jupyterhub/action-major-minor-tag-calculator@v2
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
prefix: "${{ env.REGISTRY }}jupyterhub/jupyterhub:"
defaultTag: "${{ env.REGISTRY }}jupyterhub/jupyterhub:noref"
branchRegex: ^\w[\w-.]*$
- name: Build and push jupyterhub
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
# tags parameter must be a string input so convert `gettags` JSON
# array into a comma separated list of tags
tags: ${{ join(fromJson(steps.jupyterhubtags.outputs.tags)) }}
# image: jupyterhub/jupyterhub-onbuild
#
- name: Get list of jupyterhub-onbuild tags
id: onbuildtags
uses: jupyterhub/action-major-minor-tag-calculator@v2
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
prefix: "${{ env.REGISTRY }}jupyterhub/jupyterhub-onbuild:"
defaultTag: "${{ env.REGISTRY }}jupyterhub/jupyterhub-onbuild:noref"
branchRegex: ^\w[\w-.]*$
- name: Build and push jupyterhub-onbuild
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
build-args: |
BASE_IMAGE=${{ fromJson(steps.jupyterhubtags.outputs.tags)[0] }}
context: onbuild
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ join(fromJson(steps.onbuildtags.outputs.tags)) }}
# image: jupyterhub/jupyterhub-demo
#
- name: Get list of jupyterhub-demo tags
id: demotags
uses: jupyterhub/action-major-minor-tag-calculator@v2
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
prefix: "${{ env.REGISTRY }}jupyterhub/jupyterhub-demo:"
defaultTag: "${{ env.REGISTRY }}jupyterhub/jupyterhub-demo:noref"
branchRegex: ^\w[\w-.]*$
- name: Build and push jupyterhub-demo
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
build-args: |
BASE_IMAGE=${{ fromJson(steps.onbuildtags.outputs.tags)[0] }}
context: demo-image
# linux/arm64 currently fails:
# ERROR: Could not build wheels for argon2-cffi which use PEP 517 and cannot be installed directly
# ERROR: executor failed running [/bin/sh -c python3 -m pip install notebook]: exit code: 1
platforms: linux/amd64
push: true
tags: ${{ join(fromJson(steps.demotags.outputs.tags)) }}
# image: jupyterhub/singleuser
#
- name: Get list of jupyterhub/singleuser tags
id: singleusertags
uses: jupyterhub/action-major-minor-tag-calculator@v2
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
prefix: "${{ env.REGISTRY }}jupyterhub/singleuser:"
defaultTag: "${{ env.REGISTRY }}jupyterhub/singleuser:noref"
branchRegex: ^\w[\w-.]*$
- name: Build and push jupyterhub/singleuser
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
build-args: |
JUPYTERHUB_VERSION=${{ github.ref_type == 'tag' && github.ref_name || format('git:{0}', github.sha) }}
context: singleuser
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ join(fromJson(steps.singleusertags.outputs.tags)) }}

View File

@@ -12,7 +12,7 @@ jobs:
action: action:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: dessant/support-requests@v3 - uses: dessant/support-requests@v4
with: with:
github-token: ${{ github.token }} github-token: ${{ github.token }}
support-label: "support" support-label: "support"

View File

@@ -29,6 +29,9 @@ on:
- "**" - "**"
workflow_dispatch: workflow_dispatch:
permissions:
contents: read
env: env:
# UTF-8 content may be interpreted as ascii and causes errors without this. # UTF-8 content may be interpreted as ascii and causes errors without this.
LANG: C.UTF-8 LANG: C.UTF-8
@@ -36,31 +39,39 @@ env:
jobs: jobs:
validate-rest-api-definition: validate-rest-api-definition:
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: "20"
cache: npm
- name: Validate REST API definition - name: Validate REST API definition
uses: char0n/swagger-editor-validate@v1.3.2 run: |
with: npx @redocly/cli lint
definition-file: docs/source/_static/rest-api.yml
test-docs: test-docs:
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v5
with: with:
# make rediraffecheckdiff requires git history to compare current # make rediraffecheckdiff requires git history to compare current
# commit with the main branch and previous releases. # commit with the main branch and previous releases.
fetch-depth: 0 fetch-depth: 0
- uses: actions/setup-python@v4 - uses: actions/setup-python@v6
with: with:
python-version: "3.9" python-version: "3.11"
cache: pip
cache-dependency-path: |
requirements.txt
docs/requirements.txt
- name: Install requirements - name: Install requirements
run: | run: |
pip install -r docs/requirements.txt pytest pip install -e . -r docs/requirements.txt pytest
- name: pytest docs/ - name: pytest docs/
run: | run: |
@@ -73,10 +84,12 @@ jobs:
cd docs cd docs
make html make html
# Output broken and permanently redirected links in a readable format
- name: check links - name: check links
run: | uses: manics/action-sphinx-linkcheck-summary@main
cd docs with:
make linkcheck docs-dir: docs
build-dir: docs/_build
# make rediraffecheckdiff compares files for different changesets # make rediraffecheckdiff compares files for different changesets
# these diff targets aren't always available # these diff targets aren't always available

View File

@@ -25,28 +25,24 @@ permissions:
jobs: jobs:
# The ./jsx folder contains React based source code files that are to compile # The ./jsx folder contains React based source code files that are to compile
# to share/jupyterhub/static/js/admin-react.js. The ./jsx folder includes # to share/jupyterhub/static/js/admin-react.js. The ./jsx folder includes
# tests also has tests that this job is meant to run with `yarn test` # tests also has tests that this job is meant to run with `npm test`
# according to the documentation in jsx/README.md. # according to the documentation in jsx/README.md.
test-jsx-admin-react: test-jsx-admin-react:
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
timeout-minutes: 5 timeout-minutes: 5
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v5
- uses: actions/setup-node@v3 - uses: actions/setup-node@v5
with: with:
node-version: "14" node-version: "20"
- name: Install yarn - name: install jsx
run: |
npm install -g yarn
- name: yarn
run: | run: |
cd jsx cd jsx
yarn npm ci
- name: yarn test - name: test
run: | run: |
cd jsx cd jsx
yarn test npm test

View File

@@ -36,7 +36,7 @@ permissions:
jobs: jobs:
# Run "pytest jupyterhub/tests" in various configurations # Run "pytest jupyterhub/tests" in various configurations
pytest: pytest:
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
timeout-minutes: 15 timeout-minutes: 15
strategy: strategy:
@@ -65,7 +65,7 @@ jobs:
# unencrypted HTTP # unencrypted HTTP
# #
# main_dependencies: # main_dependencies:
# Tests everything when the we use the latest available dependencies # Tests everything when we use the latest available dependencies
# from: traitlets. # from: traitlets.
# #
# NOTE: Since only the value of these parameters are presented in the # NOTE: Since only the value of these parameters are presented in the
@@ -74,7 +74,7 @@ jobs:
# Python versions available at: # Python versions available at:
# https://github.com/actions/python-versions/blob/HEAD/versions-manifest.json # https://github.com/actions/python-versions/blob/HEAD/versions-manifest.json
include: include:
- python: "3.7" - python: "3.8"
oldest_dependencies: oldest_dependencies oldest_dependencies: oldest_dependencies
legacy_notebook: legacy_notebook legacy_notebook: legacy_notebook
- python: "3.8" - python: "3.8"
@@ -84,12 +84,15 @@ jobs:
db: mysql db: mysql
- python: "3.10" - python: "3.10"
db: postgres db: postgres
- python: "3.11" - python: "3.12"
subdomain: subdomain subdomain: subdomain
serverextension: serverextension serverextension: serverextension
- python: "3.11" - python: "3.11"
ssl: ssl ssl: ssl
serverextension: serverextension serverextension: serverextension
- python: "3.11"
jupyverse: jupyverse
subset: singleuser
- python: "3.11" - python: "3.11"
subdomain: subdomain subdomain: subdomain
noextension: noextension noextension: noextension
@@ -101,6 +104,9 @@ jobs:
- python: "3.11" - python: "3.11"
browser: browser browser: browser
- python: "3.11" - python: "3.11"
subdomain: subdomain
browser: browser
- python: "3.12"
main_dependencies: main_dependencies main_dependencies: main_dependencies
steps: steps:
@@ -130,37 +136,44 @@ jobs:
elif [ "${{ matrix.noextension }}" != "" ]; then elif [ "${{ matrix.noextension }}" != "" ]; then
echo "JUPYTERHUB_SINGLEUSER_EXTENSION=0" >> $GITHUB_ENV echo "JUPYTERHUB_SINGLEUSER_EXTENSION=0" >> $GITHUB_ENV
fi fi
- uses: actions/checkout@v3 if [ "${{ matrix.jupyverse }}" != "" ]; then
# NOTE: actions/setup-node@v3 make use of a cache within the GitHub base echo "JUPYTERHUB_SINGLEUSER_APP=jupyverse" >> $GITHUB_ENV
fi
- uses: actions/checkout@v5
# NOTE: actions/setup-node@v5 make use of a cache within the GitHub base
# environment and setup in a fraction of a second. # environment and setup in a fraction of a second.
- name: Install Node v14 - name: Install Node
uses: actions/setup-node@v3 uses: actions/setup-node@v5
with: with:
node-version: "14" node-version: "20"
- name: Install Javascript dependencies - name: Install Javascript dependencies
run: | run: |
npm install npm install
npm install -g configurable-http-proxy yarn npm install -g configurable-http-proxy yarn
npm list npm list
# NOTE: actions/setup-python@v4 make use of a cache within the GitHub base # NOTE: actions/setup-python@v6 make use of a cache within the GitHub base
# environment and setup in a fraction of a second. # environment and setup in a fraction of a second.
- name: Install Python ${{ matrix.python }} - name: Install Python ${{ matrix.python }}
uses: actions/setup-python@v4 uses: actions/setup-python@v6
with: with:
python-version: "${{ matrix.python }}" python-version: "${{ matrix.python }}"
cache: pip
cache-dependency-path: |
pyproject.toml
requirements.txt
ci/oldest-dependencies/requirements.old
- name: Install Python dependencies - name: Install Python dependencies
run: | run: |
pip install --upgrade pip pip install --upgrade pip
pip install -e ".[test]"
if [ "${{ matrix.oldest_dependencies }}" != "" ]; then if [ "${{ matrix.oldest_dependencies }}" != "" ]; then
# take any dependencies in requirements.txt such as tornado>=5.0 # frozen env with oldest dependencies
# and transform them to tornado==5.0 so we can run tests with # make sure our `>=` pins really do express our minimum supported versions
# the earliest-supported versions pip install -r ci/oldest-dependencies/requirements.old -e .
cat requirements.txt | grep '>=' | sed -e 's@>=@==@g' > oldest-requirements.txt else
pip install -r oldest-requirements.txt pip install --pre -e ".[test]" "pycurl; python_version >= '3.10'"
fi fi
if [ "${{ matrix.main_dependencies }}" != "" ]; then if [ "${{ matrix.main_dependencies }}" != "" ]; then
@@ -176,6 +189,10 @@ jobs:
if [ "${{ matrix.jupyter_server }}" != "" ]; then if [ "${{ matrix.jupyter_server }}" != "" ]; then
pip install "jupyter_server==${{ matrix.jupyter_server }}" pip install "jupyter_server==${{ matrix.jupyter_server }}"
fi fi
if [ "${{ matrix.jupyverse }}" != "" ]; then
pip install "jupyverse[jupyterlab,auth-jupyterhub]"
pip install -e .
fi
if [ "${{ matrix.db }}" == "mysql" ]; then if [ "${{ matrix.db }}" == "mysql" ]; then
pip install mysqlclient pip install mysqlclient
fi fi
@@ -235,31 +252,10 @@ jobs:
- name: Ensure browsers are installed for playwright - name: Ensure browsers are installed for playwright
if: matrix.browser if: matrix.browser
run: python -m playwright install --with-deps run: python -m playwright install --with-deps firefox
- name: Run pytest - name: Run pytest
run: | run: |
pytest -k "${{ matrix.subset }}" --maxfail=2 --cov=jupyterhub jupyterhub/tests pytest -k "${{ matrix.subset }}" --maxfail=2 --cov=jupyterhub jupyterhub/tests
- uses: codecov/codecov-action@v3 - uses: codecov/codecov-action@v5
docker-build:
runs-on: ubuntu-20.04
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- name: build images
run: |
DOCKER_BUILDKIT=1 docker build -t jupyterhub/jupyterhub .
docker build -t jupyterhub/jupyterhub-onbuild onbuild
docker build -t jupyterhub/singleuser singleuser
- name: smoke test jupyterhub
run: |
docker run --rm -t jupyterhub/jupyterhub jupyterhub --help
- name: verify static files
run: |
docker run --rm -t -v $PWD/dockerfiles:/io jupyterhub/jupyterhub python3 /io/test.py

9
.gitignore vendored
View File

@@ -7,11 +7,11 @@ node_modules
dist dist
docs/_build docs/_build
docs/build docs/build
docs/source/_static/rest-api
docs/source/rbac/scope-table.md
docs/source/reference/metrics.md docs/source/reference/metrics.md
.ipynb_checkpoints .ipynb_checkpoints
.virtual_documents
jsx/build/ jsx/build/
# ignore config file at the top-level of the repo # ignore config file at the top-level of the repo
# but not sub-dirs # but not sub-dirs
@@ -19,8 +19,9 @@ jsx/build/
jupyterhub_cookie_secret jupyterhub_cookie_secret
jupyterhub.sqlite jupyterhub.sqlite
jupyterhub.sqlite* jupyterhub.sqlite*
package-lock.json
share/jupyterhub/static/components share/jupyterhub/static/components
share/jupyterhub/static/css/style.css
share/jupyterhub/static/css/style.css.map
share/jupyterhub/static/css/style.min.css share/jupyterhub/static/css/style.min.css
share/jupyterhub/static/css/style.min.css.map share/jupyterhub/static/css/style.min.css.map
share/jupyterhub/static/js/admin-react.js* share/jupyterhub/static/js/admin-react.js*
@@ -37,3 +38,5 @@ docs/source/reference/metrics.rst
oldest-requirements.txt oldest-requirements.txt
jupyterhub-proxy.pid jupyterhub-proxy.pid
examples/server-api/service-token examples/server-api/service-token
*.hot-update*

View File

@@ -14,44 +14,42 @@ ci:
autoupdate_schedule: monthly autoupdate_schedule: monthly
repos: repos:
# Autoformat: Python code, syntax patterns are modernized # autoformat and lint Python code
- repo: https://github.com/asottile/pyupgrade - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v3.4.0 rev: v0.12.11
hooks: hooks:
- id: pyupgrade - id: ruff
args: types_or:
- --py37-plus - python
- jupyter
# Autoformat: Python code args: ["--fix", "--show-fixes"]
- repo: https://github.com/PyCQA/autoflake - id: ruff-format
rev: v2.1.1 types_or:
hooks: - python
- id: autoflake - jupyter
# args ref: https://github.com/PyCQA/autoflake#advanced-usage
args:
- --in-place
# Autoformat: Python code
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
# Autoformat: Python code
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
# Autoformat: markdown, yaml, javascript (see the file .prettierignore) # Autoformat: markdown, yaml, javascript (see the file .prettierignore)
- repo: https://github.com/pre-commit/mirrors-prettier - repo: https://github.com/rbubley/mirrors-prettier
rev: v3.0.0-alpha.9-for-vscode rev: v3.6.2
hooks: hooks:
- id: prettier - id: prettier
exclude: .*/templates/.*|docs/source/_static/rest-api.yml|docs/source/rbac/scope-table.md
# autoformat HTML templates
- repo: https://github.com/djlint/djLint
rev: v1.36.4
hooks:
- id: djlint-reformat-jinja
files: ".*templates/.*.html"
types_or: ["html"]
exclude: redoc.html
- id: djlint-jinja
files: ".*templates/.*.html"
types_or: ["html"]
# Autoformat and linting, misc. details # Autoformat and linting, misc. details
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0 rev: v6.0.0
hooks: hooks:
- id: end-of-file-fixer - id: end-of-file-fixer
exclude: share/jupyterhub/static/js/admin-react.js exclude: share/jupyterhub/static/js/admin-react.js
@@ -59,8 +57,30 @@ repos:
- id: check-case-conflict - id: check-case-conflict
- id: check-executables-have-shebangs - id: check-executables-have-shebangs
# Linting: Python code (see the file .flake8) # source docs: rest-api.yml and scope-table.md are autogenerated
- repo: https://github.com/PyCQA/flake8 - repo: local
rev: "6.0.0"
hooks: hooks:
- id: flake8 - id: update-api-and-scope-docs
name: Update rest-api.yml and scope-table.md based on scopes.py
language: python
additional_dependencies: ["pytablewriter", "ruamel.yaml"]
entry: python docs/source/rbac/generate-scope-table.py
args:
- --update
files: jupyterhub/scopes.py
pass_filenames: false
# run eslint in the jsx directory
# need to pass through 'jsx:install-run' hook in
# top-level package.json to ensure dependencies are installed
# eslint pre-commit hook doesn't really work with eslint 9,
# so use `npm run lint:fix`
- id: jsx-eslint
name: eslint in jsx/
entry: npm run jsx:install-run lint:fix
pass_filenames: false
language: node
files: "jsx/.*"
# can't run on pre-commit; hangs, for some reason
stages:
- manual

View File

@@ -1,3 +1,4 @@
share/jupyterhub/templates/ share/jupyterhub/templates/
share/jupyterhub/static/js/admin-react.js share/jupyterhub/static/js/admin-react.js
jupyterhub/singleuser/templates/ jupyterhub/singleuser/templates/
docs/source/_templates/

View File

@@ -8,13 +8,13 @@ sphinx:
configuration: docs/source/conf.py configuration: docs/source/conf.py
build: build:
os: ubuntu-20.04 os: ubuntu-24.04
tools: tools:
nodejs: "16" python: "3.13"
python: "3.9"
python: python:
install: install:
- path: .
- requirements: docs/requirements.txt - requirements: docs/requirements.txt
formats: formats:

View File

@@ -12,3 +12,29 @@ Please see our documentation on
- [Testing JupyterHub and linting code](https://jupyterhub.readthedocs.io/en/latest/contributing/tests.html) - [Testing JupyterHub and linting code](https://jupyterhub.readthedocs.io/en/latest/contributing/tests.html)
If you need some help, feel free to ask on [Gitter](https://gitter.im/jupyterhub/jupyterhub) or [Discourse](https://discourse.jupyter.org/). If you need some help, feel free to ask on [Gitter](https://gitter.im/jupyterhub/jupyterhub) or [Discourse](https://discourse.jupyter.org/).
## Our Copyright Policy
Jupyter uses a shared copyright model. Each contributor maintains copyright
over their contributions to Jupyter. But, it is important to note that these
contributions are typically only changes to the repositories. Thus, the Jupyter
source code, in its entirety is not the copyright of any single person or
institution. Instead, it is the collective copyright of the entire Jupyter
Development Team. If individual contributors want to maintain a record of what
changes/contributions they have specific copyright on, they should indicate
their copyright in the commit message of the change, when they commit the
change to one of the Jupyter repositories.
With this in mind, the following banner should be used in any source code file
to indicate the copyright and license terms:
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
### About the Jupyter Development Team
The Jupyter Development Team is the set of all contributors to the Jupyter project.
This includes all of the Jupyter subprojects.
The team that coordinates JupyterHub subproject can be found here:
https://compass.hub.jupyter.org/page/governance.html

View File

@@ -1,59 +0,0 @@
# The Jupyter multi-user notebook server licensing terms
Jupyter multi-user notebook server is licensed under the terms of the Modified BSD License
(also known as New or Revised or 3-Clause BSD), as follows:
- Copyright (c) 2014-, Jupyter Development Team
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
Neither the name of the Jupyter Development Team nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
## About the Jupyter Development Team
The Jupyter Development Team is the set of all contributors to the Jupyter project.
This includes all of the Jupyter subprojects.
The core team that coordinates development on GitHub can be found here:
https://github.com/jupyter/.
## Our Copyright Policy
Jupyter uses a shared copyright model. Each contributor maintains copyright
over their contributions to Jupyter. But, it is important to note that these
contributions are typically only changes to the repositories. Thus, the Jupyter
source code, in its entirety is not the copyright of any single person or
institution. Instead, it is the collective copyright of the entire Jupyter
Development Team. If individual contributors want to maintain a record of what
changes/contributions they have specific copyright on, they should indicate
their copyright in the commit message of the change, when they commit the
change to one of the Jupyter repositories.
With this in mind, the following banner should be used in any source code file
to indicate the copyright and license terms:
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.

View File

@@ -1,136 +0,0 @@
# An incomplete base Docker image for running JupyterHub
#
# Add your configuration to create a complete derivative Docker image.
#
# Include your configuration settings by starting with one of two options:
#
# Option 1:
#
# FROM jupyterhub/jupyterhub:latest
#
# And put your configuration file jupyterhub_config.py in /srv/jupyterhub/jupyterhub_config.py.
#
# Option 2:
#
# Or you can create your jupyterhub config and database on the host machine, and mount it with:
#
# docker run -v $PWD:/srv/jupyterhub -t jupyterhub/jupyterhub
#
# NOTE
# If you base on jupyterhub/jupyterhub-onbuild
# your jupyterhub_config.py will be added automatically
# from your docker directory.
######################################################################
# This Dockerfile uses multi-stage builds with optimisations to build
# the JupyterHub wheel on the native architecture only
# https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide/
ARG BASE_IMAGE=ubuntu:22.04
######################################################################
# The JupyterHub wheel is pure Python so can be built for any platform
# on the native architecture (avoiding QEMU emulation)
FROM --platform=${BUILDPLATFORM:-linux/amd64} $BASE_IMAGE AS jupyterhub-builder
ENV DEBIAN_FRONTEND=noninteractive
# Don't clear apt cache, and don't combine RUN commands, so that cached layers can
# be reused in other stages
RUN apt-get update -qq \
&& apt-get install -yqq --no-install-recommends \
build-essential \
ca-certificates \
curl \
locales \
python3-dev \
python3-pip \
python3-pycurl \
python3-venv \
&& python3 -m pip install --no-cache-dir --upgrade setuptools pip build wheel
# Ubuntu 22.04 comes with Nodejs 12 which is too old for building JupyterHub JS
# It's fine at runtime though (used only by configurable-http-proxy)
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
&& apt-get install -yqq --no-install-recommends \
nodejs \
&& npm install --global yarn
WORKDIR /src/jupyterhub
# copy everything except whats in .dockerignore, its a
# compromise between needing to rebuild and maintaining
# what needs to be part of the build
COPY . .
ARG PIP_CACHE_DIR=/tmp/pip-cache
RUN --mount=type=cache,target=${PIP_CACHE_DIR} \
python3 -m build --wheel
######################################################################
# All other wheels required by JupyterHub, some are platform specific
FROM $BASE_IMAGE AS wheel-builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -qq \
&& apt-get install -yqq --no-install-recommends \
build-essential \
ca-certificates \
curl \
locales \
python3-dev \
python3-pip \
python3-pycurl \
python3-venv \
&& python3 -m pip install --no-cache-dir --upgrade setuptools pip build wheel
WORKDIR /src/jupyterhub
COPY --from=jupyterhub-builder /src/jupyterhub/dist/*.whl /src/jupyterhub/dist/
ARG PIP_CACHE_DIR=/tmp/pip-cache
RUN --mount=type=cache,target=${PIP_CACHE_DIR} \
python3 -m pip wheel --wheel-dir wheelhouse dist/*.whl
######################################################################
# The final JupyterHub image, platform specific
FROM $BASE_IMAGE AS jupyterhub
ENV DEBIAN_FRONTEND=noninteractive \
SHELL=/bin/bash \
LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8 \
PYTHONDONTWRITEBYTECODE=1
EXPOSE 8000
LABEL maintainer="Jupyter Project <jupyter@googlegroups.com>"
LABEL org.jupyter.service="jupyterhub"
WORKDIR /srv/jupyterhub
RUN apt-get update -qq \
&& apt-get install -yqq --no-install-recommends \
ca-certificates \
curl \
gnupg \
locales \
python-is-python3 \
python3-pip \
python3-pycurl \
nodejs \
npm \
&& locale-gen $LC_ALL \
&& npm install -g configurable-http-proxy@^4.2.0 \
# clean cache and logs
&& rm -rf /var/lib/apt/lists/* /var/log/* /var/tmp/* ~/.npm
# install the wheels we built in the previous stage
RUN --mount=type=cache,from=wheel-builder,source=/src/jupyterhub/wheelhouse,target=/tmp/wheelhouse \
# always make sure pip is up to date!
python3 -m pip install --no-compile --no-cache-dir --upgrade setuptools pip \
&& python3 -m pip install --no-compile --no-cache-dir /tmp/wheelhouse/*
CMD ["jupyterhub"]

11
LICENSE Normal file
View File

@@ -0,0 +1,11 @@
Copyright 2014-, Jupyter Development Team
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -1,29 +1,13 @@
include README.md # using setuptools-scm means we only need to handle _non-tracked files here_
include COPYING.md
include setupegg.py
include bower-lite
include package.json
include package-lock.json include package-lock.json
include *requirements.txt
include Dockerfile
graft onbuild # include untracked js/css artifacts, components
graft jsx
graft jupyterhub
graft scripts
graft share graft share
graft singleuser
graft ci
# Documentation # prune some large unused files from components.
graft docs # these patterns affect source distributions (sdists)
prune docs/node_modules # we have stricter exclusions from installation in setup.py:get_data_files
# Intermediate javascript files
prune jsx/node_modules
prune jsx/build
# prune some large unused files from components
prune share/jupyterhub/static/components/bootstrap/dist/css prune share/jupyterhub/static/components/bootstrap/dist/css
exclude share/jupyterhub/static/components/bootstrap/dist/fonts/*.svg exclude share/jupyterhub/static/components/bootstrap/dist/fonts/*.svg
prune share/jupyterhub/static/components/font-awesome/css prune share/jupyterhub/static/components/font-awesome/css
@@ -33,11 +17,3 @@ prune share/jupyterhub/static/components/jquery/external
prune share/jupyterhub/static/components/jquery/src prune share/jupyterhub/static/components/jquery/src
prune share/jupyterhub/static/components/moment/lang prune share/jupyterhub/static/components/moment/lang
prune share/jupyterhub/static/components/moment/min prune share/jupyterhub/static/components/moment/min
# Patterns to exclude from any directory
global-exclude *~
global-exclude *.pyc
global-exclude *.pyo
global-exclude .git
global-exclude .ipynb_checkpoints
global-exclude .bower.json

View File

@@ -14,7 +14,6 @@
[![Latest conda-forge version](https://img.shields.io/conda/vn/conda-forge/jupyterhub?logo=conda-forge)](https://anaconda.org/conda-forge/jupyterhub) [![Latest conda-forge version](https://img.shields.io/conda/vn/conda-forge/jupyterhub?logo=conda-forge)](https://anaconda.org/conda-forge/jupyterhub)
[![Documentation build status](https://img.shields.io/readthedocs/jupyterhub?logo=read-the-docs)](https://jupyterhub.readthedocs.org/en/latest/) [![Documentation build status](https://img.shields.io/readthedocs/jupyterhub?logo=read-the-docs)](https://jupyterhub.readthedocs.org/en/latest/)
[![GitHub Workflow Status - Test](https://img.shields.io/github/workflow/status/jupyterhub/jupyterhub/Test?logo=github&label=tests)](https://github.com/jupyterhub/jupyterhub/actions) [![GitHub Workflow Status - Test](https://img.shields.io/github/workflow/status/jupyterhub/jupyterhub/Test?logo=github&label=tests)](https://github.com/jupyterhub/jupyterhub/actions)
[![DockerHub build status](https://img.shields.io/docker/build/jupyterhub/jupyterhub?logo=docker&label=build)](https://hub.docker.com/r/jupyterhub/jupyterhub/tags)
[![Test coverage of code](https://codecov.io/gh/jupyterhub/jupyterhub/branch/main/graph/badge.svg)](https://codecov.io/gh/jupyterhub/jupyterhub) [![Test coverage of code](https://codecov.io/gh/jupyterhub/jupyterhub/branch/main/graph/badge.svg)](https://codecov.io/gh/jupyterhub/jupyterhub)
[![GitHub](https://img.shields.io/badge/issue_tracking-github-blue?logo=github)](https://github.com/jupyterhub/jupyterhub/issues) [![GitHub](https://img.shields.io/badge/issue_tracking-github-blue?logo=github)](https://github.com/jupyterhub/jupyterhub/issues)
[![Discourse](https://img.shields.io/badge/help_forum-discourse-blue?logo=discourse)](https://discourse.jupyter.org/c/jupyterhub) [![Discourse](https://img.shields.io/badge/help_forum-discourse-blue?logo=discourse)](https://discourse.jupyter.org/c/jupyterhub)
@@ -57,9 +56,8 @@ for administration of the Hub and its users.
### Check prerequisites ### Check prerequisites
- A Linux/Unix based system - A Linux/Unix based system
- [Python](https://www.python.org/downloads/) 3.6 or greater - [Python](https://www.python.org/downloads/) 3.8 or greater
- [nodejs/npm](https://www.npmjs.com/) - [nodejs/npm](https://www.npmjs.com/)
- If you are using **`conda`**, the nodejs and npm dependencies will be installed for - If you are using **`conda`**, the nodejs and npm dependencies will be installed for
you by conda. you by conda.
@@ -112,7 +110,7 @@ Visit `http://localhost:8000` in your browser, and sign in with your system user
_Note_: To allow multiple users to sign in to the server, you will need to _Note_: To allow multiple users to sign in to the server, you will need to
run the `jupyterhub` command as a _privileged user_, such as root. run the `jupyterhub` command as a _privileged user_, such as root.
The [wiki](https://github.com/jupyterhub/jupyterhub/wiki/Using-sudo-to-run-JupyterHub-without-root-privileges) The [documentation](https://jupyterhub.readthedocs.io/en/latest/howto/configuration/config-sudo.html)
describes how to run the server as a _less privileged user_, which requires describes how to run the server as a _less privileged user_, which requires
more configuration of the system. more configuration of the system.
@@ -160,10 +158,10 @@ To start the Hub on a specific url and port `10.0.1.2:443` with **https**:
## Docker ## Docker
A starter [**docker image for JupyterHub**](https://hub.docker.com/r/jupyterhub/jupyterhub/) A starter [**docker image for JupyterHub**](https://quay.io/repository/jupyterhub/jupyterhub)
gives a baseline deployment of JupyterHub using Docker. gives a baseline deployment of JupyterHub using Docker.
**Important:** This `jupyterhub/jupyterhub` image contains only the Hub itself, **Important:** This `quay.io/jupyterhub/jupyterhub` image contains only the Hub itself,
with no configuration. In general, one needs to make a derivative image, with with no configuration. In general, one needs to make a derivative image, with
at least a `jupyterhub_config.py` setting up an Authenticator and/or a Spawner. at least a `jupyterhub_config.py` setting up an Authenticator and/or a Spawner.
To run the single-user servers, which may be on the same system as the Hub or To run the single-user servers, which may be on the same system as the Hub or
@@ -171,7 +169,7 @@ not, Jupyter Notebook version 4 or greater must be installed.
The JupyterHub docker image can be started with the following command: The JupyterHub docker image can be started with the following command:
docker run -p 8000:8000 -d --name jupyterhub jupyterhub/jupyterhub jupyterhub docker run -p 8000:8000 -d --name jupyterhub quay.io/jupyterhub/jupyterhub jupyterhub
This command will create a container named `jupyterhub` that you can This command will create a container named `jupyterhub` that you can
**stop and resume** with `docker stop/start`. **stop and resume** with `docker stop/start`.
@@ -221,7 +219,7 @@ docker container or Linux VM.
We use a shared copyright model that enables all contributors to maintain the We use a shared copyright model that enables all contributors to maintain the
copyright on their contributions. copyright on their contributions.
All code is licensed under the terms of the [revised BSD license](./COPYING.md). All code is licensed under the terms of the [revised BSD license](./LICENSE).
## Help and resources ## Help and resources

View File

@@ -1,5 +1,5 @@
# Reporting a Vulnerability # Reporting a Vulnerability
If you believe youve found a security vulnerability in a Jupyter If you believe youve found a security vulnerability in a Jupyter
project, please report it to security@ipython.org. If you prefer to project, please report it!
encrypt your security reports, you can use [this PGP public key](https://jupyter-notebook.readthedocs.io/en/stable/_downloads/1d303a645f2505a8fd283826fafc9908/ipython_security.asc). See the [security documentation](https://jupyterhub.readthedocs.org/en/latest/contributing/security.html) for how.

View File

@@ -7,6 +7,7 @@ bower-lite
Since Bower's on its way out, Since Bower's on its way out,
stage frontend dependencies from node_modules into components stage frontend dependencies from node_modules into components
""" """
import json import json
import os import os
import shutil import shutil

View File

@@ -21,7 +21,7 @@ fi
# Configure a set of databases in the database server for upgrade tests # Configure a set of databases in the database server for upgrade tests
# this list must be in sync with versions in test_db.py:test_upgrade # this list must be in sync with versions in test_db.py:test_upgrade
set -x set -x
for SUFFIX in '' _upgrade_110 _upgrade_122 _upgrade_130 _upgrade_150 _upgrade_211; do for SUFFIX in '' _upgrade_110 _upgrade_122 _upgrade_130 _upgrade_150 _upgrade_211 _upgrade_311; do
$SQL_CLIENT "DROP DATABASE jupyterhub${SUFFIX};" 2>/dev/null || true $SQL_CLIENT "DROP DATABASE jupyterhub${SUFFIX};" 2>/dev/null || true
$SQL_CLIENT "CREATE DATABASE jupyterhub${SUFFIX} ${EXTRA_CREATE_DATABASE_ARGS:-};" $SQL_CLIENT "CREATE DATABASE jupyterhub${SUFFIX} ${EXTRA_CREATE_DATABASE_ARGS:-};"
done done

View File

@@ -0,0 +1,13 @@
alembic==1.4
async_generator==1.9
certipy==0.1.2
importlib_metadata==3.6; python_version < '3.10'
jinja2==2.11.0
jupyter_telemetry==0.1.0
oauthlib==3.0
pamela==1.1.0; sys_platform != 'win32'
prometheus_client==0.5.0
psutil==5.6.5; sys_platform == 'win32'
SQLAlchemy==1.4.1
tornado==5.1
traitlets==4.3.2

View File

@@ -0,0 +1,20 @@
# oldest-dependencies.txt is autogenerated.
# recreate with:
# cat requirements.txt | grep '>=' | sed -e 's@>=@==@g' > ci/legacy-env/oldest-dependencies.txt
-r ./oldest-dependencies.txt
# then `pip-compile` with Python 3.8
# below are additional pins to make this a working test env
# these are extracted from jupyterhub[test]
beautifulsoup4
coverage
playwright
pytest
pytest-cov
pytest-asyncio==0.17.*
requests-mock
virtualenv
# and any additional pins to make this a working test env
# e.g. pinning down a transitive dependency
notebook==6.*
markupsafe==2.0.*

View File

@@ -0,0 +1,285 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# pip-compile --output-file=requirements.old
#
alembic==1.4.0
# via -r ./oldest-dependencies.txt
appnope==0.1.3
# via
# ipykernel
# ipython
argon2-cffi==23.1.0
# via notebook
argon2-cffi-bindings==21.2.0
# via argon2-cffi
async-generator==1.9
# via -r ./oldest-dependencies.txt
attrs==23.1.0
# via
# jsonschema
# referencing
backcall==0.2.0
# via ipython
beautifulsoup4==4.12.2
# via -r requirements.in
bleach==6.0.0
# via nbconvert
certifi==2023.7.22
# via requests
certipy==0.1.2
# via -r ./oldest-dependencies.txt
cffi==1.15.1
# via
# argon2-cffi-bindings
# cryptography
charset-normalizer==3.2.0
# via requests
coverage[toml]==7.3.1
# via
# -r requirements.in
# pytest-cov
cryptography==41.0.4
# via pyopenssl
debugpy==1.8.0
# via ipykernel
decorator==5.1.1
# via
# ipython
# traitlets
defusedxml==0.7.1
# via nbconvert
distlib==0.3.7
# via virtualenv
entrypoints==0.4
# via
# jupyter-client
# nbconvert
exceptiongroup==1.1.3
# via pytest
fastjsonschema==2.18.0
# via nbformat
filelock==3.12.4
# via virtualenv
greenlet==2.0.2
# via
# playwright
# sqlalchemy
idna==3.4
# via requests
importlib-metadata==3.6.0 ; python_version < "3.10"
# via -r ./oldest-dependencies.txt
importlib-resources==6.1.0
# via
# jsonschema
# jsonschema-specifications
iniconfig==2.0.0
# via pytest
ipykernel==6.4.2
# via notebook
ipython==7.34.0
# via ipykernel
ipython-genutils==0.2.0
# via
# ipykernel
# notebook
# traitlets
jedi==0.19.0
# via ipython
jinja2==2.11.0
# via
# -r ./oldest-dependencies.txt
# nbconvert
# notebook
jsonschema==4.19.1
# via
# jupyter-telemetry
# nbformat
jsonschema-specifications==2023.7.1
# via jsonschema
jupyter-client==7.2.0
# via
# ipykernel
# nbclient
# notebook
jupyter-core==5.0.0
# via
# jupyter-client
# nbconvert
# nbformat
# notebook
jupyter-telemetry==0.1.0
# via -r ./oldest-dependencies.txt
jupyterlab-pygments==0.2.2
# via nbconvert
mako==1.2.4
# via alembic
markupsafe==2.0.1
# via
# -r requirements.in
# jinja2
# mako
matplotlib-inline==0.1.6
# via
# ipykernel
# ipython
mistune==0.8.4
# via nbconvert
nbclient==0.5.11
# via nbconvert
nbconvert==6.0.7
# via notebook
nbformat==5.3.0
# via
# nbclient
# nbconvert
# notebook
nest-asyncio==1.5.8
# via
# jupyter-client
# nbclient
notebook==6.1.6
# via -r requirements.in
oauthlib==3.0.0
# via -r ./oldest-dependencies.txt
packaging==23.1
# via pytest
pamela==1.1.0 ; sys_platform != "win32"
# via -r ./oldest-dependencies.txt
pandocfilters==1.5.0
# via nbconvert
parso==0.8.3
# via jedi
pexpect==4.8.0
# via ipython
pickleshare==0.7.5
# via ipython
pkgutil-resolve-name==1.3.10
# via jsonschema
platformdirs==3.10.0
# via
# jupyter-core
# virtualenv
playwright==1.38.0
# via -r requirements.in
pluggy==1.3.0
# via pytest
prometheus-client==0.5.0
# via
# -r ./oldest-dependencies.txt
# notebook
prompt-toolkit==3.0.39
# via ipython
ptyprocess==0.7.0
# via
# pexpect
# terminado
pycparser==2.21
# via cffi
pyee==9.0.4
# via playwright
pygments==2.16.1
# via
# ipython
# nbconvert
pyopenssl==23.2.0
# via certipy
pytest==7.4.2
# via
# -r requirements.in
# pytest-asyncio
# pytest-cov
pytest-asyncio==0.17.2
# via -r requirements.in
pytest-cov==4.1.0
# via -r requirements.in
python-dateutil==2.8.2
# via
# alembic
# jupyter-client
python-editor==1.0.4
# via alembic
python-json-logger==2.0.7
# via jupyter-telemetry
pyzmq==25.1.1
# via
# jupyter-client
# notebook
referencing==0.30.2
# via
# jsonschema
# jsonschema-specifications
requests==2.31.0
# via requests-mock
requests-mock==1.11.0
# via -r requirements.in
rpds-py==0.10.3
# via
# jsonschema
# referencing
ruamel-yaml==0.17.32
# via jupyter-telemetry
ruamel-yaml-clib==0.2.7
# via ruamel-yaml
send2trash==1.8.2
# via notebook
six==1.16.0
# via
# bleach
# python-dateutil
# requests-mock
# traitlets
soupsieve==2.5
# via beautifulsoup4
sqlalchemy==1.4.1
# via
# -r ./oldest-dependencies.txt
# alembic
terminado==0.13.3
# via notebook
testpath==0.6.0
# via nbconvert
tomli==2.0.1
# via
# coverage
# pytest
tornado==5.1
# via
# -r ./oldest-dependencies.txt
# ipykernel
# jupyter-client
# notebook
# terminado
traitlets==4.3.2
# via
# -r ./oldest-dependencies.txt
# ipykernel
# ipython
# jupyter-client
# jupyter-core
# jupyter-telemetry
# matplotlib-inline
# nbclient
# nbconvert
# nbformat
# notebook
typing-extensions==4.8.0
# via
# playwright
# pyee
urllib3==2.0.5
# via requests
virtualenv==20.24.5
# via -r requirements.in
wcwidth==0.2.6
# via prompt-toolkit
webencodings==0.5.1
# via bleach
zipp==3.17.0
# via
# importlib-metadata
# importlib-resources
# The following packages are considered to be unsafe in a requirements file:
# setuptools

View File

@@ -1,16 +0,0 @@
# Demo JupyterHub Docker image
#
# This should only be used for demo or testing and not as a base image to build on.
#
# It includes the notebook package and it uses the DummyAuthenticator and the SimpleLocalProcessSpawner.
ARG BASE_IMAGE=jupyterhub/jupyterhub-onbuild
FROM ${BASE_IMAGE}
# Install the notebook package
RUN python3 -m pip install notebook
# Create a demo user
RUN useradd --create-home demo
RUN chown demo .
USER demo

View File

@@ -1,26 +0,0 @@
## Demo Dockerfile
This is a demo JupyterHub Docker image to help you get a quick overview of what
JupyterHub is and how it works.
It uses the SimpleLocalProcessSpawner to spawn new user servers and
DummyAuthenticator for authentication.
The DummyAuthenticator allows you to log in with any username & password and the
SimpleLocalProcessSpawner allows starting servers without having to create a
local user for each JupyterHub user.
### Important!
This should only be used for demo or testing purposes!
It shouldn't be used as a base image to build on.
### Try it
1. `cd` to the root of your jupyterhub repo.
2. Build the demo image with `docker build -t jupyterhub-demo demo-image`.
3. Run the demo image with `docker run -d -p 8000:8000 jupyterhub-demo`.
4. Visit http://localhost:8000 and login with any username and password
5. Happy demo-ing :tada:!

View File

@@ -1,7 +0,0 @@
# Configuration file for jupyterhub-demo
c = get_config()
# Use DummyAuthenticator and SimpleSpawner
c.JupyterHub.spawner_class = "simple"
c.JupyterHub.authenticator_class = "dummy"

View File

@@ -1,14 +0,0 @@
import os
from jupyterhub._data import DATA_FILES_PATH
print(f"DATA_FILES_PATH={DATA_FILES_PATH}")
for sub_path in (
"templates",
"static/components",
"static/css/style.min.css",
"static/js/admin-react.js",
):
path = os.path.join(DATA_FILES_PATH, sub_path)
assert os.path.exists(path), path

View File

@@ -35,7 +35,7 @@ help:
# - NOTE: If the pre-requisites for the html target is updated, also update the # - NOTE: If the pre-requisites for the html target is updated, also update the
# Read The Docs section in docs/source/conf.py. # Read The Docs section in docs/source/conf.py.
# #
html: metrics scopes html: metrics
$(SPHINXBUILD) -b html "$(SOURCEDIR)" "$(BUILDDIR)/html" $(SPHINXOPTS) $(SPHINXBUILD) -b html "$(SOURCEDIR)" "$(BUILDDIR)/html" $(SPHINXOPTS)
@echo @echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html." @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
@@ -44,10 +44,6 @@ metrics: source/reference/metrics.md
source/reference/metrics.md: source/reference/metrics.md:
python3 generate-metrics.py python3 generate-metrics.py
scopes: source/rbac/scope-table.md
source/rbac/scope-table.md:
python3 source/rbac/generate-scope-table.py
# Manually added targets - related to development # Manually added targets - related to development
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
@@ -56,7 +52,7 @@ source/rbac/scope-table.md:
# - requires sphinx-autobuild, see # - requires sphinx-autobuild, see
# https://sphinxcontrib-spelling.readthedocs.io/en/latest/ # https://sphinxcontrib-spelling.readthedocs.io/en/latest/
# - builds and rebuilds html on changes to source, but does not re-generate # - builds and rebuilds html on changes to source, but does not re-generate
# metrics/scopes files # metrics files
# - starts a livereload enabled webserver and opens up a browser # - starts a livereload enabled webserver and opens up a browser
devenv: html devenv: html
sphinx-autobuild -b html --open-browser "$(SOURCEDIR)" "$(BUILDDIR)/html" sphinx-autobuild -b html --open-browser "$(SOURCEDIR)" "$(BUILDDIR)/html"

View File

@@ -1,14 +1,8 @@
# We install the jupyterhub package to help autodoc-traits inspect it and # docs also require jupyterhub itself to be installed
# generate documentation. # don't depend on it here, as that often results in a duplicate
# # installation of jupyterhub that's already installed
# FIXME: If there is a way for this requirements.txt file to pass a flag that
# the build system can intercept to not build the javascript artifacts,
# then do so so. That would mean that installing the documentation can
# avoid needing node/npm installed.
#
--editable .
autodoc-traits autodoc-traits
intersphinx-registry
jupyterhub-sphinx-theme jupyterhub-sphinx-theme
myst-parser>=0.19 myst-parser>=0.19
pre-commit pre-commit

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
{%- set _meta = meta | default({}) %}
{%- extends _meta.page_template | default('!page.html') %}

View File

@@ -0,0 +1,32 @@
{# djlint: off #}
{%- extends "!layout.html" %}
{# not sure why, but theme CSS prevents scrolling within redoc content
# If this were fixed, we could keep the navbar and footer
#}
{% block css %}
{% endblock css %}
{% block docs_navbar %}
{% endblock docs_navbar %}
{% block footer %}
{% endblock footer %}
{%- block body_tag -%}<body>{%- endblock body_tag %}
{%- block extrahead %}
{{ super() }}
<link href="{{ pathto('_static/redoc-fonts.css', 1) }}" rel="stylesheet" />
<script src="{{ pathto('_static/redoc.js', 1) }}"></script>
{%- endblock extrahead %}
{%- block content %}
<redoc id="redoc-spec"></redoc>
<script>
if (location.protocol === "file:") {
document.body.innerText = "Rendered API specification doesn't work with file: protocol. Use sphinx-autobuild to do local builds of the docs, served over HTTP."
} else {
Redoc.init(
"{{ pathto('_static/rest-api.yml', 1) }}",
{{ meta.redoc_options | default ({}) }},
document.getElementById("redoc-spec"),
);
}
</script>
{%- endblock content %}
{# djlint: on #}

View File

@@ -6,14 +6,21 @@ import contextlib
import datetime import datetime
import io import io
import os import os
import re
import subprocess import subprocess
from pathlib import Path
from urllib.request import urlretrieve
from docutils import nodes from docutils import nodes
from intersphinx_registry import get_intersphinx_mapping
from ruamel.yaml import YAML
from sphinx.directives.other import SphinxDirective from sphinx.directives.other import SphinxDirective
from sphinx.util import logging
import jupyterhub import jupyterhub
from jupyterhub.app import JupyterHub from jupyterhub.app import JupyterHub
logger = logging.getLogger(__name__)
# -- Project information ----------------------------------------------------- # -- Project information -----------------------------------------------------
# ref: https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information # ref: https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
# #
@@ -42,6 +49,10 @@ source_suffix = [".md"]
# default_role let's use use `foo` instead of ``foo`` in rST # default_role let's use use `foo` instead of ``foo`` in rST
default_role = "literal" default_role = "literal"
docs = Path(__file__).parent.parent.absolute()
docs_source = docs / "source"
rest_api_yaml = docs_source / "_static" / "rest-api.yml"
# -- MyST configuration ------------------------------------------------------ # -- MyST configuration ------------------------------------------------------
# ref: https://myst-parser.readthedocs.io/en/latest/configuration.html # ref: https://myst-parser.readthedocs.io/en/latest/configuration.html
@@ -60,6 +71,8 @@ myst_enable_extensions = [
myst_substitutions = { myst_substitutions = {
# date example: Dev 07, 2022 # date example: Dev 07, 2022
"date": datetime.date.today().strftime("%b %d, %Y").title(), "date": datetime.date.today().strftime("%b %d, %Y").title(),
"node_min": "12",
"python_min": "3.8",
"version": jupyterhub.__version__, "version": jupyterhub.__version__,
} }
@@ -119,10 +132,102 @@ class HelpAllDirective(SphinxDirective):
return [par] return [par]
class RestAPILinksDirective(SphinxDirective):
"""Directive to populate link targets for the REST API
The resulting nodes resolve xref targets,
but are not actually rendered in the final result
which is handled by a custom template.
"""
has_content = False
required_arguments = 0
optional_arguments = 0
final_argument_whitespace = False
option_spec = {}
def run(self):
targets = []
yaml = YAML(typ="safe")
with rest_api_yaml.open() as f:
api = yaml.load(f)
for path, path_spec in api["paths"].items():
for method, operation in path_spec.items():
operation_id = operation.get("operationId")
if not operation_id:
logger.warning(f"No operation id for {method} {path}")
continue
# 'id' is the id on the page (must match redoc anchor)
# 'name' is the name of the ref for use in our documents
target = nodes.target(
ids=[f"operation/{operation_id}"],
names=[f"rest-api-{operation_id}"],
)
targets.append(target)
self.state.document.note_explicit_target(target, target)
return targets
templates_path = ["_templates"]
def stage_redoc_js(app, exception):
"""Download redoc.js to our static files"""
if app.builder.name != "html":
logger.info(f"Skipping redoc download for builder: {app.builder.name}")
return
out_static = Path(app.builder.outdir) / "_static"
redoc_version = "2.1.3"
redoc_url = (
f"https://cdn.redoc.ly/redoc/v{redoc_version}/bundles/redoc.standalone.js"
)
dest = out_static / "redoc.js"
if not dest.exists():
logger.info(f"Downloading {redoc_url} -> {dest}")
urlretrieve(redoc_url, dest)
# stage fonts for redoc from google fonts
fonts_css_url = "https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700"
fonts_css_file = out_static / "redoc-fonts.css"
fonts_dir = out_static / "fonts"
fonts_dir.mkdir(exist_ok=True)
if not fonts_css_file.exists():
logger.info(f"Downloading {fonts_css_url} -> {fonts_css_file}")
urlretrieve(fonts_css_url, fonts_css_file)
# For each font external font URL,
# download the font and rewrite to a local URL
# The downloaded TTF fonts have license info in their metadata
with open(fonts_css_file) as f:
fonts_css = f.read()
fonts_css_changed = False
for font_url in re.findall(r'url\((https?[^\)]+)\)', fonts_css):
fonts_css_changed = True
filename = font_url.rpartition("/")[-1]
dest = fonts_dir / filename
local_url = str(dest.relative_to(fonts_css_file.parent))
fonts_css = fonts_css.replace(font_url, local_url)
if not dest.exists():
logger.info(f"Downloading {font_url} -> {dest}")
urlretrieve(font_url, dest)
if fonts_css_changed:
# rewrite font css with local URLs
with open(fonts_css_file, "w") as f:
logger.info(f"Rewriting URLs in {fonts_css_file}")
f.write(fonts_css)
def setup(app): def setup(app):
app.connect("build-finished", stage_redoc_js)
app.add_css_file("custom.css") app.add_css_file("custom.css")
app.add_directive("jupyterhub-generate-config", ConfigDirective) app.add_directive("jupyterhub-generate-config", ConfigDirective)
app.add_directive("jupyterhub-help-all", HelpAllDirective) app.add_directive("jupyterhub-help-all", HelpAllDirective)
app.add_directive("jupyterhub-rest-api-links", RestAPILinksDirective)
# -- Read The Docs ----------------------------------------------------------- # -- Read The Docs -----------------------------------------------------------
@@ -131,8 +236,7 @@ def setup(app):
# pre-requisite steps for "make html" from here if needed. # pre-requisite steps for "make html" from here if needed.
# #
if os.environ.get("READTHEDOCS"): if os.environ.get("READTHEDOCS"):
docs = os.path.dirname(os.path.dirname(__file__)) subprocess.check_call(["make", "metrics", "scopes"], cwd=str(docs))
subprocess.check_call(["make", "metrics", "scopes"], cwd=docs)
# -- Spell checking ---------------------------------------------------------- # -- Spell checking ----------------------------------------------------------
@@ -158,6 +262,7 @@ html_static_path = ["_static"]
html_theme = "jupyterhub_sphinx_theme" html_theme = "jupyterhub_sphinx_theme"
html_theme_options = { html_theme_options = {
"header_links_before_dropdown": 6,
"icon_links": [ "icon_links": [
{ {
"name": "GitHub", "name": "GitHub",
@@ -182,13 +287,22 @@ html_context = {
linkcheck_ignore = [ linkcheck_ignore = [
r"(.*)github\.com(.*)#", # javascript based anchors r"(.*)github\.com(.*)#", # javascript based anchors
r"(.*)/#%21(.*)/(.*)", # /#!forum/jupyter - encoded anchor edge case r"(.*)/#%21(.*)/(.*)", # /#!forum/jupyter - encoded anchor edge case
r"https?://(.*\.)?example\.(org|com)(/.*)?", # example links
r"https://github.com/[^/]*$", # too many github usernames / searches in changelog r"https://github.com/[^/]*$", # too many github usernames / searches in changelog
"https://github.com/jupyterhub/jupyterhub/pull/", # too many PRs in changelog "https://github.com/jupyterhub/jupyterhub/pull/", # too many PRs in changelog
"https://github.com/jupyterhub/jupyterhub/compare/", # too many comparisons in changelog "https://github.com/jupyterhub/jupyterhub/compare/", # too many comparisons in changelog
"https://schema.jupyter.org/jupyterhub/.*", # schemas are not published yet
r"https?://(localhost|127.0.0.1).*", # ignore localhost references in auto-links r"https?://(localhost|127.0.0.1).*", # ignore localhost references in auto-links
r".*/rest-api.html#.*", # ignore javascript-resolved internal rest-api links r"https://linux.die.net/.*", # linux.die.net seems to block requests from CI with 403 sometimes
r"https://jupyter.chameleoncloud.org", # FIXME: ignore (presumably) short-term SSL issue # don't check links to unpublished advisories
r"https://github.com/jupyterhub/jupyterhub/security/advisories/.*",
# Occasionally blocks CI checks with 403
r"https://www\.mysql\.com",
r"https://www\.npmjs\.com",
# Occasionally blocks CI checks with SSL error
r"https://mediaspace\.msu\.edu/.*",
] ]
linkcheck_anchors_ignore = [ linkcheck_anchors_ignore = [
"/#!", "/#!",
"/#%21", "/#%21",
@@ -197,12 +311,15 @@ linkcheck_anchors_ignore = [
# -- Intersphinx ------------------------------------------------------------- # -- Intersphinx -------------------------------------------------------------
# ref: https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#configuration # ref: https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#configuration
# #
intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None), intersphinx_mapping = get_intersphinx_mapping(
"tornado": ("https://www.tornadoweb.org/en/stable/", None), packages={
"jupyter-server": ("https://jupyter-server.readthedocs.io/en/stable/", None), "python",
"nbgitpuller": ("https://nbgitpuller.readthedocs.io/en/latest", None), "tornado",
} "jupyter-server",
"nbgitpuller",
}
)
# -- Options for the opengraph extension ------------------------------------- # -- Options for the opengraph extension -------------------------------------
# ref: https://github.com/wpilibsuite/sphinxext-opengraph#options # ref: https://github.com/wpilibsuite/sphinxext-opengraph#options

View File

@@ -1,18 +1,32 @@
(contributing:community)=
# Community communication channels # Community communication channels
```{note}
Our community is distributed across the world in various timezones, so please be patient if you do not get a response immediately!
```
We use different channels of communication for different purposes. Whichever one you use will depend on what kind of communication you want to engage in. We use different channels of communication for different purposes. Whichever one you use will depend on what kind of communication you want to engage in.
## Discourse (recommended) ## Discourse (recommended)
We use [Discourse](https://discourse.jupyter.org) for online discussions and support questions. ```{note}
You can ask questions here if you are a first-time contributor to the JupyterHub project. [Discourse] is open source.
Everyone in the Jupyter community is welcome to bring ideas and questions there. ```
We recommend that you first use our Discourse as all past and current discussions on it are archived and searchable. Thus, all discussions remain useful and accessible to the whole community. We use [Jupyter instance of Discourse] for online discussions and support questions.
You can ask questions at [Jupyter instance of Discourse] if you are a first-time contributor to the JupyterHub project.
Everyone is welcome to bring ideas and questions at [Jupyter instance of Discourse].
## Gitter We recommend that you first use [Jupyter instance of Discourse] as all past and current discussions on it are archived and searchable. Thus, all discussions remain useful and accessible to the whole community.
We use [our Gitter channel](https://gitter.im/jupyterhub/jupyterhub) for online, real-time text chat; a place for more ephemeral discussions. When you're not on Discourse, you can stop here to have other discussions on the fly. ## Zulip
```{note}
[Zulip] is open source.
```
We use [Jupyter instance of Zulip] for online, real-time text chat; a place for more ephemeral discussions. When you're not on [Jupyter instance of Discourse], you can stop at [Jupyter instance of Zulip] to have other discussions on the fly.
## Github Issues ## Github Issues
@@ -22,6 +36,7 @@ We use [our Gitter channel](https://gitter.im/jupyterhub/jupyterhub) for online,
- If you are using a specific JupyterHub distribution (such as [Zero to JupyterHub on Kubernetes](https://github.com/jupyterhub/zero-to-jupyterhub-k8s) or [The Littlest JupyterHub](https://github.com/jupyterhub/the-littlest-jupyterhub/)), you should open issues directly in their repository. - If you are using a specific JupyterHub distribution (such as [Zero to JupyterHub on Kubernetes](https://github.com/jupyterhub/zero-to-jupyterhub-k8s) or [The Littlest JupyterHub](https://github.com/jupyterhub/the-littlest-jupyterhub/)), you should open issues directly in their repository.
- If you cannot find a repository to open your issue in, do not worry! Open the issue in the [main JupyterHub repository](https://github.com/jupyterhub/jupyterhub/) and our community will help you figure it out. - If you cannot find a repository to open your issue in, do not worry! Open the issue in the [main JupyterHub repository](https://github.com/jupyterhub/jupyterhub/) and our community will help you figure it out.
```{note} [Discourse]: https://www.discourse.org/
Our community is distributed across the world in various timezones, so please be patient if you do not get a response immediately! [Jupyter instance of Discourse]: https://discourse.jupyter.org
``` [Jupyter instance of Zulip]: https://jupyter.zulipchat.com/
[Zulip]: https://zulip.com/

View File

@@ -1,3 +1,5 @@
(contributing:contributors)=
# Contributors # Contributors
Project Jupyter thanks the following people for their help and Project Jupyter thanks the following people for their help and

View File

@@ -1,53 +1,46 @@
(contributing-docs)= (contributing:docs)=
# Contributing Documentation # Contributing Documentation
Documentation is often more important than code. This page helps Documentation is often more important than code. This page helps
you get set up on how to contribute to JupyterHub's documentation. you get set up on how to contribute to JupyterHub's documentation.
We use [Sphinx](https://www.sphinx-doc.org) to build our documentation. It takes
our documentation source files (written in [Markedly Structured Text (MyST)](https://mystmd.org/) and
stored under the `docs/source` directory) and converts it into various
formats for people to read.
## Building documentation locally ## Building documentation locally
We use [sphinx](https://www.sphinx-doc.org) to build our documentation. It takes To make sure the documentation you write or
our documentation source files (written in [markdown](https://daringfireball.net/projects/markdown/) or [reStructuredText](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html) &
stored under the `docs/source` directory) and converts it into various
formats for people to read. To make sure the documentation you write or
change renders correctly, it is good practice to test it locally. change renders correctly, it is good practice to test it locally.
1. Make sure you have successfully completed {ref}`contributing/setup`. ```{note}
You will need Python and Git installed. Installation details are avaiable at {ref}`contributing:setup`.
```
2. Install the packages required to build the docs. 1. Install the packages required to build the docs.
```bash ```bash
python3 -m pip install -r docs/requirements.txt python3 -m pip install -r docs/requirements.txt
python3 -m pip install sphinx-autobuild
``` ```
3. Build the html version of the docs. This is the most commonly used 2. Build the HTML version of the docs. This is the most commonly used
output format, so verifying it renders correctly is usually good output format, so verifying it renders correctly is usually good
enough. enough.
```bash ```bash
cd docs sphinx-autobuild docs/source/ docs/_build/html
make html
``` ```
This step will display any syntax or formatting errors in the documentation, This step will display any syntax or formatting errors in the documentation,
along with the filename / line number in which they occurred. Fix them, along with the filename / line number in which they occurred. Fix them,
and re-run the `make html` command to re-render the documentation. and the HTML will be re-render automatically.
4. View the rendered documentation by opening `_build/html/index.html` in 3. View the rendered documentation by opening <http://127.0.0.1:8000> in
a web browser. a web browser.
:::{tip}
**On Windows**, you can open a file from the terminal with `start <path-to-file>`.
**On macOS**, you can do the same with `open <path-to-file>`.
**On Linux**, you can do the same with `xdg-open <path-to-file>`.
After opening index.html in your browser you can just refresh the page whenever
you rebuild the docs via `make html`
:::
(contributing-docs-conventions)= (contributing-docs-conventions)=
## Documentation conventions ## Documentation conventions
@@ -67,10 +60,10 @@ approach:
python3 -m pip python3 -m pip
``` ```
This invokes pip explicitly using the python3 binary that you are This invokes `pip` explicitly using the `python3` binary that you are
currently using. This is the **recommended way** to invoke pip currently using. This is the **recommended way** to invoke pip
in our documentation, since it is least likely to cause problems in our documentation, since it is least likely to cause problems
with python3 and pip being from different environments. with `python3` and `pip` being from different environments.
For more information on how to invoke `pip` commands, see For more information on how to invoke `pip` commands, see
[the pip documentation](https://pip.pypa.io/en/stable/). [the `pip` documentation](https://pip.pypa.io/en/stable/).

View File

@@ -1,7 +1,9 @@
(contributing)=
# Contributing # Contributing
We want you to contribute to JupyterHub in ways that are most exciting We want you to contribute to JupyterHub in ways that are most exciting
and useful to you. We value documentation, testing, bug reporting & code equally, and useful to you. We value documentation, testing, bug reporting and code equally,
and are glad to have your contributions in whatever form you wish. and are glad to have your contributions in whatever form you wish.
Be sure to first check our [Code of Conduct](https://github.com/jupyter/governance/blob/HEAD/conduct/code_of_conduct.md) Be sure to first check our [Code of Conduct](https://github.com/jupyter/governance/blob/HEAD/conduct/code_of_conduct.md)

View File

@@ -1,3 +1,5 @@
(contributing:roadmap)=
# The JupyterHub roadmap # The JupyterHub roadmap
This roadmap collects "next steps" for JupyterHub. It is about creating a This roadmap collects "next steps" for JupyterHub. It is about creating a

View File

@@ -1,9 +1,15 @@
(contributing:security)=
# Reporting security issues in Jupyter or JupyterHub # Reporting security issues in Jupyter or JupyterHub
If you find a security vulnerability in Jupyter or JupyterHub, If you find a security vulnerability in Jupyter or JupyterHub,
whether it is a failure of the security model described in [Security Overview](web-security) whether it is a failure of the security model described in [Security Overview](explanation:security)
or a failure in implementation, or a failure in implementation,
please report it to <mailto:security@ipython.org>. please report it!
Please use GitHub's "Report a Vulnerability" button under Security > Advisories on the appropriate repo,
e.g. [report here for JupyterHub](https://github.com/jupyterhub/jupyterhub/security/advisories).
You may also send an email to <mailto:security@ipython.org>, but the GitHub reporting system is preferred.
If you prefer to encrypt your security reports, If you prefer to encrypt your security reports,
you can use {download}`this PGP public key </ipython_security.asc>`. you can use {download}`this PGP public key </ipython_security.asc>`.

View File

@@ -1,38 +1,57 @@
(contributing/setup)= (contributing:setup)=
# Setting up a development install # Setting up a development install
JupyterHub's continuous integration runs on [Ubuntu LTS](https://ubuntu.com/).
While JupyterHub is only tested on one [Linux distribution](https://en.wikipedia.org/wiki/Linux_distribution),
it should be fairly insensitive to variations between common [POXIS](https://en.wikipedia.org/wiki/POSIX) implementation,
though we don't have the bandwidth to verify this automatically and continuously.
Feel free to try it on your platform, and be sure to {ref}`let us know <contributing:community>` about any issues you encounter.
## System requirements ## System requirements
JupyterHub can only run on macOS or Linux operating systems. If you are Your system **must** be able to run
using Windows, we recommend using [VirtualBox](https://virtualbox.org)
or a similar system to run [Ubuntu Linux](https://ubuntu.com) for - Python
development. - NodeJS
- Git
Our small team knows JupyterHub to work perfectly on macOS or Linux operating systems.
```{admonition} What about Windows?
Some users have reported that JupyterHub runs successfully on [Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/wsl/). We have no plans to support Windows outside of the WSL.
```
```{admonition} What about virtualization?
Using any form of virtualization (for example, [VirtualBox](https://www.virtualbox.org/), [Docker](https://www.docker.com/), [Podman](https://podman.io/), [WSL](https://learn.microsoft.com/en-us/windows/wsl/)) is a good way to get up and running quickly, though properly configuring the networking settings can be a bit tricky.
```
### Install Python ### Install Python
JupyterHub is written in the [Python](https://python.org) programming language and JupyterHub is written in the [Python](https://www.python.org) programming language and
requires you have at least version 3.6 installed locally. If you havent requires you have at least version {{python_min}} installed locally. If you havent
installed Python before, the recommended way to install it is to use installed Python before, the recommended way to install it is to use
[Miniforge](https://github.com/conda-forge/miniforge#download). [Miniforge](https://github.com/conda-forge/miniforge#download).
### Install nodejs ### Install NodeJS
[NodeJS 12+](https://nodejs.org/en/) is required for building some JavaScript components. Some JavaScript components require you have at least version {{node_min}} of [NodeJS](https://nodejs.org/en/) installed locally.
`configurable-http-proxy`, the default proxy implementation for JupyterHub, is written in Javascript. `configurable-http-proxy`, the default proxy implementation for JupyterHub, is written in JavaScript.
If you have not installed NodeJS before, we recommend installing it in the `miniconda` environment you set up for Python. If you have not installed NodeJS before, we recommend installing it in the `miniconda` environment you set up for Python.
You can do so with `conda install nodejs`. You can do so with `conda install nodejs`.
Many in the Jupyter community use \[`nvm`\](<https://github.com/nvm-sh/nvm>) to Many in the Jupyter community use [`nvm`](https://github.com/nvm-sh/nvm) to
managing node dependencies. managing node dependencies.
### Install git ### Install Git
JupyterHub uses [Git](https://git-scm.com) & [GitHub](https://github.com) JupyterHub uses [Git](https://git-scm.com) and [GitHub](https://github.com)
for development & collaboration. You need to [install git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) to work on for development and collaboration. You need to [install Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) to work on
JupyterHub. We also recommend getting a free account on GitHub.com. JupyterHub. We also recommend getting a free account on GitHub.
## Setting up a development install ## Install JupyterHub for development
When developing JupyterHub, you would need to make changes and be able to instantly view the results of the changes. To achieve that, a developer install is required. When developing JupyterHub, you would need to make changes and be able to instantly view the results of the changes. To achieve that, a developer install is required.
@@ -44,7 +63,7 @@ be achieved in many ways, for example, `tox`, `conda`, `docker`, etc. See this
a more detailed discussion. a more detailed discussion.
::: :::
1. Clone the [JupyterHub git repository](https://github.com/jupyterhub/jupyterhub) 1. Clone the [JupyterHub Git repository](https://github.com/jupyterhub/jupyterhub)
to your computer. to your computer.
```bash ```bash
@@ -59,18 +78,18 @@ a more detailed discussion.
python -V python -V
``` ```
This should return a version number greater than or equal to 3.6. This should return a version number greater than or equal to {{python_min}}.
```bash ```bash
npm -v npm -v
``` ```
This should return a version number greater than or equal to 5.0. This should return a version number greater than or equal to {{node_min}}.
3. Install `configurable-http-proxy` (required to run and test the default JupyterHub configuration) and `yarn` (required to build some components): 3. Install `configurable-http-proxy` (required to run and test the default JupyterHub configuration):
```bash ```bash
npm install -g configurable-http-proxy yarn npm install -g configurable-http-proxy
``` ```
If you get an error that says `Error: EACCES: permission denied`, you might need to prefix the command with `sudo`. If you get an error that says `Error: EACCES: permission denied`, you might need to prefix the command with `sudo`.
@@ -78,7 +97,7 @@ a more detailed discussion.
If you do not have access to sudo, you may instead run the following commands: If you do not have access to sudo, you may instead run the following commands:
```bash ```bash
npm install configurable-http-proxy yarn npm install configurable-http-proxy
export PATH=$PATH:$(pwd)/node_modules/.bin export PATH=$PATH:$(pwd)/node_modules/.bin
``` ```
@@ -87,36 +106,29 @@ a more detailed discussion.
If you are using conda you can instead run: If you are using conda you can instead run:
```bash ```bash
conda install configurable-http-proxy yarn conda install configurable-http-proxy
``` ```
4. Install an editable version of JupyterHub and its requirements for 4. Install an editable version of JupyterHub and its requirements for
development and testing. This lets you edit JupyterHub code in a text editor development and testing. This lets you edit JupyterHub code in a text editor
& restart the JupyterHub process to see your code changes immediately. and restart the JupyterHub process to see your code changes immediately.
```bash ```bash
python3 -m pip install --editable ".[test]" python3 -m pip install --editable ".[test]"
``` ```
5. Set up a database. 5. You are now ready to start JupyterHub!
The default database engine is `sqlite` so if you are just trying
to get up and running quickly for local development that should be
available via [Python](https://docs.python.org/3.5/library/sqlite3.html).
See [The Hub's Database](hub-database) for details on other supported databases.
6. You are now ready to start JupyterHub!
```bash ```bash
jupyterhub jupyterhub
``` ```
7. You can access JupyterHub from your browser at 6. You can access JupyterHub from your browser at
`http://localhost:8000` now. `http://localhost:8000` now.
Happy developing! Happy developing!
## Using DummyAuthenticator & SimpleLocalProcessSpawner ## Using DummyAuthenticator and SimpleLocalProcessSpawner
To simplify testing of JupyterHub, it is helpful to use To simplify testing of JupyterHub, it is helpful to use
{class}`~jupyterhub.auth.DummyAuthenticator` instead of the default JupyterHub {class}`~jupyterhub.auth.DummyAuthenticator` instead of the default JupyterHub
@@ -130,22 +142,53 @@ configuration:
jupyterhub -f testing/jupyterhub_config.py jupyterhub -f testing/jupyterhub_config.py
``` ```
The test configuration enables a few things to make testing easier:
- use 'dummy' authentication and 'simple' spawner
- named servers are enabled
- listen only on localhost
- 'admin' is an admin user, if you want to test the admin page
- disable caching of static files
The default JupyterHub [authenticator](PAMAuthenticator) The default JupyterHub [authenticator](PAMAuthenticator)
& [spawner](LocalProcessSpawner) and [spawner](LocalProcessSpawner)
require your system to have user accounts for each user you want to log in to require your system to have user accounts for each user you want to log in to
JupyterHub as. JupyterHub as.
DummyAuthenticator allows you to log in with any username & password, DummyAuthenticator allows you to log in with any username and password,
while SimpleLocalProcessSpawner allows you to start servers without having to while SimpleLocalProcessSpawner allows you to start servers without having to
create a Unix user for each JupyterHub user. Together, these make it create a Unix user for each JupyterHub user. Together, these make it
much easier to test JupyterHub. much easier to test JupyterHub.
Tip: If you are working on parts of JupyterHub that are common to all Tip: If you are working on parts of JupyterHub that are common to all
authenticators & spawners, we recommend using both DummyAuthenticator & authenticators and spawners, we recommend using both DummyAuthenticator and
SimpleLocalProcessSpawner. If you are working on just authenticator-related SimpleLocalProcessSpawner. If you are working on just authenticator-related
parts, use only SimpleLocalProcessSpawner. Similarly, if you are working on parts, use only SimpleLocalProcessSpawner. Similarly, if you are working on
just spawner-related parts, use only DummyAuthenticator. just spawner-related parts, use only DummyAuthenticator.
## Building frontend components
The testing configuration file also disables caching of static files,
which allows you to edit and rebuild these files without restarting JupyterHub.
If you are working on the admin react page, which is in the `jsx` directory, you can run:
```bash
cd jsx
npm install
npm run build:watch
```
to continuously rebuild the admin page, requiring only a refresh of the page.
If you are working on the frontend SCSS files, you can run the same `build:watch` command
in the _top level_ directory of the repo:
```bash
npm install
npm run build:watch
```
## Troubleshooting ## Troubleshooting
This section lists common ways setting up your development environment may This section lists common ways setting up your development environment may
@@ -173,3 +216,46 @@ python3 setup.py js # fetch updated client-side js
python3 setup.py css # recompile CSS from LESS sources python3 setup.py css # recompile CSS from LESS sources
python3 setup.py jsx # build React admin app python3 setup.py jsx # build React admin app
``` ```
### Failed to bind XXX to `http://127.0.0.1:<port>/<path>`
This error can happen when there's already an application or a service using this
port.
Use the following command to find out which service is using this port.
```bash
lsof -P -i TCP:<port> -sTCP:LISTEN
```
If nothing shows up, it likely means there's a system service that uses it but
your current user cannot list it. Reuse the same command with sudo.
```bash
sudo lsof -P -i TCP:<port> -sTCP:LISTEN
```
Depending on the result of the above commands, the most simple solution is to
configure JupyterHub to use a different port for the service that is failing.
As an example, the following is a frequently seen issue:
`Failed to bind hub to http://127.0.0.1:8081/hub/`
Using the procedure described above, start with:
```bash
lsof -P -i TCP:8081 -sTCP:LISTEN
```
and if nothing shows up:
```bash
sudo lsof -P -i TCP:8081 -sTCP:LISTEN
```
Finally, depending on your findings, you can apply the following change and start JupyterHub again:
```python
c.JupyterHub.hub_port = 9081 # Or any other free port
```

View File

@@ -6,61 +6,69 @@ Unit testing helps to validate that JupyterHub works the way we think it does,
and continues to do so when changes occur. They also help communicate and continues to do so when changes occur. They also help communicate
precisely what we expect our code to do. precisely what we expect our code to do.
JupyterHub uses [pytest](https://pytest.org) for all the tests. You JupyterHub uses [`pytest`](https://pytest.org) for all the tests. You
can find them under the [jupyterhub/tests](https://github.com/jupyterhub/jupyterhub/tree/main/jupyterhub/tests) directory in the git repository. can find them under the [jupyterhub/tests](https://github.com/jupyterhub/jupyterhub/tree/main/jupyterhub/tests) directory in the Git repository.
## Running the tests ```{note}
Before run any test, make sure you have completed {ref}`contributing:setup`.
Once you are done, you would be able to run `jupyterhub` from the command line and access it from your web browser.
This ensures that the development environment is properly set up for tests to run.
```
1. Make sure you have completed {ref}`contributing/setup`. ```{note}
Once you are done, you would be able to run `jupyterhub` from the command line and access it from your web browser. For details of `pytest`, refer to the [`pytest` usage documentation](https://pytest.readthedocs.io/en/latest/usage.html).
This ensures that the dev environment is properly set up for tests to run. ```
2. You can run all tests in JupyterHub ## Running all the tests
```bash You can run all tests in JupyterHub
pytest -v jupyterhub/tests
```
This should display progress as it runs all the tests, printing ```bash
information about any test failures as they occur. pytest -v jupyterhub/tests
```
If you wish to confirm test coverage the run tests with the `--cov` flag: This should display progress as it runs all the tests, printing
information about any test failures as they occur.
```bash If you wish to confirm test coverage the run tests with the `--cov` flag:
pytest -v --cov=jupyterhub jupyterhub/tests
```
3. You can also run tests in just a specific file: ```bash
pytest -v --cov=jupyterhub jupyterhub/tests
```
```bash ## Running tests from a specific file
pytest -v jupyterhub/tests/<test-file-name>
```
4. To run a specific test only, you can do: You can also run tests in just a specific file:
```bash ```bash
pytest -v jupyterhub/tests/<test-file-name>::<test-name> pytest -v jupyterhub/tests/<test-file-name>
``` ```
This runs the test with function name `<test-name>` defined in ## Running a single test
`<test-file-name>`. This is very useful when you are iteratively
developing a single test.
For example, to run the test `test_shutdown` in the file `test_api.py`, To run a specific test only, you can do:
you would run:
```bash ```bash
pytest -v jupyterhub/tests/test_api.py::test_shutdown pytest -v jupyterhub/tests/<test-file-name>::<test-name>
``` ```
For more details, refer to the [pytest usage documentation](https://pytest.readthedocs.io/en/latest/usage.html). This runs the test with function name `<test-name>` defined in
`<test-file-name>`. This is very useful when you are iteratively
developing a single test.
For example, to run the test `test_shutdown` in the file `test_api.py`,
you would run:
```bash
pytest -v jupyterhub/tests/test_api.py::test_shutdown
```
## Test organisation ## Test organisation
The tests live in `jupyterhub/tests` and are organized roughly into: The tests live in `jupyterhub/tests` and are organized roughly into:
1. `test_api.py` tests the REST API 1. `test_api.py`: tests the REST API
2. `test_pages.py` tests loading the HTML pages 2. `test_pages.py`: tests loading the HTML pages
and other collections of tests for different components. and other collections of tests for different components.
When writing a new test, there should usually be a test of When writing a new test, there should usually be a test of
@@ -126,7 +134,7 @@ For more information on asyncio and event-loops, here are some resources:
### All the tests are failing ### All the tests are failing
Make sure you have completed all the steps in {ref}`contributing/setup` successfully, and are able to access JupyterHub from your browser at http://localhost:8000 after starting `jupyterhub` in your command line. Make sure you have completed all the steps in {ref}`contributing:setup` successfully, and are able to access JupyterHub from your browser at <http://localhost:8000> after starting `jupyterhub` in your command line.
## Code formatting and linting ## Code formatting and linting

View File

@@ -1,3 +1,5 @@
(explanation:capacity-planning)=
# Capacity planning # Capacity planning
General capacity planning advice for JupyterHub is hard to give, General capacity planning advice for JupyterHub is hard to give,
@@ -206,7 +208,7 @@ mybinder.org node CPU usage is low with 50-150 users sharing just 8 cores
### Concurrent users and culling idle servers ### Concurrent users and culling idle servers
Related to [][idleness], all of these resource consumptions and limits are calculated based on **concurrently active users**, Related to [](idleness), all of these resource consumptions and limits are calculated based on **concurrently active users**,
not total users. not total users.
You might have 10,000 users of your JupyterHub deployment, but only 100 of them running at any given time. You might have 10,000 users of your JupyterHub deployment, but only 100 of them running at any given time.
That 100 is the main number you need to use for your capacity planning. That 100 is the main number you need to use for your capacity planning.

View File

@@ -0,0 +1,430 @@
(explanation:concepts)=
# JupyterHub: A conceptual overview
```{warning}
This page could be missing cross-links to other parts of
the documentation. You can help by adding them!
```
JupyterHub is not what you think it is. Most things you think are
part of JupyterHub are actually handled by some other component, for
example the spawner or notebook server itself, and it's not always
obvious how the parts relate. The knowledge contained here hasn't
been assembled in one place before, and is essential to understand
when setting up a sufficiently complex Jupyter(Hub) setup.
This document was originally written to assist in debugging: very
often, the actual problem is not where one thinks it is and thus
people can't easily debug. In order to tell this story, we start at
JupyterHub and go all the way down to the fundamental components of
Jupyter.
In this document, we occasionally leave things out or bend the truth
where it helps in explanation, and give our explanations in terms of
Python even though Jupyter itself is language-neutral. The "(&)"
symbol highlights important points where this page leaves out or bends
the truth for simplification of explanation, but there is more if you
dig deeper.
This guide is long, but after reading it you will be know of all major
components in the Jupyter ecosystem and everything else you read
should make sense.
## What is Jupyter?
Before we get too far, let's remember what our end goal is. A
**Jupyter Notebook** is nothing more than a Python(&) process
which is getting commands from a web browser and displaying the output
via that browser. What the process actually sees is roughly like
getting commands on standard input(&) and writing to standard
output(&). There is nothing intrinsically special about this process
- it can do anything a normal Python process can do, and nothing more.
The **Jupyter kernel** handles capturing output and converting things
such as graphics to a form usable by the browser.
Everything we explain below is building up to this, going through many
different layers which give you many ways of customizing how this
process runs.
## JupyterHub
**JupyterHub** is the central piece that provides multi-user
login capabilities. Despite this, the end user only briefly interacts with
JupyterHub and most of the actual Jupyter session does not relate to
the hub at all: the hub mainly handles authentication and creating (JupyterHub calls it "spawning") the
single-user server. In short, anything which is related to _starting_
the user's workspace/environment is about JupyterHub, anything about
_running_ usually isn't.
If you have problems connecting the authentication, spawning, and the
proxy (explained below), the issue is usually with JupyterHub. To
debug, JupyterHub has extensive logs which get printed to its console
and can be used to discover most problems.
The main pieces of JupyterHub are:
### Authenticator
JupyterHub itself doesn't actually manage your users. It has a
database of users, but it is usually connected with some other system
that manages the usernames and passwords. When someone tries to log
in to JupyteHub, it asks the
**authenticator**([basics](authenticators),
[reference](../reference/authenticators)) if the
username/password is valid(&). The authenticator returns a username(&),
which is passed on to the spawner, which has to use it to start that
user's environment. The authenticator can also return user
groups and admin status of users, so that JupyterHub can do some
higher-level management.
The following authenticators are included with JupyterHub:
- **PAMAuthenticator** uses the standard Unix/Linux operating system
functions to check users. Roughly, if someone already has access to
the machine (they can log in by ssh), they will be able to log in to
JupyterHub without any other setup. Thus, JupyterHub fills the role
of a ssh server, but providing a web-browser based way to access the
machine.
There are [plenty of others to choose from](authenticators-reference).
You can connect to almost any other existing service to manage your
users. You either use all users from this other service (e.g. your
company), or enable only the allowed users (e.g. your group's
Github usernames). Some other popular authenticators include:
- **OAuthenticator** uses the standard OAuth protocol to verify users.
For example, you can easily use Github to authenticate your users -
people have a "click to login with Github" button. This is often
done with a allowlist to only allow certain users.
- **NativeAuthenticator** actually stores and validates its own
usernames and passwords, unlike most other authenticators. Thus,
you can manage all your users within JupyterHub only.
- There are authenticators for LTI (learning management systems),
Shibboleth, Kerberos - and so on.
The authenticator is configured with the
`c.JupyterHub.authenticator_class` configuration option in the
`jupyterhub_config.py` file.
The authenticator runs internally to the Hub process but communicates
with outside services.
If you have trouble logging in, this is usually a problem of the
authenticator. The authenticator logs are part of the the JupyterHub
logs, but there may also be relevant information in whatever external
services you are using.
### Spawner
The **spawner** ([basics](spawners),
[reference](../reference/spawners)) is the real core of
JupyterHub: when someone wants a notebook server, the spawner allocates
resources and starts the server. The notebook server could run on the
same machine as JupyterHub, on another machine, on some cloud service,
or more. Administrators can limit resources (CPU, memory) or isolate users
from each other - if the spawner supports it. They can also do no
limiting and allow any user to access any other user's files if they
are not configured properly.
Some basic spawners included in JupyterHub are:
- **LocalProcessSpawner** is built into JupyterHub. Upon launch it tries
to switch users to the given username (`su` (&)) and start the
notebook server. It requires that the hub be run as root (because
only root has permission to start processes as other user IDs).
LocalProcessSpawner is no different than a user logging in with
something like `ssh` and running `jupyter notebook`. PAMAuthenticator and
LocalProcessSpawner is the most basic way of using JupyterHub (and
what it does out of the box) and makes the hub not too dissimilar to
an advanced ssh server.
There are [many more advanced spawners](/reference/spawners), and to
show the diversity of spawning strategys some are listed below:
- **SudoSpawner** is like LocalProcessSpawner but lets you run
JupyterHub without root. `sudo` has to be configured to allow the
hub's user to run processes under other user IDs.
- **SystemdSpawner** uses Systemd to start other processes. It can
isolate users from each other and provide resource limiting.
- **DockerSpawner** runs stuff in Docker, a containerization system.
This lets you fully isolate users, limit CPU, memory, and provide
other container images to fully customize the environment.
- **KubeSpawner** runs on the Kubernetes, a cloud orchestration
system. The spawner can easily limit users and provide cloud
scaling - but the spawner doesn't actually do that, Kubernetes
does. The spawner just tells Kubernetes what to do. If you want to
get KubeSpawner to do something, first you would figure out how to
do it in Kubernetes, then figure out how to tell KubeSpawner to tell
Kubernetes that. Actually... this is true for most spawners.
- **BatchSpawner** runs on computer clusters with batch job scheduling
systems (e.g Slurm, HTCondor, PBS, etc). The user processes are run
as batch jobs, having access to all the data and software that the
users normally will.
In short, spawners are the interface to the rest of the operating
system, and to configure them right you need to know a bit about how
the corresponding operating system service works.
The spawner is responsible for the environment of the single-user
notebook servers (described in the next section). In the end, it just
makes a choice about how to start these processes: for example, the
Docker spawner starts a normal Docker container and runs the right
command inside of it. Thus, the spawner is responsible for setting
what kind of software and data is available to the user.
The spawner runs internally to the Hub process but communicates with
outside services. It is configured by `c.JupyterHub.spawner_class` in
`jupyterhub_config.py`.
If a user tries to launch a notebook server and it doesn't work, the
error is usually with the spawner or the notebook server (as described
in the next section). Each spawner outputs some logs to the main
JupyterHub logs, but may also have logs in other places depending on
what services it interacts with (for example, the Docker spawner
somehow puts logs in the Docker system services, Kubernetes through
the `kubectl` API).
### Proxy
The JupyterHub **proxy** relays connections between the users
and their single-user notebook servers. What this basically means is
that the hub itself can shut down and the proxy can continue to
allow users to communicate with their notebook servers. (This
further emphasizes that the hub is responsible for starting, not
running, the notebooks). By default, the hub starts the proxy
automatically
and stops the proxy when the hub stops (so that connections get
interrupted). But when you [configure the proxy to run
separately](howto:separate-proxy),
user's connections will continue to work even without the hub.
The default proxy is **ConfigurableHttpProxy** which is simple but
effective. A more advanced option is the [**Traefik Proxy**](https://blog.jupyter.org/introducing-traefikproxy-a-new-jupyterhub-proxy-based-on-traefik-4839e972faf6),
which gives you redundancy and high-availability.
When users "connect to JupyterHub", they _always_ first connect to the
proxy and the proxy relays the connection to the hub. Thus, the proxy
is responsible for SSL and accepting connections from the rest of the
internet. The user uses the hub to authenticate and start the server,
and then the hub connects back to the proxy to adjust the proxy routes
for the user's server (e.g. the web path `/user/someone` redirects to
the server of someone at a certain internal address). The proxy has
to be able to internally connect to both the hub and all the
single-user servers.
The proxy always runs as a separate process to JupyterHub (even though
JupyterHub can start it for you). JupyterHub has one set of
configuration options for the proxy addresses (`bind_url`) and one for
the hub (`hub_bind_url`). If `bind_url` is given, it is just passed to
the automatic proxy to tell it what to do.
If you have problems after users are redirected to their single-user
notebook servers, or making the first connection to the hub, it is
usually caused by the proxy. The ConfigurableHttpProxy's logs are
mixed with JupyterHub's logs if it's started through the hub (the
default case), otherwise from whatever system runs the proxy (if you
do configure it, you'll know).
### Services
JupyterHub has the concept of **services** ([basics](tutorial:services),
[reference](services-reference)), which are other web services
started by the hub, but otherwise are not necessarily related to the
hub itself. They are often used to do things related to Jupyter
(things that user interacts with, usually not the hub), but could
always be run some other way. Running from the hub provides an easy
way to get Hub API tokens and authenticate users against the hub. It
can also automatically add a proxy route to forward web requests to
that service.
A common example of a service is the [cull idle
servers](https://github.com/jupyterhub/jupyterhub-idle-culler)
service. When started by the hub, it automatically gets admin API
tokens. It uses the API to list all running servers, compare against
activity timeouts, and shut down servers exceeding the limits. Even
though this is an intrinsic part of JupyterHub, it is only loosely
coupled and running as a service provides convenience of
authentication - it could be just as well run some other way, with a
manually provided API token.
The configuration option `c.JupyterHub.services` is used to start
services from the hub.
When a service is started from JupyterHub automatically, its logs are
included in the JupyterHub logs.
## Single-user notebook server
The **single-user notebook server** is the same thing you get by
running `jupyter notebook` or `jupyter lab` from the command line -
the actual Jupyter user interface for a single person.
The role of the spawner is to start this server - basically, running
the command `jupyter notebook`. Actually it doesn't run that, it runs
`jupyterhub-singleuser` which first communicates with the hub to say
"I'm alive" before running a completely normal Jupyter server. The
single-user server can be JupyterLab or classic notebooks. By this
point, the hub is almost completely out of the picture (the web
traffic is going through proxy unchanged). Also by this time, the
spawner has already decided the environment which this single-user
server will have and the single-user server has to deal with that.
The spawner starts the server using `jupyterhub-singleuser` with some
environment variables like `JUPYTERHUB_API_TOKEN` and
`JUPYTERHUB_BASE_URL` which tell the single-user server how to connect
back to the hub in order to say that it's ready.
The single-user server options are **JupyterLab** and **classic
Jupyter Notebook**. They both run through the same backend server process--the web
frontend is an option when it is starting. The spawner can choose the
command line when it starts the single-user server. Extensions are a
property of the single-user server (in two parts: there can be a part
that runs in the Python server process, and parts that run in
javascript in lab or notebook).
If one wants to install software for users, it is not a matter of
"installing it for JupyerHub" - it's a matter of installing it for the
single-user server, which might be the same environment as the hub,
but not necessarily. (see below - it's a matter of the kernels!)
After the single-user notebook server is started, any errors are only
an issue of the single-user notebook server. Sometimes, it seems like
the spawner is failing, but really the spawner is working but the
single-user notebook server dies right away (in this case, you need to
find the problem with the single-user server and adjust the spawner to
start it correctly or fix the environment). This can happen, for
example, if the spawner doesn't set an environment variable or doesn't
provide storage.
The single-user server's logs are printed to stdout/stderr, and the
spawer decides where those streams are directed, so if you
notice problems at this phase you need to check your spawner for
instructions for accessing the single-user logs. For example, the
LocalProcessSpawner logs are just outputted to the same JupyterHub
output logs, the SystemdSpawner logs are
written to the Systemd journal, Docker and Kubernetes logs are written
to Docker and Kubernetes respectively, and batchspawner output goes to
the normal output places of batch jobs and is an explicit
configuration option of the spawner.
**(Jupyter) Notebook** is the classic interface, where each notebook
opens in a separate tab. It is traditionally started by `jupyter
notebook`. Does anything need to be said here?
**JupyterLab** is the new interface, where multiple notebooks are
openable in the same tab in an IDE-like environment. It is
traditionally started with `jupyter lab`. Both Notebook and Lab use
the same `.ipynb` file format.
JupyterLab is run thorugh the same server file, but at a path `/lab`
instead of `/tree`. Thus, they can be active at the same time in the
backend and you can switch between them at runtime by changing your
URL path.
Extensions need to be re-written for JupyterLab (if moving from
classic notebooks). But, the server-side of the extensions can be
shared by both.
## Kernel
The commands you run in the notebook session are not executed in the same process as
the notebook itself, but in a separate **Jupyter kernel**. There are [many
kernels
available](https://github.com/jupyter/jupyter/wiki/Jupyter-kernels).
As a basic approximation, a **Jupyter kernel** is a process which
accepts commands (cells that are run) and returns the output to
Jupyter to display. One example is the **IPython Jupyter kernel**,
which runs Python. There is nothing special about it, it can be
considered a \*normal Python process. The kernel process can be
approximated in UNIX terms as a process that takes commands on stdin
and returns stuff on stdout(&). Obviously, it's more because it has
to be able to disentangle all the possible outputs, such as figures,
and present it to the user in a web browser.
Kernel communication is via the the ZeroMQ protocol on the local
computer. Kernels are separate processes from the main single-user
notebook server (and thus obviously, different from the JupyterHub
process and everything else). By default (and unless you do something
special), kernels share the same environment as the notebook server
(data, resource limits, permissions, user id, etc.). But they _can_
run in a separate Python environment from the single-user server
(search `--prefix` in the [ipykernel installation
instructions](https://ipython.readthedocs.io/en/stable/install/kernel_install.html))
There are also more fancy techniques such as the [Jupyter Kernel
Gateway](https://jupyter-kernel-gateway.readthedocs.io/) and [Enterprise
Gateway](https://jupyter-enterprise-gateway.readthedocs.io/), which
allow you to run the kernels on a different machine and possibly with
a different environment.
A kernel doesn't just execute it's language - cell magics such as `%`,
`%%`, and `!` are a property of the kernel - in particular, these are
IPython kernel commands and don't necessarily work in any other
kernel unless they specifically support them.
Kernels are yet _another_ layer of configurability.
Each kernel can run a different programming language, with different
software, and so on. By default, they would run in the same
environment as the single-user notebook server, and the most common
other way they are configured is by
running in different Python virtual environments or conda
environments. They can be started and killed independently (there is
normally one per notebook you have open). The kernel uses
most of your memory and CPU when running Jupyter - the rest of the web
interface has a small footprint.
You can list your installed kernels with `jupyter kernelspec list`.
If you look at one of `kernel.json` files in those directories, you
will see exactly what command is run. These are normally
automatically made by the kernels, but can be edited as needed. [The
spec](https://jupyter-client.readthedocs.io/en/stable/kernels.html)
tells you even more.
The kernel normally has to be reachable by the single-user notebook server
but the gateways mentioned above can get around that limitation.
If you get problems with "Kernel died" or some other error in a single
notebook but the single-user notebook server stays working, it is
usually a problem with the kernel. It could be that you are trying to
use more resources than you are allowed and the symptom is the kernel
getting killed. It could be that it crashes for some other reason.
In these cases, you need to find the kernel logs and investigate.
The debug logs for the kernel are normally mixed in with the
single-user notebook server logs.
## JupyterHub distributions
There are several "distributions" which automatically install all of
the things above and configure them for a certain purpose. They are
good ways to get started, but if you have custom needs, eventually it
may become hard to adapt them to your requirements.
- [**Zero to JupyterHub with
Kubernetes**](https://zero-to-jupyterhub.readthedocs.io/) installs
an entire scaleable system using Kubernetes. Uses KubeSpawner,
....Authenticator, ....
- [**The Littlest JupyterHub**](https://tljh.jupyter.org/) installs JupyterHub on a single system
using SystemdSpawner and NativeAuthenticator (which manages users
itself).
- [**JupyterHub the hard way**](https://github.com/jupyterhub/jupyterhub-the-hard-way/blob/master/docs/installation-guide-hard.md)
takes you through everything yourself. It is a natural companion to
this guide, since you get to experience every little bit.
## What's next?
Now you know everything. Well, you know how everything relates, but
there are still plenty of details, implementations, and exceptions.
When setting up JupyterHub, the first step is to consider the above
layers, decide the right option for each of them, then begin putting
everything together.

View File

@@ -1,4 +1,4 @@
(hub-database)= (explanation:hub-database)=
# The Hub's Database # The Hub's Database
@@ -82,7 +82,7 @@ Additionally, there is usually _very_ little load on the database itself.
By far the most taxing activity on the database is the 'list all users' endpoint, primarily used by the [idle-culling service](https://github.com/jupyterhub/jupyterhub-idle-culler). By far the most taxing activity on the database is the 'list all users' endpoint, primarily used by the [idle-culling service](https://github.com/jupyterhub/jupyterhub-idle-culler).
Database-based optimizations have been added to make even these operations feasible for large numbers of users: Database-based optimizations have been added to make even these operations feasible for large numbers of users:
1. State filtering on [GET /hub/api/users?state=active](../reference/rest-api.html#/default/get_users){.external}, 1. State filtering on [GET /hub/api/users?state=active](rest-api-get-users),
which limits the number of results in the query to only the relevant subset (added in JupyterHub 1.3), rather than all users. which limits the number of results in the query to only the relevant subset (added in JupyterHub 1.3), rather than all users.
2. [Pagination](api-pagination) of all list endpoints, allowing the request of a large number of resources to be more fairly balanced with other Hub activities across multiple requests (added in 2.0). 2. [Pagination](api-pagination) of all list endpoints, allowing the request of a large number of resources to be more fairly balanced with other Hub activities across multiple requests (added in 2.0).
@@ -108,26 +108,29 @@ Doing so generally involves:
### Default backend: SQLite ### Default backend: SQLite
The default database backend for JupyterHub is [SQLite](https://sqlite.org). The default database backend for JupyterHub is [SQLite](https://sqlite.org).
We have chosen SQLite as JupyterHub's default because it's simple (the 'database' is a single file) and ubiquitous (it is in the Python standard library). We have chosen SQLite as JupyterHub's default because it's simple (the 'database' is a single file), ubiquitous (it is in the Python standard library), and it does not require maintaining a separate database server.
It works very well for testing, small deployments, and workshops.
For production systems, SQLite has some disadvantages when used with JupyterHub: The main disadvantage of SQLite is it does not support remote backup tools or replication.
You should backup your database by taking snapshots of the file (`jupyterhub.sqlite`).
- `upgrade-db` may not always work, and you may need to start with a fresh database SQLite is ideal for testing, small deployments, workshops, and production servers where you do not require remote backup or replication.
- `downgrade-db` **will not** work if you want to rollback to an earlier
version, so backup the `jupyterhub.sqlite` file before upgrading (JupyterHub automatically creates a date-stamped backup file when upgrading sqlite) ### Picking your database backend (PostgreSQL, MySQL)
The sqlite documentation provides a helpful page about [when to use SQLite and The sqlite documentation provides a helpful page about [when to use SQLite and
where traditional RDBMS may be a better choice](https://sqlite.org/whentouse.html). where traditional RDBMS may be a better choice](https://sqlite.org/whentouse.html).
### Picking your database backend (PostgreSQL, MySQL)
When running a long term deployment or a production system, we recommend using a full-fledged relational database, such as [PostgreSQL](https://www.postgresql.org) or [MySQL](https://www.mysql.com), that supports the SQL `ALTER TABLE` statement, which is used in some database upgrade steps.
In general, you select your database backend with [](JupyterHub.db_url), and can further configure it (usually not necessary) with [](JupyterHub.db_kwargs). In general, you select your database backend with [](JupyterHub.db_url), and can further configure it (usually not necessary) with [](JupyterHub.db_kwargs).
## Notes and Tips ## Notes and Tips
### Upgrading the JupyterHub database
[Upgrading JupyterHub to a new major release](howto:upgrading-jupyterhub) often requires an upgrade to the database schema.
- `jupyterhub upgrade-db` will execute a schema upgrade. You should backup your database before running this.
- `jupyterhub downgrade-db` may be able to revert a schema upgrade on PostgreSQL and MySQL, but this is not guaranteed to work, and is not supported.
### SQLite ### SQLite
The SQLite database should not be used on NFS. SQLite uses reader/writer locks The SQLite database should not be used on NFS. SQLite uses reader/writer locks
@@ -143,14 +146,14 @@ We recommend using PostgreSQL for production if you are unsure whether to use
MySQL or PostgreSQL or if you do not have a strong preference. MySQL or PostgreSQL or if you do not have a strong preference.
There is additional configuration required for MySQL that is not needed for PostgreSQL. There is additional configuration required for MySQL that is not needed for PostgreSQL.
For example, to connect to a postgres database with psycopg2: For example, to connect to a PostgreSQL database with psycopg2:
1. install psycopg2: `pip instal psycopg2` (or `psycopg2-binary` to avoid compilation, which is [not recommended for production][psycopg2-binary]) 1. install psycopg2: `pip install psycopg2` (or `psycopg2-binary` to avoid compilation, which is [not recommended for production][psycopg2-binary])
2. set authentication via environment variables `PGUSER` and `PGPASSWORD` 2. set authentication via environment variables `PGUSER` and `PGPASSWORD`
3. configure [](JupyterHub.db_url): 3. configure [](JupyterHub.db_url):
```python ```python
c.JupyterHub.db_url = "postgres+psycopg2://my-postgres-server:5432/my-db-name" c.JupyterHub.db_url = "postgresql+psycopg2://my-postgres-server:5432/my-db-name"
``` ```
[psycopg2-binary]: https://www.psycopg.org/docs/install.html#psycopg-vs-psycopg-binary [psycopg2-binary]: https://www.psycopg.org/docs/install.html#psycopg-vs-psycopg-binary

View File

@@ -1,3 +1,5 @@
(explanation)=
# Explanation # Explanation
_Explanation_ documentation provide big-picture descriptions of how JupyterHub works. This section is meant to build your understanding of particular topics. _Explanation_ documentation provide big-picture descriptions of how JupyterHub works. This section is meant to build your understanding of particular topics.
@@ -5,6 +7,7 @@ _Explanation_ documentation provide big-picture descriptions of how JupyterHub w
```{toctree} ```{toctree}
:maxdepth: 1 :maxdepth: 1
concepts
capacity-planning capacity-planning
database database
websecurity websecurity

View File

@@ -1,3 +1,5 @@
(explanation:hub-oauth)=
# JupyterHub and OAuth # JupyterHub and OAuth
JupyterHub uses [OAuth 2](https://oauth.net/2/) as an internal mechanism for authenticating users. JupyterHub uses [OAuth 2](https://oauth.net/2/) as an internal mechanism for authenticating users.
@@ -96,7 +98,7 @@ the OAuth callback request.
to retrieve information about the owner of the token (the user). to retrieve information about the owner of the token (the user).
This is the step where behavior diverges for different OAuth providers. This is the step where behavior diverges for different OAuth providers.
Up to this point, all OAuth providers are the same, following the OAuth specification. Up to this point, all OAuth providers are the same, following the OAuth specification.
However, OAuth does not define a standard for issuing tokens in exchange for information about their owner or permissions ([OpenID Connect](https://openid.net/connect/) does that), However, OAuth does not define a standard for issuing tokens in exchange for information about their owner or permissions ([OpenID Connect](https://openid.net/developers/how-connect-works/) does that),
so this step may be different for each OAuth provider. so this step may be different for each OAuth provider.
- Finally, the OAuth client stores its own record that the user is authorized in a cookie. - Finally, the OAuth client stores its own record that the user is authorized in a cookie.
This could be the token itself, or any other appropriate representation of successful authentication. This could be the token itself, or any other appropriate representation of successful authentication.

View File

@@ -1,4 +1,4 @@
(singleuser)= (explanation:singleuser)=
# The JupyterHub single-user server # The JupyterHub single-user server
@@ -24,7 +24,7 @@ It's the same!
## Single-user server authentication ## Single-user server authentication
Implementation-wise, JupyterHub single-user servers are a special-case of {ref}`services` Implementation-wise, JupyterHub single-user servers are a special-case of {ref}`services-reference`
and as such use the same (OAuth) authentication mechanism (more on OAuth in JupyterHub at [](oauth)). and as such use the same (OAuth) authentication mechanism (more on OAuth in JupyterHub at [](oauth)).
This is primarily implemented in the {class}`~.HubOAuth` class. This is primarily implemented in the {class}`~.HubOAuth` class.
@@ -104,6 +104,6 @@ But technically, all JupyterHub cares about is that it is:
1. an http server at the prescribed URL, accessible from the Hub and proxy, and 1. an http server at the prescribed URL, accessible from the Hub and proxy, and
2. authenticated via [OAuth](oauth) with the Hub (it doesn't even have to do this, if you want to do your own authentication, as is done in BinderHub) 2. authenticated via [OAuth](oauth) with the Hub (it doesn't even have to do this, if you want to do your own authentication, as is done in BinderHub)
which means that you can customize JupyterHub to launch _any_ web application that meets these criteria, by following the specifications in {ref}`services`. which means that you can customize JupyterHub to launch _any_ web application that meets these criteria, by following the specifications in {ref}`services-reference`.
Most of the time, though, it's easier to use [jupyter-server-proxy](https://jupyter-server-proxy.readthedocs.io) if you want to launch additional web applications in JupyterHub. Most of the time, though, it's easier to use [jupyter-server-proxy](https://jupyter-server-proxy.readthedocs.io) if you want to launch additional web applications in JupyterHub.

View File

@@ -1,4 +1,4 @@
(web-security)= (explanation:security)=
# Security Overview # Security Overview
@@ -16,7 +16,8 @@ works.
JupyterHub is designed to be a _simple multi-user server for modestly sized JupyterHub is designed to be a _simple multi-user server for modestly sized
groups_ of **semi-trusted** users. While the design reflects serving groups_ of **semi-trusted** users. While the design reflects serving
semi-trusted users, JupyterHub can also be suitable for serving **untrusted** users. semi-trusted users, JupyterHub can also be suitable for serving **untrusted** users,
but **is not suitable for untrusted users** in its default configuration.
As a result, using JupyterHub with **untrusted** users means more work by the As a result, using JupyterHub with **untrusted** users means more work by the
administrator, since much care is required to secure a Hub, with extra caution on administrator, since much care is required to secure a Hub, with extra caution on
@@ -52,33 +53,69 @@ ensure that:
their single-user server; their single-user server;
- the modification of the configuration of the notebook server - the modification of the configuration of the notebook server
(the `~/.jupyter` or `JUPYTER_CONFIG_DIR` directory). (the `~/.jupyter` or `JUPYTER_CONFIG_DIR` directory).
- unrestricted selection of the base environment (e.g. the image used in container-based Spawners)
If any additional services are run on the same domain as the Hub, the services If any additional services are run on the same domain as the Hub, the services
**must never** display user-authored HTML that is neither _sanitized_ nor _sandboxed_ **must never** display user-authored HTML that is neither _sanitized_ nor _sandboxed_
(e.g. IFramed) to any user that lacks authentication as the author of a file. to any user that lacks authentication as the author of a file.
### Sharing access to servers
Because sharing access to servers (via `access:servers` scopes or the sharing feature in JupyterHub 5) by definition means users can serve each other files, enabling sharing is not suitable for untrusted users without also enabling per-user domains.
JupyterHub does not enable any sharing by default.
## Mitigate security issues ## Mitigate security issues
The several approaches to mitigating security issues with configuration The several approaches to mitigating security issues with configuration
options provided by JupyterHub include: options provided by JupyterHub include:
### Enable subdomains (subdomains)=
### Enable user subdomains
JupyterHub provides the ability to run single-user servers on their own JupyterHub provides the ability to run single-user servers on their own
subdomains. This means the cross-origin protections between servers has the domains. This means the cross-origin protections between servers has the
desired effect, and user servers and the Hub are protected from each other. A desired effect, and user servers and the Hub are protected from each other.
user's single-user server will be at `username.jupyter.mydomain.com`. This also
requires all user subdomains to point to the same address, which is most easily **Subdomains are the only way to reliably isolate user servers from each other.**
accomplished with wildcard DNS. Since this spreads the service across multiple
domains, you will need wildcard SSL as well. Unfortunately, for many To enable subdomains, set:
institutional domains, wildcard DNS and SSL are not available. **If you do plan
to serve untrusted users, enabling subdomains is highly encouraged**, as it ```python
resolves the cross-site issues. c.JupyterHub.subdomain_host = "https://jupyter.example.org"
```
When subdomains are enabled, each user's single-user server will be at e.g. `https://username.jupyter.example.org`.
This also requires all user subdomains to point to the same address,
which is most easily accomplished with wildcard DNS, where a single A record points to your server and a wildcard CNAME record points to your A record:
```
A jupyter.example.org 192.168.1.123
CNAME *.jupyter.example.org jupyter.example.org
```
Since this spreads the service across multiple domains, you will likely need wildcard SSL as well,
matching `*.jupyter.example.org`.
Unfortunately, for many institutional domains, wildcard DNS and SSL may not be available.
We also **strongly encourage** serving JupyterHub and user content on a domain that is _not_ a subdomain of any sensitive content.
For reasoning, see [GitHub's discussion of moving user content to github.io from \*.github.com](https://github.blog/engineering/yummy-cookies-across-domains/).
**If you do plan to serve untrusted users, enabling subdomains is highly encouraged**,
as it resolves many security issues, which are difficult to unavoidable when JupyterHub is on a single-domain.
:::{important}
JupyterHub makes no guarantees about protecting users from each other unless subdomains are enabled.
If you want to protect users from each other, you **_must_** enable per-user domains.
:::
### Disable user config ### Disable user config
If subdomains are unavailable or undesirable, JupyterHub provides a If subdomains are unavailable or undesirable, JupyterHub provides a
configuration option `Spawner.disable_user_config`, which can be set to prevent configuration option `Spawner.disable_user_config = True`, which can be set to prevent
the user-owned configuration files from being loaded. After implementing this the user-owned configuration files from being loaded. After implementing this
option, `PATH`s and package installation are the other things that the option, `PATH`s and package installation are the other things that the
admin must enforce. admin must enforce.
@@ -88,21 +125,24 @@ admin must enforce.
For most Spawners, `PATH` is not something users can influence, but it's important that For most Spawners, `PATH` is not something users can influence, but it's important that
the Spawner should _not_ evaluate shell configuration files prior to launching the server. the Spawner should _not_ evaluate shell configuration files prior to launching the server.
### Isolate packages using virtualenv ### Isolate packages in a read-only environment
Package isolation is most easily handled by running the single-user server in The user must not have permission to install packages into the environment where the singleuser-server runs.
a virtualenv with disabled system-site-packages. The user should not have On a shared system, package isolation is most easily handled by running the single-user server in
permission to install packages into this environment. a root-owned virtualenv with disabled system-site-packages.
The user must not have permission to install packages into this environment.
The same principle extends to the images used by container-based deployments.
If users can select the images in which their servers run, they can disable all security for their own servers.
It is important to note that the control over the environment only affects the It is important to note that the control over the environment is only required for the
single-user server, and not the environment(s) in which the user's kernel(s) single-user server, and not the environment(s) in which the users' kernel(s)
may run. Installing additional packages in the kernel environment does not may run. Installing additional packages in the kernel environment does not
pose additional risk to the web application's security. pose additional risk to the web application's security.
### Encrypt internal connections with SSL/TLS ### Encrypt internal connections with SSL/TLS
By default, all communications on the server, between the proxy, hub, and single By default, all communications within JupyterHub—between the proxy, hub, and single
-user notebooks are performed unencrypted. Setting the `internal_ssl` flag in -user notebooksare performed unencrypted. Setting the `internal_ssl` flag in
`jupyterhub_config.py` secures the aforementioned routes. Turning this `jupyterhub_config.py` secures the aforementioned routes. Turning this
feature on does require that the enabled `Spawner` can use the certificates feature on does require that the enabled `Spawner` can use the certificates
generated by the `Hub` (the default `LocalProcessSpawner` can, for instance). generated by the `Hub` (the default `LocalProcessSpawner` can, for instance).
@@ -116,6 +156,103 @@ Unix permissions to the communication sockets thereby restricting
communication to the socket owner. The `internal_ssl` option will eventually communication to the socket owner. The `internal_ssl` option will eventually
extend to securing the `tcp` sockets as well. extend to securing the `tcp` sockets as well.
### Mitigating same-origin deployments
While per-user domains are **required** for robust protection of users from each other,
you can mitigate many (but not all) cross-user issues.
First, it is critical that users cannot modify their server environments, as described above.
Second, it is important that users do not have `access:servers` permission to any server other than their own.
If users can access each others' servers, additional security measures must be enabled, some of which come with distinct user-experience costs.
Without the [Same-Origin Policy] (SOP) protecting user servers from each other,
each user server is considered a trusted origin for requests to each other user server (and the Hub itself).
Servers _cannot_ meaningfully distinguish requests originating from other user servers,
because SOP implies a great deal of trust, losing many restrictions applied to cross-origin requests.
That means pages served from each user server can:
1. arbitrarily modify the path in the Referer
2. make fully authorized requests with cookies
3. access full page contents served from the hub or other servers via popups
JupyterHub uses distinct xsrf tokens stored in cookies on each server path to attempt to limit requests across.
This has limitations because not all requests are protected by these XSRF tokens,
and unless additional measures are taken, the XSRF tokens from other user prefixes may be retrieved.
[Same-Origin Policy]: https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy
For example:
- `Content-Security-Policy` header must prohibit popups and iframes from the same origin.
The following Content-Security-Policy rules are _insecure_ and readily enable users to access each others' servers:
- `frame-ancestors: 'self'`
- `frame-ancestors: '*'`
- `sandbox allow-popups`
- Ideally, pages should use the strictest `Content-Security-Policy: sandbox` available,
but this is not feasible in general for JupyterLab pages, which need at least `sandbox allow-same-origin allow-scripts` to work.
The default Content-Security-Policy for single-user servers is
```
frame-ancestors: 'none'
```
which prohibits iframe embedding, but not pop-ups.
A more secure Content-Security-Policy that has some costs to user experience is:
```
frame-ancestors: 'none'; sandbox allow-same-origin allow-scripts
```
`allow-popups` is not disabled by default because disabling it breaks legitimate functionality, like "Open this in a new tab", and the "JupyterHub Control Panel" menu item.
To reiterate, the right way to avoid these issues is to enable per-user domains, where none of these concerns come up.
Note: even this level of protection requires administrators maintaining full control over the user server environment.
If users can modify their server environment, these methods are ineffective, as users can readily disable them.
### Cookie tossing
Cookie tossing is a technique where another server on a subdomain or peer subdomain can set a cookie
which will be read on another domain.
This is not relevant unless there are other user-controlled servers on a peer domain.
"Domain-locked" cookies avoid this issue, but have their own restrictions:
- JupyterHub must be served over HTTPS
- All secure cookies must be set on `/`, not on sub-paths, which means they are shared by all JupyterHub components in a single-domain deployment.
As a result, this option is only recommended when per-user subdomains are enabled,
to prevent sending all jupyterhub cookies to all user servers.
To enable domain-locked cookies, set:
```python
c.JupyterHub.cookie_host_prefix_enabled = True
```
```{versionadded} 4.1
```
### Forced-login
Jupyter servers can share links with `?token=...`.
JupyterHub prior to 5.0 will accept this request and persist the token for future requests.
This is useful for enabling admins to create 'fully authenticated' links bypassing login.
However, it also means users can share their own links that will log other users into their own servers,
enabling them to serve each other notebooks and other arbitrary HTML, depending on server configuration.
```{versionadded} 4.1
Setting environment variable `JUPYTERHUB_ALLOW_TOKEN_IN_URL=0` in the single-user environment can opt out of accepting token auth in URL parameters.
```
```{versionadded} 5.0
Accepting tokens in URLs is disabled by default, and `JUPYTERHUB_ALLOW_TOKEN_IN_URL=1` environment variable must be set to _allow_ token auth in URL parameters.
```
## Security audits ## Security audits
We recommend that you do periodic reviews of your deployment's security. It's We recommend that you do periodic reviews of your deployment's security. It's

View File

@@ -1,3 +1,5 @@
(faq)=
# Frequently asked questions # Frequently asked questions
## How do I share links to notebooks? ## How do I share links to notebooks?

View File

@@ -1,3 +1,5 @@
(faq:institutional)=
# Institutional FAQ # Institutional FAQ
This page contains common questions from users of JupyterHub, This page contains common questions from users of JupyterHub,
@@ -64,7 +66,7 @@ industry, and government research labs. It is most-commonly used by two kinds of
Here is a sample of organizations that use JupyterHub: Here is a sample of organizations that use JupyterHub:
- **Universities and colleges**: UC Berkeley, UC San Diego, Cal Poly SLO, Harvard University, University of Chicago, - **Universities and colleges**: UC Berkeley, UC San Diego, Cal Poly SLO, Harvard University, University of Chicago,
University of Oslo, University of Sheffield, Université Paris Sud, University of Versailles University of Oslo, University of Sheffield, Université Paris Sud, University of Versailles, University of Portland
- **Research laboratories**: NASA, NCAR, NOAA, the Large Synoptic Survey Telescope, Brookhaven National Lab, - **Research laboratories**: NASA, NCAR, NOAA, the Large Synoptic Survey Telescope, Brookhaven National Lab,
Minnesota Supercomputing Institute, ALCF, CERN, Lawrence Livermore National Laboratory, HUNT Minnesota Supercomputing Institute, ALCF, CERN, Lawrence Livermore National Laboratory, HUNT
- **Online communities**: Pangeo, Quantopian, mybinder.org, MathHub, Open Humans - **Online communities**: Pangeo, Quantopian, mybinder.org, MathHub, Open Humans
@@ -130,7 +132,7 @@ level for several years, and makes a number of "default" security decisions that
users. users.
- For security considerations in the base JupyterHub application, - For security considerations in the base JupyterHub application,
[see the JupyterHub security page](web-security). [see the JupyterHub security page](explanation:security).
- For security considerations when deploying JupyterHub on Kubernetes, see the - For security considerations when deploying JupyterHub on Kubernetes, see the
[JupyterHub on Kubernetes security page](https://z2jh.jupyter.org/en/latest/security.html). [JupyterHub on Kubernetes security page](https://z2jh.jupyter.org/en/latest/security.html).
@@ -140,7 +142,7 @@ in a variety of deployment setups. This often entails connecting your JupyterHub
in these cases, and the security of your JupyterHub deployment will often depend on these decisions. in these cases, and the security of your JupyterHub deployment will often depend on these decisions.
If you are worried about security, don't hesitate to reach out to the JupyterHub community in the If you are worried about security, don't hesitate to reach out to the JupyterHub community in the
[Jupyter Community Forum](https://discourse.jupyter.org/c/jupyterhub). This community of practice has many [Jupyter Community Forum](https://discourse.jupyter.org/c/jupyterhub/10). This community of practice has many
individuals with experience running secure JupyterHub deployments and will be very glad to help you out. individuals with experience running secure JupyterHub deployments and will be very glad to help you out.
### Does JupyterHub provide computing or data infrastructure? ### Does JupyterHub provide computing or data infrastructure?

View File

@@ -1,4 +1,4 @@
(troubleshooting)= (faq:troubleshooting)=
# Troubleshooting # Troubleshooting
@@ -46,13 +46,13 @@ things like inspect other users' servers or modify the user list at runtime).
### JupyterHub Docker container is not accessible at localhost ### JupyterHub Docker container is not accessible at localhost
Even though the command to start your Docker container exposes port 8000 Even though the command to start your Docker container exposes port 8000
(`docker run -p 8000:8000 -d --name jupyterhub jupyterhub/jupyterhub jupyterhub`), (`docker run -p 8000:8000 -d --name jupyterhub quay.io/jupyterhub/jupyterhub jupyterhub`),
it is possible that the IP address itself is not accessible/visible. As a result, it is possible that the IP address itself is not accessible/visible. As a result,
when you try http://localhost:8000 in your browser, you are unable to connect when you try http://localhost:8000 in your browser, you are unable to connect
even though the container is running properly. One workaround is to explicitly even though the container is running properly. One workaround is to explicitly
tell Jupyterhub to start at `0.0.0.0` which is visible to everyone. Try this tell Jupyterhub to start at `0.0.0.0` which is visible to everyone. Try this
command: command:
`docker run -p 8000:8000 -d --name jupyterhub jupyterhub/jupyterhub jupyterhub --ip 0.0.0.0 --port 8000` `docker run -p 8000:8000 -d --name jupyterhub quay.io/jupyterhub/jupyterhub jupyterhub --ip 0.0.0.0 --port 8000`
### How can I kill ports from JupyterHub-managed services that have been orphaned? ### How can I kill ports from JupyterHub-managed services that have been orphaned?
@@ -167,7 +167,7 @@ When your whole JupyterHub sits behind an organization proxy (_not_ a reverse pr
### Launching Jupyter Notebooks to run as an externally managed JupyterHub service with the `jupyterhub-singleuser` command returns a `JUPYTERHUB_API_TOKEN` error ### Launching Jupyter Notebooks to run as an externally managed JupyterHub service with the `jupyterhub-singleuser` command returns a `JUPYTERHUB_API_TOKEN` error
{ref}`services` allow processes to interact with JupyterHub's REST API. Example use-cases include: {ref}`services-reference` allow processes to interact with JupyterHub's REST API. Example use-cases include:
- **Secure Testing**: provide a canonical Jupyter Notebook for testing production data to reduce the number of entry points into production systems. - **Secure Testing**: provide a canonical Jupyter Notebook for testing production data to reduce the number of entry points into production systems.
- **Grading Assignments**: provide access to shared Jupyter Notebooks that may be used for management tasks such as grading assignments. - **Grading Assignments**: provide access to shared Jupyter Notebooks that may be used for management tasks such as grading assignments.
@@ -198,6 +198,23 @@ With a docker container, pass in the environment variable with the run command:
[This example](https://github.com/jupyterhub/jupyterhub/tree/HEAD/examples/service-notebook/external) demonstrates how to combine the use of the `jupyterhub-singleuser` environment variables when launching a Notebook as an externally managed service. [This example](https://github.com/jupyterhub/jupyterhub/tree/HEAD/examples/service-notebook/external) demonstrates how to combine the use of the `jupyterhub-singleuser` environment variables when launching a Notebook as an externally managed service.
### Jupyter Notebook/Lab can be launched, but notebooks seem to hang when trying to execute a cell
This often occurs when your browser is unable to open a websocket connection to a Jupyter kernel.
#### Diagnose
Open your browser console, e.g. [Chrome](https://developer.chrome.com/docs/devtools/console), [Firefox](https://firefox-source-docs.mozilla.org/devtools-user/web_console/).
If you see errors related to opening websockets this is likely to be the problem.
#### Solutions
This could be caused by anything related to the network between your computer/browser and the server running JupyterHub, such as:
- reverse proxies (see {ref}`howto:config:reverse-proxy` for example configurations)
- anti-virus or firewalls running on your computer or JupyterHub server
- transparent proxies running on your network
## How do I...? ## How do I...?
### Use a chained SSL certificate ### Use a chained SSL certificate
@@ -259,17 +276,6 @@ the entire filesystem and set the default to the user's home directory.
c.Spawner.notebook_dir = '/' c.Spawner.notebook_dir = '/'
c.Spawner.default_url = '/home/%U' # %U will be replaced with the username c.Spawner.default_url = '/home/%U' # %U will be replaced with the username
### How do I increase the number of pySpark executors on YARN?
From the command line, pySpark executors can be configured using a command
similar to this one:
pyspark --total-executor-cores 2 --executor-memory 1G
[Cloudera documentation for configuring spark on YARN applications](https://www.cloudera.com/documentation/enterprise/latest/topics/cdh_ig_running_spark_on_yarn.html#spark_on_yarn_config_apps)
provides additional information. The [pySpark configuration documentation](https://spark.apache.org/docs/0.9.0/configuration.html)
is also helpful for programmatic configuration examples.
### How do I use JupyterLab's pre-release version with JupyterHub? ### How do I use JupyterLab's pre-release version with JupyterHub?
While JupyterLab is still under active development, we have had users While JupyterLab is still under active development, we have had users
@@ -300,6 +306,52 @@ notebook servers to default to JupyterLab:
Users will need a GitHub account to log in and be authenticated by the Hub. Users will need a GitHub account to log in and be authenticated by the Hub.
### I'm seeing "403 Forbidden XSRF cookie does not match POST" when users try to login
During login, JupyterHub takes the request IP into account for CSRF protection.
If proxies are not configured to properly set forwarded ips,
JupyterHub will see all requests as coming from an internal ip,
likely the ip of the proxy itself.
You can see this in the JupyterHub logs, which log the ip address of requests.
If most requests look like they are coming from a small number `10.0.x.x` or `172.16.x.x` ips, the proxy is not forwarding the true request ip properly.
If the proxy has multiple replicas,
then it is likely the ip may change from one request to the next,
leading to this error during login:
> 403 Forbidden XSRF cookie does not match POST argument
The best way to fix this is to ensure your proxies set the forwarded headers, e.g. for nginx:
```nginx
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
```
But if this is not available to you, you can instruct jupyterhub to ignore IPs from certain networks
with the environment variable `$JUPYTERHUB_XSRF_ANONYMOUS_IP_CIDRS`.
For example, to ignore the common [private networks](https://en.wikipedia.org/wiki/Private_network#Private_IPv4_addresses):
```bash
export JUPYTERHUB_XSRF_ANONYMOUS_IP_CIDRS="10.0.0.0/8;172.16.0.0/12;192.168.0.0/16"
```
The result will be that any request from an ip on one of these networks will be treated as coming from the same source.
To totally disable taking the ip into consideration, set
```bash
export JUPYTERHUB_XSRF_ANONYMOUS_IP_CIDRS="0.0.0.0/0"
```
If your proxy sets its own headers to identify a browser origin, you can instruct JupyterHub to use those:
```bash
export JUPYTERHUB_XSRF_ANONYMOUS_ID_HEADERS="My-Custom-Header;User-Agent"
```
Again, these things are only used to compute the XSRF token used while a user is not logged in (i.e. during login itself).
### How do I set up rotating daily logs? ### How do I set up rotating daily logs?
You can do this with [logrotate](https://linux.die.net/man/8/logrotate), You can do this with [logrotate](https://linux.die.net/man/8/logrotate),
@@ -347,12 +399,12 @@ In order to resolve this issue, there are two potential options.
### Where do I find Docker images and Dockerfiles related to JupyterHub? ### Where do I find Docker images and Dockerfiles related to JupyterHub?
Docker images can be found at the [JupyterHub organization on DockerHub](https://hub.docker.com/u/jupyterhub/). Docker images can be found at the [JupyterHub organization on Quay.io](https://quay.io/organization/jupyterhub).
The Docker image [jupyterhub/singleuser](https://hub.docker.com/r/jupyterhub/singleuser/) The Docker image [jupyterhub/singleuser](https://quay.io/repository/jupyterhub/singleuser)
provides an example single-user notebook server for use with DockerSpawner. provides an example single-user notebook server for use with DockerSpawner.
Additional single-user notebook server images can be found at the [Jupyter Additional single-user notebook server images can be found at the [Jupyter
organization on DockerHub](https://hub.docker.com/r/jupyter/) and information organization on Quay.io](https://quay.io/organization/jupyter) and information
about each image at the [jupyter/docker-stacks repo](https://github.com/jupyter/docker-stacks). about each image at the [jupyter/docker-stacks repo](https://github.com/jupyter/docker-stacks).
### How can I view the logs for JupyterHub or the user's Notebook servers when using the DockerSpawner? ### How can I view the logs for JupyterHub or the user's Notebook servers when using the DockerSpawner?

View File

@@ -1,4 +1,4 @@
(api-only)= (howto:api-only)=
# Deploying JupyterHub in "API only mode" # Deploying JupyterHub in "API only mode"

View File

@@ -1,3 +1,5 @@
(howto:config:gh-oauth)=
# Configure GitHub OAuth # Configure GitHub OAuth
In this example, we show a configuration file for a fairly standard JupyterHub In this example, we show a configuration file for a fairly standard JupyterHub

View File

@@ -1,3 +1,5 @@
(howto:config:reverse-proxy)=
# Using a reverse proxy # Using a reverse proxy
In the following example, we show configuration files for a JupyterHub server In the following example, we show configuration files for a JupyterHub server
@@ -79,7 +81,7 @@ server {
location / { location / {
proxy_pass http://127.0.0.1:8000; proxy_pass http://127.0.0.1:8000;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host; proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# websocket headers # websocket headers

View File

@@ -1,3 +1,5 @@
(howto:config:no-sudo)=
# Run JupyterHub without root privileges using `sudo` # Run JupyterHub without root privileges using `sudo`
**Note:** Setting up `sudo` permissions involves many pieces of system **Note:** Setting up `sudo` permissions involves many pieces of system
@@ -33,7 +35,7 @@ This user shouldn't have a login shell or password (possible with -r).
## Set up sudospawner ## Set up sudospawner
Next, you will need [sudospawner](https://github.com/jupyter/sudospawner) Next, you will need [sudospawner](https://github.com/jupyterhub/sudospawner)
to enable monitoring the single-user servers with sudo: to enable monitoring the single-user servers with sudo:
```bash ```bash
@@ -70,7 +72,7 @@ rhea ALL=(JUPYTER_USERS) NOPASSWD:JUPYTER_CMD
``` ```
It might be useful to modify `secure_path` to add commands in path. (Search for It might be useful to modify `secure_path` to add commands in path. (Search for
`secure_path` in the [sudo docs](https://www.sudo.ws/man/1.8.14/sudoers.man.html) `secure_path` in the [sudo docs](https://www.sudo.ws)
As an alternative to adding every user to the `/etc/sudoers` file, you can As an alternative to adding every user to the `/etc/sudoers` file, you can
use a group in the last line above, instead of `JUPYTER_USERS`: use a group in the last line above, instead of `JUPYTER_USERS`:
@@ -123,7 +125,7 @@ the shadow password database.
**Note:** On [Fedora based distributions](https://fedoraproject.org/wiki/List_of_Fedora_remixes) there is no clear way to configure **Note:** On [Fedora based distributions](https://fedoraproject.org/wiki/List_of_Fedora_remixes) there is no clear way to configure
the PAM database to allow sufficient access for authenticating with the target user's password the PAM database to allow sufficient access for authenticating with the target user's password
from JupyterHub. As a workaround we recommend use an from JupyterHub. As a workaround we recommend use an
[alternative authentication method](https://github.com/jupyterhub/jupyterhub/wiki/Authenticators). [alternative authentication method](authenticators-reference).
```bash ```bash
$ ls -l /etc/shadow $ ls -l /etc/shadow

View File

@@ -1,3 +1,5 @@
(howto:config:user-env)=
# Configuring user environments # Configuring user environments
To deploy JupyterHub means you are providing Jupyter notebook environments for To deploy JupyterHub means you are providing Jupyter notebook environments for
@@ -45,7 +47,7 @@ additional packages.
## Configuring Jupyter and IPython ## Configuring Jupyter and IPython
[Jupyter](https://jupyter-notebook.readthedocs.io/en/stable/config_overview.html) [Jupyter](https://jupyter-notebook.readthedocs.io/en/stable/configuring/config_overview.html)
and [IPython](https://ipython.readthedocs.io/en/stable/development/config.html) and [IPython](https://ipython.readthedocs.io/en/stable/development/config.html)
have their own configuration systems. have their own configuration systems.
@@ -212,13 +214,31 @@ By default, the single-user server launches JupyterLab,
which is based on [Jupyter Server][]. which is based on [Jupyter Server][].
This is the default server when running JupyterHub ≥ 2.0. This is the default server when running JupyterHub ≥ 2.0.
To switch to using the legacy Jupyter Notebook server, you can set the `JUPYTERHUB_SINGLEUSER_APP` environment variable To switch to using the legacy Jupyter Notebook server (notebook < 7.0), you can set the `JUPYTERHUB_SINGLEUSER_APP` environment variable
(in the single-user environment) to: (in the single-user environment) to:
```bash ```bash
export JUPYTERHUB_SINGLEUSER_APP='notebook.notebookapp.NotebookApp' export JUPYTERHUB_SINGLEUSER_APP='notebook.notebookapp.NotebookApp'
``` ```
:::{note}
```
JUPYTERHUB_SINGLEUSER_APP='notebook.notebookapp.NotebookApp'
```
is only valid for notebook < 7. notebook v7 is based on jupyter-server,
and the default jupyter-server application must be used.
Selecting the new notebook UI is no longer a matter of selecting the server app to launch,
but only the default URL for users to visit.
To use notebook v7 with JupyterHub, leave the default singleuser app config alone (or specify `JUPYTERHUB_SINGLEUSER_APP=jupyter-server`) and set the default _URL_ for user servers:
```python
c.Spawner.default_url = '/tree/'
```
:::
[jupyter server]: https://jupyter-server.readthedocs.io [jupyter server]: https://jupyter-server.readthedocs.io
[jupyter notebook]: https://jupyter-notebook.readthedocs.io [jupyter notebook]: https://jupyter-notebook.readthedocs.io

View File

@@ -0,0 +1,130 @@
# Logging users in via URL
Sometimes, JupyterHub is integrated into an existing application that has already handled user login, etc..
It is often preferable in these applications to be able to link users to their running JupyterHub server without _prompting_ the user to login again with the Hub when the Hub should really be an implementation detail,
and not part of the user experience.
One way to do this has been to use [API only mode](#howto:api-only), issue tokens for users, and redirect users to a URL like `/users/name/?token=abc123`.
This is [disabled by default](#HubAuth.allow_token_in_url) in JupyterHub 5, because it presents a vulnerability for users to craft links that let _other_ users login as them, which can lead to inter-user attacks.
But that leaves the question: how do I as an _application developer_ embedding JupyterHub link users to their own running server without triggering another login prompt?
The problem with `?token=...` in the URL is specifically that _users_ can get and create these tokens, and share URLs.
This wouldn't be an issue if only authorized applications could issue tokens that behave this way.
The single-user server doesn't exactly have the hooks to manage this easily, but the [Authenticator](#Authenticator) API does.
## Problem statement
We want our external application to be able to:
1. authenticate users
2. (maybe) create JupyterHub users
3. start JupyterHub servers
4. redirect users into running servers _without_ any login prompts/loading pages from JupyterHub, and without any prior JupyterHub credentials
Step 1 is up to the application and not JupyterHub's problem.
Step 2 and 3 use the JupyterHub [REST API](#jupyterhub-rest-API).
The service would need the scopes:
```
admin:users # creating users
servers # start/stop servers
```
That leaves the last step: sending users to their running server with credentials, without prompting login.
This is where things can get tricky!
### Ideal case: oauth
_Ideally_, the best way to set this up is with the external service as an OAuth provider,
though in some cases it works best to use proxy-based authentication like Shibboleth / [REMOTE_USER](https://github.com/cwaldbieser/jhub_remote_user_authenticator).
The main things to know are:
- Links to `/hub/user-redirect/some/path` will ultimately land users at `/users/theirserver/some/path` after completing login, ensuring the server is running, etc.
- Setting `Authenticator.auto_login = True` allows beginning the login process without JupyterHub's "Login with..." prompt
_If_ your OAuth provider allows logging in to external services via your oauth provider without prompting, this is enough.
Not all do, though.
If you've already ensured the server is running, this will _appear_ to the user as if they are being sent directly to their running server.
But what _actually_ happens is quite a series of redirects, state checks, and cookie-setting:
1. visiting `/hub/user-redirect/some/path` checks if the user is logged in
1. if not, begin the login process (`/hub/login?next=/hub/user-redirect/...`)
2. redirects to your oauth provider to authenticate the user
3. redirects back to `/hub/oauth_callback` to complete login
4. redirects back to `/hub/user-redirect/...`
2. once authenticated, checks that the user's server is running
1. if not running, begins launch of the server
2. redirects to `/hub/spawn-pending/?next=...`
3. once the server is running, redirects to the actual user server `/users/username/some/path`
Now we're done, right? Actually, no, because the browser doesn't have credentials for their user server!
This sequence of redirects happens all the time in JupyterHub launch, and is usually totally transparent.
4. at the user server, check for a token in cookie
1. if not present or not valid, begin oauth with the Hub (redirect to `/hub/api/oauth2/authorize/...`)
2. hub redirects back to `/users/user/oauth_callback` to complete oauth
3. redirect again to the URL that started this internal oauth
5. finally, arrive at `/users/username/some/path`, the ultimate destination, with valid JupyterHub credentials
The steps that will show users something other than the page you want them to are:
- Step 1.1 will be a prompt e.g. with "Login with..." unless you set `c.Authenticator.auto_login = True`
- Step 1.2 _may_ be a prompt from your oauth provider. This isn't controlled by JupyterHub, and may not be avoidable.
- Step 2.2 will show the spawn pending page only if the server is not already running
Otherwise, this is all transparent redirects to the final destination.
#### Using an authentication proxy (REMOTE_USER)
If you use an Authentication proxy like Shibboleth that sets e.g. the REMOTE_USER header,
you can use an Authenticator like [RemoteUserAuthenticator](https://github.com/cwaldbieser/jhub_remote_user_authenticator) to automatically login users based on headers in the request.
The same process will work, but instead of step 1.1 redirecting to the oauth provider, it logs in immediately.
If you do support an auth proxy, you also need to be extremely sure that requests only come from the auth proxy, and don't accept any requests setting the REMOTE_USER header coming from other sources.
### Custom case
But let's say you can't use OAuth or REMOTE_USER, and you still want to hide JupyterHub implementation details.
All you really want is a way to write a URL that will take users to their servers without any login prompts.
You can do this if you create an Authenticator with `auto_login=True` that logs users in based on something in the _request_, e.g. a query parameter.
We have an _example_ in the JupyterHub repo in `examples/forced-login` that does this.
It is a sample 'external service' where you type in a username and a destination path.
When you 'login' with this username:
1. a token is issued
2. the token is stored and associated with the username
3. redirect to `/hub/login?login_token=...&next=/hub/user-redirect/destination/path`
Then on the JupyterHub side, there is the `ForcedLoginAuthenticator`.
This class implements `authenticate`, which:
1. has `auto_login = True` so visiting `/hub/login` calls `authenticate()` directly instead of serving a page
2. gets the token from the `login_token` URL parameter
3. makes a POST request to the external application with the token, requesting a username
4. the external application returns the username and deletes the token, so it cannot be re-used
5. Authenticator returns the username
This doesn't _bypass_ JupyterHub authentication, as some deployments have done, but it does _hide_ it.
If your service launches servers via the API, you could run this in [API only mode](#howto:api-only) by adding `/hub/login` as well:
```python
c.JupyterHub.hub_routespec = "/hub/api/"
c.Proxy.additional_routes = {"/hub/login": "http://hub:8080"}
```
```{literalinclude} ../../../examples/forced-login/jupyterhub_config.py
:language: python
:start-at: class ForcedLoginAuthenticator
:end-before: c = get_config()
```
**Why does this work?**
This is still logging in with a token in the URL, right?
Yes, but the key difference is that users cannot issue these tokens.
The sample application is still technically vulnerable, because the token link should really be non-transferrable, even if it can only be used once.
The only defense the sample application has against this is rapidly expiring tokens (they expire after 30 seconds).
You can use state cookies, etc. to manage that more rigorously, as done in OAuth (at which point, maybe implement OAuth itself, why not?).

View File

@@ -14,7 +14,7 @@ separate-proxy
templates templates
upgrading upgrading
log-messages log-messages
forced-login
``` ```
(config-examples)= (config-examples)=

View File

@@ -1,3 +1,5 @@
(howto:log-messages)=
# Interpreting common log messages # Interpreting common log messages
When debugging errors and outages, looking at the logs emitted by When debugging errors and outages, looking at the logs emitted by
@@ -69,4 +71,4 @@ aligned, rather than as an indicator of an existing problem.
Upgrade the version of the `jupyterhub` package in your user environment or image Upgrade the version of the `jupyterhub` package in your user environment or image
so that it matches the version of JupyterHub running your JupyterHub server! If you so that it matches the version of JupyterHub running your JupyterHub server! If you
are using the [zero-to-jupyterhub](https://z2jh.jupyter.org) helm chart, you can find the appropriate are using the [zero-to-jupyterhub](https://z2jh.jupyter.org) helm chart, you can find the appropriate
version of the `jupyterhub` package to install in your user image [here](https://jupyterhub.github.io/helm-chart/) version of the `jupyterhub` package to install in your user image [here](https://hub.jupyter.org/helm-chart/)

View File

@@ -1,3 +1,5 @@
(howto:custom-proxy)=
# Writing a custom Proxy implementation # Writing a custom Proxy implementation
JupyterHub 0.8 introduced the ability to write a custom implementation of the JupyterHub 0.8 introduced the ability to write a custom implementation of the
@@ -230,4 +232,4 @@ A list of the proxies that are currently available for JupyterHub (that we know
1. [`jupyterhub/configurable-http-proxy`](https://github.com/jupyterhub/configurable-http-proxy) The default proxy which uses node-http-proxy 1. [`jupyterhub/configurable-http-proxy`](https://github.com/jupyterhub/configurable-http-proxy) The default proxy which uses node-http-proxy
2. [`jupyterhub/traefik-proxy`](https://github.com/jupyterhub/traefik-proxy) The proxy which configures traefik proxy server for jupyterhub 2. [`jupyterhub/traefik-proxy`](https://github.com/jupyterhub/traefik-proxy) The proxy which configures traefik proxy server for jupyterhub
3. [`AbdealiJK/configurable-http-proxy`](https://github.com/AbdealiJK/configurable-http-proxy) A pure python implementation of the configurable-http-proxy 3. [`AbdealiJK/configurable-http-proxy`](https://github.com/corridor/configurable-http-proxy) A pure python implementation of the configurable-http-proxy

View File

@@ -1,4 +1,4 @@
(using-jupyterhub-rest-api)= (howto:rest-api)=
# Using JupyterHub's REST API # Using JupyterHub's REST API
@@ -24,6 +24,7 @@ such as:
- Checking which users are active - Checking which users are active
- Adding or removing users - Adding or removing users
- Adding or removing services
- Stopping or starting single user notebook servers - Stopping or starting single user notebook servers
- Authenticating services - Authenticating services
- Communicating with an individual Jupyter server's REST API - Communicating with an individual Jupyter server's REST API
@@ -98,9 +99,46 @@ In JupyterHub 2.0,
specific permissions are now defined as '**scopes**', specific permissions are now defined as '**scopes**',
and can be assigned both at the user/service level, and can be assigned both at the user/service level,
and at the individual token level. and at the individual token level.
The previous behavior is represented by the scope `inherit`,
and is still the default behavior for requesting a token if limited permissions are not specified.
This allows e.g. a user with full admin permissions to request a token with limited permissions. This allows e.g. a user with full admin permissions to request a token with limited permissions.
In JupyterHub 5.0, you can specify scopes for a token when requesting it via the `/hub/tokens` page as a space-separated list.
In JupyterHub 3.0 and later, you can also request tokens with limited scopes via the JupyterHub API (provided you already have a token!):
```python
import json
from urllib.parse import quote
import requests
def request_token(
username, *, api_token, scopes=None, expires_in=0, hub_url="http://127.0.0.1:8081"
):
"""Request a new token for a user"""
request_body = {}
if expires_in:
request_body["expires_in"] = expires_in
if scopes:
request_body["scopes"] = scopes
url = hub_url.rstrip("/") + f"/hub/api/users/{quote(username)}/tokens"
r = requests.post(
url,
data=json.dumps(request_body),
headers={"Authorization": f"token {api_token}"},
)
if r.status_code >= 400:
# extract error message for nicer error messages
r.reason = r.json().get("message", r.text)
r.raise_for_status()
# response is a dict and will include the token itself in the 'token' field,
# as well as other fields about the token
return r.json()
request_token("myusername", scopes=["list:users"], api_token="abc123")
```
## Updating to admin services ## Updating to admin services
```{note} ```{note}
@@ -163,8 +201,8 @@ Authorization header.
### Use requests ### Use requests
Using the popular Python [requests](https://docs.python-requests.org) Using the popular Python [requests](https://requests.readthedocs.io)
library, an API GET request is made, and the request sends an API token for library, an API GET request is made to [/users](rest-api-get-users), and the request sends an API token for
authorization. The response contains information about the users, here's example code to make an API request for the users of a JupyterHub deployment authorization. The response contains information about the users, here's example code to make an API request for the users of a JupyterHub deployment
```python ```python
@@ -182,7 +220,7 @@ r.raise_for_status()
users = r.json() users = r.json()
``` ```
This example provides a slightly more complicated request, yet the This example provides a slightly more complicated request (to [/groups/formgrade-data301/users](rest-api-post-group-users)), yet the
process is very similar: process is very similar:
```python ```python
@@ -216,7 +254,7 @@ provided by notebook servers managed by JupyterHub if it has the necessary `acce
Pagination is available through the `offset` and `limit` query parameters on Pagination is available through the `offset` and `limit` query parameters on
list endpoints, which can be used to return ideally sized windows of results. list endpoints, which can be used to return ideally sized windows of results.
Here's example code demonstrating pagination on the `GET /users` Here's example code demonstrating pagination on the [`GET /users`](rest-api-get-users)
endpoint to fetch the first 20 records. endpoint to fetch the first 20 records.
```python ```python
@@ -315,12 +353,18 @@ hub:
With that setting in place, a new named-server is activated like this: With that setting in place, a new named-server is activated like this:
```{parsed-literal}
[POST /api/users/:username/servers/:servername](rest-api-post-user-server-name)
```
e.g.
```bash ```bash
curl -X POST -H "Authorization: token <token>" "http://127.0.0.1:8081/hub/api/users/<user>/servers/<serverA>" curl -X POST -H "Authorization: token <token>" "http://127.0.0.1:8081/hub/api/users/<user>/servers/<serverA>"
curl -X POST -H "Authorization: token <token>" "http://127.0.0.1:8081/hub/api/users/<user>/servers/<serverB>" curl -X POST -H "Authorization: token <token>" "http://127.0.0.1:8081/hub/api/users/<user>/servers/<serverB>"
``` ```
The same servers can be stopped by substituting `DELETE` for `POST` above. The same servers can be [stopped](rest-api-delete-user-server-name) by substituting `DELETE` for `POST` above.
### Some caveats for using named-servers ### Some caveats for using named-servers

View File

@@ -1,4 +1,4 @@
(separate-proxy)= (howto:separate-proxy)=
# Running proxy separately from the hub # Running proxy separately from the hub
@@ -70,7 +70,7 @@ need to configure the options there.
## Docker image ## Docker image
You can use [jupyterhub configurable-http-proxy docker You can use [jupyterhub configurable-http-proxy docker
image](https://hub.docker.com/r/jupyterhub/configurable-http-proxy/) image](https://quay.io/repository/jupyterhub/configurable-http-proxy)
to run the proxy. to run the proxy.
## See also ## See also

View File

@@ -1,3 +1,5 @@
(howto:templates)=
# Working with templates and UI # Working with templates and UI
The pages of the JupyterHub application are generated from The pages of the JupyterHub application are generated from

View File

@@ -0,0 +1,144 @@
(howto:upgrading-v5)=
# Upgrading to JupyterHub 5
This document describes the specific considerations.
For general upgrading tips, see the [docs on upgrading jupyterhub](upgrading).
You can see the [changelog](changelog) for more detailed information.
## Python version
JupyterHub 5 requires Python 3.8.
Make sure you have at least Python 3.8 in your user and hub environments before upgrading.
## Database upgrades
JupyterHub 5 does have a database schema upgrade,
so you should backup your database and run `jupyterhub upgrade-db` after upgrading and before starting JupyterHub.
The updated schema only adds some columns, so is one that should be not too disruptive to roll back if you need to.
## User subdomains
All JupyterHub deployments which care about protecting users from each other are encouraged to enable per-user domains, if possible,
as this provides the best isolation between user servers.
To enable subdomains, set:
```python
c.JupyterHub.subdomain_host = "https://myjupyterhub.example.org"
```
If you were using subdomains before, some user servers and all services will be on different hosts in the default configuration.
JupyterHub 5 allows complete customization of the subdomain scheme via the new {attr}`.JupyterHub.subdomain_hook`,
and changes the default subdomain scheme.
.
You can provide a completely custom subdomain scheme, or select one of two default implementations by name: `idna` or `legacy`. `idna` is the default.
The new default behavior can be selected explicitly via:
```python
c.JupyterHub.subdomain_hook = "idna"
```
Or to delay any changes to URLs for your users, you can opt-in to the pre-5.0 behavior with:
```python
c.JupyterHub.subdomain_hook = "legacy"
```
The key differences of the new `idna` scheme:
- It should always produce valid domains, regardless of username (not true for the legacy scheme when using characters that might need escaping or usernames that are long)
- each Service gets its own subdomain on `service--` rather than sharing `services.`
Below is a table of examples of users and services with their domains with the old and new scheme, assuming the configuration:
```python
c.JupyterHub.subdomain_host = "https://jupyter.example.org"
```
| kind | name | legacy | idna |
| ------- | ------------------ | ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| user | laudna | `laudna.jupyter.example.org` | `laudna.jupyter.example.org` |
| service | bells | `services.jupyter.example.org` | `bells--service.jupyter.example.org` |
| user | jester@mighty.nein | `jester_40mighty.nein.jupyter.example.org` (may not work!) | `u-jestermi--8037680.jupyter.example.org` (not as pretty, but guaranteed to be valid and not collide) |
## Tokens in URLs
JupyterHub 5 does not accept `?token=...` URLs by default in single-user servers.
These URLs allow one user to force another to login as them,
which can be the start of an inter-user attack.
There is a valid use case for producing links which allow starting a fully authenticated session,
so you may still opt in to this behavior by setting:
```python
c.Spawner.environment.update({"JUPYTERHUB_ALLOW_TOKEN_IN_URL": "1"})
```
if you are not concerned about protecting your users from each other.
If you have subdomains enabled, the threat is substantially reduced.
## Sharing
The big new feature in JupyterHub 5.0 is sharing.
Check it out in [the sharing docs](sharing-tutorial).
## Authenticator.allow_all and allow_existing_users
Prior to JupyterHub 5, JupyterHub Authenticators had the _implicit_ default behavior to allow any user who successfully authenticates to login **if no users are explicitly allowed** (i.e. `allowed_users` is empty on the base class).
This behavior was considered a too-permissive default in Authenticators that source large user pools like OAuthenticator, which would accept e.g. all users with a Google account by default.
As a result, OAuthenticator 16 introduced two configuration options: `allow_all` and `allow_existing_users`.
JupyterHub 5 adopts these options for all Authenticators:
1. `Authenticator.allow_all` (default: False)
2. `Authenticator.allow_existing_users` (default: True if allowed_users is non-empty, False otherwise)
having the effect that _some_ allow configuration is required for anyone to be able to login.
If you want to preserve the pre-5.0 behavior with no explicit `allow` configuration, set:
```python
c.Authenticator.allow_all = True
```
`allow_existing_users` defaults are meant to be backward-compatible, but you can now _explicitly_ allow or not based on presence in the database by setting `Authenticator.allow_existing_users` to True or False.
:::{seealso}
[Authenticator config docs](authenticators) for details on these and other Authenticator options.
:::
## Bootstrap 5
JupyterHub uses the CSS framework [bootstrap](https://getbootstrap.com), which is upgraded from 3.4 to 5.3.
If you don't have any custom HTML templates, you are likely to only see relatively minor aesthetic changes.
If you have custom HTML templates or spawner options forms, they may need some updating to look right.
See the bootstrap documentation. Since we upgraded two major versions, you might need to look at both v4 and v5 documentation for what has changed since 3.x:
- [migrating to v4](https://getbootstrap.com/docs/4.6/migration/)
- [migrating to v5](https://getbootstrap.com/docs/5.3/migration/)
If you customized the JupyterHub CSS by recompiling from LESS files, bootstrap migrated to SCSS.
You can start by autoconverting your LESS to SCSS (it's not that different) with [less2sass](https://github.com/ekryski/less2sass):
```bash
npm install --global less2scss
# converts less/foo.less to scss/foo.scss
less2scss --src ./less --dst ./scss
```
Bootstrap also allows configuring things with [CSS variables](https://getbootstrap.com/docs/5.3/customize/css-variables/), so depending on what you have customized, you may be able to get away with just adding a CSS file defining variables without rebuilding the whole SCSS.
## groups required with Authenticator.manage_groups
Setting `Authenticator.manage_groups = True` allows the Authenticator to manage group membership by returning `groups` from the authentication model.
However, this option is available even on Authenticators that do not support it, which led to confusion.
Starting with JupyterHub 5, if `manage_groups` is True `authenticate` _must_ return a groups field, otherwise an error is raised.
This prevents confusion when users enable managed groups that is not implemented.
If an Authenticator _does_ support managing groups but was not providing a `groups` field in order to leave membership unmodified, it must specify `"groups": None` to make this explicit instead of implicit (this is backward-compatible).

View File

@@ -1,4 +1,4 @@
(upgrading-jupyterhub)= (howto:upgrading-jupyterhub)=
# Upgrading JupyterHub # Upgrading JupyterHub
@@ -14,12 +14,20 @@ JupyterHub is painless, quick and with minimal user interruption.
The steps are discussed in detail, so if you get stuck at any step you can always refer to this guide. The steps are discussed in detail, so if you get stuck at any step you can always refer to this guide.
For specific version migrations:
```{toctree}
:maxdepth: 1
./upgrading-v5
```
## Read the Changelog ## Read the Changelog
The [changelog](changelog) contains information on what has The [changelog](changelog) contains information on what has
changed with the new JupyterHub release and any deprecation warnings. changed with the new JupyterHub release and any deprecation warnings.
Read these notes to familiarize yourself with the coming changes. There Read these notes to familiarize yourself with the coming changes. There
might be new releases of the authenticators & spawners you use, so might be new releases of the authenticators and spawners you use, so
read the changelogs for those too! read the changelogs for those too!
## Notify your users ## Notify your users
@@ -33,7 +41,7 @@ If you use a different proxy or run `configurable-http-proxy`
independent of JupyterHub, your users will be able to continue using notebook independent of JupyterHub, your users will be able to continue using notebook
servers they had already launched, but will not be able to launch new servers or sign in. servers they had already launched, but will not be able to launch new servers or sign in.
## Backup database & config ## Backup database and config
Before doing an upgrade, it is critical to back up: Before doing an upgrade, it is critical to back up:
@@ -82,7 +90,7 @@ with:
conda install -c conda-forge jupyterhub==<version> conda install -c conda-forge jupyterhub==<version>
``` ```
You should also check for new releases of the authenticator & spawner you You should also check for new releases of the authenticator and spawner you
are using. You might wish to upgrade those packages, too, along with JupyterHub are using. You might wish to upgrade those packages, too, along with JupyterHub
or upgrade them separately. or upgrade them separately.
@@ -99,17 +107,6 @@ jupyterhub upgrade-db
This should find the location of your database, and run the necessary upgrades This should find the location of your database, and run the necessary upgrades
for it. for it.
### SQLite database disadvantages
SQLite has some disadvantages when it comes to upgrading JupyterHub. These
are:
- `upgrade-db` may not work, and you may need to delete your database
and start with a fresh one.
- `downgrade-db` **will not** work if you want to rollback to an
earlier version, so backup the `jupyterhub.sqlite` file before
upgrading.
### What happens if I delete my database? ### What happens if I delete my database?
Losing the Hub database is often not a big deal. Information that Losing the Hub database is often not a big deal. Information that

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@@ -17,7 +17,7 @@ It has two main distributions which are developed to serve the needs of each of
1. [The Littlest JupyterHub](https://github.com/jupyterhub/the-littlest-jupyterhub) distribution is suitable if you need a small number of users (1-100) and a single server with a simple environment. 1. [The Littlest JupyterHub](https://github.com/jupyterhub/the-littlest-jupyterhub) distribution is suitable if you need a small number of users (1-100) and a single server with a simple environment.
2. [Zero to JupyterHub with Kubernetes](https://github.com/jupyterhub/zero-to-jupyterhub-k8s) allows you to deploy dynamic servers on the cloud if you need even more users. 2. [Zero to JupyterHub with Kubernetes](https://github.com/jupyterhub/zero-to-jupyterhub-k8s) allows you to deploy dynamic servers on the cloud if you need even more users.
This distribution runs JupyterHub on top of [Kubernetes](https://k8s.io). This distribution runs JupyterHub on top of [Kubernetes](https://kubernetes.io/).
```{note} ```{note}
It is important to evaluate these distributions before you can continue with the It is important to evaluate these distributions before you can continue with the

View File

@@ -13,26 +13,53 @@ The files are:
This file is JupyterHub's REST API schema. Both a version and the RBAC This file is JupyterHub's REST API schema. Both a version and the RBAC
scopes descriptions are updated in it. scopes descriptions are updated in it.
""" """
import os
from collections import defaultdict from collections import defaultdict
from pathlib import Path from pathlib import Path
from subprocess import run
from pytablewriter import MarkdownTableWriter from pytablewriter import MarkdownTableWriter
from ruamel.yaml import YAML from ruamel.yaml import YAML
from jupyterhub import __version__ HERE = Path(__file__).parent.absolute()
from jupyterhub.scopes import scope_definitions DOCS = HERE / ".." / ".."
HERE = os.path.abspath(os.path.dirname(__file__))
DOCS = Path(HERE).parent.parent.absolute()
REST_API_YAML = DOCS.joinpath("source", "_static", "rest-api.yml") REST_API_YAML = DOCS.joinpath("source", "_static", "rest-api.yml")
SCOPE_TABLE_MD = Path(HERE).joinpath("scope-table.md") SCOPE_TABLE_MD = HERE.joinpath("scope-table.md")
def _load_jupyterhub_info():
"""
The equivalent of
from jupyterhub import __version__
from jupyterhub.scopes import scope_definitions
but without needing to install JupyterHub and dependencies
so that we can run this pre-commit
"""
root = HERE / ".." / ".." / ".."
g = {}
exec((root / "jupyterhub" / "_version.py").read_text(), g)
# To avoid parsing the whole of scope_definitions.py just pull out
# the relevant lines
scopes_file = root / "jupyterhub" / "scopes.py"
scopes_lines = []
for line in scopes_file.read_text().splitlines():
if not scopes_lines and line == "scope_definitions = {":
scopes_lines.append(line)
elif scopes_lines:
scopes_lines.append(line)
if line == "}":
break
exec("\n".join(scopes_lines), g)
return g["__version__"], g["scope_definitions"]
class ScopeTableGenerator: class ScopeTableGenerator:
def __init__(self): def __init__(self):
self.scopes = scope_definitions self.version, self.scopes = _load_jupyterhub_info()
@classmethod @classmethod
def create_writer(cls, table_name, headers, values): def create_writer(cls, table_name, headers, values):
@@ -130,7 +157,7 @@ class ScopeTableGenerator:
with open(filename) as f: with open(filename) as f:
content = yaml.load(f.read()) content = yaml.load(f.read())
content["info"]["version"] = __version__ content["info"]["version"] = self.version
for scope in self.scopes: for scope in self.scopes:
description = self.scopes[scope]['description'] description = self.scopes[scope]['description']
doc_description = self.scopes[scope].get('doc_description', '') doc_description = self.scopes[scope].get('doc_description', '')
@@ -144,12 +171,6 @@ class ScopeTableGenerator:
with open(filename, 'w') as f: with open(filename, 'w') as f:
yaml.dump(content, f) yaml.dump(content, f)
run(
['pre-commit', 'run', 'prettier', '--files', filename],
cwd=HERE,
check=False,
)
def main(): def main():
table_generator = ScopeTableGenerator() table_generator = ScopeTableGenerator()

View File

@@ -0,0 +1,58 @@
Table 1. Available scopes and their hierarchy
| Scope | Grants permission to: |
| --------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `(no_scope)` | Identify the owner of the requesting entity. |
| `self` | The users own resources _(metascope for users, resolves to (no_scope) for services)_ |
| `inherit` | Everything that the token-owning entity can access _(metascope for tokens)_ |
| `admin-ui` | Access the admin page. Permission to take actions via the admin page granted separately. |
| `admin:users` | Read, modify, create, and delete users and their authentication state, not including their servers or tokens. This is an extremely privileged scope and should be considered tantamount to superuser. |
| &nbsp;&nbsp;&nbsp;`admin:auth_state` | Read a users authentication state. |
| &nbsp;&nbsp;&nbsp;`users` | Read and write permissions to user models (excluding servers, tokens and authentication state). |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`read:users` | Read user models (including the URL of the default server if it is running). |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`read:users:name` | Read names of users. |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`read:users:groups` | Read users group membership. |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`read:users:activity` | Read time of last user activity. |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`list:users` | List users, including at least their names. |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`read:users:name` | Read names of users. |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`users:activity` | Update time of last user activity. |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`read:users:activity` | Read time of last user activity. |
| &nbsp;&nbsp;&nbsp;`read:roles:users` | Read user role assignments. |
| &nbsp;&nbsp;&nbsp;`delete:users` | Delete users. |
| `read:roles` | Read role assignments. |
| &nbsp;&nbsp;&nbsp;`read:roles:users` | Read user role assignments. |
| &nbsp;&nbsp;&nbsp;`read:roles:services` | Read service role assignments. |
| &nbsp;&nbsp;&nbsp;`read:roles:groups` | Read group role assignments. |
| `admin:servers` | Read, start, stop, create and delete user servers and their state. |
| &nbsp;&nbsp;&nbsp;`admin:server_state` | Read and write users server state. |
| &nbsp;&nbsp;&nbsp;`servers` | Start and stop user servers. |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`read:servers` | Read users names and their server models (excluding the server state). |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`read:users:name` | Read names of users. |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`delete:servers` | Stop and delete users' servers. |
| `tokens` | Read, write, create and delete user tokens. |
| &nbsp;&nbsp;&nbsp;`read:tokens` | Read user tokens. |
| `admin:groups` | Read and write group information, create and delete groups. |
| &nbsp;&nbsp;&nbsp;`groups` | Read and write group information, including adding/removing any users to/from groups. Note: adding users to groups may affect permissions. |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`read:groups` | Read group models. |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`read:groups:name` | Read group names. |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`list:groups` | List groups, including at least their names. |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`read:groups:name` | Read group names. |
| &nbsp;&nbsp;&nbsp;`read:roles:groups` | Read group role assignments. |
| &nbsp;&nbsp;&nbsp;`delete:groups` | Delete groups. |
| `admin:services` | Create, read, update, delete services, not including services defined from config files. |
| &nbsp;&nbsp;&nbsp;`list:services` | List services, including at least their names. |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`read:services:name` | Read service names. |
| &nbsp;&nbsp;&nbsp;`read:services` | Read service models. |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`read:services:name` | Read service names. |
| &nbsp;&nbsp;&nbsp;`read:roles:services` | Read service role assignments. |
| `read:hub` | Read detailed information about the Hub. |
| `access:services` | Access services via API or browser. |
| `shares` | Manage access to shared servers. |
| &nbsp;&nbsp;&nbsp;`access:servers` | Access user servers via API or browser. |
| &nbsp;&nbsp;&nbsp;`read:shares` | Read information about shared access to servers. |
| &nbsp;&nbsp;&nbsp;`users:shares` | Read and revoke a user's access to shared servers. |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`read:users:shares` | Read servers shared with a user. |
| &nbsp;&nbsp;&nbsp;`groups:shares` | Read and revoke a group's access to shared servers. |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`read:groups:shares` | Read servers shared with a group. |
| `proxy` | Read information about the proxys routing table, sync the Hub with the proxy and notify the Hub about a new proxy. |
| `shutdown` | Shutdown the hub. |
| `read:metrics` | Read prometheus metrics. |

View File

@@ -178,6 +178,83 @@ Note that only the {ref}`horizontal filtering <horizontal-filtering-target>` can
Metascopes `self` and `all`, `<resource>`, `<resource>:<subresource>`, `read:<resource>`, `admin:<resource>`, and `access:<resource>` scopes are predefined and cannot be changed otherwise. Metascopes `self` and `all`, `<resource>`, `<resource>:<subresource>`, `read:<resource>`, `admin:<resource>`, and `access:<resource>` scopes are predefined and cannot be changed otherwise.
``` ```
(access-scopes)=
### Access scopes
An **access scope** is used to govern _access_ to a JupyterHub service or a user's single-user server.
This means making API requests, or visiting via a browser using OAuth.
Without the appropriate access scope, a user or token should not be permitted to make requests of the service.
When you attempt to access a service or server authenticated with JupyterHub, it will begin the [oauth flow](explanation:hub-oauth) for issuing a token that can be used to access the service.
If the user does not have the access scope for the relevant service or server, JupyterHub will not permit the oauth process to complete.
If oauth completes, the token will have at least the access scope for the service.
For minimal permissions, this is the _only_ scope granted to tokens issued during oauth by default,
but can be expanded via {attr}`.Spawner.oauth_client_allowed_scopes` or a service's [`oauth_client_allowed_scopes`](service-credentials) configuration.
:::{seealso}
[Further explanation of OAuth in JupyterHub](explanation:hub-oauth)
:::
If a given service or single-user server can be governed by a single boolean "yes, you can use this service" or "no, you can't," or limiting via other existing scopes, access scopes are enough to manage access to the service.
But you can also further control granular access to servers or services with [custom scopes](custom-scopes), to limit access to particular APIs within the service, e.g. read-only access.
#### Example access scopes
Some example access scopes for services:
access:services
: access to all services
access:services!service=somename
: access to the service named `somename`
and for user servers:
access:servers
: access to all user servers
access:servers!user
: access to all of a user's _own_ servers (never in _resolved_ scopes, but may be used in configuration)
access:servers!user=name
: access to all of `name`'s servers
access:servers!group=groupname
: access to all servers owned by a user in the group `groupname`
access:servers!server
: access to only the issuing server (only relevant when applied to oauth tokens associated with a particular server, e.g. via the {attr}`Spawner.oauth_client_allowed_scopes` configuration.
access:servers!server=username/
: access to only `username`'s _default_ server.
(granting-scopes)=
### Considerations when allowing users to grant permissions via the `groups` scope
In general, permissions are fixed by role assignments in configuration (or via [Authenticator-managed roles](#authenticator-roles) in JupyterHub 5) and can only be modified by administrators who can modify the Hub configuration.
There is only one scope that allows users to modify permissions of themselves or others at runtime instead of via configuration:
the `groups` scope, which allows adding and removing users from one or more groups.
With the `groups` scope, a user can add or remove any users to/from any group.
With the `groups!group=name` filtered scope, a user can add or remove any users to/from a specific group.
There are two ways in which adding a user to a group may affect their permissions:
- if the group is assigned one or more roles, adding a user to the group may increase their permissions (this is usually the point!)
- if the group is the _target_ of a filter on this or another group, such as `access:servers!group=students`, adding a user to the group can grant _other_ users elevated access to that user's resources.
With these in mind, when designing your roles, do not grant users the `groups` scope for any groups which:
- have roles the user should not have authority over, or
- would grant them access they shouldn't have for _any_ user (e.g. don't grant `teachers` both `access:servers!group=students` and `groups!group=students` which is tantamount to the unrestricted `access:servers` because they control which users the `group=students` filter applies to).
If a group does not have role assignments and the group is not present in any `!group=` filter, there should be no permissions-related consequences for adding users to groups.
:::{note}
The legacy `admin` property of users, which grants extreme superuser permissions and is generally discouraged in favor of more specific roles and scopes, may be modified only by other users with the `admin` property (e.g. added via `admin_users`).
:::
(custom-scopes)= (custom-scopes)=
### Custom scopes ### Custom scopes
@@ -298,8 +375,24 @@ class MyHandler(HubOAuthenticated, BaseHandler):
Existing scope filters (`!user=`, etc.) may be applied to custom scopes. Existing scope filters (`!user=`, etc.) may be applied to custom scopes.
Custom scope _filters_ are NOT supported. Custom scope _filters_ are NOT supported.
:::{warning}
JupyterHub allows you to define custom scopes,
but it does not enforce that your services apply them.
For example, if you enable read-only access to servers via custom JupyterHub
(as seen in the `read-only` example),
it is the administrator's responsibility to enforce that they are applied.
If you allow users to launch servers without that custom Authorizer,
read-only permissions will not be enforced, and the default behavior of unrestricted access via the `access:servers` scope will be applied.
:::
### Scopes and APIs ### Scopes and APIs
The scopes are also listed in the [](jupyterhub-rest-API) documentation. Each API endpoint has a list of scopes which can be used to access the API; if no scopes are listed, the API is not authenticated and can be accessed without any permissions (i.e., no scopes). The scopes are also listed in the [](jupyterhub-rest-API) documentation.
Each API endpoint has a list of scopes which can be used to access the API;
if no scopes are listed, the API is not authenticated and can be accessed without any permissions (i.e., no scopes).
Listed scopes by each API endpoint reflect the "lowest" permissions required to gain any access to the corresponding API. For example, posting user's activity (_POST /users/:name/activity_) needs `users:activity` scope. If scope `users` is passed during the request, the access will be granted as the required scope is a subscope of the `users` scope. If, on the other hand, `read:users:activity` scope is passed, the access will be denied. Listed scopes by each API endpoint reflect the "lowest" permissions required to gain any access to the corresponding API.
For example, posting user's activity (_POST /users/:name/activity_) needs `users:activity` scope.
If scope `users` is held by the request, the access will be granted as the required scope is a subscope of the `users` scope.
If, on the other hand, `read:users:activity` scope is the only scope held, the request will be denied.

View File

@@ -84,7 +84,6 @@ The passed scopes are compared to the scopes required to access the API as follo
- if the API scopes are present within the set of passed scopes, the access is granted and the API returns its "full" response - if the API scopes are present within the set of passed scopes, the access is granted and the API returns its "full" response
- if that is not the case, another check is utilized to determine if subscopes of the required API scopes can be found in the passed scope set: - if that is not the case, another check is utilized to determine if subscopes of the required API scopes can be found in the passed scope set:
- if found, the RBAC framework employs the {ref}`filtering <vertical-filtering-target>` procedures to refine the API response to access only resource attributes corresponding to the passed scopes. For example, providing a scope `read:users:activity!group=class-C` for the `GET /users` API will return a list of user models from group `class-C` containing only the `last_activity` attribute for each user model - if found, the RBAC framework employs the {ref}`filtering <vertical-filtering-target>` procedures to refine the API response to access only resource attributes corresponding to the passed scopes. For example, providing a scope `read:users:activity!group=class-C` for the `GET /users` API will return a list of user models from group `class-C` containing only the `last_activity` attribute for each user model
- if not found, the access to API is denied - if not found, the access to API is denied

View File

@@ -11,7 +11,7 @@ No other database records are affected.
## Upgrade steps ## Upgrade steps
1. All running **servers must be stopped** before proceeding with the upgrade. 1. All running **servers must be stopped** before proceeding with the upgrade.
2. To upgrade the Hub, follow the [Upgrading JupyterHub](upgrading-jupyterhub) instructions. 2. To upgrade the Hub, follow the [Upgrading JupyterHub](howto:upgrading-jupyterhub) instructions.
```{attention} ```{attention}
We advise against defining any new roles in the `jupyterhub.config.py` file right after the upgrade is completed and JupyterHub restarted for the first time. This preserves the 'current' state of the Hub. You can define and assign new roles on any other following startup. We advise against defining any new roles in the `jupyterhub.config.py` file right after the upgrade is completed and JupyterHub restarted for the first time. This preserves the 'current' state of the Hub. You can define and assign new roles on any other following startup.
``` ```

View File

@@ -1,33 +1,42 @@
# Authenticators # Authenticators
## Module: {mod}`jupyterhub.auth`
```{eval-rst} ```{eval-rst}
.. automodule:: jupyterhub.auth .. module:: jupyterhub.auth
``` ```
### {class}`Authenticator` ## {class}`Authenticator`
```{eval-rst} ```{eval-rst}
.. autoconfigurable:: Authenticator .. autoconfigurable:: Authenticator
:members: :members:
``` ```
### {class}`LocalAuthenticator` ## {class}`LocalAuthenticator`
```{eval-rst} ```{eval-rst}
.. autoconfigurable:: LocalAuthenticator .. autoconfigurable:: LocalAuthenticator
:members: :members:
``` ```
### {class}`PAMAuthenticator` ## {class}`PAMAuthenticator`
```{eval-rst} ```{eval-rst}
.. autoconfigurable:: PAMAuthenticator .. autoconfigurable:: PAMAuthenticator
``` ```
### {class}`DummyAuthenticator` ## {class}`DummyAuthenticator`
```{eval-rst} ```{eval-rst}
.. autoconfigurable:: DummyAuthenticator .. autoconfigurable:: DummyAuthenticator
``` ```
```{eval-rst}
.. module:: jupyterhub.authenticators.shared
```
## {class}`SharedPasswordAuthenticator`
```{eval-rst}
.. autoconfigurable:: SharedPasswordAuthenticator
:no-inherited-members:
```

View File

@@ -11,7 +11,7 @@
:Release: {{ version }} :Release: {{ version }}
JupyterHub also provides a REST API for administration of the Hub and users. JupyterHub also provides a REST API for administration of the Hub and users.
The documentation on [Using JupyterHub's REST API](using-jupyterhub-rest-api) provides The documentation on [Using JupyterHub's REST API](howto:rest-api) provides
information on: information on:
- what you can do with the API - what you can do with the API

View File

@@ -10,7 +10,7 @@
```{eval-rst} ```{eval-rst}
.. autoconfigurable:: Spawner .. autoconfigurable:: Spawner
:members: options_from_form, poll, start, stop, get_args, get_env, get_state, template_namespace, format_string, create_certs, move_certs :members: options_from_form, user_options, poll, start, stop, get_args, get_env, get_state, template_namespace, format_string, create_certs, move_certs
``` ```
### {class}`LocalProcessSpawner` ### {class}`LocalProcessSpawner`

View File

@@ -30,22 +30,66 @@ popular services:
- Globus - Globus
- Google - Google
- MediaWiki - MediaWiki
- Okpy
- OpenShift - OpenShift
A [generic implementation](https://github.com/jupyterhub/oauthenticator/blob/master/oauthenticator/generic.py), which you can use for OAuth authentication with any provider, is also available. A [generic implementation](https://github.com/jupyterhub/oauthenticator/blob/master/oauthenticator/generic.py), which you can use for OAuth authentication with any provider, is also available.
## The Dummy Authenticator ## The Dummy Authenticator
When testing, it may be helpful to use the When testing, it may be helpful to use the {class}`~.jupyterhub.auth.DummyAuthenticator`:
{class}`jupyterhub.auth.DummyAuthenticator`. This allows for any username and
password unless if a global password has been set. Once set, any username will ```python
still be accepted but the correct password will need to be provided. c.JupyterHub.authenticator_class = "dummy"
# always a good idea to limit to localhost when testing with an insecure config
c.JupyterHub.ip = "127.0.0.1"
```
This allows for any username and password to login, and is _wildly_ insecure.
To use, specify
```python
c.JupyterHub.authenticator_class = "dummy"
```
:::{versionadded} 5.0
The DummyAuthenticator's default `allow_all` is True,
unlike most other Authenticators.
:::
:::{deprecated} 5.3
Setting a password on DummyAuthenticator is deprecated.
Use the new {class}`~.jupyterhub.authenticators.shared.SharedPasswordAuthenticator`
if you want to set a shared password for users.
:::
## Shared Password Authenticator
:::{versionadded} 5.3
{class}`~.jupyterhub.authenticators.shared.SharedPasswordAuthenticator` is added and [DummyAuthenticator.password](#DummyAuthenticator.password) is deprecated.
:::
For short-term deployments like workshops where there is no real user data to protect and you trust users to not abuse the system or each other,
{class}`~.jupyterhub.authenticators.shared.SharedPasswordAuthenticator` can be used.
Set a [user password](#SharedPasswordAuthenticator.user_password) for users to login:
```python
c.JupyterHub.authenticator_class = "shared-password"
c.SharedPasswordAuthenticator.user_password = "my-workshop-2042"
```
You can also grant admin users access by adding them to `admin_users` and setting a separate [admin password](#SharedPasswordAuthenticator.admin_password):
```python
c.Authenticator.admin_users = {"danger", "eggs"}
c.SharedPasswordAuthenticator.admin_password = "extra-super-secret-secure-password"
```
## Additional Authenticators ## Additional Authenticators
A partial list of other authenticators is available on the Additional authenticators can be found on GitHub
[JupyterHub wiki](https://github.com/jupyterhub/jupyterhub/wiki/Authenticators). by searching for [topic:jupyterhub topic:authenticator](https://github.com/search?q=topic%3Ajupyterhub%20topic%3Aauthenticator&type=repositories).
## Technical Overview of Authentication ## Technical Overview of Authentication
@@ -55,9 +99,9 @@ The base authenticator uses simple username and password authentication.
The base Authenticator has one central method: The base Authenticator has one central method:
#### Authenticator.authenticate method #### Authenticator.authenticate
Authenticator.authenticate(handler, data) {meth}`.Authenticator.authenticate`
This method is passed the Tornado `RequestHandler` and the `POST data` This method is passed the Tornado `RequestHandler` and the `POST data`
from JupyterHub's login form. Unless the login form has been customized, from JupyterHub's login form. Unless the login form has been customized,
@@ -66,17 +110,24 @@ from JupyterHub's login form. Unless the login form has been customized,
- `username` - `username`
- `password` - `password`
The `authenticate` method's job is simple: If authentication is successful the `authenticate` method must return either:
- return the username (non-empty str) of the authenticated user if - the username (non-empty str) of the authenticated user
authentication is successful - or a dictionary with fields:
- return `None` otherwise - `name`: the username
- `admin`: optional, a boolean indicating whether the user is an admin.
In most cases it is better to use fine grained [RBAC permissions](rbac) instead of giving users full admin privileges.
- `auth_state`: optional, a dictionary of [auth state that will be persisted](authenticator-auth-state)
- `groups`: optional, a list of JupyterHub [group memberships](authenticator-groups)
Otherwise, it must return `None`.
Writing an Authenticator that looks up passwords in a dictionary Writing an Authenticator that looks up passwords in a dictionary
requires only overriding this one method: requires only overriding this one method:
```python ```python
from IPython.utils.traitlets import Dict from secrets import compare_digest
from traitlets import Dict
from jupyterhub.auth import Authenticator from jupyterhub.auth import Authenticator
class DictionaryAuthenticator(Authenticator): class DictionaryAuthenticator(Authenticator):
@@ -86,8 +137,14 @@ class DictionaryAuthenticator(Authenticator):
) )
async def authenticate(self, handler, data): async def authenticate(self, handler, data):
if self.passwords.get(data['username']) == data['password']: username = data["username"]
return data['username'] password = data["password"]
check_password = self.passwords.get(username, "")
# always call compare_digest, for timing attacks
if compare_digest(check_password, password) and username in self.passwords:
return username
else:
return None
``` ```
#### Normalize usernames #### Normalize usernames
@@ -131,7 +188,7 @@ To only allow usernames that start with 'w':
c.Authenticator.username_pattern = r'w.*' c.Authenticator.username_pattern = r'w.*'
``` ```
### How to write a custom authenticator ## How to write a custom authenticator
You can use custom Authenticator subclasses to enable authentication You can use custom Authenticator subclasses to enable authentication
via other mechanisms. One such example is using [GitHub OAuth][]. via other mechanisms. One such example is using [GitHub OAuth][].
@@ -143,11 +200,6 @@ and {meth}`.Authenticator.post_spawn_stop`, are hooks that can be used to do
auth-related startup (e.g. opening PAM sessions) and cleanup auth-related startup (e.g. opening PAM sessions) and cleanup
(e.g. closing PAM sessions). (e.g. closing PAM sessions).
See a list of custom Authenticators [on the wiki](https://github.com/jupyterhub/jupyterhub/wiki/Authenticators).
If you are interested in writing a custom authenticator, you can read
[this tutorial](http://jupyterhub-tutorial.readthedocs.io/en/latest/authenticators.html).
### Registering custom Authenticators via entry points ### Registering custom Authenticators via entry points
As of JupyterHub 1.0, custom authenticators can register themselves via As of JupyterHub 1.0, custom authenticators can register themselves via
@@ -183,6 +235,168 @@ Additionally, configurable attributes for your authenticator will
appear in jupyterhub help output and auto-generated configuration files appear in jupyterhub help output and auto-generated configuration files
via `jupyterhub --generate-config`. via `jupyterhub --generate-config`.
(authenticator-allow)=
### Allowing access
When dealing with logging in, there are generally two _separate_ steps:
authentication
: identifying who is trying to log in, and
authorization
: deciding whether an authenticated user is allowed to access your JupyterHub
{meth}`Authenticator.authenticate` is responsible for authenticating users.
It is perfectly fine in the simplest cases for `Authenticator.authenticate` to be responsible for authentication _and_ authorization,
in which case `authenticate` may return `None` if the user is not authorized.
However, Authenticators also have two methods, {meth}`~.Authenticator.check_allowed` and {meth}`~.Authenticator.check_blocked_users`, which are called after successful authentication to further check if the user is allowed.
If `check_blocked_users()` returns False, authorization stops and the user is not allowed.
If `Authenticator.allow_all` is True OR `check_allowed()` returns True, authorization proceeds.
:::{versionadded} 5.0
{attr}`.Authenticator.allow_all` and {attr}`.Authenticator.allow_existing_users` are new in JupyterHub 5.0.
By default, `allow_all` is False,
which is a change from pre-5.0, where `allow_all` was implicitly True if `allowed_users` was empty.
:::
### Overriding `check_allowed`
:::{versionchanged} 5.0
`check_allowed()` is **not called** if `allow_all` is True.
:::
:::{versionchanged} 5.0
Starting with 5.0, `check_allowed()` should **NOT** return True if no allow config
is specified (`allow_all` should be used instead).
:::
The base implementation of {meth}`~.Authenticator.check_allowed` checks:
- if username is in the `allowed_users` set, return True
- else return False
:::{versionchanged} 5.0
Prior to 5.0, this would also return True if `allowed_users` was empty.
For clarity, this is no longer the case. A new `allow_all` property (default False) has been added which is checked _before_ calling `check_allowed`.
If `allow_all` is True, this takes priority over `check_allowed`, which will be ignored.
If your Authenticator subclass similarly returns True when no allow config is defined,
this is fully backward compatible for your users, but means `allow_all = False` has no real effect.
You can make your Authenticator forward-compatible with JupyterHub 5 by defining `allow_all` as a boolean config trait on your class:
```python
class MyAuthenticator(Authenticator):
# backport allow_all from JupyterHub 5
allow_all = Bool(False, config=True)
def check_allowed(self, username, authentication):
if self.allow_all:
# replaces previous "if no auth config"
return True
...
```
:::
If an Authenticator defines additional sources of `allow` configuration,
such as membership in a group or other information,
it should override `check_allowed` to account for this.
:::{note}
`allow_` configuration should generally be _additive_,
i.e. if access is granted by _any_ allow configuration,
a user should be authorized.
JupyterHub recommends that Authenticators applying _restrictive_ configuration should use names like `block_` or `require_`,
and check this during `check_blocked_users` or `authenticate`, not `check_allowed`.
:::
In general, an Authenticator's skeleton should look like:
```python
class MyAuthenticator(Authenticator):
# backport allow_all for compatibility with JupyterHub < 5
allow_all = Bool(False, config=True)
require_something = List(config=True)
allowed_something = Set()
def authenticate(self, data, handler):
...
if success:
return {"username": username, "auth_state": {...}}
else:
return None
def check_blocked_users(self, username, authentication=None):
"""Apply _restrictive_ configuration"""
if self.require_something and not has_something(username, self.request_):
return False
# repeat for each restriction
if restriction_defined and restriction_not_met:
return False
return super().check_blocked_users(self, username, authentication)
def check_allowed(self, username, authentication=None):
"""Apply _permissive_ configuration
Only called if check_blocked_users returns True
AND allow_all is False
"""
if self.allow_all:
# check here to backport allow_all behavior
# from JupyterHub 5
# this branch will never be taken with jupyterhub >=5
return True
if self.allowed_something and user_has_something(username):
return True
# repeat for each allow
if allow_config and allow_met:
return True
# should always have this at the end
if self.allowed_users and username in self.allowed_users:
return True
# do not call super!
# super().check_allowed is not safe with JupyterHub < 5.0,
# as it will return True if allowed_users is empty
return False
```
Key points:
- `allow_all` is backported from JupyterHub 5, for consistent behavior in all versions of JupyterHub (optional)
- restrictive configuration is checked in `check_blocked_users`
- if any restriction is not met, `check_blocked_users` returns False
- permissive configuration is checked in `check_allowed`
- if any `allow` condition is met, `check_allowed` returns True
So the logical expression for a user being authorized should look like:
> if ALL restrictions are met AND ANY admissions are met: user is authorized
#### Custom error messages
Any of these authentication and authorization methods may raise a `web.HTTPError` Exception
```python
from tornado import web
raise web.HTTPError(403, "informative message")
```
if you want to show a more informative login failure message rather than the generic one.
(authenticator-auth-state)=
### Authentication state ### Authentication state
JupyterHub 0.8 adds the ability to persist state related to authentication, JupyterHub 0.8 adds the ability to persist state related to authentication,
@@ -284,7 +498,7 @@ c.Authenticator.manage_groups = True
to enable this behavior. to enable this behavior.
The default is False for Authenticators that ship with JupyterHub, The default is False for Authenticators that ship with JupyterHub,
but may be True for custom Authenticators. but may be True for custom Authenticators.
Check your Authenticator's documentation for manage_groups support. Check your Authenticator's documentation for `manage_groups` support.
If True, {meth}`.Authenticator.authenticate` and {meth}`.Authenticator.refresh_user` may include a field `groups` If True, {meth}`.Authenticator.authenticate` and {meth}`.Authenticator.refresh_user` may include a field `groups`
which is a list of group names the user should be a member of: which is a list of group names the user should be a member of:
@@ -295,7 +509,62 @@ which is a list of group names the user should be a member of:
- If `None` is returned, no changes are made to the user's group membership - If `None` is returned, no changes are made to the user's group membership
If authenticator-managed groups are enabled, If authenticator-managed groups are enabled,
all group-management via the API is disabled. groups cannot be specified with `load_groups` traitlet.
:::{warning}
When `manage_groups` is True,
managing groups via the API is still permitted via the `admin:groups` scope (starting with 5.3),
but any time a user logs in their group membership is completely reset via the login process.
So it only really makes sense to make manual changes via the API that reflect upstream changes which are not automatically propagated, such as group deletion.
:::
:::{versionchanged} 5.3
Prior to JupyterHub 5.3, all group management via the API was disabled if `Authenticator.manage_groups` is True.
:::
(authenticator-roles)=
## Authenticator-managed roles
:::{versionadded} 5.0
:::
Some identity providers may have their own concept of role membership that you would like to preserve in JupyterHub.
This is now possible with {attr}`.Authenticator.manage_roles`.
You can set the config:
```python
c.Authenticator.manage_roles = True
```
to enable this behavior.
The default is False for Authenticators that ship with JupyterHub,
but may be True for custom Authenticators.
Check your Authenticator's documentation for `manage_roles` support.
If True, {meth}`.Authenticator.authenticate` and {meth}`.Authenticator.refresh_user` may include a field `roles`
which is a list of roles that user should be assigned to:
- User will be assigned each role in the list
- User will be revoked roles not in the list (but they may still retain the role privileges if they inherit the role from their group)
- Any roles not already present in the database will be created
- Attributes of the roles (`description`, `scopes`, `groups`, `users`, and `services`) will be updated if given
- If `None` is returned, no changes are made to the user's roles
If authenticator-managed roles are enabled,
all role-management via the API is disabled,
and roles cannot be assigned to groups nor users via `load_roles` traitlet
(roles can still be created via `load_roles` or assigned to services).
When an authenticator manages roles, the initial roles and role assignments
can be loaded from role specifications returned by the {meth}`.Authenticator.load_managed_roles()` method.
The authenticator-manged roles and role assignment will be deleted after restart if:
- {attr}`.Authenticator.reset_managed_roles_on_startup` is set to `True`, and
- the roles and role assignments are not included in the initial set of roles returned by the {meth}`.Authenticator.load_managed_roles()` method.
## pre_spawn_start and post_spawn_stop hooks ## pre_spawn_start and post_spawn_stop hooks

File diff suppressed because one or more lines are too long

View File

@@ -1,28 +1,23 @@
# Event logging and telemetry # Event logging and telemetry
JupyterHub can be configured to record structured events from a running server using Jupyter's [Telemetry System]. The types of events that JupyterHub emits are defined by [JSON schemas] listed at the bottom of this page. JupyterHub can be configured to record structured events from a running server using Jupyter's [Events System]. The types of events that JupyterHub emits are defined by [JSON schemas] listed at the bottom of this page.
## How to emit events ## How to emit events
Event logging is handled by its `Eventlog` object. This leverages Python's standing [logging] library to emit, filter, and collect event data. Event logging is handled by its `EventLogger` object. This leverages Python's standing [logging] library to emit, filter, and collect event data.
To begin recording events, you'll need to set two configurations: To begin recording events, you'll need to set at least one configuration option:
> 1. `handlers`: tells the EventLog _where_ to route your events. This trait is a list of Python logging handlers that route events to the event log file. > `EventLogger.handlers`: tells the EventLogger _where_ to route your events. This trait is a list of Python logging handlers that route events to e.g. an event log file.
> 2. `allows_schemas`: tells the EventLog _which_ events should be recorded. No events are emitted by default; all recorded events must be listed here.
Here's a basic example: Here's a basic example:
``` ```python
import logging import logging
c.EventLog.handlers = [ c.EventLogger.handlers = [
logging.FileHandler('event.log'), logging.FileHandler('event.log'),
] ]
c.EventLog.allowed_schemas = [
'hub.jupyter.org/server-action'
]
``` ```
The output is a file, `"event.log"`, with events recorded as JSON data. The output is a file, `"event.log"`, with events recorded as JSON data.
@@ -37,6 +32,15 @@ The output is a file, `"event.log"`, with events recorded as JSON data.
server-actions server-actions
``` ```
:::{versionchanged} 5.0
JupyterHub 5.0 changes from the deprecated jupyter-telemetry to jupyter-events.
The main changes are:
- `EventLog` configuration is now called `EventLogger`
- The `hub.jupyter.org/server-action` schema is now called `https://schema.jupyter.org/jupyterhub/events/server-action`
:::
[json schemas]: https://json-schema.org/ [json schemas]: https://json-schema.org/
[logging]: https://docs.python.org/3/library/logging.html [logging]: https://docs.python.org/3/library/logging.html
[telemetry system]: https://github.com/jupyter/telemetry [events system]: https://jupyter-events.readthedocs.io

View File

@@ -16,19 +16,13 @@ Please submit pull requests to update information or to add new institutions or
- [BIDS - Berkeley Institute for Data Science](https://bids.berkeley.edu/) - [BIDS - Berkeley Institute for Data Science](https://bids.berkeley.edu/)
- [Teaching with Jupyter notebooks and JupyterHub](https://bids.berkeley.edu/resources/videos/teaching-ipythonjupyter-notebooks-and-jupyterhub) - [Data 8](https://www.data8.org/)
- [Data 8](http://data8.org/)
- [GitHub organization](https://github.com/data-8) - [GitHub organization](https://github.com/data-8)
- [NERSC](https://www.nersc.gov/) - [NERSC](https://www.nersc.gov/)
- [Press release on Jupyter and Cori](https://www.nersc.gov/news-publications/nersc-news/nersc-center-news/2016/jupyter-notebooks-will-open-up-new-possibilities-on-nerscs-cori-supercomputer/)
- [Moving and sharing data](https://www.nersc.gov/assets/Uploads/03-MovingAndSharingData-Cholia.pdf)
- [Research IT](https://research-it.berkeley.edu) - [Research IT](https://research-it.berkeley.edu)
- [JupyterHub server supports campus research computation](https://research-it.berkeley.edu/blog/17/01/24/free-fully-loaded-jupyterhub-server-supports-campus-research-computation) - [JupyterHub server supports campus research computation](https://research-it.berkeley.edu/news/free-fully-loaded-jupyterhub-server-supports-campus-research-computation)
### University of California Davis ### University of California Davis
@@ -84,14 +78,13 @@ Within CERN, there are two noteworthy JupyterHub deployments in operation:
- Advanced Computing - Advanced Computing
- [Palmetto cluster and JupyterHub](https://citi.sites.clemson.edu/2016/08/18/JupyterHub-for-Palmetto-Cluster.html) - [Palmetto cluster and JupyterHub](https://citi.sites.clemson.edu/2016/08/18/JupyterHub-for-Palmetto-Cluster.html)
### University of Colorado Boulder ### ETH Zurich
- (CU Research Computing) CURC [ETH Zurich](https://ethz.ch/en.html), (Federal Institute of Technology Zurich), is a public research university in Zürich, Switzerland, with focus on science, technology, engineering, and mathematics, although its 16 departments span a variety of disciplines and subjects.
- [JupyterHub User Guide](https://curc.readthedocs.io/en/latest/gateways/jupyterhub.html) The [Educational Development and Technology](https://ethz.ch/en/the-eth-zurich/organisation/departments/teaching-and-learning.html) unit provides JupyterHub exclusively for teaching and learning, integrated in the learning management system [Moodle](https://ethz.ch/staffnet/en/teaching/academic-support/it-services-teaching/teaching-applications/moodle-service.html). Each course gets its individually configured JupyterHub environment deployed on a on-premise Kubernetes cluster.
- Slurm job dispatched on Crestone compute cluster
- log troubleshooting - [ETH JupyterHub](https://ethz.ch/staffnet/en/teaching/academic-support/it-services-teaching/teaching-applications/jupyterhub.html) for teaching and learning
- Profiles in IPython Clusters tab
### George Washington University ### George Washington University
@@ -128,16 +121,15 @@ Within CERN, there are two noteworthy JupyterHub deployments in operation:
### Paderborn University ### Paderborn University
- [Data Science (DICE) group](https://dice-research.org) - [Data Science (DICE) group](https://dice-research.org)
- [nbgraderutils](https://github.com/dice-group/nbgraderutils): Use JupyterHub + nbgrader + iJava kernel for online Java exercises. Used in lecture Statistical Natural Language Processing. - [JavaOnlineExercises](https://github.com/dice-group/JavaOnlineExercises): Use JupyterHub + nbgrader + iJava kernel for online Java exercises. Used in lecture Statistical Natural Language Processing.
### Penn State University ### Penn State University
- [Press release](https://news.psu.edu/story/523093/2018/05/24/new-open-source-web-apps-available-students-and-faculty): "New open-source web apps available for students and faculty" - [Press release](https://www.psu.edu/news/academics/story/new-open-source-web-apps-available-students-and-faculty): "New open-source web apps available for students and faculty"
### University of California San Diego ### University of California San Diego
- San Diego Supercomputer Center - Andrea Zonca - San Diego Supercomputer Center - Andrea Zonca
- [Deploy JupyterHub on a Supercomputer with SSH](https://zonca.github.io/2017/05/jupyterhub-hpc-batchspawner-ssh.html) - [Deploy JupyterHub on a Supercomputer with SSH](https://zonca.github.io/2017/05/jupyterhub-hpc-batchspawner-ssh.html)
- [Run Jupyterhub on a Supercomputer](https://zonca.github.io/2015/04/jupyterhub-hpc.html) - [Run Jupyterhub on a Supercomputer](https://zonca.github.io/2015/04/jupyterhub-hpc.html)
- [Deploy JupyterHub on a VM for a Workshop](https://zonca.github.io/2016/04/jupyterhub-sdsc-cloud.html) - [Deploy JupyterHub on a VM for a Workshop](https://zonca.github.io/2016/04/jupyterhub-sdsc-cloud.html)
@@ -157,7 +149,7 @@ Within CERN, there are two noteworthy JupyterHub deployments in operation:
### Elucidata ### Elucidata
- What's new in Jupyter Notebooks @[Elucidata](https://elucidata.io/): - What's new in Jupyter Notebooks @[Elucidata](https://www.elucidata.io/):
- [Using Jupyter Notebooks with Jupyterhub on GCP, managed by GKE](https://medium.com/elucidata/why-you-should-be-using-a-jupyter-notebook-8385a4ccd93d) - [Using Jupyter Notebooks with Jupyterhub on GCP, managed by GKE](https://medium.com/elucidata/why-you-should-be-using-a-jupyter-notebook-8385a4ccd93d)
## Service Providers ## Service Providers
@@ -177,7 +169,7 @@ Within CERN, there are two noteworthy JupyterHub deployments in operation:
### Microsoft Azure ### Microsoft Azure
- [Azure Data Science Virtual Machine release notes](https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-data-science-linux-dsvm-intro) - [Azure Data Science Virtual Machine release notes](https://learn.microsoft.com/en-us/azure/machine-learning/machine-learning-data-science-linux-dsvm-intro)
### Rackspace Carina ### Rackspace Carina
@@ -188,6 +180,12 @@ Within CERN, there are two noteworthy JupyterHub deployments in operation:
- [Deploying JupyterHub on Hadoop](https://jupyterhub-on-hadoop.readthedocs.io) - [Deploying JupyterHub on Hadoop](https://jupyterhub-on-hadoop.readthedocs.io)
### Sirepo
- Sirepo is an online Computer-Aided Engineering gateway that contains a JupyterHub instance. Sirepo is provided at no cost for community use, but users must request login access.
- [Sirepo.com](https://www.sirepo.com)
- [Sirepo Jupyter](https://www.sirepo.com/jupyter)
## Miscellaneous ## Miscellaneous
- https://medium.com/@ybarraud/setting-up-jupyterhub-with-sudospawner-and-anaconda-844628c0dbee#.rm3yt87e1 - https://medium.com/@ybarraud/setting-up-jupyterhub-with-sudospawner-and-anaconda-844628c0dbee#.rm3yt87e1
@@ -199,5 +197,5 @@ Within CERN, there are two noteworthy JupyterHub deployments in operation:
- https://www.walkingrandomly.com/?p=5734 - https://www.walkingrandomly.com/?p=5734
- https://wrdrd.com/docs/consulting/education-technology - https://wrdrd.com/docs/consulting/education-technology
- https://bitbucket.org/jackhale/fenics-jupyter - https://bitbucket.org/jackhale/fenics-jupyter
- [LinuxCluster blog](https://linuxcluster.wordpress.com/category/application/jupyterhub/) - [LinuxCluster blog](https://thelinuxcluster.com/category/application/jupyterhub/)
- [Spark Cluster on OpenStack with Multi-User Jupyter Notebook](https://arnesund.com/2015/09/21/spark-cluster-on-openstack-with-multi-user-jupyter-notebook/) - [Spark Cluster on OpenStack with Multi-User Jupyter Notebook](https://arnesund.com/2015/09/21/spark-cluster-on-openstack-with-multi-user-jupyter-notebook/)

View File

@@ -21,7 +21,9 @@ services
urls urls
event-logging event-logging
monitoring monitoring
sharing
gallery-jhub-deployments gallery-jhub-deployments
changelog changelog
rest-api
api/index.md api/index.md
``` ```

View File

@@ -18,3 +18,42 @@ tool like [Grafana](https://grafana.com).
/reference/metrics /reference/metrics
``` ```
## Customizing the metrics prefix
JupyterHub metrics all have a `jupyterhub_` prefix.
As of JupyterHub 5.0, this can be overridden with `$JUPYTERHUB_METRICS_PREFIX` environment variable
in the Hub's environment.
For example,
```bash
export JUPYTERHUB_METRICS_PREFIX=jupyterhub_prod
```
would result in the metric `jupyterhub_prod_active_users`, etc.
(monitoring_bucket_sizes)=
## Customizing bucket sizes
As of JupyterHub 5.3, the following environment variables in the Hub's environment can be overridden to support custom bucket sizes - below are the defaults:
| Variable | Default |
| -------------------------------------------------- | ------------------------------------------------------------------ |
| `JUPYTERHUB_SERVER_SPAWN_DURATION_SECONDS_BUCKETS` | `0.5,1,2.5,5,10,15,30,60,120,180,300,600,inf` |
| `JUPYTERHUB_SERVER_STOP_DURATION_SECONDS_BUCKETS` | `0.005,0.01,0.025,0.05,0.075,0.1,0.25,0.5,0.75,1,2.5,5,7.5,10,inf` |
For example,
```bash
export JUPYTERHUB_SERVER_SPAWN_DURATION_SECONDS_BUCKETS="1,2,4,6,12,30,60,120,inf"
```
## Configuring metrics
```{eval-rst}
.. currentmodule:: jupyterhub.metrics
.. autoconfigurable:: PeriodicMetricsCollector
```

View File

@@ -1,33 +1,25 @@
<!--- ---
This doc is part of the API references section of the References documentation. page_template: redoc.html
---> # see: https://redocly.com/docs/redoc/config/ for options
redoc_options:
hideHostname: true
hideLoading: true
---
(jupyterhub-rest-API)= (jupyterhub-rest-API)=
# JupyterHub REST API # JupyterHub REST API
Below is an interactive view of JupyterHub's OpenAPI specification. NOTE: The contents of this markdown file are not used,
this page is entirely generated from `_templates/redoc.html` and `_static/rest-api.yml`
<!-- client-rendered openapi UI copied from FastAPI --> REST API methods can be linked by their operationId in rest-api.yml,
prefixed with `rest-api-`, e.g.
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swagger-ui-dist@3/swagger-ui.css"> ```markdown
<script src="https://cdn.jsdelivr.net/npm/swagger-ui-dist@4.1/swagger-ui-bundle.js"></script> you cat [GET /api/users](rest-api-get-users)
<!-- `SwaggerUIBundle` is now available on the page --> ```
<!-- render the ui here --> ```{jupyterhub-rest-api-links}
<div id="openapi-ui"></div>
<script> ```
const ui = SwaggerUIBundle({
url: '../_static/rest-api.yml',
dom_id: '#openapi-ui',
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIBundle.SwaggerUIStandalonePreset
],
layout: "BaseLayout",
deepLinking: true,
showExtensions: true,
showCommonExtensions: true,
});
</script>

View File

@@ -1,23 +1,22 @@
(services)= (services-reference)=
# Services # Services
## Definition of a Service ## Definition of a Service
When working with JupyterHub, a **Service** is defined as a process that interacts When working with JupyterHub, a **Service** is defined as something (usually a process) that can interact with the Hub's REST API.
with the Hub's REST API. A Service may perform a specific A Service may perform a specific action or task.
action or task. For example, the following tasks can each be a unique Service: For example, the following tasks can each be a unique Service:
- shutting down individuals' single user notebook servers that have been idle - shutting down individuals' single user notebook servers that have been idle for some time
for some time - an additional web application which uses the Hub as an OAuth provider to authenticate and authorize user access
- registering additional web servers which should use the Hub's authentication - a script run once in a while, which performs any API action
and be served behind the Hub's proxy. - automating requests to running user servers, such as activity data collection
Two key features help define a Service: Two key features help differentiate Services:
- Is the Service **managed** by JupyterHub? - Is the Service **managed** by JupyterHub?
- Does the Service have a web server that should be added to the proxy's - Does the Service have a web server that should be added to the proxy's table?
table?
Currently, these characteristics distinguish two types of Services: Currently, these characteristics distinguish two types of Services:
@@ -30,24 +29,32 @@ Currently, these characteristics distinguish two types of Services:
A Service may have the following properties: A Service may have the following properties:
- `name: str` - the name of the service - `name: str` - the name of the service
- `admin: bool (default - false)` - whether the service should have - `url: str (default - None)` - The URL where the service should be running (from the proxy's perspective).
administrative privileges Typically a localhost URL for Hub-managed services.
- `url: str (default - None)` - The URL where the service is/should be. If a If a url is specified,
url is specified for where the Service runs its own web server, the service will be added to the proxy at `/services/:name`.
the service will be added to the proxy at `/services/:name` - `api_token: str (default - None)` - For Externally-Managed Services,
- `api_token: str (default - None)` - For Externally-Managed Services you need to specify you need to specify an API token to perform API requests to the Hub.
an API token to perform API requests to the Hub For Hub-managed services, this token is generated at startup,
and available via `$JUPYTERHUB_API_TOKEN`.
For OAuth services, this is the client secret.
- `display: bool (default - True)` - When set to true, display a link to the - `display: bool (default - True)` - When set to true, display a link to the
service's URL under the 'Services' dropdown in user's hub home page. service's URL under the 'Services' dropdown in users' hub home page.
Only has an effect if `url` is also specified.
- `oauth_no_confirm: bool (default - False)` - When set to true, - `oauth_no_confirm: bool (default - False)` - When set to true,
skip the OAuth confirmation page when users access this service. skip the OAuth confirmation page when users access this service.
By default, when users authenticate with a service using JupyterHub, By default, when users authenticate with a service using JupyterHub,
they are prompted to confirm that they want to grant that service they are prompted to confirm that they want to grant that service
access to their credentials. access to their credentials.
Skipping the confirmation page is useful for admin-managed services that are considered part of the Hub Skipping the confirmation page is useful for admin-managed services that are considered part of the Hub
and shouldn't need extra prompts for login. and shouldn't need extra prompts for login.
- `oauth_client_id: str (default - 'service-$name')` -
This never needs to be set, but you can specify a service's OAuth client id.
It must start with `service-`.
- `oauth_redirect_uri: str (default: '/services/:name/oauth_redirect')` -
Set the OAuth redirect URI.
Required if the redirect URI differs from the default or the service is not to be added to the proxy at `/services/:name`
(i.e. `url` is not set, but there is still a public web service using OAuth).
If a service is also to be managed by the Hub, it has a few extra options: If a service is also to be managed by the Hub, it has a few extra options:
@@ -55,19 +62,19 @@ If a service is also to be managed by the Hub, it has a few extra options:
externally. - If a command is specified for launching the Service, the Service will externally. - If a command is specified for launching the Service, the Service will
be started and managed by the Hub. be started and managed by the Hub.
- `environment: dict` - additional environment variables for the Service. - `environment: dict` - additional environment variables for the Service.
- `user: str` - the name of a system user to manage the Service. If - `user: str` - the name of a system user to manage the Service.
unspecified, run as the same user as the Hub. If unspecified, run as the same user as the Hub.
## Hub-Managed Services ## Hub-Managed Services
A **Hub-Managed Service** is started by the Hub, and the Hub is responsible A **Hub-Managed Service** is started by the Hub, and the Hub is responsible
for the Service's actions. A Hub-Managed Service can only be a local for the Service's operation. A Hub-Managed Service can only be a local
subprocess of the Hub. The Hub will take care of starting the process and subprocess of the Hub. The Hub will take care of starting the process and
restart the service if the service stops. restart the service if the service stops.
While Hub-Managed Services share some similarities with notebook Spawners, While Hub-Managed Services share some similarities with single-user server Spawners,
there are no plans for Hub-Managed Services to support the same spawning there are no plans for Hub-Managed Services to support the same spawning
abstractions as a notebook Spawner. abstractions as a Spawner.
If you wish to run a Service in a Docker container or other deployment If you wish to run a Service in a Docker container or other deployment
environments, the Service can be registered as an environments, the Service can be registered as an
@@ -80,7 +87,7 @@ the Service. For example, a 'cull idle' notebook server task configured as a
Hub-Managed Service would include: Hub-Managed Service would include:
- the Service name, - the Service name,
- admin permissions, and - permissions to see when users are active, and to stop servers
- the `command` to launch the Service which will cull idle servers after a - the `command` to launch the Service which will cull idle servers after a
timeout interval timeout interval
@@ -131,6 +138,14 @@ JUPYTERHUB_OAUTH_SCOPES: JSON-serialized list of scopes to use for allowing ac
(deprecated in 3.0, use JUPYTERHUB_OAUTH_ACCESS_SCOPES). (deprecated in 3.0, use JUPYTERHUB_OAUTH_ACCESS_SCOPES).
JUPYTERHUB_OAUTH_ACCESS_SCOPES: JSON-serialized list of scopes to use for allowing access to the service (new in 3.0). JUPYTERHUB_OAUTH_ACCESS_SCOPES: JSON-serialized list of scopes to use for allowing access to the service (new in 3.0).
JUPYTERHUB_OAUTH_CLIENT_ALLOWED_SCOPES: JSON-serialized list of scopes that can be requested by the oauth client on behalf of users (new in 3.0). JUPYTERHUB_OAUTH_CLIENT_ALLOWED_SCOPES: JSON-serialized list of scopes that can be requested by the oauth client on behalf of users (new in 3.0).
JUPYTERHUB_PUBLIC_URL: the public URL of the service,
e.g. `https://jupyterhub.example.org/services/name/`.
Empty if no public URL is specified (default).
Will be available if subdomains are configured.
JUPYTERHUB_PUBLIC_HUB_URL: the public URL of JupyterHub as a whole,
e.g. `https://jupyterhub.example.org/`.
Empty if no public URL is specified (default).
Will be available if subdomains are configured.
``` ```
For the previous 'cull idle' Service example, these environment variables For the previous 'cull idle' Service example, these environment variables
@@ -156,8 +171,8 @@ to perform its API requests. Each Externally-Managed Service will need a
unique API token, because the Hub authenticates each API request and the API unique API token, because the Hub authenticates each API request and the API
token is used to identify the originating Service or user. token is used to identify the originating Service or user.
A configuration example of an Externally-Managed Service with admin access and A configuration example of an Externally-Managed Service running its own web
running its own web server is: server is:
```python ```python
c.JupyterHub.services = [ c.JupyterHub.services = [
@@ -174,6 +189,149 @@ c.JupyterHub.services = [
In this case, the `url` field will be passed along to the Service as In this case, the `url` field will be passed along to the Service as
`JUPYTERHUB_SERVICE_URL`. `JUPYTERHUB_SERVICE_URL`.
(service-credentials)=
## Service credentials
A service has direct access to the Hub API via its `api_token`.
Exactly what actions the service can take are governed by the service's [role assignments](define-role-target):
```python
c.JupyterHub.services = [
{
"name": "user-lister",
"command": ["python3", "/path/to/user-lister"],
}
]
c.JupyterHub.load_roles = [
{
"name": "list-users",
"scopes": ["list:users", "read:users"],
"services": ["user-lister"]
}
]
```
When a service has a configured URL or explicit `oauth_client_id` or `oauth_redirect_uri`, it can operate as an [OAuth client](explanation:hub-oauth).
When a user visits an oauth-authenticated service,
completion of authentication results in issuing an oauth token.
This token is:
- owned by the authenticated user
- associated with the oauth client of the service
- governed by the service's `oauth_client_allowed_scopes` configuration
This token enables the service to act _on behalf of_ the user.
When an oauthenticated service makes a request to the Hub (or other Hub-authenticated service), it has two credentials available to authenticate the request:
- the service's own `api_token`, which acts _as_ the service,
and is governed by the service's own role assignments.
- the user's oauth token issued to the service during the oauth flow,
which acts _as_ the user.
Choosing which one to use depends on "who" should be considered taking the action represented by the request.
A service's own permissions governs how it can act without any involvement of a user.
The service's `oauth_client_allowed_scopes` configuration allows individual users to _delegate_ permission for the service to act on their behalf.
This allows services to have little to no permissions of their own,
but allow users to take actions _via_ the service,
using their own credentials.
An example of such a service would be a web application for instructors,
presenting a dashboard of actions which can be taken for students in their courses.
The service would need no permission to do anything with the JupyterHub API on its own,
but it could employ the user's oauth credentials to list users,
manage student servers, etc.
This service might look like:
```python
c.JupyterHub.services = [
{
"name": "grader-dashboard",
"command": ["python3", "/path/to/grader-dashboard"],
"url": "http://127.0.0.1:12345",
"oauth_client_allowed_scopes": [
"list:users",
"read:users",
]
}
]
c.JupyterHub.load_roles = [
{
"name": "grader",
"scopes": [
"list:users!group=class-a",
"read:users!group=class-a",
"servers!group=class-a",
"access:servers!group=class-a",
"access:services",
],
"groups": ["graders"]
}
]
```
In this example, the `grader-dashboard` service does not have permission to take any actions with the Hub API on its own because it has not been assigned any role.
But when a grader accesses the service,
the dashboard will have a token with permission to list and read information about any users that the grader can access.
The dashboard will _not_ have permission to do additional things as the grader.
The dashboard will be able to:
- list users in class A (`list:users!group=class-a`)
- read information about users in class A (`read:users!group=class-a`)
The dashboard will _not_ be able to:
- start, stop, or access user servers (`servers`, `access:servers`), even though the grader has this permission (it's not in `oauth_client_allowed_scopes`)
- take any action without the grader granting permission via oauth
## Adding or removing services at runtime
Only externally-managed services can be added at runtime by using JupyterHubs REST API.
### Add a new service
To add a new service, send a POST request to this endpoint
```
POST /hub/api/services/:servicename
```
**Required scope: `admin:services`**
**Payload**: The payload should contain the definition of the service to be created. The endpoint supports the same properties as externally-managed services defined in the config file.
**Possible responses**
- `201 Created`: The service and related objects are created (and started in case of a Hub-managed one) successfully.
- `400 Bad Request`: The payload is invalid or JupyterHub can not create the service.
- `409 Conflict`: The service with the same name already exists.
### Remove an existing service
To remove an existing service, send a DELETE request to this endpoint
```
DELETE /hub/api/services/:servicename
```
**Required scope: `admin:services`**
**Payload**: `None`
**Possible responses**
- `200 OK`: The service and related objects are removed (and stopped in case of a Hub-managed one) successfully.
- `400 Bad Request`: JupyterHub can not remove the service.
- `404 Not Found`: The requested service does not exist.
- `405 Not Allowed`: The requested service is created from the config file, it can not be removed at runtime.
## Writing your own Services ## Writing your own Services
When writing your own services, you have a few decisions to make (in addition When writing your own services, you have a few decisions to make (in addition
@@ -237,16 +395,14 @@ There are two levels of authentication with the Hub:
This should be used for any service that serves pages that should be visited with a browser. This should be used for any service that serves pages that should be visited with a browser.
To use HubAuth, you must set the `.api_token` instance variable. This can be To use HubAuth, you must set the `.api_token` instance variable. This can be
done either programmatically when constructing the class, or via the done via the HubAuth constructor, direct assignment to a HubAuth object, or via the
`JUPYTERHUB_API_TOKEN` environment variable. A number of the examples in the `JUPYTERHUB_API_TOKEN` environment variable. A number of the examples in the
root of the jupyterhub git repository set the `JUPYTERHUB_API_TOKEN` variable root of the jupyterhub git repository set the `JUPYTERHUB_API_TOKEN` variable
so consider having a look at those for futher reading so consider having a look at those for further reading
([cull-idle](https://github.com/jupyterhub/jupyterhub/tree/master/examples/cull-idle), ([cull-idle](https://github.com/jupyterhub/jupyterhub/tree/master/examples/cull-idle),
[external-oauth](https://github.com/jupyterhub/jupyterhub/tree/master/examples/external-oauth), [external-oauth](https://github.com/jupyterhub/jupyterhub/tree/master/examples/external-oauth),
[service-notebook](https://github.com/jupyterhub/jupyterhub/tree/master/examples/service-notebook) [service-notebook](https://github.com/jupyterhub/jupyterhub/tree/master/examples/service-notebook)
and [service-whoiami](https://github.com/jupyterhub/jupyterhub/tree/master/examples/service-whoami)) and [service-whoami](https://github.com/jupyterhub/jupyterhub/tree/master/examples/service-whoami))
(TODO: Where is this API TOKen set?)
Most of the logic for authentication implementation is found in the Most of the logic for authentication implementation is found in the
{meth}`.HubAuth.user_for_token` methods, {meth}`.HubAuth.user_for_token` methods,
@@ -299,7 +455,7 @@ for more details.
### Authenticating tornado services with JupyterHub ### Authenticating tornado services with JupyterHub
Since most Jupyter services are written with tornado, Since most Jupyter services are written with tornado,
we include a mixin class, [`HubOAuthenticated`][huboauthenticated], we include a mixin class, {class}`.HubOAuthenticated`,
for quickly authenticating your own tornado services with JupyterHub. for quickly authenticating your own tornado services with JupyterHub.
Tornado's {py:func}`~.tornado.web.authenticated` decorator calls a Handler's {py:meth}`~.tornado.web.RequestHandler.get_current_user` Tornado's {py:func}`~.tornado.web.authenticated` decorator calls a Handler's {py:meth}`~.tornado.web.RequestHandler.get_current_user`
@@ -358,7 +514,7 @@ For example, using flask:
:language: python :language: python
``` ```
We recommend looking at the [`HubOAuth`][huboauth] class implementation for reference, We recommend looking at the {class}`.HubOAuth` class implementation for reference,
and taking note of the following process: and taking note of the following process:
1. retrieve the token from the request. 1. retrieve the token from the request.
@@ -407,7 +563,7 @@ and an example of its configuration is found [here](https://github.com/jupyter/n
nbviewer can also be run as a Hub-Managed Service as described [nbviewer README][nbviewer example] nbviewer can also be run as a Hub-Managed Service as described [nbviewer README][nbviewer example]
section on securing the notebook viewer. section on securing the notebook viewer.
[requests]: https://docs.python-requests.org/en/master/ [requests]: https://requests.readthedocs.io
[services_auth]: ../api/services.auth.html [services_auth]: ../api/services.auth.html
[nbviewer example]: https://github.com/jupyter/nbviewer#securing-the-notebook-viewer [nbviewer example]: https://github.com/jupyter/nbviewer#securing-the-notebook-viewer
[fastapi example]: https://github.com/jupyterhub/jupyterhub/tree/HEAD/examples/service-fastapi [fastapi example]: https://github.com/jupyterhub/jupyterhub/tree/HEAD/examples/service-fastapi

View File

@@ -0,0 +1,403 @@
(sharing-reference)=
# Sharing access to user servers
In order to make use of features like JupyterLab's real-time collaboration (RTC), multiple users must have access to a single server.
There are a few ways to do this, but ultimately both users must have the appropriate `access:servers` scope.
Prior to JupyterHub 5.0, this could only be granted via static role assignments in JupyterHub configuration.
JupyterHub 5.0 adds the concept of a 'share', allowing _users_ to grant each other limited access to their servers.
:::{seealso}
Documentation on [roles and scopes](rbac) for more details on how permissions work in JupyterHub, and in particular [access scopes](access-scopes).
:::
In JupyterHub, shares:
1. are 'granted' to a user or group
2. grant only limited permissions (e.g. only 'access' or access and start/stop)
3. may be revoked by anyone with the `shares` permissions
4. may always be revoked by the shared-with user or group
Additionally a "share code" is a random string, which has all the same properties as a Share aside from the user or group.
The code can be exchanged for actual sharing permission, to enable the pattern of sharing permissions without needing to know the username(s) of who you'd like to share with (e.g. email a link).
There is not yet _UI_ to create shares, but they can be managed via JupyterHub's [REST API](jupyterhub-rest-api).
In general, with shares you can:
1. access other users' servers
2. grant access to your servers
3. see servers shared with you
4. review and revoke permissions for servers you manage
## Enable sharing
For safety, users do not have permission to share access to their servers by default.
To grant this permission, a user must have the `shares` scope for their servers.
To grant all users permission to share access to their servers:
```python
c.JupyterHub.load_roles = [
{
"name": "user",
"scopes": ["self", "shares!user"],
},
]
```
With this, only the sharing via invitation code described below will be available.
Additionally, to share access with a **specific user or group** (more below),
a user must have permission to read that user or group's name.
To enable the _full_ sharing API for all users:
```python
c.JupyterHub.load_roles = [
{
"name": "user",
"scopes": ["self", "shares!user", "read:users:name", "read:groups:name"],
},
]
```
Note that this exposes the ability for all users to _discover_ existing user and group names,
which is part of why we have the share-by-code pattern,
so users don't need this ability to share with each other.
## Share or revoke access to a server
To modify who has access to a server, you need the permission `shares` with the appropriate _server_ filter,
and access to read the name of the target user or group (`read:users:name` or `read:groups:name`).
You can only modify access to one server at a time.
### Granting access to a server
To grant access to a particular user, in addition to `shares`, the granter must have at least `read:user:name` permission for the target user (or `read:group:name` if it's a group).
Send a POST request to `/api/shares/:username/:servername` to grant permissions.
```{parsed-literal}
[POST /api/shares/:username/:servername](rest-api-post-shares-server)
```
The JSON body should specify what permissions to grant and whom to grant them to:
```python
{
"scopes": [],
"user": "username", # or:
"group": "groupname",
}
```
It should have exactly one of "user" or "group" defined (not both).
The specified user or group will be _granted_ access to the target server.
If `scopes` is specified, all requested scopes _must_ have the `!server=:username/:servername` filter applied.
The default value for `scopes` is `["access:servers!server=:username/:servername"]` (i.e. the 'access scope' for the server).
### Revoke access
To revoke permissions, you need the permission `shares` with the appropriate _server_ filter,
and `read:users:name` (or `read:groups:name`) for the user or group to modify.
You can only modify access to one server at a time.
Send a PATCH request to `/api/shares/:username/:servername` to revoke permissions.
```{parsed-literal}
[PATCH /api/shares/:username/:servername](rest-api-patch-shares-server)
```
The JSON body should specify the scopes to revoke
```
POST /api/shares/:username/:servername
{
"scopes": [],
"user": "username", # or:
"group": "groupname",
}
```
If `scopes` is empty or unspecified, _all_ scopes are revoked from the target user or group.
#### Revoke _all_ permissions
A DELETE request will revoke all shared access permissions for the given server.
```{parsed-literal}
[DELETE /api/shares/:username/:servername](rest-api-delete-shares-server)
```
### View shares for a server
To view shares for a given server, you need the permission `read:shares` with the appropriate _server_ filter.
```{parsed-literal}
[GET /api/shares/:username/:servername](rest-api-get-shares-server)
```
This is a paginated endpoint, so responses has `items` as a list of Share models, and `_pagination` for information about retrieving all shares if there are many:
```python
{
"items": [
{
"server": {...},
"scopes": ["access:servers!server=sharer/"],
"user": {
"name": "shared-with",
},
"group": None, # or {"name": "groupname"},
...
},
...
],
"_pagination": {
"total": 5,
"limit": 50,
"offset": 0,
"next": None,
},
}
```
see the [rest-api](rest-api-get-shares-server) for full details of the response models.
### View servers shared with user or group
To review servers shared with a given user or group, you need the permission `read:users:shares` or `read:groups:shares` with the appropriate _user_ or _group_ filter.
```{parsed-literal}
[GET /api/users/:username/shared](rest-api-get-user-shared)
```
or
```{parsed-literal}
[GET /api/groups/:groupname/shared](rest-api-get-group-shared)
```
These are paginated endpoints.
### Access permission for a single user on a single server
```{parsed-literal}
[GET /api/users/:username/shared/:ownername/:servername](rest-api-get-user-shared-server)
```
or
```{parsed-literal}
[GET /api/groups/:groupname/shared/:ownername/:servername](rest-api-get-group-shared-server)
```
will return the _single_ Share info for the given user or group for the server specified by `ownername/servername`,
or 404 if no access is granted.
### Revoking one's own permissions for a server
To revoke sharing permissions from the perspective of the user or group being shared with,
you need the permissions `users:shares` or `groups:shares` with the appropriate _user_ or _group_ filter.
This allows users to 'leave' shared servers, without needing permission to manage the server's sharing permissions.
```{parsed-literal}
[DELETE /api/users/:username/shared/:ownername/:servername](rest-api-delete-user-shared-server)
```
or
```{parsed-literal}
[DELETE /api/groups/:groupname/shared/:ownername/:servername](rest-api-delete-group-shared-server)
```
will revoke all permissions granted to the user or group for the specified server.
### The Share model
<!-- refresh from examples/user-sharing/rest-api.ipynb -->
A Share returned in the REST API has the following structure:
```python
{
"server": {
"name": "servername",
"user": {
"name": "ownername"
},
"url": "/users/ownername/servername/",
"ready": True,
},
"scopes": ["access:servers!server=username/servername"],
"user": { # or None
"name": "username",
},
"group": None, # or {"name": "groupname"},
"created_at": "2023-10-02T13:27Z",
}
```
where exactly one of `user` and `group` is not null and the other is null.
See the [rest-api](rest-api-get-shares-server) for full details of the response models.
## Share via invitation code
Sometimes you would like to share access to a server with one or more users,
but you don't want to deal with collecting everyone's username.
For this, you can create shares via _share code_.
This is identical to sharing with a user,
only it adds the step where the sharer creates the _code_ and distributes the code to one or more users,
then the users themselves exchange the code for actual sharing permissions.
Share codes are much like shares, except:
1. they don't associate with specific users
2. they can be used multiple times, by more than one user (i.e. send one invite email to several recipients)
3. they expire (default: 1 day)
4. they can only be accepted by individual users, not groups
### Creating share codes
To create a share code:
```{parsed-literal}
[POST /api/share-codes/:username/:servername](rest-api-post-share-code)
```
where the body should include the scopes to be granted and expiration.
Share codes _must_ expire.
```python
{
"scopes": ["access:servers!server=:user/:server"],
"expires_in": 86400, # seconds, default: 1 day
}
```
If no scopes are specified, the access scope for the specified server will be used.
If no expiration is specified, the code will expire in one day (86400 seconds).
The response contains the code itself:
```python
{
"code": "abc1234....",
"accept_url": "/hub/accept-share?code=abc1234",
"full_accept_url": "https://hub.example.org/hub/accept-share?code=abc1234",
"id": "sc_1234",
"scopes": [...],
...
}
```
See the [rest-api](rest-api-post-share-code) for full details of the response models.
### Accepting sharing invitations
Sharing invitations can be accepted by visiting:
```
/hub/accept-share/?code=:share-code
```
where you will be able to confirm the permissions you would like to accept.
After accepting permissions, you will be redirected to the running server.
If the server is not running and you have not also been granted permission to start it,
you will need to contact the owner of the server to start it.
### Listing existing invitations
You can see existing invitations for
```{parsed-literal}
[GET /hub/api/share-codes/:username/:servername](rest-api-get-share-codes-server)
```
which produces a paginated list of share codes (_excluding_ the codes themselves, which are not stored by jupyterhub):
```python
{
"items": [
{
"id": "sc_1234",
"exchange_count": 0,
"last_exchanged_at": None,
"scopes": ["access:servers!server=username/servername"],
"server": {
"name": "",
"user": {
"name": "username",
},
},
...
}
],
"_pagination": {
"total": 5,
"limit": 50,
"offset": 0,
"next": None,
}
}
```
see the [rest-api](rest-api) for full details of the response models.
### Share code model
<!-- refresh from examples/user-sharing/rest-api.ipynb -->
A Share Code returned in the REST API has most of the same fields as a Share, but lacks the association with a user or group, and adds information about exchanges of the share code,
and the `id` that can be used for revocation:
```python
{
# common share fields
"server": {
"user": {
"name": "sharer"
},
"name": "",
"url": "/user/sharer/",
"ready": True,
},
"scopes": [
"access:servers!server=sharer/"
],
# share-code-specific fields
"id": "sc_1",
"created_at": "2024-01-23T11:46:32.154416Z",
"expires_at": "2024-01-24T11:46:32.153582Z",
"exchange_count": 1,
"last_exchanged_at": "2024-01-23T11:46:43.589701Z"
}
```
see the [rest-api](rest-api-get-share-codes-server) for full details of the response models.
### Revoking invitations
If you've finished inviting users to a server, you can revoke all invitations with:
```{parsed-literal}
[DELETE /hub/api/share-codes/:username/:servername](rest-api-delete-share-code)
```
or revoke a single invitation code:
```
DELETE /hub/api/share-codes/:username/:servername?code=:thecode
```
You can also revoke a code by _id_, if you non longer have the code:
```
DELETE /hub/api/share-codes/:username/:servername?id=sc_123
```
where the `id` is retrieved from the share-code model, e.g. when listing current share codes.

View File

@@ -2,7 +2,7 @@
# Spawners # Spawners
A [Spawner][] starts each single-user notebook server. A [Spawner](#Spawner) starts each single-user notebook server.
The Spawner represents an abstract interface to a process, The Spawner represents an abstract interface to a process,
and a custom Spawner needs to be able to take three actions: and a custom Spawner needs to be able to take three actions:
@@ -12,7 +12,7 @@ and a custom Spawner needs to be able to take three actions:
## Examples ## Examples
Custom Spawners for JupyterHub can be found on the [JupyterHub wiki](https://github.com/jupyterhub/jupyterhub/wiki/Spawners). Additional Spawners can be installed from separate packages.
Some examples include: Some examples include:
- [DockerSpawner](https://github.com/jupyterhub/dockerspawner) for spawning user servers in Docker containers - [DockerSpawner](https://github.com/jupyterhub/dockerspawner) for spawning user servers in Docker containers
@@ -31,12 +31,13 @@ Some examples include:
- [SSHSpawner](https://github.com/NERSC/sshspawner) to spawn notebooks - [SSHSpawner](https://github.com/NERSC/sshspawner) to spawn notebooks
on a remote server using SSH on a remote server using SSH
- [KubeSpawner](https://github.com/jupyterhub/kubespawner) to spawn notebook servers on kubernetes cluster. - [KubeSpawner](https://github.com/jupyterhub/kubespawner) to spawn notebook servers on kubernetes cluster.
- [NomadSpawner](https://github.com/mxab/jupyterhub-nomad-spawner) to spawn a notebook server as a Nomad job inside HashiCorp's Nomad cluster
## Spawner control methods ## Spawner control methods
### Spawner.start ### Spawner.start
`Spawner.start` should start a single-user server for a single user. [](#Spawner.start) should start a single-user server for a single user.
Information about the user can be retrieved from `self.user`, Information about the user can be retrieved from `self.user`,
an object encapsulating the user's name, authentication, and server info. an object encapsulating the user's name, authentication, and server info.
@@ -67,11 +68,11 @@ async def start(self):
When `Spawner.start` returns, the single-user server process should actually be running, When `Spawner.start` returns, the single-user server process should actually be running,
not just requested. JupyterHub can handle `Spawner.start` being very slow not just requested. JupyterHub can handle `Spawner.start` being very slow
(such as PBS-style batch queues, or instantiating whole AWS instances) (such as PBS-style batch queues, or instantiating whole AWS instances)
via relaxing the `Spawner.start_timeout` config value. via relaxing the [](#Spawner.start_timeout) config value.
#### Note on IPs and ports #### Note on IPs and ports
`Spawner.ip` and `Spawner.port` attributes set the _bind_ URL, [](#Spawner.ip) and [](#Spawner.port) attributes set the _bind_ URL,
which the single-user server should listen on which the single-user server should listen on
(passed to the single-user process via the `JUPYTERHUB_SERVICE_URL` environment variable). (passed to the single-user process via the `JUPYTERHUB_SERVICE_URL` environment variable).
The _return_ value is the IP and port (or full URL) the Hub should _connect to_. The _return_ value is the IP and port (or full URL) the Hub should _connect to_.
@@ -123,7 +124,7 @@ If both attributes are not present, the Exception will be shown to the user as u
### Spawner.poll ### Spawner.poll
`Spawner.poll` checks if the spawner is still running. [](#Spawner.poll) checks if the spawner is still running.
It should return `None` if it is still running, It should return `None` if it is still running,
and an integer exit status, otherwise. and an integer exit status, otherwise.
@@ -132,7 +133,7 @@ to check if the local process is still running. On Windows, it uses `psutil.pid_
### Spawner.stop ### Spawner.stop
`Spawner.stop` should stop the process. It must be a tornado coroutine, which should return when the process has finished exiting. [](#Spawner.stop) should stop the process. It must be a tornado coroutine, which should return when the process has finished exiting.
## Spawner state ## Spawner state
@@ -165,17 +166,18 @@ def clear_state(self):
self.pid = 0 self.pid = 0
``` ```
(spawner_user_options)=
## Spawner options form ## Spawner options form
(new in 0.4)
Some deployments may want to offer options to users to influence how their servers are started. Some deployments may want to offer options to users to influence how their servers are started.
This may include cluster-based deployments, where users specify what resources should be available, This may include cluster-based deployments, where users specify what memory or cpu resources should be available,
or docker-based deployments where users can select from a list of base images. or container-based deployments where users can select from a list of base images,
or more complex configurations where users select a "profile" representing a bundle of settings to be applied together.
This feature is enabled by setting `Spawner.options_form`, which is an HTML form snippet This feature is enabled by setting [](#Spawner.options_form), which is an HTML form snippet
inserted unmodified into the spawn form. inserted unmodified into the spawn form.
If the `Spawner.options_form` is defined, when a user tries to start their server, they will be directed to a form page, like this: If the `Spawner.options_form` is defined, when a user tries to start their server they will be directed to a form page, like this:
![spawn-form](/images/spawn-form.png) ![spawn-form](/images/spawn-form.png)
@@ -185,28 +187,40 @@ See [this example](https://github.com/jupyterhub/jupyterhub/blob/HEAD/examples/s
### `Spawner.options_from_form` ### `Spawner.options_from_form`
Options from this form will always be a dictionary of lists of strings, e.g.: Inputs from an HTML form always arrive as a dictionary of lists of strings, e.g.:
```python ```python
{ formdata = {
'integer': ['5'], 'integer': ['5'],
'checkbox': ['on'],
'text': ['some text'], 'text': ['some text'],
'select': ['a', 'b'], 'select': ['a', 'b'],
} }
``` ```
When `formdata` arrives, it is passed through `Spawner.options_from_form(formdata)`, When `formdata` arrives, it is passed through [](#Spawner.options_from_form):
which is a method to turn the form data into the correct structure.
This method must return a dictionary, and is meant to interpret the lists-of-strings into the correct types. For example, the `options_from_form` for the above form would look like:
```python ```python
def options_from_form(self, formdata): spawner.user_options = spawner.options_from_form(formdata, spawner=spawner)
```
to create `spawner.user_options`.
[](#Spawner.options_from_form) is a configurable function to turn the HTTP form data into the correct structure for [](#Spawner.user_options).
`options_from_form` must return a dictionary, _may_ be async, and is meant to interpret the lists-of-strings a web form produces into the correct types.
For example, the `options_from_form` for the above form might look like:
```python
def options_from_form(formdata, spawner=None):
options = {} options = {}
options['integer'] = int(formdata['integer'][0]) # single integer value options['integer'] = int(formdata['integer'][0]) # single integer value
options['checkbox'] = formdata['checkbox'] == ['on']
options['text'] = formdata['text'][0] # single string value options['text'] = formdata['text'][0] # single string value
options['select'] = formdata['select'] # list already correct options['select'] = formdata['select'] # list already correct
options['notinform'] = 'extra info' # not in the form at all options['notinform'] = 'extra info' # not in the form at all
return options return options
c.Spawner.options_from_form = options_from_form
``` ```
which would return: which would return:
@@ -214,15 +228,115 @@ which would return:
```python ```python
{ {
'integer': 5, 'integer': 5,
'checkbox': True,
'text': 'some text', 'text': 'some text',
'select': ['a', 'b'], 'select': ['a', 'b'],
'notinform': 'extra info', 'notinform': 'extra info',
} }
``` ```
When `Spawner.start` is called, this dictionary is accessible as `self.user_options`. ### Applying user options
[spawner]: https://github.com/jupyterhub/jupyterhub/blob/HEAD/jupyterhub/spawner.py The base Spawner class doesn't do anything with `user_options`, that is also up to your deployment and/or chosen Spawner.
This is because the users can specify arbitrary option dictionary by using the API,
so it is part of your Spawner and/or deployment configuration to expose the options you trust your users to set.
[](#Spawner.apply_user_options) is the hook for taking `user_options` and applying whatever configuration it may represent.
It is critical that `apply_user_options` validates all input, since these are provided by the user.
```python
def apply_user_options(spawner, user_options):
if "image" in user_options and isinstance(user_options["image"], str):
spawner.image = user_options["image"]
c.Spawner.apply_user_options = apply_user_options
```
:::{versionadded} 5.3
JupyterHub 5.3 introduces [](#Spawner.apply_user_options) configuration.
Previously, [](#Spawner.user_options) could only be consumed during [](#Spawner.start),
at which point `user_options` is available to the Spawner instance as `self.user_options`.
This approach requires subclassing, so it was not possible to apply new `user_options` via configuration.
In JupyterHub 5.3, it is possible to fully expose user options,
and for some simple cases, fully with _declarative_ configuration.
:::
### Declarative configuration for user options
While [](#Spawner.options_from_form) and [](#Spawner.apply_user_options) are callables by nature,
some simple cases can be represented by declarative configuration,
which is most conveniently expressed in e.g. the yaml of the JupyterHub helm chart.
The cases currently handled are:
```python
c.Spawner.options_form = """
<input name="image_input" type="text" value="quay.io/jupyterhub/singleuser:5.2"/>
<input name="debug_checkbox" type="checkbox" />
"""
c.Spawner.options_from_form = "simple"
c.Spawner.apply_user_options = {"image_input": "image", "debug_checkbox": "debug"}
```
`options_from_form = "simple"` uses a built-in method to do the very simplest interpretation of an html form,
casting the lists of strings to single strings by getting the first item when there is only one.
The only extra processing it performs is casting the checkbox value of `on` to True.
So it turns this formdata:
```python
{
"image_input": ["my_image"],
"debug_checkbox": ["on"],
}
```
into this `user_options`
```python
{
"image_input": "my_image",
"debug_checkbox": True
}
```
When `apply_user_options` is a dictionary, any input in `user_options` is looked up in this dictionary,
and assigned to the corresponding Spawner attribute.
Strings are passed through traitlets' `from_string` logic (what is used for setting values on the command-line),
which means you can set numbers and things this way as well,
even though `options_from_form` leaves these as strings.
So in the above configuration, we have exposed `Spawner.debug` and `Spawner.image` without needing to write any functions.
In the JupyterHub helm chart YAML, this would look like:
```yaml
hub:
config:
KubeSpawner:
options_form: |
<input name="image_input" type="text" value="quay.io/jupyterhub/singleuser:5.2"/>
<input name="debug_checkbox" type="checkbox" />
options_from_form: simple
apply_user_options:
image_input: image
debug_checkbox: debug
```
### Setting `user_options` directly via the REST API
In addition to going through the options form, `user_options` may be set directly, via the REST API.
The body of a POST request to spawn a server may be a JSON dictionary,
which will be used to set `user_options` directly.
When used this way, neither `options_form` nor `options_from_form` are involved,
`user_options` is set directly, and only `apply_user_options` is called.
```
POST /hub/api/users/servers/:name
{
"option": 5,
"bool": True,
"string": "value"
}
```
## Writing a custom spawner ## Writing a custom spawner
@@ -314,6 +428,14 @@ The process environment is returned by `Spawner.get_env`, which specifies the fo
- `JUPYTERHUB_OAUTH_ACCESS_SCOPES` - the scopes required to access the server (called `JUPYTERHUB_OAUTH_SCOPES` prior to 3.0) - `JUPYTERHUB_OAUTH_ACCESS_SCOPES` - the scopes required to access the server (called `JUPYTERHUB_OAUTH_SCOPES` prior to 3.0)
- `JUPYTERHUB_OAUTH_CLIENT_ALLOWED_SCOPES` - the scopes the service is allowed to request. - `JUPYTERHUB_OAUTH_CLIENT_ALLOWED_SCOPES` - the scopes the service is allowed to request.
If no scopes are requested explicitly, these scopes will be requested. If no scopes are requested explicitly, these scopes will be requested.
- `JUPYTERHUB_PUBLIC_URL` - the public URL of the server,
e.g. `https://jupyterhub.example.org/user/name/`.
Empty if no public URL is specified (default).
Will be available if subdomains are configured.
- `JUPYTERHUB_PUBLIC_HUB_URL` - the public URL of JupyterHub as a whole,
e.g. `https://jupyterhub.example.org/`.
Empty if no public URL is specified (default).
Will be available if subdomains are configured.
Optional environment variables, depending on configuration: Optional environment variables, depending on configuration:
@@ -345,7 +467,7 @@ spawner, does not support limits and guarantees. One of the spawners
that supports limits and guarantees is the that supports limits and guarantees is the
[`systemdspawner`](https://github.com/jupyterhub/systemdspawner). [`systemdspawner`](https://github.com/jupyterhub/systemdspawner).
### Memory Limits & Guarantees ### Memory Limits and Guarantees
`c.Spawner.mem_limit`: A **limit** specifies the _maximum amount of memory_ `c.Spawner.mem_limit`: A **limit** specifies the _maximum amount of memory_
that may be allocated, though there is no promise that the maximum amount will that may be allocated, though there is no promise that the maximum amount will
@@ -365,7 +487,7 @@ available for the single-user notebook server to use. The environment variable
limits and providing these guarantees.** If these values are set to `None`, no limits and providing these guarantees.** If these values are set to `None`, no
limits or guarantees are provided, and no environment values are set. limits or guarantees are provided, and no environment values are set.
### CPU Limits & Guarantees ### CPU Limits and Guarantees
`c.Spawner.cpu_limit`: In supported spawners, you can set `c.Spawner.cpu_limit`: In supported spawners, you can set
`c.Spawner.cpu_limit` to limit the total number of cpu-cores that a `c.Spawner.cpu_limit` to limit the total number of cpu-cores that a

View File

@@ -4,7 +4,7 @@
This document describes how JupyterHub routes requests. This document describes how JupyterHub routes requests.
This does not include the [REST API](using-jupyterhub-rest-api) URLs. This does not include the [REST API](howto:rest-api) URLs.
In general, all URLs can be prefixed with `c.JupyterHub.base_url` to In general, all URLs can be prefixed with `c.JupyterHub.base_url` to
run the whole JupyterHub application on a prefix. run the whole JupyterHub application on a prefix.
@@ -169,27 +169,20 @@ _Version changed: 1.0_
JupyterHub version 0.9 failed these API requests with status `404`, JupyterHub version 0.9 failed these API requests with status `404`,
but version 1.0 uses 503. but version 1.0 uses 503.
## `/user-redirect/...` ## `/hub/user-redirect/...`
The `/user-redirect/...` URL is for sharing a URL that will redirect a user The `/hub/user-redirect/...` URL is for sharing a URL that will redirect a user
to a path on their own default server. to a path on their own default server.
This is useful when different users have the same file at the same URL on their servers, This is useful when different users have the same file at the same URL on their servers,
and you want a single link to give to any user that will open that file on their server. and you want a single link to give to any user that will open that file on their server.
e.g. a link to `/user-redirect/notebooks/Index.ipynb` e.g. a link to `/hub/user-redirect/notebooks/Index.ipynb`
will send user `hortense` to `/user/hortense/notebooks/Index.ipynb` will send user `hortense` to `/user/hortense/notebooks/Index.ipynb`
**DO NOT** share links to your own server with other users. **DO NOT** share links to your own server with other users.
This will not work in general, This will not work in general,
unless you grant those users access to your server. unless you grant those users access to your server.
**Contributions welcome:** The JupyterLab "shareable link" should share this link
when run with JupyterHub, but it does not.
See [jupyterlab-hub](https://github.com/jupyterhub/jupyterlab-hub)
where this should probably be done and
[this issue in JupyterLab](https://github.com/jupyterlab/jupyterlab/issues/5388)
that is intended to make it possible.
## Spawning ## Spawning
### `/hub/spawn[/:username[/:servername]]` ### `/hub/spawn[/:username[/:servername]]`
@@ -240,7 +233,7 @@ and the page will show a link back to `/hub/spawn/...`.
On this page, users can manage their JupyterHub API tokens. On this page, users can manage their JupyterHub API tokens.
They can revoke access and request new tokens for writing scripts They can revoke access and request new tokens for writing scripts
against the [JupyterHub REST API](using-jupyterhub-rest-api). against the [JupyterHub REST API](howto:rest-api).
## `/hub/admin` ## `/hub/admin`

View File

@@ -6,6 +6,10 @@
It is recommended to use at least JupyterLab 3.6 with JupyterHub >= 3.1.1 for this. It is recommended to use at least JupyterLab 3.6 with JupyterHub >= 3.1.1 for this.
::: :::
:::{note}
Starting with JupyterLab >=4.0, installing the [jupyter-collaboration](https://github.com/jupyterlab/jupyter-collaboration) package in your single-user environment enables collaborative mode, instead of passing the `--collaborative` flag at runtime.
:::
JupyterLab has support for real-time collaboration (RTC), where multiple users are working with the same Jupyter server and see each other's edits. JupyterLab has support for real-time collaboration (RTC), where multiple users are working with the same Jupyter server and see each other's edits.
Beyond other collaborative-editing environments, Jupyter includes _execution_. Beyond other collaborative-editing environments, Jupyter includes _execution_.
So granting someone access to your server also means granting them access to **run code as you**. So granting someone access to your server also means granting them access to **run code as you**.
@@ -74,7 +78,7 @@ c.JupyterHub.load_roles = []
c.JupyterHub.load_groups = { c.JupyterHub.load_groups = {
# collaborative accounts get added to this group # collaborative accounts get added to this group
# so it's easy to see which accounts are collaboration accounts # so it's easy to see which accounts are collaboration accounts
"collaborative": [], "collaborative": {"users": []},
} }
``` ```
@@ -98,12 +102,12 @@ for project_name, project in project_config["projects"].items():
members = project.get("members", []) members = project.get("members", [])
print(f"Adding project {project_name} with members {members}") print(f"Adding project {project_name} with members {members}")
# add them to a group for the project # add them to a group for the project
c.JupyterHub.load_groups[project_name] = members c.JupyterHub.load_groups[project_name] = {"users": members}
# define a new user for the collaboration # define a new user for the collaboration
collab_user = f"{project_name}-collab" collab_user = f"{project_name}-collab"
# add the collab user to the 'collaborative' group # add the collab user to the 'collaborative' group
# so we can identify it as a collab account # so we can identify it as a collab account
c.JupyterHub.load_groups["collaborative"].append(collab_user) c.JupyterHub.load_groups["collaborative"]["users"].append(collab_user)
# finally, grant members of the project collaboration group # finally, grant members of the project collaboration group
# access to the collab user's server, # access to the collab user's server,

View File

@@ -2,24 +2,82 @@
# Authentication and User Basics # Authentication and User Basics
The default Authenticator uses [PAM][] (Pluggable Authentication Module) to authenticate system users with The default Authenticator uses [PAM][] (Pluggable Authentication Module) to authenticate users already defined on the system with their usernames and passwords.
their usernames and passwords. With the default Authenticator, any user With the default Authenticator,
with an account and password on the system will be allowed to login. any user with an account and password on the system will be able to login.
But that does not mean they will be **allowed** to access JupyterHub.
## Create a set of allowed users (`allowed_users`) :::{important}
Only _explicitly allowed_ users can login to JupyterHub
(a user who can login but is not allowed will see a permission error after successful login).
:::
## Deciding who is allowed
In the base Authenticator, there are 3 configuration options for granting users access to your Hub:
1. `allow_all` grants any user who can successfully authenticate access to the Hub
2. `allowed_users` defines a set of users who can access the Hub
3. `allow_existing_users` enables managing users via the JupyterHub API or admin page
These options should apply to all Authenticators.
Your chosen Authenticator may add additional configuration options to admit users, such as team membership, course enrollment, etc.
:::{important}
You should always specify at least one allow configuration if you want people to be able to access your Hub!
In most cases, this looks like:
```python
c.Authenticator.allow_all = True
# or
c.Authenticator.allowed_users = {"name", ...}
```
:::
:::{versionchanged} 5.0
If no allow config is specified, then by default **nobody will have access to your Hub**.
Prior to 5.0, the opposite was true; effectively `allow_all = True` if no other allow config was specified.
:::
You can restrict which users are allowed to login with a set, You can restrict which users are allowed to login with a set,
`Authenticator.allowed_users`: `Authenticator.allowed_users`:
```python ```python
c.Authenticator.allowed_users = {'mal', 'zoe', 'inara', 'kaylee'} c.Authenticator.allowed_users = {'mal', 'zoe', 'inara', 'kaylee'}
# c.Authenticator.allow_all = False
c.Authenticator.allow_existing_users = False
``` ```
Users in the `allowed_users` set are added to the Hub database when the Hub is Users in the `allowed_users` set are added to the Hub database when the Hub is started.
started.
```{warning} :::{versionchanged} 5.0
If this configuration value is not set, then **all authenticated users will be allowed into your hub**. {attr}`.Authenticator.allow_all` and {attr}`.Authenticator.allow_existing_users` are new in JupyterHub 5.0
to enable explicit configuration of previously implicit behavior.
Prior to 5.0, `allow_all` was implicitly True if `allowed_users` was empty.
Starting with 5.0, to allow all authenticated users by default,
`allow_all` must be explicitly set to True.
By default, `allow_existing_users` is True when `allowed_users` is not empty,
to ensure backward-compatibility.
To make the `allowed_users` set _restrictive_,
set `allow_existing_users = False`.
:::
## One Time Passwords ( request_otp )
By setting `request_otp` to true, the login screen will show and additional password input field
to accept an OTP:
```python
c.Authenticator.request_otp = True
```
By default, the prompt label is `OTP:`, but this can be changed by setting `otp_prompt`:
```python
c.Authenticator.otp_prompt = 'Google Authenticator:'
``` ```
## Configure admins (`admin_users`) ## Configure admins (`admin_users`)
@@ -27,7 +85,7 @@ If this configuration value is not set, then **all authenticated users will be a
```{note} ```{note}
As of JupyterHub 2.0, the full permissions of `admin_users` As of JupyterHub 2.0, the full permissions of `admin_users`
should not be required. should not be required.
Instead, you can assign [roles](define-role-target) to users or groups Instead, it is best to assign [roles](define-role-target) to users or groups
with only the scopes they require. with only the scopes they require.
``` ```
@@ -41,6 +99,25 @@ A set of initial admin users, `admin_users` can be configured as follows:
c.Authenticator.admin_users = {'mal', 'zoe'} c.Authenticator.admin_users = {'mal', 'zoe'}
``` ```
:::{warning}
`admin_users` config can only be used to _grant_ admin permissions.
Removing users from this set **does not** remove their admin permissions,
which must be done via the admin page or API.
Role assignments via `load_roles` are the only way to _revoke_ past permissions from configuration:
```python
c.JupyterHub.load_roles = [
{
"name": "admin",
"users": ["admin1", "..."],
}
]
```
or, better yet, [specify your own roles](define-role-target) with only the permissions your admins actually need.
:::
Users in the admin set are automatically added to the user `allowed_users` set, Users in the admin set are automatically added to the user `allowed_users` set,
if they are not already present. if they are not already present.
@@ -53,26 +130,55 @@ group. For example, we can let any user in the `wheel` group be an admin:
c.PAMAuthenticator.admin_groups = {'wheel'} c.PAMAuthenticator.admin_groups = {'wheel'}
``` ```
## Give admin access to other users' notebook servers (`admin_access`) ## Give some users access to other users' notebook servers
Since the default `JupyterHub.admin_access` setting is `False`, the admins The `access:servers` scope can be granted to users to give them permission to visit other users' servers.
do not have permission to log in to the single user notebook servers For example, to give members of the `teachers` group access to the servers of members of the `students` group:
owned by _other users_. If `JupyterHub.admin_access` is set to `True`,
then admins have permission to log in _as other users_ on their ```python
respective machines for debugging. **As a courtesy, you should make c.JupyterHub.load_roles = [
sure your users know if admin_access is enabled.** {
"name": "teachers",
"scopes": [
"admin-ui",
"list:users",
"access:servers!group=students",
],
"groups": ["teachers"],
}
]
```
By default, only the deprecated `admin` role has global `access` permissions.
**As a courtesy, you should make sure your users know if admin access is enabled.**
## Add or remove users from the Hub ## Add or remove users from the Hub
:::{versionadded} 5.0
`c.Authenticator.allow_existing_users` is added in 5.0 and True by default _if_ any `allowed_users` are specified.
Prior to 5.0, this behavior was not optional.
:::
Users can be added to and removed from the Hub via the admin Users can be added to and removed from the Hub via the admin
panel or the REST API. When a user is **added**, the user will be panel or the REST API.
automatically added to the `allowed_users` set and database. Restarting the Hub
will not require manually updating the `allowed_users` set in your config file, To enable this behavior, set:
```python
c.Authenticator.allow_existing_users = True
```
When a user is **added**, the user will be
automatically added to the `allowed_users` set and database.
If `allow_existing_users` is True, restarting the Hub will not require manually updating the `allowed_users` set in your config file,
as the users will be loaded from the database. as the users will be loaded from the database.
If `allow_existing_users` is False, users not granted access by configuration such as `allowed_users` will not be permitted to login,
even if they are present in the database.
After starting the Hub once, it is not sufficient to **remove** a user After starting the Hub once, it is not sufficient to **remove** a user
from the allowed users set in your config file. You must also remove the user from the allowed users set in your config file. You must also remove the user
from the Hub's database, either by deleting the user from JupyterHub's from the Hub's database, either by deleting the user via JupyterHub's
admin page, or you can clear the `jupyterhub.sqlite` database and start admin page, or you can clear the `jupyterhub.sqlite` database and start
fresh. fresh.
@@ -112,7 +218,6 @@ popular services:
- [Globus](https://oauthenticator.readthedocs.io/en/latest/reference/api/gen/oauthenticator.globus.html) - [Globus](https://oauthenticator.readthedocs.io/en/latest/reference/api/gen/oauthenticator.globus.html)
- [Google](https://oauthenticator.readthedocs.io/en/latest/reference/api/gen/oauthenticator.google.html) - [Google](https://oauthenticator.readthedocs.io/en/latest/reference/api/gen/oauthenticator.google.html)
- [MediaWiki](https://oauthenticator.readthedocs.io/en/latest/reference/api/gen/oauthenticator.mediawiki.html) - [MediaWiki](https://oauthenticator.readthedocs.io/en/latest/reference/api/gen/oauthenticator.mediawiki.html)
- [Okpy](https://oauthenticator.readthedocs.io/en/latest/reference/api/gen/oauthenticator.okpy.html)
- [OpenShift](https://oauthenticator.readthedocs.io/en/latest/reference/api/gen/oauthenticator.openshift.html) - [OpenShift](https://oauthenticator.readthedocs.io/en/latest/reference/api/gen/oauthenticator.openshift.html)
A [generic implementation](https://oauthenticator.readthedocs.io/en/latest/reference/api/gen/oauthenticator.generic.html), which you can use for OAuth authentication A [generic implementation](https://oauthenticator.readthedocs.io/en/latest/reference/api/gen/oauthenticator.generic.html), which you can use for OAuth authentication

View File

@@ -99,4 +99,4 @@ maintenance, re-configuration, etc.), then user connections are not
interrupted. For simplicity, by default the hub starts the proxy interrupted. For simplicity, by default the hub starts the proxy
automatically, so if the hub restarts, the proxy restarts, and user automatically, so if the hub restarts, the proxy restarts, and user
connections are interrupted. It is easy to run the proxy separately, connections are interrupted. It is easy to run the proxy separately,
for information see [the separate proxy page](separate-proxy). for information see [the separate proxy page](howto:separate-proxy).

View File

@@ -43,7 +43,7 @@ is important that these files be put in a secure location on your server, where
they are not readable by regular users. they are not readable by regular users.
If you are using a **chain certificate**, see also chained certificate for SSL If you are using a **chain certificate**, see also chained certificate for SSL
in the JupyterHub [Troubleshooting FAQ](troubleshooting). in the JupyterHub [Troubleshooting FAQ](faq:troubleshooting).
### Using letsencrypt ### Using letsencrypt
@@ -68,7 +68,7 @@ c.JupyterHub.ssl_cert = '/etc/letsencrypt/live/example.com/fullchain.pem'
### If SSL termination happens outside of the Hub ### If SSL termination happens outside of the Hub
In certain cases, for example, if the hub is running behind a reverse proxy, and In certain cases, for example, if the hub is running behind a reverse proxy, and
[SSL termination is being provided by NGINX](https://www.nginx.com/resources/admin-guide/nginx-ssl-termination/), [SSL termination is being provided by NGINX](https://docs.nginx.com/nginx/admin-guide/security-controls/terminating-ssl-http/),
it is reasonable to run the hub without SSL. it is reasonable to run the hub without SSL.
To achieve this, remove `c.JupyterHub.ssl_key` and `c.JupyterHub.ssl_cert` To achieve this, remove `c.JupyterHub.ssl_key` and `c.JupyterHub.ssl_cert`

View File

@@ -1,3 +1,5 @@
(tutorial:services)=
# External services # External services
When working with JupyterHub, a **Service** is defined as a process When working with JupyterHub, a **Service** is defined as a process

View File

@@ -51,5 +51,6 @@ Further tutorials of configuring JupyterHub for specific tasks
```{toctree} ```{toctree}
:maxdepth: 1 :maxdepth: 1
sharing
collaboration-users collaboration-users
``` ```

View File

@@ -1,9 +1,9 @@
# Install JupyterHub with Docker # Install JupyterHub with Docker
The JupyterHub [docker image](https://hub.docker.com/r/jupyterhub/jupyterhub/) is the fastest way to set up Jupyterhub in your local development environment. The JupyterHub [docker image](https://quay.io/repository/jupyterhub/jupyterhub) is the fastest way to set up Jupyterhub in your local development environment.
:::{note} :::{note}
This `jupyterhub/jupyterhub` docker image is only an image for running This `quay.io/jupyterhub/jupyterhub` docker image is only an image for running
the Hub service itself. It does not provide the other Jupyter components, the Hub service itself. It does not provide the other Jupyter components,
such as Notebook installation, which are needed by the single-user servers. such as Notebook installation, which are needed by the single-user servers.
To run the single-user servers, which may be on the same system as the Hub or To run the single-user servers, which may be on the same system as the Hub or
@@ -24,7 +24,7 @@ You should have [Docker] installed on a Linux/Unix based system.
To pull the latest JupyterHub image and start the `jupyterhub` container, run this command in your terminal. To pull the latest JupyterHub image and start the `jupyterhub` container, run this command in your terminal.
``` ```
docker run -d -p 8000:8000 --name jupyterhub jupyterhub/jupyterhub jupyterhub docker run -d -p 8000:8000 --name jupyterhub quay.io/jupyterhub/jupyterhub jupyterhub
``` ```
This command exposes the Jupyter container on port:8000. Navigate to `http://localhost:8000` in a web browser to access the JupyterHub console. This command exposes the Jupyter container on port:8000. Navigate to `http://localhost:8000` in a web browser to access the JupyterHub console.
@@ -46,7 +46,7 @@ If you want to run docker on a computer that has a public IP then you should
(as in MUST) **secure it with ssl** by adding ssl options to your docker (as in MUST) **secure it with ssl** by adding ssl options to your docker
configuration or using an ssl enabled proxy. configuration or using an ssl enabled proxy.
[Mounting volumes](https://docs.docker.com/engine/admin/volumes/volumes/) [Mounting volumes](https://docs.docker.com/engine/storage/volumes/)
enables you to persist and store the data generated by the docker container, even when you stop the container. enables you to persist and store the data generated by the docker container, even when you stop the container.
The persistent data can be stored on the host system, outside the container. The persistent data can be stored on the host system, outside the container.

View File

@@ -5,13 +5,12 @@
Before installing JupyterHub, you will need: Before installing JupyterHub, you will need:
- a Linux/Unix-based system - a Linux/Unix-based system
- [Python](https://www.python.org/downloads/) 3.6 or greater. An understanding - [Python {{python_min}}](https://www.python.org/downloads/) or greater. An understanding
of using [`pip`](https://pip.pypa.io) or of using [`pip`](https://pip.pypa.io) or
[`conda`](https://docs.conda.io/projects/conda/en/latest/user-guide/getting-started.html) for [`conda`](https://docs.conda.io/projects/conda/en/latest/user-guide/getting-started.html) for
installing Python packages is helpful. installing Python packages is helpful.
- [nodejs/npm](https://www.npmjs.com/). [Install nodejs/npm](https://docs.npmjs.com/getting-started/installing-node), - [Node.js {{node_min}}](https://www.npmjs.com/) or greater, along with npm. [Install Node.js/npm](https://docs.npmjs.com/getting-started/installing-node),
using your operating system's package manager. using your operating system's package manager.
- If you are using **`conda`**, the nodejs and npm dependencies will be installed for - If you are using **`conda`**, the nodejs and npm dependencies will be installed for
you by conda. you by conda.
@@ -24,7 +23,7 @@ Before installing JupyterHub, you will need:
``` ```
[nodesource][] is a great resource to get more recent versions of the nodejs runtime, [nodesource][] is a great resource to get more recent versions of the nodejs runtime,
if your system package manager only has an old version of Node.js (e.g. 10 or older). if your system package manager only has an old version of Node.js.
- A [pluggable authentication module (PAM)](https://en.wikipedia.org/wiki/Pluggable_authentication_module) - A [pluggable authentication module (PAM)](https://en.wikipedia.org/wiki/Pluggable_authentication_module)
to use the [default Authenticator](authenticators). to use the [default Authenticator](authenticators).
@@ -72,6 +71,35 @@ jupyterhub -h
configurable-http-proxy -h configurable-http-proxy -h
``` ```
## Configuration
At this point, we could start jupyterhub, but nobody would be able to use it!
Only users who are explicitly **allowed** can use JupyterHub.
To allow users, we need to create a configuration file.
JupyterHub uses a configuration file called `jupyterhub_config.py`,
which is a regular Python script with one function `get_config()` pre-defined, returning the "config object".
Assigning attributes to this object is how we configure JupyterHub.
At this point, we have two choices:
1. allow any user who can successfully login with our Authenticator (often a good choice for local machines with PAM)
2. allow one or more users by name.
We'll start with the first one.
Create the file `jupyerhub_config.py` with the content:
```python
c = get_config() # noqa
c.Authenticator.allow_all = True
# alternative: c.Authenticator.allowed_users = {"yourusername"}
```
This configuration means that anyone who can login with PAM (any existing user on the system) should have access to JupyterHub.
:::{seealso}
[](authenticators)
:::
## Start the Hub server ## Start the Hub server
To start the Hub server, run the command: To start the Hub server, run the command:
@@ -90,6 +118,6 @@ To **allow multiple users to sign in** to the Hub server, you must start
sudo jupyterhub sudo jupyterhub
``` ```
The [wiki](https://github.com/jupyterhub/jupyterhub/wiki/Using-sudo-to-run-JupyterHub-without-root-privileges) [](howto:config:no-sudo)
describes how to run the server as a _less privileged user_. This requires describes how to run the server as a _less privileged user_. This requires
additional configuration of the system. additional configuration of the system.

View File

@@ -1,7 +1,7 @@
# Starting servers with the JupyterHub API # Starting servers with the JupyterHub API
Sometimes, when working with applications such as [BinderHub](https://binderhub.readthedocs.io), it may be necessary to launch Jupyter-based services on behalf of your users. Sometimes, when working with applications such as [BinderHub](https://binderhub.readthedocs.io), it may be necessary to launch Jupyter-based services on behalf of your users.
Doing so can be achieved through JupyterHub's [REST API](using-jupyterhub-rest-api), which allows one to launch and manage servers on behalf of users through API calls instead of the JupyterHub UI. Doing so can be achieved through JupyterHub's [REST API](howto:rest-api), which allows one to launch and manage servers on behalf of users through API calls instead of the JupyterHub UI.
This way, you can take advantage of other user/launch/lifecycle patterns that are not natively supported by the JupyterHub UI, all without the need to develop the server management features of JupyterHub Spawners and/or Authenticators. This way, you can take advantage of other user/launch/lifecycle patterns that are not natively supported by the JupyterHub UI, all without the need to develop the server management features of JupyterHub Spawners and/or Authenticators.
This tutorial goes through working with the JupyterHub API to manage servers for users. This tutorial goes through working with the JupyterHub API to manage servers for users.

View File

@@ -0,0 +1,296 @@
(sharing-tutorial)=
# Sharing access to your server
In JupyterHub 5.0, users can grant each other limited access to their servers without intervention by Hub administrators.
There is not (yet!) any UI for granting shared access, so this tutorial goes through the steps of using the JupyterHub API to grant access to servers.
For more background on how sharing works in JupyterHub, see the [sharing reference documentation](sharing-reference).
## Setup: enable sharing (admin)
First, sharing must be _enabled_ on the JupyterHub deployment.
That is, grant (some) users permission to share their servers with others.
Users cannot share their servers by default.
This is the only step that requires an admin action.
To grant users permission to share access to their servers,
add the `shares!user` scope to the default `user` role:
```python
c.JupyterHub.load_roles = [
{
"name": "user",
"scopes": ["self", "shares!user"],
},
]
```
With this, only the sharing via invitation code (described below) will be available.
Additionally, if you want users to be able to share access with a **specific user or group** (more below),
a user must have permission to read that user or group's name.
To enable the _full_ sharing API for all users:
```python
c.JupyterHub.load_roles = [
{
"name": "user",
"scopes": ["self", "shares!user", "read:users:name", "read:groups:name"],
},
]
```
Note that this exposes the ability for all users to _discover_ existing user and group names,
which is part of why we have the share-by-code pattern,
so users don't need this ability to share with each other.
Adding filters lets you limit who can be shared with by name.
:::{note}
Removing a user's permission to grant shares only prevents _future_ shares.
Any shared permissions previously granted by a user will remain and must be revoked separately,
if desired.
:::
### Grant servers permission to share themselves (admin)
When you want users to be able to share access while viewing a server, grant the appropriate
sharing scopes so the server or the browser token can manage sharing. By default, tokens used
to talk to a server have limited permissions.
Granting browser-originating tokens the sharing scopes is the recommended approach when using
JupyterLab with the `jupyter-collaboration` extension, which provides a UI for managing shares.
The minimal permissions required to allow browser tokens to request sharing-related scopes are:
```python
c.Spawner.oauth_client_allowed_scopes = ["access:servers!server", "shares!server"]
```
JupyterHub's `user-sharing` example does it this way.
The `jupyter-collaboration` UI requires additional Hub scopes to share their server with specific users on the Hub:
```python
c.Spawner.oauth_client_allowed_scopes = [
"read:users:name", "shares!user", "list:users", "servers!user"
]
```
The nice thing about this approach is that only users who already have those permissions will get a token which can take these actions.
The downside is that the browser token is only accessible to the javascript (e.g. JupyterLab) and/or jupyter-server request handlers, but not notebooks or terminals.
The second way, which is less secure, but perhaps more convenient for demonstration purposes,
is to grant the _server itself_ permission to grant access to itself.
```python
c.Spawner.server_token_scopes = [
"users:activity!user",
"shares!server",
]
```
The security downside of this approach is that anyone who can access the server generally can assume the permissions of the server token.
Effectively, this means anyone who the server is shared _with_ will gain permission to further share the server with others.
This is not the case for the first approach, but this token is accessible to terminals and notebook kernels, making it easier to illustrate.
## Get a token
Now, assuming the _user_ has permission to share their server (step 0), we need a token to make the API requests in this tutorial.
You can do this at the token page, or inherit it from the single-user server environment if one of the above configurations has been selected by admins.
To request a token with only the permissions required (`shares!user`) on the token page:
![JupyterHub Token page requesting a token with scopes "shares!user"](../images/sharing-token.png)
This token will be in the `Authorization` header.
To create a {py:class}`requests.Session` that will send this header on every request:
```python
import requests
from getpass import getpass
token = getpass.getpass("JupyterHub API token: ")
session = requests.Session()
session.headers = {"Authorization": f"Bearer {token}"}
```
We will make subsequent requests in this tutorial with this session object, so the header is present.
## Issue a sharing code
We are going to make a POST request to `/hub/api/share-codes/username/` to issue a _sharing code_.
This is a _code_, which can be _exchanged_ by one or more users for access to the shared service.
A sharing code:
- always expires (default: after one day)
- can be _exchanged_ multiple times for shared access to the server
When the sharing code expires, any permissions granted by the code will remain
(think of it like an invitation to collaborate on a repository or to a chat group - the invitation can expire, but once accepted, access persists).
To request a share code:
```
POST /hub/api/share-codes/:username/:servername
```
Assuming your username is `barb` and you want to share access to your default server, this would be:
```
POST /hub/api/share-codes/barb/
```
```python
# sample values, replace with your actual hub
hub_url = "http://127.0.0.1:8000"
username = "barb"
r = session.post(f"{hub_url}/hub/api/share-codes/{username}/")
```
which will have a JSON response:
```python
{
'server': {'user': {'name': 'barb'},
'name': '',
'url': '/user/barb/',
'ready': True,
},
'scopes': ['access:servers!server=barb/'],
'id': 'sc_2',
'created_at': '2024-01-10T13:01:32.972409Z',
'expires_at': '2024-01-11T13:01:32.970126Z',
'exchange_count': 0,
'last_exchanged_at': None,
'code': 'U-eYLFT1lGstEqfMHpAIvTZ1MRjZ1Y1a-loGQ0K86to',
'accept_url': '/hub/accept-share?code=U-eYLFT1lGstEqfMHpAIvTZ1MRjZ1Y1a-loGQ0K86to',
'full_accept_url': 'https://hub.example.org/accept-share?code=U-eYLFT1lGstEqfMHpAIvTZ1MRjZ1Y1a-loGQ0K86to',
}
```
The most relevant fields here are `code`, which contains the code itself, and `accept_url`, which is the URL path for the page another user.
Note: it does not contain the _hostname_ of the hub, which JupyterHub often does not know.
If `public_url` configuration is defined, `full_accept_url` will be the full URL including the host.
Otherwise, it will be null.
Share codes are guaranteed to be url-safe, so no encoding is required.
### Expanding or limiting the share code
You can specify scopes (must be limited to this specific server) and expiration of the sharing code.
:::{note}
The granted permissions do not expire, only the code itself.
That means that after expiration, users may not exchange the code anymore,
but any user who has exchanged it will still have those permissions.
:::
The _default_ scopes are only `access:servers!server=:user/:server`, and the default expiration is one day (86400).
These can be overridden in the JSON body of the POST request that issued the token:
```python
import json
options = {
"scopes": [
f"access:servers!server={username}/", # access the server (default)
f"servers!server={username}/", # start/stop the server
f"shares!server={username}/", # further share the server with others
],
"expires_in": 3600, # code expires in one hour
}
session.post(f"{hub_url}/hub/api/share-codes/{username}/", data=json.dumps(options))
```
### Distribute the sharing code
Now that you have a code and/or a URL, anyone you share the code with will be able to visit `$JUPYTERHUB/hub/accept-share?code=code`.
### Sharing a link to a specific page
The `accept-share` page also accepts a `next` URL parameter, which can be a redirect to a specific page, rather than the default page of the server.
For example:
```
/hub/accept-code?code=abc123&next=/users/barb/lab/tree/mynotebook.ipynb
```
would be a link that can be shared with any JupyterHub user that will take them directly to the file `mynotebook.ipynb` in JupyterLab on barb's server after granting them access to the server.
## Reviewing shared access
When you have shared access to your server, it's a good idea to check out who has access.
You can see who has access with:
```python
session.get()
```
which produces a paginated list of who has shared access:
```python
{'items': [{'server': {'user': {'name': 'barb'},
'name': '',
'url': '/user/barb/',
'ready': True},
'scopes': ['access:servers!server=barb/',
'servers!server=barb/',
'shares!server=barb/'],
'user': {'name': 'shared-with'},
'group': None,
'kind': 'user',
'created_at': '2024-01-10T13:16:56.432599Z'}],
'_pagination': {'offset': 0, 'limit': 200, 'total': 1, 'next': None}}
```
## Revoking shared access
There are two ways to revoke access to a shared server:
1. `PATCH` requests can revoke individual permissions from individual users or groups
2. `DELETE` requests revokes all shared permissions from anyone (unsharing the server in one step)
To revoke one or more scopes from a user:
```python
options = {
"user": "shared-with",
"scopes": ["shares!server=barb/"],
}
session.patch(f"{hub_url}/hub/api/shares/{username}/", data=json.dumps(options))
```
The Share model with remaining permissions, if any, will be returned:
```python
{'server': {'user': {'name': 'barb'},
'name': '',
'url': '/user/barb/',
'ready': True},
'scopes': ['access:servers!server=barb/', 'servers!server=barb/'],
'user': {'name': 'shared-with'},
'group': None,
'kind': 'user',
'created_at': '2024-01-10T13:16:56.432599Z'}
```
If no permissions remain, the response will be an empty dict (`{}`).
To revoke all permissions for a single user, leave `scopes` unspecified:
```python
options = {
"user": "shared-with",
}
session.patch(f"{hub_url}/hub/api/shares/{username}/", data=json.dumps(options))
```
Or revoke all shared permissions from all users for the server:
```python
session.delete(f"{hub_url}/hub/api/shares/{username}/")
```

View File

@@ -2,6 +2,7 @@
Example for a Spawner.pre_spawn_hook Example for a Spawner.pre_spawn_hook
create a directory for the user before the spawner starts create a directory for the user before the spawner starts
""" """
# pylint: disable=import-error # pylint: disable=import-error
import os import os
import shutil import shutil
@@ -27,8 +28,9 @@ def clean_dir_hook(spawner):
shutil.rmtree(temp_path) shutil.rmtree(temp_path)
c = get_config() # noqa
# attach the hook functions to the spawner # attach the hook functions to the spawner
# pylint: disable=undefined-variable
c.Spawner.pre_spawn_hook = create_dir_hook c.Spawner.pre_spawn_hook = create_dir_hook
c.Spawner.post_stop_hook = clean_dir_hook c.Spawner.post_stop_hook = clean_dir_hook

View File

@@ -60,8 +60,9 @@ The essential pieces for using JupyterHub as an OAuth provider are:
"name": "my-service", "name": "my-service",
# the oauth client id of your service # the oauth client id of your service
# must be unique but isn't private # must be unique but isn't private
# can be randomly generated or hand-written # can be randomly generated or hand-written, but must
"oauth_client_id": "abc123", # begin with service-
"oauth_client_id": "service-abc123",
# the API token and client secret of the service # the API token and client secret of the service
# should be generated securely, # should be generated securely,
# e.g. via `openssl rand -hex 32` # e.g. via `openssl rand -hex 32`
@@ -77,7 +78,7 @@ The essential pieces for using JupyterHub as an OAuth provider are:
The relevant OAuth URLs and keys for using JupyterHub as an OAuth provider are: The relevant OAuth URLs and keys for using JupyterHub as an OAuth provider are:
1. the client_id, used in oauth requests 1. the client_id, used in oauth requests. This must begin with the characters `service-`
2. the api token registered with jupyterhub is the client_secret for oauth requests 2. the api token registered with jupyterhub is the client_secret for oauth requests
3. oauth url of the Hub, which is "/hub/api/oauth2/authorize", e.g. `https://myhub.horse/hub/api/oauth2/authorize` 3. oauth url of the Hub, which is "/hub/api/oauth2/authorize", e.g. `https://myhub.horse/hub/api/oauth2/authorize`
4. a redirect handler to receive the authenticated response 4. a redirect handler to receive the authenticated response

View File

@@ -8,8 +8,8 @@ if not api_token:
"Make sure to `export JUPYTERHUB_API_TOKEN=$(openssl rand -hex 32)`" "Make sure to `export JUPYTERHUB_API_TOKEN=$(openssl rand -hex 32)`"
) )
c = get_config() # noqa
# tell JupyterHub to register the service as an external oauth client # tell JupyterHub to register the service as an external oauth client
c.JupyterHub.services = [ c.JupyterHub.services = [
{ {
'name': 'external-oauth', 'name': 'external-oauth',
@@ -18,3 +18,26 @@ c.JupyterHub.services = [
'oauth_redirect_uri': 'http://127.0.0.1:5555/oauth_callback', 'oauth_redirect_uri': 'http://127.0.0.1:5555/oauth_callback',
} }
] ]
# Grant all JupyterHub users ability to access services
c.JupyterHub.load_roles = [
{
'name': 'user',
'description': 'Allow all users to access all services',
'scopes': ['access:services', 'self'],
}
]
# Boilerplate to make sure the example runs - this is not relevant
# to external oauth services.
# Allow authentication with any username and any password
from jupyterhub.auth import DummyAuthenticator
c.JupyterHub.authenticator_class = DummyAuthenticator
# Optionally set a global password that all users must use
# c.DummyAuthenticator.password = "your_password"
# only listen on localhost for testing.
c.JupyterHub.bind_url = 'http://127.0.0.1:8000'

View File

@@ -3,6 +3,7 @@
Implements OAuth handshake manually Implements OAuth handshake manually
so all URLs and requests necessary for OAuth with JupyterHub should be in one place so all URLs and requests necessary for OAuth with JupyterHub should be in one place
""" """
import json import json
import os import os
from urllib.parse import urlencode, urlparse from urllib.parse import urlencode, urlparse

Some files were not shown because too many files have changed in this diff Show More