Compare commits

...

4181 Commits

Author SHA1 Message Date
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
Min RK
20f75c0018 Bump to 4.1.0.dev 2023-06-12 15:29:13 +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
689dc5ba24 Bump to 4.0.1 2023-06-08 10:38:00 +02:00
Min RK
d42a7261a4 Merge pull request #4472 from minrk/401-cl
changelog for 4.0.1
2023-06-08 10:37:12 +02:00
Min RK
bcbf136de2 set date for 4.0.1
Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2023-06-08 09:58:21 +02:00
Min RK
55e9a0f5b5 changelog for 4.0.1 2023-06-07 15:41:22 +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
Min RK
d64d916abc Merge pull request #4470 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-06-06 09:05:29 +02:00
pre-commit-ci[bot]
da668b5e9a [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v3.3.2 → v3.4.0](https://github.com/asottile/pyupgrade/compare/v3.3.2...v3.4.0)
2023-06-06 04:12:25 +00:00
Erik Sundell
d54442ecbf Merge pull request #4467 from minrk/main
Abort informatively on unrecognized CLI options
2023-06-05 10:30:31 +02:00
Min RK
c930d6bf6a Abort informatively on unrecognized CLI options
rather than ignoring them, leading to unexpected behavior
2023-06-02 13:26:31 +02:00
Min RK
2ce263d45f Merge pull request #4463 from minrk/prefer-runtime-token
Reorder token request docs
2023-06-02 11:48:23 +02:00
Min RK
68f81fdc30 Merge pull request #4457 from diocas/fix_4174
Delete server button on admin page
2023-06-02 11:46:24 +02:00
Min RK
e7ab18a720 Merge pull request #4464 from opoplawski/xsrf
Add xsrf to custom_html template context
2023-06-02 11:30:53 +02:00
Orion Poplawski
582467642c Add xsrf to custom_html template context 2023-06-01 10:00:57 -06:00
Min RK
d65e2daa15 Apply suggestions from code review
Co-authored-by: Simon Li <orpheus+devel@gmail.com>
2023-06-01 12:55:07 +02:00
Min RK
4eaa7c5eb3 Reorder token request docs
- suggest token page first
- remove caveat about JupyterHub 0.8, which can be assumed now
- undocument `jupyterhub token`
- refresh token page screenshots, and remove duplicate screenshot of the token page
- minor improvements to language in token page
2023-05-31 14:25:03 +02:00
Min RK
02de44e551 Merge pull request #4458 from tfmark/rest-api-docs-servers-as-dict
'servers' should be a dict of dicts, not a list of dicts in rest-api.yml
2023-05-25 13:37:01 +02:00
tfmark
4cdf0a65cd 'servers' should be a dict of dicts, not a list of dicts in rest-api.yml 2023-05-24 16:09:26 +01:00
pre-commit-ci[bot]
b0367c21f3 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-05-23 15:33:08 +00:00
Diogo Castro
9d68107722 Add test case for named servers
Adapt all tests
2023-05-23 17:30:23 +02:00
Diogo Castro
ad61c23873 Allow deletion of named servers 2023-05-23 17:30:23 +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
Min RK
c359221ef3 Merge pull request #4454 from goseind/gallery_cern
Add CERN to Gallery of JupyterHub Deployments
2023-05-22 13:45:48 +02:00
Min RK
cc94d290ab Merge pull request #4456 from manics/doc-config-ref
Config reference: link to nicer(?) API docs first
2023-05-22 13:45:33 +02:00
Min RK
da0a58cb9c Merge pull request #4451 from minrk/preserve-cli-port
preserve CLI > env priority config in jupyterhub-singleuser extension
2023-05-22 13:16:08 +02:00
Simon Li
7ddd3b0589 Config reference: link to nicer(?) API docs first
`Configuration Reference` sounds like it's the place to go to see the full list of JupyterHub config options.
However it's not very readable as it's a plain-text dump of the output of `jupyterhub --generate-config`.

This links to some of the API doc pages instead, which present most of the information in an easier to read format. Unfortunately it also includes a lot of non-traitlets documentation.
2023-05-18 16:23:21 +01: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
Domenic Gosein
ff71d09fd1 Add CERN to Gallery of JupyterHub Deployments 2023-05-16 16:57:40 +00:00
Min RK
1eb0b1b073 preserve CLI > env priority in jupyterhub-singleuser extension 2023-05-12 17:21:12 +02:00
Min RK
9ea9902c76 Merge pull request #4448 from minrk/collab-link
Fix link to collaboration accounts doc in example
2023-05-11 21:35:35 +02:00
Min RK
6494017ce2 Fix link to collaboration accounts doc in example 2023-05-11 15:08:14 +02:00
Simon Li
b0cd9eebe9 Merge pull request #4443 from manics/node18
Update jsx dependencies as much as possible
2023-05-11 00:35:43 +01:00
Min RK
c3d4885521 Merge pull request #4428 from minrk/faq-share
update sharing faq for 2023
2023-05-10 17:08:32 +02:00
Min RK
2919aaae79 Merge pull request #4444 from manics/remove-alpine
Remove Dockerfile.alpine
2023-05-08 14:24:20 +02:00
Simon Li
1986ba71c1 Remove Dockerfile.alpine 2023-05-06 12:49:02 +01:00
Simon Li
a2c39a4dbc Remove multi-arch cross-compilation debugging 2023-05-06 12:33:32 +01:00
Simon Li
1e847c8710 Reduce container build time to 20 2023-05-06 12:22:25 +01:00
Simon Li
83a8552a63 Clean-up FROM --platform leftover from debugging 2023-05-06 12:09:43 +01:00
Simon Li
f60c633320 Replace apt -q with apt-get -qq 2023-05-06 11:58:05 +01:00
Simon Li
a5c7384228 Completely seperate jupyterhub and other wheel stages 2023-05-06 11:44:42 +01:00
Simon Li
27de930978 More debugging 2023-05-06 10:40:07 +01:00
Simon Li
98e76d52bc Debugging BUILDPLATFORM TARGETPLATFORM 2023-05-06 00:51:53 +01:00
Simon Li
729aac9bd1 Why is BUILDPLATFORM linux/arm64 when buliding arm64 on a gh amd64 runner? 2023-05-06 00:38:05 +01:00
Simon Li
bc85c445ab Attempt to reduce container build time
JupyterHub is pure Python, so can be built in a native platform image and copied into the target platform image
2023-05-06 00:03:32 +01:00
Simon Li
9f708fa10c lodash per method packages are deprecated
https://lodash.com/per-method-packages
2023-05-05 23:36:53 +01:00
Simon Li
d26c7cd6fc Try increasing release container build time to 45 2023-05-05 22:54:20 +01:00
Simon Li
0174083439 regenerate yarn.lock 2023-05-05 21:04:03 +01:00
Simon Li
e6fc2aee4a Update package.json as much as possible without tests failing 2023-05-05 21:04:03 +01:00
Simon Li
47513cfbd0 npx npm-check-updates -u 2023-05-05 21:04:03 +01:00
Simon Li
4e7147a495 Update nodejs from 12 to 18 2023-05-05 21:04:00 +01:00
Min RK
5cfc0db0d5 Merge pull request #4441 from ryanlovett/support-bot-typo 2023-05-04 08:37:24 +02:00
ryanlovett
eb862e2cbb Fix "Thanks" typo. 2023-05-03 17:35:10 -07:00
Min RK
98799e4227 Merge pull request #4432 from huntdatacenter/add-research-institution
add HUNT into research institutions
2023-05-03 14:07:04 +02:00
Min RK
ea6a0e53cc Merge pull request #4440 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-05-02 09:14:20 +02:00
Min RK
f2b42a50c8 Merge pull request #4438 from yuvipanda/no-mo-admin
Remove old admin JS code
2023-05-02 09:13:33 +02:00
pre-commit-ci[bot]
43336f5b07 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-05-02 04:27:03 +00:00
pre-commit-ci[bot]
bf2d948366 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v3.3.1 → v3.3.2](https://github.com/asottile/pyupgrade/compare/v3.3.1...v3.3.2)
- [github.com/PyCQA/autoflake: v2.0.2 → v2.1.1](https://github.com/PyCQA/autoflake/compare/v2.0.2...v2.1.1)
- [github.com/pre-commit/mirrors-prettier: v3.0.0-alpha.6 → v3.0.0-alpha.9-for-vscode](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.0-alpha.6...v3.0.0-alpha.9-for-vscode)
2023-05-02 04:26:36 +00:00
YuviPanda
271fd35bce Remove old admin JS code
We have a new react based admin, and this JS was just loading
and doing nothing.
2023-05-01 11:35:22 -07:00
Min RK
1d70986c25 Merge pull request #4435 from mouse1203/playwright_more
Finish migrating browser tests from selenium to playwright
2023-04-28 12:50:52 +02:00
mouse1203
ec017d1f1d Update test_browser.py
added to test_start_stop_server_on_admin_page waiting to load page
2023-04-27 15:16:29 +02:00
mouse1203
a8c804de5b Finish to migrate tests from selenium to playwright
Removed selenium tests and configuration
Added the rest of playwright tests
2023-04-27 14:43:59 +02:00
Min RK
3578001fab Merge pull request #4431 from mouse1203/playwright_more
Migrate some tests from selenium to playwright
2023-04-27 12:59:53 +02:00
Matúš Košút
b199110276 add HUNT into research institutions 2023-04-26 16:13:13 +02:00
mouse1203
b69bba5a7d Adding new playwright tests and removing a part of Selenium tests
Added Playwright tests which are covered Login, Spawning, Home and Token pages
Removed Selenium cases which are covered Login, Spawning, Home and Token pages
2023-04-25 10:42:05 +02:00
Min RK
efdad701df Merge pull request #4420 from mouse1203/playwright_more 2023-04-24 08:49:13 +02:00
Min RK
8a074b12b5 Merge pull request #4429 from consideRatio/pr/fix-missing-redirects 2023-04-24 08:46:06 +02:00
Erik Sundell
b5e5fe630d docs: fix missing redirects for api to reference/api 2023-04-23 08:02:52 +02:00
mouse1203
5d23bf6da3 Update test.yml
remove stage:
- name: Install playwright module
2023-04-21 15:35:12 +02:00
mouse1203
e5a8939481 Update setup.py
Update setup.py
2023-04-20 14:42:37 +02:00
mouse1203
0eca901c65 Added playwright in setup.py
Added "playwright" in setup.py under test section
2023-04-20 14:37:40 +02:00
mouse1203
4a1964f881 Updated configuration for selenium/playwright
Renamed selenium/playwright to browser in markers and configuration
2023-04-20 14:19:46 +02:00
Min RK
131094b5ff Merge pull request #4426 from minrk/upgrade-note
add upgrade note for 4.0 to changelog
2023-04-20 14:16:04 +02:00
Min RK
4544a98fb9 put upgrade note to note heading
Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2023-04-20 14:11:38 +02:00
Min RK
cbacdecb1e update sharing faq for 2023 2023-04-20 13:52:01 +02:00
Erik Sundell
64d8b2adc9 Merge pull request #4427 from minrk/rtd-internal-links
Fix some public URL links within the docs
2023-04-20 13:48:55 +02:00
Min RK
9c83c15f67 Fix some public URL links within the docs
there shouldn't be any links to jupyterhub.readthedocs.io
2023-04-20 13:36:16 +02:00
Min RK
d2a545a01e add upgrade note for 4.0 to changelog 2023-04-20 12:59:42 +02:00
Min RK
10e7ab96e5 Bump to 4.0.0 2023-04-20 12:18:26 +02:00
Min RK
40f519544f Merge pull request #4424 from minrk/changelog-4f
final changelog for 4.0.0
2023-04-20 12:17:56 +02:00
Min RK
076c14dce6 final changelog for 4.0.0 2023-04-20 11:17:52 +02:00
Erik Sundell
e223ce59e1 Merge pull request #4423 from minrk/diataxis-redirects
add remaining redirects for docs reorg
2023-04-20 10:59:36 +02:00
Min RK
ad833755e1 update comment for rediraffe check conditions 2023-04-20 09:14:57 +02:00
Min RK
142978b4d8 Merge pull request #4417 from manics/server-admin-list-as-table
Server admin: word-wrap lists
2023-04-20 09:11:21 +02:00
Min RK
e3cab48039 github.ref is always branch name on origin in PRs 2023-04-19 16:02:43 +02:00
Min RK
203f4a5855 test PRs against base ref
rather than making assumptions about checkouts and origins
2023-04-19 15:56:09 +02:00
Erik Sundell
cfc27db43d ci: fix failure getting latest tag for make rediraffecheckdiff 2023-04-19 15:48:23 +02:00
Erik Sundell
e2a8557083 ci: don't run make rediraffecheckdiff in forks 2023-04-19 15:41:24 +02:00
Erik Sundell
d5478b1f21 maint: let rediraffecheckdiff compare with origin/main, not main 2023-04-19 15:08:00 +02:00
Erik Sundell
cf19af6f1c ci: provide git history for make rediraffecheckdiff 2023-04-19 14:52:36 +02:00
Min RK
1342f00d8e move redirect line for 4.0 to bottom so rediraffewritediff adds in the right place 2023-04-19 13:40:17 +02:00
Min RK
1e49b4379b set rediraffe auto redirect percentage to 80% 2023-04-19 13:37:17 +02:00
Min RK
a5d563217c check redirects in test-docs
check all for:

- this PR
- latest tag
- longer term (3.0)
2023-04-19 13:27:51 +02:00
Min RK
b1ac3b82dc complete redirects for diataxis reorg
ran rediraffecheckdiff with rediraffe_branch=3.1.1

add a marker indicating that redirects are up-to-date for 4.0
2023-04-19 13:26:04 +02:00
mouse1203
a376f33af1 Update test.yml
Update test.yml
2023-04-17 10:25:26 +02:00
mouse1203
6f8a49569b Update test.yml
Update test.yml - added "if matrix.playwright"
2023-04-17 10:16:34 +02:00
mouse1203
a4c553a5c5 Merge remote-tracking branch 'upstream/main' into playwright_more 2023-04-17 10:07:20 +02:00
Erik Sundell
75ebe40f86 Merge pull request #4419 from manics/disable-dev-traitlets
Disable dev traitlets
2023-04-16 15:33:41 +02:00
Simon Li
69d711929a Disable dev traitlets
JupyterHub CI is currently broken with dev traitlets: https://github.com/jupyterhub/jupyterhub/issues/4418

This temporarily disables it
2023-04-16 14:00:04 +01:00
Simon Li
4c12872dbf Dockerfile uses nodejs 12- undo upgrade of packages in yarn.lock 2023-04-15 23:07:33 +01:00
Simon Li
21cee1be31 Render tabel cells with multiple data items as RowListItem 2023-04-14 23:41:36 +01:00
Simon Li
00c782fd40 Update yarn.lock 2023-04-14 23:40:54 +01:00
Simon Li
b3f9635ecc ReactObjectTableViewer can handle components 2023-04-14 23:29:53 +01:00
Simon Li
8c10fb285e Convert ReactObjectTableViewer to tsx, remove horizontal option 2023-04-14 19:39:20 +01:00
Simon Li
8a3f5d8f2e Copy f29827028f/src/ReactObjectTableViewer.tsx 2023-04-14 19:30:48 +01:00
Simon Li
7b496a5b4a Server admin: lists are displayed as word-wrapped CSV 2023-04-14 18:02:05 +01:00
mouse1203
41445cffb4 Update pytest.ini
Update pytest.ini
Adding "and not playwright"
2023-04-14 16:29:59 +02:00
Simon Li
64e7705053 Server admin: lists are displayed as tables not csv joined 2023-04-14 15:22:51 +01:00
mouse1203
dafd2d67f6 Update test.yml
Update test.yml
2023-04-14 16:09:57 +02:00
mouse1203
823ab58f3a update test.yml
update test.yml
2023-04-14 15:54:23 +02:00
mouse1203
ab7883e5c3 Update test.yml
Update test.yml: added install playwright
2023-04-14 15:45:14 +02:00
mouse1203
8fd1fb3234 added playwright with settings
added one case with settings
2023-04-14 15:22:16 +02:00
Min RK
6502b50576 Merge pull request #4416 from crazytan/patch-1
Remove bracket around link text without address
2023-04-14 07:15:03 +02:00
Jia Tan
861347cce0 Remove bracket around link text without address. 2023-04-13 15:35:11 -07:00
Erik Sundell
43d4b65250 Merge pull request #4409 from consideRatio/pr/dependabot-rename
dependabot: rename to .yaml
2023-04-07 16:00:22 +02:00
Erik Sundell
e53ce19fcc dependabot: rename to .yaml 2023-04-05 10:31:52 +02:00
Erik Sundell
e603ff8274 Merge pull request #4408 from consideRatio/pr/dependabot-syntax-fix
dependabot: fix syntax error of not using quotes for ##:##
2023-04-04 22:37:50 +02:00
Erik Sundell
22b15f0ecf dependabot: fix syntax error of not using quotes for ##:## 2023-04-04 22:36:43 +02:00
Erik Sundell
c48c5bce99 Merge pull request #4403 from consideRatio/pr/dependabot-monthly
dependabot: monthly updates of github actions
2023-04-04 22:35:15 +02:00
Erik Sundell
fa11d7e3c6 Add ci label to dependabot updates of github actions 2023-04-04 22:34:56 +02:00
Erik Sundell
7e3f29d033 Merge pull request #4404 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-04-04 08:47:53 +02:00
pre-commit-ci[bot]
b7827687a8 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/PyCQA/autoflake: v2.0.1 → v2.0.2](https://github.com/PyCQA/autoflake/compare/v2.0.1...v2.0.2)
- [github.com/psf/black: 23.1.0 → 23.3.0](https://github.com/psf/black/compare/23.1.0...23.3.0)
2023-04-04 06:21:53 +00:00
Erik Sundell
0beb4639a3 dependabot: monthly updates of github actions 2023-04-01 11:44:00 +02:00
Simon Li
b010c9501e Merge pull request #4402 from minrk/named-server-trailing-slash
make sure named server URLs include trailing slash
2023-03-30 20:07:55 +01:00
Min RK
295e92270b make sure named server URLs include trailing slash 2023-03-30 12:29:56 +02:00
Min RK
e42066f1c9 Merge pull request #4394 from alekseyolg/patch-1
Reduce size of jupyterhub image
2023-03-30 09:38:55 +02:00
Aleksey Karpov
1d29fcbfb2 Update Dockerfile
The same apt command in the entire file.
2023-03-29 14:46:28 +03:00
Aleksey Karpov
bdbfbb7e32 Update Dockerfile
Silently updating the list of available apt packages.
2023-03-29 14:44:00 +03:00
Aleksey Karpov
42314ed75b Apply suggestions from code review
Co-authored-by: Min RK <benjaminrk@gmail.com>
2023-03-29 14:15:20 +03:00
Aleksey Karpov
d8141692ab Update Dockerfile
Co-authored-by: Min RK <benjaminrk@gmail.com>
2023-03-29 14:12:12 +03: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
Aleksey Karpov
025db2f9f3 Update Dockerfile
removed the installation of apt packages from the cache due to the fact that the tests did not pass.
2023-03-24 15:22:01 +03:00
Aleksey Karpov
3985140377 Update test.yml
Add env DOCKER_BUILDKIT
2023-03-24 15:06:24 +03:00
Aleksey Karpov
6886384ca3 Update Dockerfile
Add mount cache
2023-03-24 14:49:11 +03:00
Erik Sundell
4a7fe8648a Merge pull request #4400 from minrk/intersect-server-scopes
add Spawner.server_token_scopes config
2023-03-23 11:48:52 +01:00
Min RK
7383c0cf60 esnure activity permissions are present in server tokens
with a warning

avoids case where custom server token permissions remove necessary permissions for posting activity updates
2023-03-23 10:58:19 +01:00
Min RK
83186e02a2 Do not give JUPYTERHUB_API_TOKEN access to other user servers
never intended, but limiting to server wasn't possible before

No change, except when one user has multiple servers running simultaneously.
2023-03-23 10:23:53 +01:00
Erik Sundell
c6b4577c0a Merge pull request #4399 from minrk/more-db-doc
add some more detail and examples to database doc
2023-03-22 14:19:59 +01:00
Min RK
73b1922c17 add Spawner.server_token_scopes config
consistent behavior with oauth_client_allowed_scopes,
where the _intersection_ of requested and owner-held permissions is granted,
instead of failing

Enables different users to have different permissions in $JUPTYERHUB_API_TOKEN,
either via callables or via requesting as much as you may want and only granting the subset.

Additionally, the !server filter can now be correctly applied to the server token

default behavior is unchanged
2023-03-22 13:56:58 +01:00
Min RK
1430e02fa8 fix db url for mysqlclient 2023-03-22 13:56:14 +01:00
Min RK
9ef09a288a add some more detail and examples to database doc
include actual configuration samples for postgres/mysql
2023-03-22 11:31:33 +01:00
Min RK
4a093be938 test with mysqlclient
as recommended by sqlalchemy
2023-03-22 10:33:51 +01:00
Simon Li
64a253dbef Merge pull request #4398 from ryanlovett/docs-managed-groups
Fix variable spelling.
2023-03-18 15:42:04 +00:00
ryanlovett
54877025ca Fix variable spelling.
The variable is `manage_groups`, although some method and function names use "managed".
2023-03-17 10:13:52 -07:00
Min RK
7793176b65 Bump to 4.0.0b2 2023-03-15 11:58:54 +01:00
Min RK
bf32599d5d Merge pull request #4396 from minrk/beta-2
Refresh 4.0 changelog
2023-03-15 11:57:46 +01:00
Min RK
01a31c894c CURC removed parallel tutorial 2023-03-15 11:51:44 +01:00
Min RK
1e9cf23302 Refresh 4.0 changelog 2023-03-15 10:21:07 +01:00
Aleksey Karpov
555969141e Update Dockerfile
Add env PYTHONDONTWRITEBYTECODE=1
2023-03-15 12:16:00 +03:00
Aleksey Karpov
a938982bdc Update Dockerfile
Divided the assembly image into parts
2023-03-15 12:10:28 +03:00
Min RK
17b54fee6a Merge pull request #4395 from jupyterhub/dependabot/npm_and_yarn/jsx/webpack-5.76.0
Bump webpack from 5.74.0 to 5.76.0 in /jsx
2023-03-15 09:26:08 +01:00
Aleksey Karpov
60a153718d Update Dockerfile
Add python-is-python3 
https://github.com/jupyterhub/jupyterhub/pull/4199
2023-03-15 08:20:46 +03:00
dependabot[bot]
9e1e382c37 Bump webpack from 5.74.0 to 5.76.0 in /jsx
Bumps [webpack](https://github.com/webpack/webpack) from 5.74.0 to 5.76.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.74.0...v5.76.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-15 04:12:11 +00:00
Aleksey Karpov
d72a96ec17 Update Dockerfile
Reduced the number of layers, optimized the assembly, reduced the size of the final image, removed the logs, removed unnecessary commands.
2023-03-14 21:43:48 +03:00
Min RK
5f845e78f1 Merge pull request #4393 from mouse1203/more_selenium
Selenium: updating test_oauth_page
2023-03-14 13:53:44 +01:00
mouse1203
0d7e608a64 Rewrite using parse_qs
Using parse_qs and urlparse instead of unquote for assertions
2023-03-14 12:10:53 +01:00
mouse1203
15c5f152f8 updating the assertion for client_id
updating the assertion for client_id: urllib.parse instead  of replace
2023-03-13 19:58:17 +01:00
mouse1203
6d13893f16 Changing in test_oauth_page
rewrote rows with assertions for client_id and redirect_url
2023-03-13 14:52:34 +01:00
Min RK
7e35de2577 Merge pull request #4390 from ryanlovett/ryanlovett-tutorial-collab-1
Add emphasis about role loading and hub restarts.
2023-03-10 15:22:15 +01:00
Erik Sundell
ec78503d1e Merge pull request #4392 from minrk/suppress-sqla-warning
avoid warning on engine_connect listener
2023-03-09 10:53:11 +01:00
Min RK
7d0bc1a112 avoid warning on engine_connect listener 2023-03-09 09:16:15 +01:00
Simon Li
98e4531b44 Merge pull request #4386 from minrk/get_users_link
Re-enable links to REST API
2023-03-08 21:09:54 +00:00
Ryan Lovett
bb92058fbf Add emphasis about role loading and hub restarts.
It may not be obvious that the load_roles code acts on existing groups, and one must have the hub re-run it to load_roles for new groups.
2023-03-08 11:12:46 -08:00
Min RK
a5c59d6550 Re-enable links to REST API
- fix path to oauth spec
- enable attrs_inline for external link handling to internal targets
2023-03-08 07:51:03 +01:00
Min RK
f14be3df65 Merge pull request #4387 from consideRatio/pr/fix-template-inclusion-in-wheel
fix inclusion of singleuser/templates/page.html in wheel
2023-03-07 16:20:31 +01:00
Erik Sundell
3f7a32c990 Merge pull request #4388 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-03-07 11:31:57 +01:00
pre-commit-ci[bot]
a8d8fc02e7 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pre-commit/mirrors-prettier: v3.0.0-alpha.4 → v3.0.0-alpha.6](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.0-alpha.4...v3.0.0-alpha.6)
2023-03-07 03:44:16 +00:00
Erik Sundell
0713fa209e fix inclusion of singleuser/templates/page.html in wheel 2023-03-06 22:32:17 +01:00
Simon Li
850f430ad6 Merge pull request #4383 from minrk/exponential-max-wait
exponential_backoff: preserve jitter when max_wait is reached
2023-03-02 17:55:58 +00:00
Min RK
4026ed87e8 exponential_backoff: preserve jitter when max_wait is reached 2023-03-02 13:57:13 +01:00
Erik Sundell
f57d196e33 Merge pull request #4379 from minrk/unpin-singleuser
remove pin from singleuser
2023-03-01 14:16:12 +01:00
Min RK
ca9dc3a179 remove pin from singleuser
mysterious upstream image problem has been fixed just as mysteriously
2023-03-01 13:38:16 +01:00
Min RK
a348ba6536 Bump to 4.0.0b1 2023-03-01 11:09:39 +01:00
Min RK
c9e194f187 Merge pull request #4357 from minrk/singleuser-doc
add singleuser explanation doc
2023-03-01 11:06:30 +01:00
Min RK
5c6825f298 myst 0.19 changed intersphinx link syntax 2023-03-01 11:02:33 +01:00
Min RK
6bd0bb4b4a feedback from review in singleuser doc 2023-03-01 10:10:30 +01:00
Min RK
9422d2778f Merge pull request #4373 from minrk/collaboration-user-tutorial
add collaboration accounts tutorial
2023-03-01 09:46:29 +01:00
Min RK
ca760fc0df add singleuser explanation doc 2023-02-28 16:21:49 +01:00
Min RK
901904ecb8 Merge pull request #4375 from minrk/changelog-4
changelog for 4.0 beta
2023-02-28 16:15:38 +01:00
Min RK
33e173766f changelog: move breaking changes to the top 2023-02-28 15:54:49 +01:00
Min RK
6df40cd94b add changelog redirect 2023-02-28 15:53:52 +01:00
Min RK
6cc6be6c1c changelog for 4.0 beta 2023-02-28 15:02:55 +01:00
Min RK
44c7fe0fa6 Merge pull request #4377 from alwasega/updates
reduce nested hierarchy in docs organization
2023-02-28 15:00:24 +01:00
pre-commit-ci[bot]
533e97eaa9 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-02-28 13:33:00 +00:00
alwasega
e4dece9f24 Added redirect and modified api reference section 2023-02-28 16:34:52 +03:00
Min RK
08f9396017 add rtc screenshots 2023-02-28 11:47:50 +01:00
Min RK
c6598c797b Add collaboration-users example and tutorial 2023-02-28 11:35:03 +01:00
Min RK
6378592db9 Merge pull request #4363 from minrk/jupyterhub-sphinx-theme
JupyterHub sphinx theme
2023-02-28 11:01:55 +01:00
pre-commit-ci[bot]
fd598a0b97 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-02-28 08:58:18 +00:00
alwasega
bc3ef4403f Resolved items as guided by @minrk comments 2023-02-28 11:58:45 +03:00
Min RK
786196527b Merge pull request #4374 from 3coins/patch-1
Getting started link broken
2023-02-27 10:29:22 +01:00
Piyush Jain
93c488f840 Corrected Getting Started Link
Current getting started link in README is broken.
2023-02-24 16:15:42 -08:00
Min RK
23516e93f9 Merge pull request #4365 from minrk/admin-panel-button-condition
admin panel: fix condition for start/stop buttons on user servers
2023-02-24 15:59:29 +01:00
Min RK
112a79d7c6 try to simplify admin start/stop test
remove unused parameterization, excess variables
2023-02-24 15:32:50 +01:00
Sarah Gibson
ce7085b720 Merge pull request #4368 from alwasega/index 2023-02-22 14:06:18 +00:00
alwasega
e31e4f8cfc Incorporated heading suggestion 2023-02-22 15:34:55 +03:00
pre-commit-ci[bot]
177c6ea0ee [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-02-22 11:00:50 +00:00
alwasega
b0dbb055f4 Updated the top-level index file 2023-02-22 14:01:24 +03:00
Sarah Gibson
f245e933ee Merge pull request #4355 from alwasega/contributing 2023-02-21 13:00:11 +00:00
Min RK
e0cd07a9bb wait for admin page to load after clicking access-server button 2023-02-21 12:31:04 +01:00
Min RK
46052387bc admin panel: fix condition for start/stop buttons on user servers
`.ready` is the right switch for the links, not `.started` which can be defined even after they stop
2023-02-21 09:07:22 +01:00
Min RK
0b5a992605 update nav links for new theme 2023-02-20 15:08:47 +01:00
Min RK
3e9cd8acf8 use jupyterhub sphinx theme 2023-02-20 15:06:41 +01:00
Simon Li
bed466018c Merge pull request #4358 from pnasrat/remove-pdf-link
Remove PDF links from README.md
2023-02-17 17:39:39 +00:00
Pris Nasrat
6de12313e1 Remove PDF links from README.md
Fixes #4320
2023-02-17 08:25:46 -05:00
alwasega
ecc2108710 Reverted to previous toctree 2023-02-17 08:25:03 +03:00
Allan Wasega
b64ff64cc0 Merge branch 'jupyterhub:main' into contributing 2023-02-16 21:15:10 -08:00
Erik Sundell
63dcebadbe Merge pull request #4354 from minrk/server-extension-default
Make singleuser server-extension default
2023-02-16 19:28:13 +01:00
Simon Li
015dc03986 Merge pull request #4356 from minrk/cookie-error
avoid logging error when browsers send invalid cookies
2023-02-16 15:06:22 +00:00
Min RK
f1075b5a21 avoid error when browsers send invalid cookies 2023-02-16 15:07:35 +01:00
Min RK
403b5f1ffe subset tests for singleuser cases
saves some time for some matrix entries
2023-02-16 14:45:10 +01:00
Min RK
e9fd6e1c32 make sure ssl/subdomain are covered both for both mixin and serverextension 2023-02-16 14:45:10 +01:00
Min RK
18adfbbf30 add internal-ssl config for singleuser extension 2023-02-16 14:16:46 +01:00
Min RK
4c1df3f3fe fix hub_host links with subdomains
- fixes missing hub_host in singleuser mixins
- fixes test to match extension behavior, which is correct
2023-02-16 14:16:46 +01:00
Min RK
0ea813e6ad enable allow_remote access in singleuser extension
otherwise Host header validation prevents remote access
2023-02-16 14:16:45 +01:00
Min RK
09a595851e add test matrix entry for jupyter-server 1.x 2023-02-16 14:16:45 +01:00
Min RK
6ad6cf01c5 default to auth extensions with Jupyter Server 2 2023-02-16 14:16:45 +01:00
pre-commit-ci[bot]
bdfde0a256 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-02-16 10:12:40 +00:00
alwasega
ee2e830e03 Updates to the documentation Contribution section 2023-02-16 13:11:52 +03:00
Erik Sundell
c9d52ce6ff Merge pull request #3888 from minrk/server-extension
singleuser auth as server extension
2023-02-15 20:46:33 +01:00
Min RK
3b04f0872b extension: use jupyterhub log_request function
matches subclass log behavior
2023-02-15 11:30:18 +01:00
Min RK
61ac37500b Merge pull request #4341 from Sheila-nk/asyncio-doc
Document use of pytest-asyncio in JupyterHub test suite
2023-02-15 10:51:24 +01:00
Min RK
a43757bc1a fix hub api url in extension check_hub_version 2023-02-14 16:56:08 +01:00
Min RK
5f9283c7c0 Address review in singleuser extension
- more thorough docstrings, comments
- add missing `check_hub_version` call
- remove duplicate HubAuth instance on authorizer
2023-02-14 16:04:34 +01:00
Yuvi Panda
5d9e8b47c2 Merge pull request #4352 from shaneknapp/fix-spawn-timer-4351
add a few more buckets for server_spawn_duration_seconds
2023-02-13 12:51:48 -08:00
shane knapp
475548a3e2 add a few more buckets 2023-02-13 12:23:59 -08:00
Sheila Kahwai
f21743b751 add pytest-asyncio info under test organization 2023-02-13 10:48:37 +03:00
Sheila
b2a9a6d1c0 Merge branch 'jupyterhub:main' into asyncio-doc 2023-02-13 10:35:20 +03:00
Min RK
c93832cb33 Merge pull request #4343 from alwasega/references
Restructured references section of the docs
2023-02-10 13:42:26 +01:00
Min RK
46508a31d3 Merge pull request #4348 from minrk/build-push-temp
temporary fix: pin base-notebook tag
2023-02-10 12:00:51 +01:00
pre-commit-ci[bot]
b171608e26 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-02-10 10:05:54 +00:00
Min RK
d65064af74 set timeout on docker workflow
avoids six hour runaway jobs
2023-02-10 11:04:29 +01:00
Sheila Kahwai
493d856872 add pytest-asycnio doc to toctree 2023-02-10 13:01:21 +03:00
Sheila Kahwai
2adb341769 add pytest-asyncio document 2023-02-10 12:09:08 +03:00
pre-commit-ci[bot]
ac9682a4a7 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-02-10 09:02:12 +00:00
Sheila
057d32c166 Merge branch 'jupyterhub:main' into asyncio-doc 2023-02-10 12:01:42 +03:00
Min RK
037c3bc184 debug: try pinning singleuser base image 2023-02-10 08:53:03 +01:00
Min RK
9a49d06b21 consolidate disable_user_config implementation
found some fixes required to run on ServerApp to affect extensions,
which were not affected before
2023-02-10 08:21:02 +01:00
pre-commit-ci[bot]
dff1b0aca6 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-02-09 10:10:40 +00:00
alwasega
9535fa3af1 Re-pushed files after merging main into references 2023-02-09 13:12:42 +03:00
pre-commit-ci[bot]
fed4cd5e40 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-02-09 09:49:53 +00:00
Allan Wasega
587e5ebfff Merge branch 'jupyterhub:main' into references 2023-02-09 12:49:03 +03:00
alwasega
46be2c21e0 Pulled upstream changes and re-pushed files 2023-02-09 12:47:12 +03:00
alwasega
1837c33a56 Restructured references section of the docs 2023-02-09 12:25:07 +03:00
Min RK
40164e685f pre-commit; updated black 2023-02-08 16:40:41 +01:00
Min RK
3ad81f3bce sync with main 2023-02-08 16:39:59 +01:00
Min RK
155c8f664a singleuser: add some clarifying comments 2023-02-08 16:13:14 +01:00
Min RK
969084df98 Apply suggestions from code review
Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2023-02-08 16:12:49 +01:00
Min RK
39d4d38b8b Merge pull request #4319 from minrk/require-sqla-14
require sqlalchemy 1.4
2023-02-08 15:31:14 +01:00
Sheila Kahwai
759c4c5ebc move information to tests.md 2023-02-08 17:24:15 +03:00
Min RK
2bc452a617 Merge pull request #4328 from mouse1203/more_selenium
Selenium: adding new cases that covered Admin UI page
2023-02-08 13:38:36 +01:00
Sarah Gibson
8ef43941e8 Merge pull request #4340 from alwasega/explanation 2023-02-08 10:23:51 +00:00
pre-commit-ci[bot]
defde67746 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-02-08 08:22:43 +00:00
alwasega
3abce3581c Added signpost comments in explanation/index and rbac/index files 2023-02-08 11:24:46 +03:00
pre-commit-ci[bot]
ec9e9c3b04 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-02-07 12:56:24 +00:00
alwasega
c766f5866e incorporated changes after review 2023-02-07 15:58:05 +03:00
Erik Sundell
27c44e44c3 Merge pull request #4342 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-02-07 08:59:56 +01:00
mouse1203
af1dd54470 selenium:updating cases are related to Admin UI
According to the review updated cases covered the Admin UI:
- rename the function,
- add docstring,
- add parametrization,
- use the fixture admin_user instead of the function
2023-02-07 08:55:11 +01:00
pre-commit-ci[bot]
be07c7ef31 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-02-07 04:40:23 +00:00
pre-commit-ci[bot]
637cafcf6e [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/PyCQA/autoflake: v2.0.0 → v2.0.1](https://github.com/PyCQA/autoflake/compare/v2.0.0...v2.0.1)
- [github.com/psf/black: 22.12.0 → 23.1.0](https://github.com/psf/black/compare/22.12.0...23.1.0)
2023-02-07 04:37:54 +00:00
Sheila Kahwai
977c5b7f0b add README on use of pytest-asyncio 2023-02-06 17:11:44 +03:00
pre-commit-ci[bot]
a084d23107 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-02-06 08:32:25 +00:00
alwasega
c4d5762608 Moved Explanation/Background files 2023-02-06 11:31:37 +03:00
Erik Sundell
270b619921 Merge pull request #4339 from jupyterhub/dependabot/github_actions/docker/build-push-action-4.0.0
build(deps): bump docker/build-push-action from 3.3.0 to 4.0.0
2023-02-06 06:09:47 +01:00
dependabot[bot]
f2ac996bc6 build(deps): bump docker/build-push-action from 3.3.0 to 4.0.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3.3.0 to 4.0.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](37abcedcc1...3b5e8027fc)

---
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-02-06 05:06:42 +00:00
Sarah Gibson
8cb1e347da Merge pull request #4338 from alwasega/tutorials_2 2023-02-03 14:58:19 +00:00
alwasega
d1fba40f9a Added suggestion in tutorials/index.md 2023-02-03 16:54:24 +03:00
pre-commit-ci[bot]
195ec4c359 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-02-03 13:02:03 +00:00
alwasega
f857b17022 Moved last set of Tutorials 2023-02-03 15:57:35 +03:00
Min RK
58dccdb59b jupyterhub-singleuser as a Jupyter Server 2.0 extension
mostly a copy (fork) of singleuser app
using public APIs instead of lots of patching.

opt-in via `JUPYTERHUB_SINGLEUSER_EXTENSION=1`

related changes:

- stop running a test single-user server in a thread. It's complicated and fragile.
  Instead, run it normally, and get the info we need from a custom handler registered via an extension
  via the `full_spawn` fixture
2023-02-02 16:14:06 +01:00
Erik Sundell
63f164ca53 Merge pull request #4334 from minrk/fix-ref
fix a couple ref links in changelog
2023-02-02 11:30:03 +01:00
Min RK
39f1faa1df fix a couple ref links in changelog
maybe mangled in an rst2md migration
2023-02-02 11:11:35 +01:00
Georgiana
9de3757caa Merge pull request #4332 from minrk/simplify-async-app
simplify some async fixtures
2023-02-02 11:20:17 +02:00
Sarah Gibson
75e49ebdd3 Merge pull request #4331 from alwasega/rediraffe 2023-02-01 12:55:55 +00:00
alwasega
150b22aab9 fixed comments syntax 2023-02-01 14:15:24 +03:00
alwasega
842712171e Added comments in redirects.text file 2023-02-01 14:06:15 +03:00
alwasega
ce1264cd18 fixed typos in conf.py 2023-01-31 21:06:56 +03:00
pre-commit-ci[bot]
2755966adf [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-01-31 14:00:04 +00:00
alwasega
bea35a60df Added missed redirects manually and updated comments on conf.py 2023-01-31 17:01:38 +03:00
Min RK
bf560707b6 Merge pull request #4326 from bl-aire/a11y
Improve contrast on muted text
2023-01-31 14:42:59 +01:00
Ogoh Blessing
194ff5ee57 Increase contrast of muted text 2023-01-31 14:42:23 +01:00
mouse1203
bc751b0740 Selenium: add wait element into open_admin_page
adding a waiting for loading of element
2023-01-31 13:18:47 +01:00
Min RK
44cb302de0 simplify some async fixtures
use async fixtures for simpler event-loop integration

several of these fixtures were written before fixtures themselves could be async,
but now they can, which means we can use async/await instead of run_sync.
2023-01-31 11:17:40 +01:00
pre-commit-ci[bot]
da5183a6f8 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-01-31 08:01:26 +00:00
alwasega
dd0b49c8f4 Added rediraffe using auto redirect builder 2023-01-31 10:58:21 +03:00
Min RK
d5bc135d9b fix xsrfToken in react
caught now that we have browser tests
2023-01-30 15:42:07 +01:00
mouse1203
9884fa7127 selenium: update spawn_pending_server_ready
adding await wait_for_ready(browser)
replacing await in_thread(browser.get, home_page)

adding waiting start all/stop all buttons in case start_stop_all_servers_on_admin_page
2023-01-30 14:50:57 +01:00
Erik Sundell
e85b91cd9b Merge pull request #4322 from jupyterhub/dependabot/github_actions/docker/setup-buildx-action-2.3.0
build(deps): bump docker/setup-buildx-action from 2.2.1 to 2.3.0 (now v2)
2023-01-30 14:48:08 +01:00
Erik Sundell
1666342fc3 Merge pull request #4327 from minrk/gitignore-backups
also ignore sqlite backups
2023-01-30 14:17:53 +01:00
Min RK
2a13929e63 also ignore sqlite backups
not just the rename (in case of `jupyterhub upgrade-db`)
2023-01-30 14:11:01 +01:00
mouse1203
11cd8674c2 selenium:add cases that covered Admin page
Adding cases: search, paging, start all/stop all, start/stop user´s server
2023-01-30 12:54:54 +01:00
Erik Sundell
df3be4c770 Merge pull request #4325 from minrk/pcau
pre-commit: bump isort
2023-01-30 10:57:27 +01:00
Min RK
ceb1154e61 pre-commit: bump isort 2023-01-30 10:54:22 +01:00
Min RK
56e603bf0f Merge pull request #4324 from consideRatio/pr/remove-readme-notice
Remove no longer relevant notice in readme
2023-01-30 10:53:21 +01:00
Erik Sundell
7366fddb0c ci: reference actions with v2 over git commit hash 2023-01-30 08:09:49 +01:00
Erik Sundell
124ae60133 Remove no longer relevant notice in readme 2023-01-30 07:48:18 +01:00
dependabot[bot]
d2231cb683 build(deps): bump docker/setup-buildx-action from 2.2.1 to 2.3.0
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.2.1 to 2.3.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](8c0edbc76e...5e716dcfd6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-30 05:07:12 +00:00
Min RK
51b6376634 require sqlalchemy 1.4
removes some workarounds needed for sqlalchemy 1.1 + 2.0 support

1.4 backports most 2.0 behavior, keeping it off-by-default for an easier opt-in transition

opt-in with `session.future = True` flag
2023-01-27 14:15:02 +01:00
Sarah Gibson
95cf06a46e Merge pull request #4314 from alwasega/howto_2 2023-01-27 11:58:16 +00:00
Min RK
f658113b8c Merge pull request #4316 from minrk/cl-311
changelog for 3.1.1
2023-01-27 12:48:58 +01:00
Min RK
6911e2b052 changelog for 3.1.1 2023-01-27 11:56:04 +01:00
Min RK
3cf2ef7757 Merge pull request #4302 from minrk/sqla2
sqlalchemy 2 compatibility
2023-01-27 11:00:29 +01:00
Min RK
2db7c47fbf sqlalchemy 2 compatibility
- avoid backref warnings by adding objects to session explicitly before creating any relationships
- remove unnecessary `[]` around scalar query
- use `text()` wrapper on connection.execute
- engine.execute is removed
- update import of declarative_base
- ensure RemovedIn20Warning is available for warnings filters on sqlalchemy < 1.4 (needs editable install to avoid pytest path mismatch)
- explicitly relay password in engine.url to alembic
2023-01-27 10:42:03 +01:00
alwasega
680309e35d fixed MyST references 2023-01-27 11:58:03 +03:00
pre-commit-ci[bot]
62ceb9cc3d [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-01-27 08:43:30 +00:00
alwasega
f825973588 Moved second half of HowTo documentation 2023-01-27 11:32:41 +03:00
Sarah Gibson
0a84738fe9 Merge pull request #4311 from alwasega/howto_1 2023-01-26 18:02:00 +00:00
Min RK
a24608d445 Merge pull request #4309 from TaofeeqatDev/Jupyterhub1
Update authenticators-users-basics.md
2023-01-26 11:34:26 +01:00
Taofeeq Taofeeqat Olawumi
7f818a04ae Update authenticators-users-basics.md 2023-01-26 10:14:12 +01:00
alwasega
6340b1564e fixed outstanding MyST reference error in api/index.md file 2023-01-26 00:33:34 +03:00
alwasega
d2814c9c11 renamed MyST references in API docs to avoid duplication error 2023-01-26 00:29:23 +03:00
alwasega
49169dab2f fixed broken MyST references 2023-01-26 00:05:17 +03:00
pre-commit-ci[bot]
3f2d55474c [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-01-25 20:54:03 +00:00
alwasega
ee43ebeab5 Moved first half of HowTo documentation 2023-01-25 23:51:36 +03:00
Erik Sundell
e255ada169 Merge pull request #4032 from minrk/rm-referer-check
Use XSRF tokens for cross-site checks
2023-01-25 16:21:31 +01:00
Min RK
a336a30cf8 remove outdated xsrf todo 2023-01-25 15:47:13 +01:00
Taofeeq Taofeeqat Olawumi
7b39790a86 Update authenticators-users-basics.md
1. Fix some typo errors
2. Fix some grammar issues.
2023-01-24 16:02:03 +01:00
Sarah Gibson
38ba275367 Merge pull request #4307 from alwasega/faqs 2023-01-24 13:17:12 +00:00
alwasega
c65779db56 fixed broken MyST reference 2023-01-24 12:53:39 +03:00
alwasega
d8a5034b16 transferred docs to FAQ folder 2023-01-24 12:13:18 +03:00
Sarah Gibson
cb0073e9b8 Merge pull request #4305 from alwasega/tutorials 2023-01-23 16:01:26 +00:00
alwasega
dd95201b90 corrected MyST anchors location and minor error 2023-01-23 18:19:49 +03:00
alwasega
f88695084b fixed more than one myst target found error 2023-01-23 16:24:49 +03:00
pre-commit-ci[bot]
61ad3812ce [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-01-23 12:59:56 +00:00
alwasega
7c8800c724 added myst references in files 2023-01-23 16:01:13 +03:00
alwasega
b691480e5f Added docs to the folder 2023-01-20 13:36:16 +03:00
Sarah Gibson
36f74689c4 Merge pull request #4301 from alwasega/create-folders 2023-01-19 14:54:31 +00:00
Min RK
043390afe1 Merge pull request #4304 from GeorgianaElena/fix-oauthenticator-links
Fix the oauthenticator docs api links
2023-01-19 15:34:31 +01:00
Georgiana Dolocan
c5cceb789a Fix the oauthenticator docs api links 2023-01-19 16:02:58 +02:00
alwasega
f434b7ea33 Edited source/index.md file 2023-01-19 14:04:52 +03:00
Erik Sundell
8b0258c4f5 Merge pull request #4303 from minrk/install-events
make sure event-schemas are installed
2023-01-19 10:16:46 +01:00
Min RK
5b5069af99 make sure event-schemas are installed 2023-01-19 09:59:53 +01:00
pre-commit-ci[bot]
08c14a03d7 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-01-18 14:15:09 +00:00
alwasega
70196a4721 Edited files and folders per comments 2023-01-18 17:16:25 +03:00
pre-commit-ci[bot]
1114736ae7 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-01-17 21:21:35 +00:00
alwasega
0873902a18 Created folders to house the restructured documentation 2023-01-18 00:10:36 +03:00
Erik Sundell
a245708eaf Merge pull request #4294 from minrk/form-color-scope
Move some common form CSS to page.less
2023-01-17 09:47:31 +01:00
Min RK
21ad59dc3c Merge pull request #4292 from minrk/doc-db
expand database docs
2023-01-16 10:56:35 +01:00
Min RK
c7f8895a95 Merge pull request #4300 from jupyterhub/dependabot/github_actions/docker/build-push-action-3.3.0
build(deps): bump docker/build-push-action from 3.2.0 to 3.3.0
2023-01-16 10:49:22 +01:00
Min RK
abe1136cba Use XSRF tokens for cross-site protections
Removes all Referer checks, which have proven unreliable and have never been particularly strong

We can use XSRF on paths for more robust inter-path protections.

- `_xsrf` is added for forms via hidden input
- xsrf check is additionally applied to GET requests on API endpoints
2023-01-16 09:35:33 +01:00
dependabot[bot]
d0f719b0e1 build(deps): bump docker/build-push-action from 3.2.0 to 3.3.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](c56af95754...37abcedcc1)

---
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-01-16 05:04:20 +00:00
Simon Li
c565835773 Merge pull request #4299 from minrk/group_property_feature
test and fix deprecated load_groups list
2023-01-13 14:58:46 +00:00
Min RK
663857a15f Merge pull request #4298 from mouse1203/more_selenium
Selenium testing: adding new case covered the authorisation page
2023-01-13 15:43:48 +01:00
Min RK
728b4e3dc7 test and fix deprecated load_groups list 2023-01-13 14:22:56 +01:00
mouse1203
6da46f36c9 Apply suggestions from code review
Co-authored-by: Min RK <benjaminrk@gmail.com>
2023-01-13 13:33:42 +01:00
Min RK
126f8d0115 Merge pull request #4297 from minrk/linkcheck-skip
docs: fix linkcheck in gallery
2023-01-13 11:37:53 +01:00
mouse1203
11f575568f working on test_oauth_page
updated the locator for "Authorize" button
reused functions from scopes.py
changed the part of comparing scopes on the service page
2023-01-13 11:10:05 +01:00
Min RK
57a22719a5 docs: fix linkcheck in gallery
- jupyter.chameleoncloud SSL is failing (I can reproduce with conda curl, but not /usr/bin/curl, so seems to be a CA issue)
- remove dead arnesund tag link (keep single article link)
2023-01-13 10:49:21 +01:00
Min RK
995264ffef Merge pull request #4288 from stevejpurves/docs-name-template
added note on `Spawner.name_template` setting
2023-01-12 11:45:43 +01:00
Steve Purves
f364c61d64 a more general statement on named server config 2023-01-11 16:59:37 +00:00
Erik Sundell
93926a564a Merge pull request #4295 from minrk/docstring-format
Fix formatting of load_groups help string
2023-01-11 16:49:44 +01:00
Min RK
5b743a147f Fix formatting of load_groups help string 2023-01-11 16:43:08 +01:00
Min RK
6abcbe8e37 Merge pull request #3651 from vladfreeze/group_property_feature
Dynamic table for changing customizable properties of groups
2023-01-11 16:34:45 +01:00
mouse1203
f4d8ad00a3 working on test_oauth_page
working on test_oauth_page case: added a check of scopes on the service page
2023-01-11 15:00:56 +01:00
Min RK
ad9b0095cb Move some common form CSS to page.less
so it affects other forms, such as the spawner form

results in more consistent style
2023-01-11 14:13:05 +01:00
Min RK
3c0467ebcf add group properties to rest api spec 2023-01-11 12:10:40 +01:00
Min RK
dfec64ab18 test group properties endpoint 2023-01-11 12:00:45 +01:00
Min RK
f65f429a4a avoid link myst can't seem to understand 2023-01-11 11:46:36 +01:00
Vlad Vifor
db9226d871 Added deprecation warning to jupyterhub/app.py
Co-authored-by: Min RK <benjaminrk@gmail.com>
2023-01-11 11:30:50 +01:00
pre-commit-ci[bot]
ced81d1a2e [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-01-11 09:42:51 +00:00
vpopescu
fec0cb1260 Fixed removals caused by merge, documentation 2023-01-11 10:42:03 +01:00
Min RK
52b8bc135f Apply suggestions from code review
Co-authored-by: Georgiana <georgiana.dolocan@gmail.com>
Co-authored-by: ajpower <122097973+ajpower@users.noreply.github.com>
2023-01-11 10:10:07 +01:00
Min RK
c7402676a8 expand database docs
add notes on what's in the database,
why there's a database,
and how it relates to performance
2023-01-09 15:40:00 +01:00
Min RK
336d7cfcfa Merge pull request #4290 from bl-aire/a11y
Fix skipped heading level across pages
2023-01-09 11:45:35 +01:00
Min RK
bf029d3c31 Merge pull request #4291 from jupyterhub/dependabot/npm_and_yarn/jsx/json5-2.2.3
build(deps): bump json5 from 2.2.1 to 2.2.3 in /jsx
2023-01-09 11:45:21 +01:00
Ogoh Blessing
ffb41b0164 Remove aria-hidden attribute 2023-01-09 10:26:49 +00:00
dependabot[bot]
86dcb51417 build(deps): bump json5 from 2.2.1 to 2.2.3 in /jsx
Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.1...v2.2.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-09 02:24:16 +00:00
Ogoh Blessing
8613d43fe4 Fix skipped heading level 2023-01-08 00:05:02 +00:00
Ogoh Blessing
6b7061173f Add th cells to tables 2023-01-08 00:01:29 +00:00
pre-commit-ci[bot]
80368aad24 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-01-04 21:19:02 +00:00
Steve Purves
b17b073599 added note on Spawner.name_template setting 2023-01-04 21:14:16 +00:00
Vlad Vifor
e84359cc23 Merge branch 'jupyterhub:main' into group_property_feature 2023-01-03 16:00:45 +01:00
Erik Sundell
e4f72c9eeb Merge pull request #4286 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-01-03 15:05:21 +01:00
pre-commit-ci[bot]
7a94443a06 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pycqa/isort: 5.11.1 → 5.11.4](https://github.com/pycqa/isort/compare/5.11.1...5.11.4)
2023-01-03 01:50:49 +00:00
mouse1203
ddf1ff03f5 Adding the test case for the oauth confirmation page
added draft version of the test case for the oauth confirmation page
2023-01-02 13:10:22 +01:00
Min RK
49c518940b Merge pull request #4274 from bl-aire/main
Fix reoccurring accessibility issues in JupyterHub's pages
2022-12-21 15:36:44 +01:00
Ogoh Blessing
bf0927685f accessibility improvements across pages
- Add html language attribute

- Rename logo's alt text so it clearly states the image's purpose

- Fix missing first level heading for Login, Home and Token page

- Fix missing header level 1 of Login page

- Fix low contrast issue of navbar

Co-authored-by: Min RK <benjaminrk@gmail.com>
2022-12-21 15:04:25 +01:00
Erik Sundell
30f5d9c8ce Merge pull request #4258 from minrk/rm-unused-cookie
Remove remnants of unused jupyterhub-services cookie
2022-12-21 12:52:01 +01:00
Min RK
e057e8696b Merge pull request #4278 from mouse1203/more_selenium
Refactored selenium tests for improved readability
2022-12-21 12:04:27 +01:00
mouse1203
e31b69863f Changed locator under token_table_body_as_dict function
Changed locator under token_table_body_as_dict function
2022-12-21 10:41:27 +01:00
mouse1203
bf85411f23 table-as-dict function, locators, menu-bar
Added table-as-dict function instead of few functions for working with the tokens table
replaced static value from locators.py by locator itself in test_browser
simplified menu-bar case
2022-12-20 09:28:00 +01:00
Erik Sundell
5977e7f092 Merge pull request #4245 from manics/docs-fix-spawner-env
doc: fix formatting of spawner env-vars
2022-12-15 16:35:57 +01:00
Erik Sundell
70e53f31d0 Merge pull request #4268 from minrk/pre-commit-monthly
pre-commit: autoupdate monthly
2022-12-15 16:33:39 +01:00
Simon Li
afe50ef96e Merge pull request #4269 from minrk/document-jupyter-env
Document JUPYTER_PREFER_ENV_PATH=0 for shared user environments
2022-12-15 14:25:22 +00:00
Simon Li
e580b907c3 spawners.md: format env vars as code (avoids prettier bug) 2022-12-15 14:05:24 +00:00
Simon Li
3491ad6816 Merge pull request #4273 from minrk/rm-pipes
remove deprecated import of pipes.quote
2022-12-15 13:59:15 +00:00
Min RK
d300eb2519 remove deprecated import of pipes.quote
This function has been shlex.quote since 3.3, and pipes is set to be deprecated.
2022-12-15 12:12:48 +01:00
Min RK
7f7463ac3c Merge pull request #4271 from minrk/testing-localhost
only run testing config on localhost
2022-12-14 19:45:29 +01:00
Erik Sundell
b3f121e3e4 Merge pull request #4259 from minrk/toctree-max-depth
set max depth on api/index toctree
2022-12-14 16:09:49 +01:00
Min RK
7358b4d4ea only run testing config on localhost
avoids listening on the network with dummy auth
2022-12-14 13:45:10 +01:00
Min RK
15a7e9406b Document JUPYTER_PREFER_ENV_PATH=0 for shared user environments 2022-12-14 13:09:12 +01:00
Min RK
d6965cca81 Merge pull request #4207 from mouse1203/more_selenium
more selenium test cases
2022-12-13 14:57:36 +01:00
Min RK
78e36db3e3 xfail progress test
unreliable on CI, need to deal with race conditions
2022-12-13 14:07:04 +01:00
Min RK
25a4ef36db finish spawn_pending test
simplify conditions to check, fix next url, add missing ready signal to spawn_pending.html

need slow_spawn to be even slower
2022-12-13 14:02:10 +01:00
Min RK
1a8d4c0e96 pre-commit: autoupdate monthly 2022-12-13 09:29:53 +01:00
Min RK
0627fe0bb3 Merge pull request #4267 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-12-13 09:28:25 +01:00
pre-commit-ci[bot]
2b0533fd8d [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v3.3.0 → v3.3.1](https://github.com/asottile/pyupgrade/compare/v3.3.0...v3.3.1)
- [github.com/pycqa/isort: 5.10.1 → 5.11.1](https://github.com/pycqa/isort/compare/5.10.1...5.11.1)
- [github.com/psf/black: 22.10.0 → 22.12.0](https://github.com/psf/black/compare/22.10.0...22.12.0)
2022-12-13 01:22:36 +00:00
mouse1203
fe81f4d72d Changing in menu_bar and start_pending
Additionally replaced Dict to dict, in some places int removed
2022-12-12 18:02:20 +01:00
Min RK
241f927e91 Merge pull request #4264 from minrk/selenium-firefox
remove unnecessary actions for firefox/geckodriver
2022-12-12 13:40:32 +01:00
Min RK
ea2c081f6d Merge pull request #4263 from jupyterhub/dependabot/github_actions/dessant/support-requests-3
build(deps): bump dessant/support-requests from 2 to 3
2022-12-12 12:41:18 +01:00
dependabot[bot]
4022a3d564 build(deps): bump dessant/support-requests from 2 to 3
Bumps [dessant/support-requests](https://github.com/dessant/support-requests) from 2 to 3.
- [Release notes](https://github.com/dessant/support-requests/releases)
- [Changelog](https://github.com/dessant/support-requests/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dessant/support-requests/compare/v2...v3)

---
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>
2022-12-12 05:07:36 +00:00
Min RK
7739890264 simplify token page tests
- remove db utilities
- simplify waits
2022-12-09 13:54:20 +01:00
Min RK
cf5999b048 tests: wait for javascript to finish loading before clicking
allows us to wait for the javascript to finish loading,
since clicking buttons won't do anything if we click before the js has registered click handlers
2022-12-09 13:11:42 +01:00
Min RK
868a571c73 set max depth on api/index toctree
default maxdepth seems to have changed?
2022-12-09 11:32:25 +01:00
Min RK
21ff1de87e remove unmaintained actions for firefox/geckodriver
geckodriver is already set up in the GHA environment!
2022-12-09 09:40:33 +01:00
Min RK
2dab6aed99 Remove remnants of unused jupyterhub-services cookie
We stopped being able to use it in 2.0, but we didn't stop setting it.
2022-12-09 09:22:17 +01:00
Min RK
a8549ddbe2 wait for js events on token page 2022-12-08 15:56:37 +01:00
Min RK
aa91a69bc8 use a single browser session for selenium tests
avoids instantiating firefox for each test
2022-12-08 15:41:15 +01:00
Min RK
0ed05edba2 selenium: make click async 2022-12-08 15:36:39 +01:00
mouse1203
bec7c8ad2d change user to user.name
change user to user.name under case test_open_url_login
2022-12-08 15:17:17 +01:00
mouse1203
9449e77cca remove empty and pyparsing module
remove empty and pyparsing module
2022-12-08 14:52:39 +01:00
pre-commit-ci[bot]
0bd20ba74b [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-12-08 13:40:17 +00:00
mouse1203
98494b8c58 Merge branch 'main' into more_selenium 2022-12-08 14:39:42 +01:00
Min RK
7c5662ee52 Merge pull request #4256 from consideRatio/pr/update-makefile-make-bat
docs: refresh Makefile/make.bat
2022-12-08 09:21:57 +01:00
Erik Sundell
a9b6d7e51c docs: refresh Makefile/make.bat 2022-12-07 21:24:59 +01:00
Erik Sundell
ee45866afe Merge pull request #4251 from minrk/test-docs
Test docs, links on CI
2022-12-07 15:38:59 +01:00
Min RK
593112807b resolve linkcheck failures
- several http->https
- a few page moves
- miniconda->miniforge
- remove rochester from gallery, which doesn't apepar to be publicly documented (may be accessible internally, but that's not for a public gallery)
2022-12-07 15:10:42 +01:00
Min RK
0fa732a0a8 build docs, linkcheck on CI
RTD doesn't stop on warnings, but we should still notice
2022-12-07 15:10:42 +01:00
Min RK
4d0b37292d gitignore generated metrics.md 2022-12-07 15:10:42 +01:00
Min RK
d4a98738f1 Merge pull request #4249 from minrk/rst2myst
convert remaining rst files to myst
2022-12-07 14:35:19 +01:00
pre-commit-ci[bot]
3884d556b0 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-12-07 13:17:26 +00:00
Erik Sundell
71d5e604cb docs: use MyST fieldlist and substitution 2022-12-07 14:16:22 +01:00
Erik Sundell
f3bb3651b3 docs: remove redundant currentmodule directive, fix indentation 2022-12-07 13:11:23 +01:00
Erik Sundell
8bdd5a58a4 Merge pull request #4250 from minrk/figure-typo
fix bracket typo in capacity figures
2022-12-07 12:29:03 +01:00
Min RK
0085febc1c fix bracket typo in capacity figures 2022-12-07 09:43:04 +01:00
Min RK
8b988dc0be fix link targets after rst2myst 2022-12-07 09:42:26 +01:00
Min RK
b859818a9c switch generate-metrics to markdown 2022-12-07 09:02:09 +01:00
Min RK
832e8c0348 run rst2myst 2022-12-07 08:58:00 +01:00
Simon Li
5b7b9b5677 Merge pull request #4248 from consideRatio/pr/fix-py36-detail
maint: fix detail when removing support for py36
2022-12-06 19:05:19 +00:00
Erik Sundell
1d0496fc80 Merge pull request #4247 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-12-06 18:13:35 +01:00
Erik Sundell
4ff76d6d85 Merge pull request #4246 from jupyterhub/dependabot/npm_and_yarn/jsx/decode-uri-component-0.2.2
build(deps): bump decode-uri-component from 0.2.0 to 0.2.2 in /jsx
2022-12-06 18:13:15 +01:00
Erik Sundell
97e51fe54f maint: fix detail when removing support for py36 2022-12-06 18:06:40 +01:00
pre-commit-ci[bot]
19a375fba2 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v3.2.2 → v3.3.0](https://github.com/asottile/pyupgrade/compare/v3.2.2...v3.3.0)
2022-12-06 00:31:36 +00:00
dependabot[bot]
e5d48f419f build(deps): bump decode-uri-component from 0.2.0 to 0.2.2 in /jsx
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-05 13:45:13 +00:00
Min RK
e9c0fc6eb7 Bump to 3.2.0.dev 2022-12-05 14:45:03 +01:00
Min RK
eca9c00872 Bump to 3.1.0 2022-12-05 14:44:43 +01:00
Min RK
e6e2a7d003 Merge pull request #4232 from minrk/changelog-3.1
changelog for 3.1.0
2022-12-05 14:44:02 +01:00
Min RK
b35a78240c changelog for 1.5.1 2022-12-05 14:02:36 +01:00
Min RK
d317c067d1 Update changelog for 3.1.0 2022-12-05 13:35:59 +01:00
Simon Li
cfc93d8555 doc: fix formatting of spawner env-vars 2022-12-02 17:39:11 +00:00
Erik Sundell
681ff09e06 Merge pull request #4233 from minrk/ci-db-versions
ci: update database image versions
2022-12-01 16:40:03 +01:00
Erik Sundell
0d72280e5d Merge pull request #4214 from yuvipanda/metricsss
Add active users prometheus metrics
2022-12-01 15:45:59 +01:00
mouse1203
ab8629642d token cases, updating cases according last review
adding checks token from db, adding some explanations to async sleep(still wip),  renamed few cases (spawn_panding, token), adding "cleanup_after" fixture into def browser()
2022-12-01 15:43:40 +01:00
Simon Li
dca8725876 Merge pull request #4240 from minrk/default-named-server-doc
clarify docstrings for default_server_name
2022-12-01 14:20:37 +00:00
Min RK
3bb1d640ee clearer descriptions of default_server_name behavior
Co-authored-by: Jörg Behrmann <behrmann@physik.fu-berlin.de>
2022-12-01 14:52:23 +01:00
Min RK
954e64e3ca clarify docstrings for default_server_name
and warn if default_server_name is specified but named servers not enabled
2022-12-01 14:39:19 +01:00
Min RK
58475ffcfd make active_users config and methods consistent
- use interval instead of period to match other interval config
- avoid redundant `metric` in both class and method/attr names
- interval is separate per metric group (only one for now)
2022-12-01 14:22:47 +01:00
Georgiana
181aec31af Merge pull request #4236 from minrk/deprecate-extra-handlers
deprecate JupyterHub.extra_handlers
2022-12-01 13:41:36 +02:00
Min RK
c6ac4e0d34 test active users metrics 2022-12-01 10:23:51 +01:00
Min RK
8fe875430a Merge pull request #4209 from ArafatAbdussalam/patch-2
avoid contraction in setup.rst
2022-12-01 09:01:23 +01:00
Min RK
f2dcf96bef remove unused monthy_active_users metric
just jupyterhub_active_users now

Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2022-12-01 08:25:44 +01:00
Yuvi Panda
6e90059580 Merge pull request #4230 from minrk/logout-clear-user
make current_user available to handle_logout hook
2022-11-30 15:19:01 -08:00
Min RK
0a2e6a4042 Merge pull request #4127 from ArafatAbdussalam/branch1
update troubleshooting.md docs
2022-11-30 14:11:53 +01:00
Arafat Abdussalam
672ef34d9b update troubleshooting.md docs
I fixed the grammatical errors on the docs

address review

Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2022-11-30 14:01:13 +01:00
Min RK
2d9285d447 Merge pull request #4156 from liliyao2022/patch-5
Update dockerfile README
2022-11-30 13:54:02 +01:00
Chris Holdgraf
859cff345c Merge pull request #4008 from minrk/capacity-planning 2022-11-30 12:10:16 +01:00
Min RK
4938ed66b6 set base jupyterhub db upgrade-from test version to 1.1
jupyterhub 1.0 is not compatible with more recent mysql
2022-11-30 11:58:37 +01:00
Min RK
770325f695 deprecate JupyterHub.extra_handlers
I don't think we should encourage in-memory extensions.

Point to services, instead.
2022-11-30 11:52:33 +01:00
Min RK
ec8e6e2e4a ci: update database image versions
mysql: 8.0
postgres: 15.1
2022-11-30 09:48:54 +01:00
Min RK
f7ce07ee9e changelog for 3.1.0 2022-11-30 09:45:11 +01:00
Min RK
2b70e768e5 Merge pull request #4229 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-11-29 14:59:21 +01:00
Min RK
6d7341b478 clear user before rendering logout page
instead of in clear_login_cookie

ensures current_user is accessible in `handle_logout` hook
2022-11-29 10:04:22 +01:00
pre-commit-ci[bot]
b76e308e71 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/PyCQA/autoflake: v1.7.7 → v2.0.0](https://github.com/PyCQA/autoflake/compare/v1.7.7...v2.0.0)
- [github.com/pre-commit/pre-commit-hooks: v4.3.0 → v4.4.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.3.0...v4.4.0)
- [github.com/PyCQA/flake8: 5.0.4 → 6.0.0](https://github.com/PyCQA/flake8/compare/5.0.4...6.0.0)
2022-11-29 01:55:14 +00:00
Min RK
eac96acadd Merge pull request #4150 from liliyao2022/patch-2
grammar improvements in quickstart.md
2022-11-24 11:26:40 +01:00
Min RK
9992e26a8c Merge pull request #4185 from lumenCodes/instFaq
Edits to institutional FAQ
2022-11-24 11:26:11 +01:00
Min RK
0ec4852800 add 'you will need' to dockerfile readme requirements 2022-11-24 11:25:46 +01:00
Min RK
fdf9fbb65b connect users with infrastructure 2022-11-24 11:23:59 +01:00
Min RK
2f81ea8fb1 Merge pull request #4172 from liliyao2022/patch-10
Deleted unused failRegexEvent
2022-11-24 11:22:40 +01:00
Min RK
cab9c1d9ab Merge pull request #4130 from lumenCodes/tempaltesdoc
refine text in template docs.
2022-11-24 11:20:58 +01:00
Lili Yao
fd172a56e0 grammer improvements in quickstart.md
Modified some grammar issues.
2022-11-24 11:20:23 +01:00
Min RK
6b6946fe8a Merge pull request #4136 from yamakat/Improve-on-documentation-websecurity.md
Update wording in web security docs
2022-11-24 11:18:51 +01:00
Min RK
e97d5c6662 Merge branch 'main' into tempaltesdoc 2022-11-24 11:15:49 +01:00
Min RK
343fe70393 Merge pull request #4072 from ruqayaahh/templates-docs-contributions
[doc] templates: updated obsolete links and made wordings clearer
2022-11-24 11:12:45 +01:00
Min RK
b048bbcd9e Merge pull request #4084 from melissakirabo/patch-1
Refine text in documentation index
2022-11-24 11:07:18 +01:00
Min RK
5639b3a622 Apply suggestions from code review 2022-11-24 11:04:16 +01:00
Min RK
08e6da7584 Merge pull request #4186 from emmanuella194/main
highlight "what is our actual goal" in faq
2022-11-24 10:11:34 +01:00
Min RK
385a4556a4 Merge pull request #4119 from PoorvajaRayas/PoorvajaRayas
Formatting changes to tests.rst
2022-11-24 10:10:00 +01:00
Min RK
40b8393c4b Merge pull request #4094 from Busayo-ojo/busayo-ojo
Fixed typos and added punctuations
2022-11-24 10:09:34 +01:00
Emmanuella Orioma
65464c7029 Updated faq.md
I think the *But what is our actual goal* should be an heading for better reading experience
2022-11-24 10:08:46 +01:00
PoorvajaRayas
869f2dd08d Reviewed documentation and fixed grammatical errors 2022-11-24 10:06:40 +01:00
Min RK
8b471624ee Merge branch 'main' into busayo-ojo 2022-11-24 10:04:08 +01:00
Min RK
51c1ea1f7f restore 'the'
Co-authored-by: Georgiana <georgiana.dolocan@gmail.com>
2022-11-24 10:02:53 +01:00
Min RK
d04c0c28c0 Merge pull request #2641 from ericdill/copyediting
Some suggestions from reading through the docs
2022-11-24 09:46:29 +01:00
pre-commit-ci[bot]
33fa9b953b [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-11-24 08:41:13 +00:00
Min RK
de5fb1e7ce Merge branch 'main' into copyediting 2022-11-24 09:40:21 +01:00
Min RK
1cf13bea66 Merge pull request #4210 from ArafatAbdussalam/patch-3
grammar in security-basics.rst
2022-11-24 09:21:13 +01:00
pre-commit-ci[bot]
abe7150ffe [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-11-23 10:22:56 +00:00
Erik Sundell
95e5a5dea8 Merge pull request #4227 from consideRatio/pr/docs-cleanup
docs: refresh conf.py, add opengraph and rediraffe extensions
2022-11-23 10:45:42 +01:00
YuviPanda
f05778a1ae Add comment clarifying why we freeze time 2022-11-22 14:23:21 -08:00
YuviPanda
06fb211283 Make duration be a label on the metric
- Stops ambiguous wording on 'monthly', use more precise '30d'
- Add a 7d active users metric
- Allows us to make this configurable in the future if needed
2022-11-22 14:18:15 -08:00
Erik Sundell
f877588e52 docs: fix rST syntax error for italics 2022-11-22 17:47:37 +01:00
Erik Sundell
bfe0186ad2 docs: add rediraffe sphinx extension
This extension helps us restructure our documentation without creating
dead links. It requires us to explicitly declare what should be
redirected where though.

It seems better to have it in place ahead of time than to be something
we ask a contributor add just in time when its needed.
2022-11-22 17:47:37 +01:00
Erik Sundell
d23e095106 docs: add opengraph sphinx extension
This extension helps add metadata etc to the rendered HTML documentation
to help for example links on discourse.jupyter.org look good.
2022-11-22 17:47:37 +01:00
Erik Sundell
96d4486ae5 docs: refresh conf.py for readability 2022-11-22 17:47:37 +01:00
Erik Sundell
98710dbc8b Merge pull request #4223 from consideRatio/pr/requirements-details
maint: add test to extras_require, remove greenlet workaround, test final py311, misc cleanup
2022-11-22 17:24:23 +01:00
pre-commit-ci[bot]
8ac3a8e4e6 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-11-22 12:53:06 +00:00
Erik Sundell
0575022186 docs: install jupyterhub package and remove path setup steps
When we install the jupyterhub package, we don't have to put it on the
path explicitly.
2022-11-22 13:51:28 +01:00
Erik Sundell
1ac9c443b5 maint: add test to extras_require, remove dev-requirements.txt 2022-11-22 13:51:28 +01:00
Erik Sundell
08ed8443f2 maint: install html5lib via beautifulsoup4's extra_requires 2022-11-22 13:45:57 +01:00
Erik Sundell
0cdaa833c4 maint: remove unused urllib3 from test requirements 2022-11-22 13:45:57 +01:00
Erik Sundell
87ce2a9b2f maint: add jsonschema to test requirements and cleanup attrs constraint 2022-11-22 13:45:57 +01:00
Erik Sundell
f26b43f209 maint: remove no longer needed py311 greenlet workaround 2022-11-22 13:45:55 +01:00
Erik Sundell
e6e84eabb3 ci: focus tests towards py311 over py310 2022-11-22 13:43:11 +01:00
Erik Sundell
4fadfd42da Merge pull request #4225 from minrk/selenium-wait
selenium: update next_url after waiting for it to change
2022-11-22 09:56:03 +01:00
Min RK
29d84f4192 selenium: update next_url after waiting for it to change 2022-11-22 09:41:24 +01:00
Min RK
fc7ef39f21 Merge pull request #4211 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-11-21 15:21:02 +01:00
Min RK
d5d9cb204c Merge pull request #4219 from consideRatio/pr/stricter-flake8
pre-commit: add autoflake and make flake8 checks stricter
2022-11-21 15:10:14 +01:00
pre-commit-ci[bot]
9d592fff31 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-11-18 15:43:10 +00:00
Erik Sundell
12594631e0 maint: use __all__ statements where its reasonable to do
Co-authored-by: Simon Li <orpheus+devel@gmail.com>
2022-11-18 16:42:43 +01:00
Min RK
ffbc981bfe Merge pull request #4222 from consideRatio/pr/docs-maintenance
docs: sphinx config cleanup, removing epub build, fix build warnings
2022-11-17 14:43:33 +01:00
Erik Sundell
7f3fd7e3cc docs: fix broken links and formatting errors 2022-11-17 13:38:25 +01:00
Erik Sundell
1c9499e91e docs: remove epub documentation build 2022-11-17 13:09:06 +01:00
Erik Sundell
26e5efeec4 docs: cleanup unused config for htmlhelp, latex, manual 2022-11-17 13:08:17 +01:00
Erik Sundell
90811196d7 docs: remove unused alabaster_jupyterhub requirement 2022-11-17 13:00:22 +01:00
Min RK
a917de258f Merge pull request #4221 from jupyterhub/dependabot/npm_and_yarn/jsx/loader-utils-2.0.4
Bump loader-utils from 2.0.2 to 2.0.4 in /jsx
2022-11-17 09:24:04 +01:00
dependabot[bot]
5d7383278f Bump loader-utils from 2.0.2 to 2.0.4 in /jsx
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.2 to 2.0.4.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v2.0.2...v2.0.4)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 04:52:44 +00:00
pre-commit-ci[bot]
865d5f7646 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-11-16 14:53:12 +00:00
Erik Sundell
5a5e0118b8 docs: comment about isort, black, tbump in pyproject.toml 2022-11-16 15:51:26 +01:00
Erik Sundell
b9596b2dee pre-commit: add autoflake 2022-11-16 15:51:26 +01:00
Erik Sundell
3b5b42e620 flake8: manual F408 fix, avoid indirect import of public_host / public_url 2022-11-16 15:51:26 +01:00
Erik Sundell
7a9491c323 flake8: check F408 about unused imports, manual fixes only 2022-11-16 15:51:26 +01:00
Erik Sundell
957fd9cc20 flake8: check F811 about redefinition of unused name 2022-11-16 15:51:26 +01:00
Erik Sundell
eaa096152a flake8: check F403 about import * 2022-11-16 15:51:26 +01:00
Min RK
5ea93add28 Merge pull request #4216 from consideRatio/pr/cleanup-flake8-config
ci: flake8, cleanup unused/redundant config
2022-11-16 09:06:43 +01:00
Erik Sundell
b77e9cbf08 ci: flake8, add back general ignore of pydocstyle warnings 2022-11-16 08:54:23 +01:00
Erik Sundell
24dfa5d228 ci: flake8, cleanup unused/redundant config
- E### warnings were already ignored by E
- Sorting of import warnings won't matter as we have black and isort
- D400: First line should end with a period

  This is not flake8 configuration, but related to `pydocstyle`, which
  isn't used.
2022-11-16 08:16:44 +01:00
Yuvi Panda
98603ef3e4 Merge pull request #4208 from ArafatAbdussalam/patch-1
improved the grammatical structure
2022-11-15 16:09:12 -08:00
YuviPanda
06aded4bce Fix some typos 2022-11-15 16:01:20 -08:00
YuviPanda
a2e80e5d6f Add daily & monthly active users prometheus metrics
These are *extremely useful* for people advocating for
more resources for their JupyterHubs, but a little difficult
to calculate without a full scale log ingestion and analytics
pipeline (such as ELK or equivalent). However, these are easy
to calculate on the JupyterHub side at any given instance -
these are fairly quick SQL queries. Prometheus can capture and
store this as a timeseries, and provide valuble advocacy data
that is hard to get otherwise.

This turns the metrics on by default, but only updates them every
hour - which seems fine for metrics that don't change that often.
This should reduce performance impact. Admins can also turn this
off if needed.

I've had to implement this in many different ways in many different
contexts, and it's also important to be able to *trust* these. Getting
this from other grafana data can be tricky to validate - we had an
experimental one in our grafana dashboards at some point in the past
that we had to kill due to it being hard to validate
(https://github.com/jupyterhub/grafana-dashboards/pull/45). This metric
will provide an authoritative source of truth for this.

Ref https://github.com/2i2c-org/infrastructure/issues/1888
2022-11-15 15:43:01 -08:00
pre-commit-ci[bot]
c993163f0b [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v3.2.0 → v3.2.2](https://github.com/asottile/pyupgrade/compare/v3.2.0...v3.2.2)
2022-11-15 00:12:51 +00:00
Arafat Abdussalam
e6e890b46c Update security-basics.rst 2022-11-14 11:22:12 +01:00
Arafat Abdussalam
d2c6ae925f modified setup.rst
When I needed to set up Linux on my windows, i found out the easier to do so was through Windows Subsystem for Linux. Hence, I needed to add the guide to the development setup
2022-11-14 10:45:14 +01:00
Arafat Abdussalam
32cddfbdfe Update docs.rst 2022-11-14 10:30:56 +01:00
mouse1203
7dee409218 Delete test_browser.py
Delete test_browser.py under jupyterhub/tests/ which was added to this folder accidentally
2022-11-11 12:59:11 +01:00
mouse1203
7dc230581c more selenium test cases
- revoking tokens
- logout
- token page
2022-11-11 10:53:33 +01:00
Simon Li
730fe5a446 Merge pull request #4204 from minrk/access-servers
[docs] typo in access:servers scope
2022-11-11 08:41:31 +00:00
Min RK
2ed84b0de1 typo in access:servers scope
it's not access:users:servers
2022-11-11 09:23:23 +01:00
pre-commit-ci[bot]
a5a61893fb [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-11-02 14:22:56 +00:00
vpopescu
67f5543e18 Merge branch 2022-11-02 15:22:21 +01:00
Your Name
de1757bf57 Deleted unused failRegexEvent 2022-11-02 09:23:45 +01:00
Min RK
54c06c33bd Merge pull request #4188 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-11-01 09:05:17 +01:00
Min RK
17119a273f Merge pull request #4187 from consideRatio/main
ci: use non-deprecated codecov uploader
2022-11-01 09:01:22 +01:00
Min RK
7effe53c28 Merge pull request #4139 from Joel-Ando/Joel-Ando-patch-1
highlight note about the docker image scope
2022-11-01 08:50:58 +01:00
Joel-Ando
59f14ad7c0 Update quickstart-docker.rst 2022-11-01 08:50:25 +01:00
pre-commit-ci[bot]
54a5d2c152 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v3.1.0 → v3.2.0](https://github.com/asottile/pyupgrade/compare/v3.1.0...v3.2.0)
- [github.com/pre-commit/mirrors-prettier: v3.0.0-alpha.3 → v3.0.0-alpha.4](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.0-alpha.3...v3.0.0-alpha.4)
2022-11-01 00:03:21 +00:00
Erik Sundell
b83a6250ba ci: use non-deprecated codecov uploader 2022-10-31 19:36:37 +01:00
pre-commit-ci[bot]
ca6aba7568 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-28 14:55:47 +00:00
lumenCodes
49ec485614 Merge branch 'main' of https://github.com/jupyterhub/jupyterhub into instFaq 2022-10-28 15:51:08 +01:00
lumenCodes
8de25d08a7 I fixed typo errors and structure 2022-10-28 15:50:47 +01:00
Min RK
a7cfc76a82 Merge pull request #4113 from EstherChristopher/patch-2
proofread upgrading docs
2022-10-28 15:14:32 +02:00
Esther Christopher
c19b3b540a Update upgrading.rst
Hopefully, it's all sorted now and gets merged. Sorry for the back and forth.
2022-10-28 13:50:02 +01:00
Chinwendu
5ec1cf86a7 Update docs/source/reference/templates.md
Co-authored-by: Min RK <benjaminrk@gmail.com>
2022-10-27 14:06:45 +01:00
Min RK
2594a7269e Merge pull request #4140 from Joel-Ando/Joel-Ando-patch-2
add link to rbac index from implementation
2022-10-27 15:00:22 +02:00
Min RK
f20021c068 Merge pull request #4173 from liliyao2022/patch-11
jsx: remove unused useState
2022-10-27 14:28:16 +02:00
Min RK
5708de05ff Merge pull request #4129 from lumenCodes/restapidoc
reorder REST API doc
2022-10-27 14:21:12 +02:00
Min RK
28f2ba9df9 Merge pull request #4168 from lumenCodes/proxy
clarify CHP downsides in proxy doc
2022-10-27 14:19:50 +02:00
Min RK
35297ce87f Merge pull request #4167 from lumenCodes/services
Proofread services.md
2022-10-27 14:17:09 +02:00
Min RK
73d97c0a82 Merge pull request #4109 from EstherChristopher/patch-1
Reviewed the documentation
2022-10-27 14:11:37 +02:00
Esther Christopher
f0957ad247 Resolve conflicts in event doc 2022-10-27 14:10:41 +02:00
pre-commit-ci[bot]
777bbe8e92 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-26 18:06:17 +00:00
lumenCodes
3eb6cd302c Applied PR Changes 2022-10-26 19:02:42 +01:00
lumenCodes
438b285670 I effected PR requested changes 2022-10-26 18:44:51 +01:00
pre-commit-ci[bot]
cf2ec324b7 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-26 17:23:20 +00:00
Chinwendu
b33b8772d3 Merge branch 'main' into restapidoc 2022-10-26 18:22:47 +01:00
pre-commit-ci[bot]
6a4078f977 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-26 17:17:20 +00:00
lumenCodes
12de64828c update to the proxy file. 2022-10-26 18:12:23 +01:00
lumenCodes
23506a25e5 applied PR change suggestions 2022-10-26 11:44:13 +01:00
lumenCodes
8ffa07e82d Update to the services.md 2022-10-26 11:44:13 +01:00
Esther Christopher
2019bd2797 Update upgrading.rst
Hi @minrk, I went through the reference files you sent and made the necessary adjustments. I think everything should be fine now. I also added a new correction. Please review and revert.
2022-10-26 11:24:53 +01:00
Min RK
88e2346bf2 Merge pull request #4171 from liliyao2022/patch-9
typos in example readme
2022-10-26 10:02:02 +02:00
Min RK
2bb7594cd1 Merge pull request #4170 from KaluBuikem/patch-2
Updated deployment gallery links
2022-10-26 10:01:12 +02:00
Min RK
36d596a4d3 Merge pull request #4169 from emmanuella194/main
typo in contributing doc
2022-10-26 09:42:05 +02:00
Min RK
d9c36ed725 Merge pull request #4166 from lumenCodes/contributing
Welcome first-time contributors to the forum
2022-10-26 09:39:38 +02:00
Lili Yao
cb5cc8c1b4 Update Groups.jsx
"useState" was not used in this file.
2022-10-26 17:58:26 +11:00
Lili Yao
76f7ff4721 Update README.md
Corrected some spelling errors.
2022-10-26 15:44:52 +11:00
pre-commit-ci[bot]
22d2bbe1ae [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-26 00:51:27 +00:00
Kalu Chibuikem Victor
d215248d8a Updated gallery-jhub-deployments.md
I embedded links into the text and updated minor text errors
2022-10-26 01:50:28 +01:00
Emmanuella Orioma
488331e033 Update docs.rst
I corrected the spelling error in line 21
2022-10-25 23:26:16 +03:00
Chinwendu
cde1b65252 Update docs/source/contributing/community.md
Co-authored-by: Min RK <benjaminrk@gmail.com>
2022-10-25 16:11:52 +01:00
Joel-Ando
5f32abeeba Update tech-implementation.md 2022-10-25 14:55:53 +01:00
Min RK
41cbcc9502 Merge pull request #4021 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-10-25 10:37:38 +02:00
Min RK
297c40195c Merge pull request #4106 from alwasega/server
Edited and restructured `server-api` file
2022-10-25 10:14:10 +02:00
Min RK
209eb4468e Merge pull request #4157 from Uzor13/rest-api-doc
Updated JupyterHub's REST API doc
2022-10-25 09:57:47 +02:00
pre-commit-ci[bot]
7c92902e48 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-24 23:10:47 +00:00
pre-commit-ci[bot]
d5beda293b [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.37.3 → v3.1.0](https://github.com/asottile/pyupgrade/compare/v2.37.3...v3.1.0)
- [github.com/psf/black: 22.6.0 → 22.10.0](https://github.com/psf/black/compare/22.6.0...22.10.0)
- [github.com/pre-commit/mirrors-prettier: v2.7.1 → v3.0.0-alpha.3](https://github.com/pre-commit/mirrors-prettier/compare/v2.7.1...v3.0.0-alpha.3)
2022-10-24 23:08:59 +00:00
pre-commit-ci[bot]
3b4c40e5e0 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-24 18:22:26 +00:00
Uzochukwu Precious
5cfa16dbfd review update 2022-10-24 19:21:43 +01:00
lumenCodes
7a22a2cf93 Addittion to the contributing .md 2022-10-24 17:36:38 +01:00
pre-commit-ci[bot]
eb72067ab3 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-24 14:46:42 +00:00
Allan Wasega
3da4dc66c9 Incorporated suggested edits 2022-10-24 17:44:57 +03:00
Allan Wasega
87c2d545df Merge branch 'jupyterhub:main' into server 2022-10-24 17:00:33 +03:00
Joel-Ando
3e4cc0b869 Update tech-implementation.md 2022-10-24 14:14:48 +01:00
Min RK
de8d1b71f8 Merge pull request #4153 from Teniola-theDev/patch-1
Consistent capitalization of Authenticator
2022-10-24 14:43:30 +02:00
Min RK
af7494c460 Merge pull request #4026 from mouse1203/main
Add browser-based tests with Selenium
2022-10-24 14:41:24 +02:00
Joel-Ando
d0a48c0655 Update tech-implementation.md 2022-10-24 13:28:28 +01:00
Teniola Olowookere
48fc74b9b4 removed extra text 2022-10-24 13:17:52 +01:00
Min RK
54ac5226b3 Merge pull request #4152 from emmanuella194/main
Link back to rbac from use-cases
2022-10-24 14:15:27 +02:00
Emmanuella Orioma
ce9feb5139 Update use-case.md
changed RBAC documentation url to the internal rbac jupyter documentation
2022-10-24 15:09:29 +03:00
Teniola Olowookere
ec0cb70f35 removed duplicate link 2022-10-24 13:08:52 +01:00
Teniola Olowookere
c0af08fabd Merge branch 'jupyterhub:main' into patch-1 2022-10-24 13:07:32 +01:00
Teniola Olowookere
a2e59e6867 Update docs/source/getting-started/authenticators-users-basics.md
Co-authored-by: Min RK <benjaminrk@gmail.com>
2022-10-24 13:03:04 +01:00
Min RK
4859c62381 Merge pull request #4154 from minrk/rm-redundant-roles-target
Remove redundant ref target for roles
2022-10-24 13:44:26 +02:00
mouse1203
9b7a77c36f selenium: added docstrings
added docstrings, parameter for open_url function, removed element function (unused)
2022-10-24 13:09:46 +02:00
Min RK
ab7ec8b33d Merge pull request #4160 from Christiandike/update/configsudo.md
Update/configsudo.md
2022-10-24 12:57:53 +02:00
Min RK
15c691b358 Merge pull request #4162 from liliyao2022/patch-8
Typo in institutional-faq
2022-10-24 12:44:03 +02:00
Christian Dike
1c95d94b96 Update config-sudo.md 2022-10-24 11:38:58 +01:00
Christian Dike
e76e9099c2 Update docs/source/reference/config-sudo.md
Co-authored-by: Min RK <benjaminrk@gmail.com>
2022-10-24 11:33:48 +01:00
Min RK
63cd63ffee Merge pull request #4161 from Christiandike/update/separate-proxy.md
Improve text in proxy docs
2022-10-24 12:33:07 +02:00
Min RK
2c4c5fc6fe Merge pull request #4159 from liliyao2022/patch-7
Update roadmap.md
2022-10-24 11:35:52 +02:00
Min RK
c788d6f087 Merge pull request #4158 from liliyao2022/patch-6
Update README.md
2022-10-24 11:35:14 +02:00
Min RK
a1c94a6e13 Merge pull request #4098 from NPDebs/main
Proofread and Improve security-basics.rst
2022-10-24 11:33:05 +02:00
Min RK
37bf8e0724 Merge pull request #4118 from falyne/main
Capitalization typo in troubleshooting.md
2022-10-24 10:52:39 +02:00
Min RK
56161c2aa6 Merge pull request #4155 from Christiandike/update/oauth.md
Add link to OAuth 2
2022-10-24 10:44:16 +02:00
Min RK
66a86f5db0 Merge pull request #4090 from alwasega/community
Restructured Community communication channels file
2022-10-24 10:28:20 +02:00
Min RK
ea0462de1a Merge pull request #4164 from jupyterhub/dependabot/github_actions/docker/setup-buildx-action-2.2.1
Bump docker/setup-buildx-action from 2.1.0 to 2.2.1
2022-10-24 09:21:51 +02:00
dependabot[bot]
37be9b4a5b Bump docker/setup-buildx-action from 2.1.0 to 2.2.1
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.1.0 to 2.2.1.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](95cb08cb26...8c0edbc76e)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-24 05:27:46 +00:00
Lili Yao
c4d8be22b6 Update institutional-faq.md
Corrected a spelling error.
2022-10-24 12:51:48 +11:00
pre-commit-ci[bot]
ced408c205 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-23 19:18:11 +00:00
Christian Dike
5ce930324c Update separate-proxy.md 2022-10-23 20:16:46 +01:00
Christian Dike
36b15d7ce0 Update separate-proxy.md 2022-10-23 20:11:36 +01:00
Christian Dike
7b636b6f9c Update config-sudo.md 2022-10-23 19:26:24 +01:00
Christian Dike
35b06481e2 Update config-sudo.md 2022-10-23 19:03:32 +01:00
Joel-Ando
18b049e3c9 Update tech-implementation.md 2022-10-23 16:23:35 +01:00
Joel-Ando
6b62fe794e Update tech-implementation.md
did the necessary changes
2022-10-23 16:13:20 +01:00
Lili Yao
ad25ef8f87 Update roadmap.md
It seems that we don't need an "a" here, or should we change it to "an" instead?
2022-10-23 15:42:57 +11:00
Lili Yao
61369ea5da Update README.md
Modified some spelling and grammar errors.
2022-10-23 13:53:02 +11:00
Emmanuella Orioma
a17b4c5801 Updated use-cases.md
Added the RBAC jupyter documentation link
2022-10-22 22:23:26 +03:00
Deborah Udoh
750d36a8f7 Update security-basics.rst 2022-10-22 11:19:27 +01:00
Deborah Udoh
23fc2f42d0 Update security-basics.rst
Co-authored-by: Min RK <benjaminrk@gmail.com>
2022-10-22 10:41:10 +01:00
Deborah Udoh
29ba669c73 Update security-basics.rst 2022-10-22 10:32:16 +01:00
Uzochukwu Precious
eb8f338186 Updated JupyterHub's REST API doc 2022-10-22 10:02:39 +01:00
Melissa Kirabo
76f9cf00c4 Update index.rst 2022-10-22 10:55:50 +03:00
Ngobiri Falyne
fc5f55caf9 Update troubleshooting.md
I replaced the comma, 
adjusted jupyterhub to JuputerHub
and the others as adiced
2022-10-22 06:53:16 +01:00
Lili Yao
131da596c5 Update README.md 2022-10-22 11:26:18 +11:00
Christian Dike
70bfdd6d00 update oauth.md 2022-10-22 00:51:38 +01:00
Christian Dike
02f33073ad update oauth.md 2022-10-22 00:37:08 +01:00
Esther Christopher
411189e54c Update upgrading.rst 2022-10-22 00:32:18 +01:00
Allan Wasega
9f5f19cb26 Fixed minor errors 2022-10-22 01:06:56 +03:00
Allan Wasega
9d93df6baf Fixed a minor error 2022-10-22 00:57:04 +03:00
pre-commit-ci[bot]
39eb1f055f [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-21 21:40:42 +00:00
Allan Wasega
74b0ebefe9 Fixed minor issues in community communication channels file 2022-10-22 00:34:23 +03:00
pre-commit-ci[bot]
28867760a4 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-21 21:05:16 +00:00
Allan Wasega
7a0b98d9ce Updated the server-api file with all comments 2022-10-22 00:04:37 +03:00
Allan Wasega
14e9155eb8 Merge branch 'jupyterhub:main' into server 2022-10-21 23:53:47 +03:00
pre-commit-ci[bot]
7ce4b13998 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-21 20:41:36 +00:00
Allan Wasega
5a16d770da Updated the server-api file as per review comments 2022-10-21 23:41:06 +03:00
Teniola Olowookere
b741a30dc3 Update docs/source/getting-started/authenticators-users-basics.md
I committed your suggestion about changing the target for the "roles". Thank you!

Co-authored-by: Min RK <benjaminrk@gmail.com>
2022-10-21 20:25:21 +01:00
Min RK
aebe33b62b Remove redundant ref target for roles
it's already addressable at that same target name,
having this here results in ambiguous ref targets in MyST
2022-10-21 15:59:49 +02:00
pre-commit-ci[bot]
794a1aa70f [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-21 13:44:46 +00:00
Teniola Olowookere
4e45b89ed1 Capitalised some words 2022-10-21 14:40:24 +01:00
mtkmtk
cd969c5dc4 Update websecurity.md 2022-10-21 10:31:24 -03:00
mtkmtk
de4117cba9 Update docs/source/reference/websecurity.md
Co-authored-by: Min RK <benjaminrk@gmail.com>
2022-10-21 10:25:09 -03:00
Sarah Gibson
f4c129a649 Merge pull request #4148 from Christiandike/update/spawners.md 2022-10-21 14:08:15 +01:00
Emmanuella Orioma
69e973d53a Update use-case.md
Worked on the documentation page  (jupyterhub/docs/source/rbac/use-case.md)

Added a wikipedia reference to [RBCA framework] and also emphasized on the solution under the *service to cull idle servers*
2022-10-21 13:21:20 +01:00
mtkmtk
f566559f9a Merge branch 'main' into Improve-on-documentation-websecurity.md 2022-10-21 09:17:48 -03:00
Christian Dike
37b82f7c2a Update docs/source/reference/spawners.md
Co-authored-by: Sarah Gibson <44771837+sgibson91@users.noreply.github.com>
2022-10-21 12:05:12 +01:00
Christian Dike
a71f6be001 Update docs/source/reference/spawners.md
Co-authored-by: Sarah Gibson <44771837+sgibson91@users.noreply.github.com>
2022-10-21 12:04:45 +01:00
Min RK
3da7021faa Merge pull request #4147 from Teebarh/mychanges
Added punctuations and capitalized words where necessary.
2022-10-21 10:34:24 +02:00
Melissa Kirabo
7330babc7e Update index.rst 2022-10-21 11:34:12 +03:00
Min RK
eeb0e506f3 Merge pull request #4146 from lumenCodes/spawners-basic
Update to the spawner basic file
2022-10-21 10:31:03 +02:00
Min RK
d59d856fa6 Merge pull request #4145 from softkeldozy/configuration_branch
Added text to documentation for more readability
2022-10-21 10:30:08 +02:00
Min RK
a7df46ead7 Merge pull request #4126 from PoorvajaRayas/patch-1
Update troubleshooting.md
2022-10-21 10:15:25 +02:00
Min RK
cb03c6035a Merge pull request #4116 from Eshy10/main
Upgrading.rst (Fix Duplicate statement)
2022-10-21 10:11:20 +02:00
Melissa Kirabo
037943728f Update docs/source/index.rst
Co-authored-by: Min RK <benjaminrk@gmail.com>
2022-10-21 11:07:44 +03:00
Melissa Kirabo
42918352a8 Update docs/source/index.rst
Co-authored-by: Min RK <benjaminrk@gmail.com>
2022-10-21 11:06:55 +03:00
Melissa Kirabo
ec18f7b65a Update docs/source/index.rst
Co-authored-by: Min RK <benjaminrk@gmail.com>
2022-10-21 11:04:04 +03:00
Christian Dike
69869ee823 update spawners.md 2022-10-21 01:49:36 +01:00
Christian Dike
fedcd22b0c update spawners.md 2022-10-21 01:29:31 +01:00
Esther Christopher
2f4691e692 Merge branch 'main' into patch-2 2022-10-20 21:15:43 +01:00
mtkmtk
aaffb66bef Updating websecurity.md after first review 2022-10-20 16:42:51 -03:00
Esther Christopher
e228b017e9 Merge branch 'main' into patch-1 2022-10-20 20:30:50 +01:00
Toyibat Adele
8e111665cd Added Punctuations and Capitalized words where necessary. 2022-10-20 17:44:56 +01:00
Sarah Gibson
283d2b75b6 Merge pull request #4135 from Christiandike/update/websecurity 2022-10-20 17:37:36 +01:00
Sarah Gibson
3f73671adf Merge pull request #4114 from alexanderchosen/alexanderchosen 2022-10-20 17:36:00 +01:00
Adewale Modupe
459793010b Merge branch 'main' into main 2022-10-20 14:40:03 +01:00
Eshy10
248bf8ef83 chore: remove capitalize word and "This is" after the colon for environments 2022-10-20 14:25:36 +01:00
Kelvin Obidozie
f71388633f Added text to documentation for more readability 2022-10-20 13:38:12 +01:00
PoorvajaRayas
dd8259fb46 Updated the document by making necessary changes 2022-10-20 17:47:13 +05:30
pre-commit-ci[bot]
677895c3eb [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-20 11:55:29 +00:00
Alexander Chosen Okon
9fcaf8df52 further simplified the words in the document
I made changes to some of the words used by simplifying them to ensure that all users can easily understand the document.
2022-10-20 11:55:23 +00:00
PoorvajaRayas
cd3f37f6a6 Update troubleshooting.md 2022-10-20 17:24:55 +05:30
lumenCodes
91f06f49e0 update to the spawner basic file 2022-10-20 12:54:42 +01:00
Christian Dike
145ccfbd4f update websecurity.md 2022-10-20 10:36:59 +01:00
Ngobiri Falyne
141f5ea2b4 Update troubleshooting.md 2022-10-20 10:01:44 +01:00
pre-commit-ci[bot]
c3da12c195 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-20 09:00:35 +00:00
Ngobiri Falyne
439b96978e Update troubleshooting.md 2022-10-20 09:58:37 +01:00
Min RK
8ba57f9309 Merge pull request #4132 from ToobaJamal/edit
update spawners-basics.md
2022-10-20 10:56:15 +02:00
pre-commit-ci[bot]
1ea557c999 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-20 08:44:59 +00:00
Ngobiri Falyne
d5f5d837de Merge branch 'main' into main 2022-10-20 09:44:28 +01:00
Melissa Kirabo
462324bba8 Merge branch 'main' into patch-1 2022-10-20 11:42:10 +03:00
Min RK
1dd848e560 Merge pull request #4124 from AdrianaHelga/AdrianaHelga-patch-1
Update services-basics.md
2022-10-20 10:28:07 +02:00
Min RK
864f7dc0c1 Merge pull request #4111 from zeelyha/docs
Typo in templates.md
2022-10-20 10:00:19 +02:00
Min RK
817f6e9c35 Merge pull request #4095 from Goodiec/patch-2
Update config-proxy.md
2022-10-20 09:11:24 +02:00
Min RK
85c67dd05c Merge pull request #4088 from ToobaJamal/main
Grammatical/link fixes in upgrading doc
2022-10-20 09:05:15 +02:00
Min RK
b0c2dd01a1 Merge pull request #4097 from Mackenzie-OO7/fix-typos
Modifications to URLs docs
2022-10-20 09:03:20 +02:00
Christian Dike
281658ccce update websecurity.md
Delete erroneous text from merge conflict
2022-10-20 07:48:52 +01:00
pre-commit-ci[bot]
c14d8e3446 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-20 03:28:21 +00:00
Joel-Ando
d956563ff4 Merge branch 'main' into Joel-Ando-patch-2 2022-10-20 04:27:19 +01:00
pre-commit-ci[bot]
e389e7f6d4 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-19 20:35:22 +00:00
mtkmtk
634bd26ad4 Update websecurity.md 2022-10-19 17:32:58 -03:00
Levai Mackenzie Ágbàrà
e82bd5a96b Merge branch 'jupyterhub:main' into fix-typos 2022-10-19 18:43:22 +01:00
pre-commit-ci[bot]
9c044e863a [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-19 13:33:49 +00:00
Alexander Chosen Okon
0340e9d6ad Merge branch 'main' into alexanderchosen 2022-10-19 13:33:11 +00:00
pre-commit-ci[bot]
ecf486d678 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-19 11:59:10 +00:00
Christian Dike
587059da11 Merge branch 'main' into update/websecurity 2022-10-19 12:57:48 +01:00
Alexander Chosen Okon
6f25abac2e Update config-user-env.md
I made a few changes to the spacing used.
2022-10-19 11:49:55 +00:00
Christian Dike
7d73d5774e update websecurity.md
- fix typos/edit text
- add important links
2022-10-19 12:37:13 +01:00
Georgiana
30e652f59e Merge pull request #4081 from Christiandike/Update/docs
Migrate community channels to markdown, update text
2022-10-19 11:59:43 +02:00
Georgiana
00cc149b0d Merge pull request #4089 from Christiandike/update/tech-implementation.md
Update rbac tech-implementation docs
2022-10-19 11:51:58 +02:00
pre-commit-ci[bot]
d407c96ee8 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-19 09:47:27 +00:00
Christian Dike
84e1216dda Update docs/source/contributing/community.md
Co-authored-by: Georgiana <georgiana.dolocan@gmail.com>
2022-10-19 10:45:49 +01:00
Christian Dike
c8aae0ea1c Update docs/source/contributing/community.md
Co-authored-by: Georgiana <georgiana.dolocan@gmail.com>
2022-10-19 10:44:41 +01:00
Christian Dike
313623256f Update docs/source/contributing/community.md
Co-authored-by: Georgiana <georgiana.dolocan@gmail.com>
2022-10-19 10:44:15 +01:00
Georgiana
da7ac11605 Merge pull request #4069 from chicken-biryani/main
Update the testing docs
2022-10-19 11:29:36 +02:00
Goodness Chris-Ugari
eaeef65560 Update config-proxy.md
Update comment
2022-10-19 09:34:42 +01:00
Alexander Chosen okon
a4597a1c50 alexanderchosen 2022-10-18 23:47:20 +00:00
Alexander Chosen okon
390efc1c5a removed the logo image and resolved some conflicts 2022-10-18 23:24:53 +00:00
Goodness Chris-Ugari
853f8accf5 Update config-proxy.md
update
2022-10-18 15:09:44 +01:00
Goodness Chris-Ugari
1f66237a5a Merge branch 'jupyterhub:main' into patch-2 2022-10-18 15:04:47 +01:00
Georgiana
0881514988 Merge pull request #4096 from Christiandike/update/config-ghoauth
Link reference to github oauth config with jupyter
2022-10-18 15:03:04 +02:00
Georgiana
975a841cdc Merge pull request #4093 from Achele/Achele
fixed some typos and technical terms
2022-10-18 15:01:30 +02:00
Sarah Gibson
ef0a627e28 Merge pull request #4133 from Teniola-theDev/spawner/editone
I capitalized cli and added y to jupterhub
2022-10-18 12:22:22 +01:00
Teniola Olowookere
504ebe9012 capitalized cli and added y to jupterhub 2022-10-18 10:09:31 +01:00
Tooba Jamal
895d713370 update spawners-basics.md 2022-10-18 12:01:13 +05:00
Tooba Jamal
d1ad045335 update index.rst 2022-10-18 11:55:48 +05:00
Tooba Jamal
1041bc53b1 fix typo 2022-10-18 11:21:50 +05:00
lumenCodes
2636a9fff5 added section refrence 2022-10-18 03:26:36 +01:00
lumenCodes
b1dfac546d fix: typo errors 2022-10-18 03:20:34 +01:00
pre-commit-ci[bot]
28de35facd [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-18 01:25:28 +00:00
lumenCodes
10c54353da Rest Api doc update 2022-10-18 02:19:33 +01:00
pre-commit-ci[bot]
b890a7486d [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-17 20:33:17 +00:00
PoorvajaRayas
97c72dd779 Update troubleshooting.md
Improved the documentation to make it clearer
2022-10-18 02:01:50 +05:30
Christian Dike
ae833d4a51 Add link to gh oauth
Co-authored-by: Georgiana <georgiana.dolocan@gmail.com>
2022-10-17 18:09:49 +01:00
Shloka
15b8857728 Update docs/source/contributing/tests.rst
Co-authored-by: Min RK <benjaminrk@gmail.com>
2022-10-17 22:30:55 +05:30
Shloka
79ea4038e5 Update docs/source/contributing/tests.rst
Co-authored-by: Min RK <benjaminrk@gmail.com>
2022-10-17 22:30:47 +05:30
Sarah Gibson
e7284b65ad Merge pull request #4092 from Temidayo32/announcement 2022-10-17 17:33:52 +01:00
Ojoachele Onuh
deaccdc668 Resolved and updated corrections from previous pull request 2022-10-17 17:27:09 +01:00
pre-commit-ci[bot]
838719e7ab [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-17 15:11:38 +01:00
Christian Dike
6ca5c1a276 Update documentation
Fix structure of documentation to aid readability and flow.
2022-10-17 15:09:40 +01:00
dependabot[bot]
d3facd93f1 Merge pull request #4121 from jupyterhub/dependabot/github_actions/docker/setup-buildx-action-2.1.0 2022-10-17 12:46:35 +00:00
Simon Li
8d2a987c81 remove out of date commented tag version 2022-10-17 13:29:25 +01:00
Christian Dike
e7a325ed24 Update docs/source/rbac/tech-implementation.md
update text

Co-authored-by: Min RK <benjaminrk@gmail.com>
2022-10-17 13:20:37 +01:00
Christian Dike
fc6d93bbe3 Update docs/source/rbac/tech-implementation.md
Replace URLs with internal markdown link

Co-authored-by: Min RK <benjaminrk@gmail.com>
2022-10-17 13:20:02 +01:00
Goodness Chris-Ugari
e9f8459681 Merge branch 'jupyterhub:main' into patch-2 2022-10-17 13:06:29 +01:00
Min RK
8785ecd810 Merge pull request #4086 from ArafatAbdussalam/branch2
Updated log messages
2022-10-17 13:45:16 +02:00
Min RK
147f029bf6 Merge pull request #4091 from Goodiec/patch-1
Update config-user-env.md
2022-10-17 13:44:21 +02:00
Min RK
cd440b0f7d Merge pull request #4085 from Goodiec/Goodiec-troubleshooting-doc
Update troubleshooting.md
2022-10-17 13:43:41 +02:00
Min RK
0a9d2b7f76 Merge branch 'main' into branch2 2022-10-17 13:42:02 +02:00
Min RK
658a1fccfe Merge pull request #4083 from ArafatAbdussalam/branch1
updated websecirity.md
2022-10-17 13:10:40 +02:00
dependabot[bot]
ee578dd7b5 Merge pull request #4122 from jupyterhub/dependabot/github_actions/docker/build-push-action-3.2.0 2022-10-17 11:10:16 +00:00
Min RK
d2d9ce9d02 Merge pull request #4074 from ToobaJamal/edit
Update index.rst
2022-10-17 13:05:14 +02:00
Min RK
93529d11bc Merge pull request #4065 from chicken-biryani/community-channels
Modification in community channels docs
2022-10-17 13:01:00 +02:00
dependabot[bot]
9d630add9a Bump docker/setup-buildx-action from 2.0.0 to 2.1.0
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.0.0 to 2.1.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](dc7b9719a9...95cb08cb26)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-17 10:53:28 +00:00
dependabot[bot]
ea88427b7f Bump docker/build-push-action from 3.1.1 to 3.2.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3.1.1 to 3.2.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](c84f382811...c56af95754)

---
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>
2022-10-17 10:53:28 +00:00
Simon Li
cc4a3da32c Merge pull request #4123 from jupyterhub/dependabot/github_actions/docker/setup-qemu-action-2.1.0
Bump docker/setup-qemu-action from 2.0.0 to 2.1.0
2022-10-17 11:52:42 +01:00
Goodness Chris-Ugari
c7f14eec14 Update troubleshooting.md
Removed static header items
2022-10-17 11:07:39 +01:00
Goodness Chris-Ugari
cf1dcd6f3a Update config-user-env.md
update
2022-10-17 10:59:20 +01:00
dependabot[bot]
bcaaaa2d35 Bump docker/setup-qemu-action from 2.0.0 to 2.1.0
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 2.0.0 to 2.1.0.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](8b122486ce...e81a89b173)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-17 05:20:46 +00:00
AdrianaHelga
7462cfa6fd Update services-basics.md 2022-10-16 11:01:21 +03:00
Arafat Abdussalam
a785b8d38a I made the correction to the PR
I resolved my previous commit as suggested
2022-10-14 02:59:34 -07:00
Arafat Abdussalam
714b5925f6 Correction of previous commit
I made a correction to my previous commit as suggested. I will def try to avoid such mistakes.
2022-10-14 02:51:40 -07:00
Ngobiri Falyne
de3210536f Update troubleshooting.md
Adjusted the Heading sudospawner - Sudospawner to suite sentence case
Under proxy Settings, i adjusted the sentence "a organization to an organization" also singleuser to single-user
under Toree intergration, the sentence is not clear so I adjusted to Toree kernel will raise and issue when running with jupyterHub,
2022-10-14 04:53:09 +01:00
Eshy10
e6e1e90386 chore: captitalize the first letter on explation of hub environment 2022-10-14 03:04:08 +01:00
Eshy10
0667451584 chore: remove duplicate version statement and add color to environments title 2022-10-14 02:55:27 +01:00
Alexander Chosen okon
35d26e75f4 Documentation reviewed, made concise & image added 2022-10-13 23:20:10 +00:00
pre-commit-ci[bot]
9f62c76a8e [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-13 22:41:04 +00:00
Esther Christopher
72096b5166 Edited for Clarity
Edited for sentence restructuring, sentence clarity, change of grammar, grammatical punctuation errors, and grammatical correctness.
2022-10-13 17:00:49 +01:00
Zeelyha
88906c2e1b Update templates.md
Fixed a typo
2022-10-13 15:13:30 +01:00
Esther Christopher
67b62db524 Reviewed the documentation
1. Edited the topic of the documentation to Pascal Case.
2. Completed a sentence for clarity
2022-10-13 13:04:42 +01:00
Allan Wasega
f9dbfd7275 Edited and restructured server-api file 2022-10-13 08:58:42 +03:00
Deborah Udoh
b15d56432d Proofread and improve security-basics.rst 2022-10-12 16:21:07 +01:00
Chidinma Udo
a10879f493 Modifications to URLs docs 2022-10-12 16:20:18 +01:00
Tooba Jamal
c2d1a21d32 update spawners-basics.md 2022-10-12 20:18:18 +05:00
Tooba Jamal
8060003fd6 update spawners-basics.md 2022-10-12 20:12:20 +05:00
Shloka
5018c13b81 Fixes 2022-10-12 19:31:04 +05:30
Tooba Jamal
99255b04ac fix typo 2022-10-12 18:59:56 +05:00
Christian Dike
2e6949c6e1 add reference for github oauth config with jupyter
add link to the reference documentation for github oauth configuration with jupyterhub. Fix typos
2022-10-12 14:59:31 +01:00
Tooba Jamal
0f5f0f0df9 update index.rst
Made the requested changes
2022-10-12 18:58:28 +05:00
Goodness Chris-Ugari
da302f5206 Update config-proxy.md
This PR improves the proxy configuration doc and is part of [issue 41](https://github.com/jupyterhub/outreachy/issues/41)
2022-10-12 14:51:22 +01:00
Shloka
b0f90a0f4b Update docs/source/contributing/tests.rst
Co-authored-by: Simon Li <orpheus+devel@gmail.com>
2022-10-12 19:08:01 +05:30
Shloka
7a915533a6 Update docs/source/contributing/tests.rst
Co-authored-by: Simon Li <orpheus+devel@gmail.com>
2022-10-12 19:07:50 +05:30
Shloka
733e018bdc Update docs/source/contributing/tests.rst
Co-authored-by: Simon Li <orpheus+devel@gmail.com>
2022-10-12 19:07:43 +05:30
Busayo-ojo
4380d1c15a Fixed typos and added punctuations 2022-10-12 14:33:58 +01:00
pre-commit-ci[bot]
a87872e7aa [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-12 13:28:00 +00:00
Shloka
578c78397a Modifications 2022-10-12 18:56:30 +05:30
Shloka
0820f4cfa1 Modifications 2022-10-12 18:52:58 +05:30
Ojoachele Onuh
f386da1b7a fixed some typos and technical terms 2022-10-12 13:12:08 +01:00
Goodness Chris-Ugari
71ce37b834 Update troubleshooting.md
Implement suggested changes.
2022-10-12 13:02:12 +01:00
Goodness Chris-Ugari
64965b7a2e Merge branch 'jupyterhub:main' into Goodiec-troubleshooting-doc 2022-10-12 12:53:25 +01:00
pre-commit-ci[bot]
ef7545fc75 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-12 11:34:19 +00:00
pre-commit-ci[bot]
af95d643b1 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-12 11:33:54 +00:00
Goodness Chris-Ugari
67bca186b4 Update config-user-env.md
This PR improves the 'Configuring user environments' doc and is part of [issue 41](https://github.com/jupyterhub/outreachy/issues/41)
2022-10-12 12:31:44 +01:00
Temidayo
08a125489d fixed a typo 2022-10-12 12:29:07 +01:00
Temidayo
1050dadda4 modified announcement README and config.py 2022-10-12 12:27:57 +01:00
Min RK
5997614f45 Merge pull request #4073 from ikeadeoyin/quickstart-docker-guide
improved the quickstart docker guide
2022-10-12 12:40:08 +02:00
Georgiana
7e78394eb2 Merge pull request #4079 from mahamtariq58/documentation
Improve the documentation about log messages
2022-10-12 12:39:53 +02:00
Min RK
fd2717c5ce Merge pull request #4071 from NPDebs/main
Improve Documentation
2022-10-12 12:35:09 +02:00
Tooba Jamal
dcd4e689aa update index.rst 2022-10-12 12:09:57 +05:00
Tooba Jamal
6ef8120f94 fix grammatical error 2022-10-12 10:58:13 +05:00
Joel-Ando
a697c80475 Update tech-implementation.md 2022-10-12 01:10:09 +01:00
mahamtariq58
c675c29fce Update docs/source/admin/log-messages.md
Co-authored-by: Georgiana <georgiana.dolocan@gmail.com>
2022-10-12 02:53:58 +05:00
mahamtariq58
9b44eec7f7 Update docs/source/admin/log-messages.md
Co-authored-by: Georgiana <georgiana.dolocan@gmail.com>
2022-10-12 02:53:43 +05:00
mahamtariq58
9cb4173042 Update docs/source/admin/log-messages.md
Co-authored-by: Georgiana <georgiana.dolocan@gmail.com>
2022-10-12 02:53:24 +05:00
Christian Dike
916a83a954 Update tech-implementation.md
Fix typos and grammatical errors. Improve sentence structure. Use appropriate technical terms.
2022-10-11 19:03:21 +01:00
mahamtariq58
6933e8fb33 Update docs/source/admin/log-messages.md
Co-authored-by: Georgiana <georgiana.dolocan@gmail.com>
2022-10-11 19:57:11 +05:00
Tooba Jamal
8f30f4afd9 update upgrading.rst 2022-10-11 19:40:15 +05:00
Tooba Jamal
d5790ce386 update upgrading.rst 2022-10-11 19:38:36 +05:00
Tooba Jamal
6b4c5e4bce update upgrading.rst 2022-10-11 19:36:04 +05:00
Tooba Jamal
15cf30156d update upgrading.rst 2022-10-11 19:12:03 +05:00
Georgiana
dff0f054d0 Merge pull request #4068 from Goodiec/Goodiec-improve-setup-doc-apge
Update setup.rst
2022-10-11 14:33:27 +02:00
Goodness Chris-Ugari
45b5a249c6 Update setup.rst
Corrected JupyterHub capitalization
2022-10-11 13:02:10 +01:00
Georgiana
e3a25a883f Merge pull request #4070 from Mackenzie-OO7/mackenzie-oo7
Update the Technical Overview Docs
2022-10-11 14:00:19 +02:00
pre-commit-ci[bot]
3ee21cc967 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-11 09:17:46 +00:00
Arafat Abdussalam
941e8c928a Updated log messages
I improved the log message subsection of the documentation by making the page more user friendly
2022-10-11 10:14:03 +01:00
pre-commit-ci[bot]
5d5a424aea [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-11 08:40:40 +00:00
Goodness Chris-Ugari
f2059c0d03 Update troubleshooting.md
This PR improves the troubleshooting doc and is part of [issue 41](https://github.com/jupyterhub/outreachy/issues/41)
2022-10-11 09:37:54 +01:00
Goodness Chris-Ugari
20f6b13e86 Merge branch 'jupyterhub:main' into Goodiec-improve-setup-doc-apge 2022-10-11 09:14:54 +01:00
Melissa Kirabo
eb6bf3f698 Update index.rst
I have made some changes to the flow of the documentation, added descriptions, and corrected grammatical errors
2022-10-11 10:06:24 +03:00
Arafat Abdussalam
b87b8c52d3 updated websecirity.md
I have the grammatical errors written on the page such as improving the abbreviated words with apostrophes and other typos
2022-10-11 07:21:19 +01:00
pre-commit-ci[bot]
a2852b1b2b [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-10 22:41:59 +00:00
mahamtariq58
b98e981e6a Merge branch 'jupyterhub:main' into documentation 2022-10-11 03:38:52 +05:00
Maham Tariq
d223c0edff Fixed some confused Lines 2022-10-11 02:58:19 +05:00
pre-commit-ci[bot]
53bf7a18ae [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-10 17:03:46 +00:00
Deborah Udoh
835fe8be8f Update roles.md in line with review 2022-10-10 18:03:13 +01:00
Deborah Udoh
ed71aead2b Update roles.md
Co-authored-by: Min RK <benjaminrk@gmail.com>
2022-10-10 17:56:35 +01:00
Georgiana
5713e56fd1 Merge pull request #4067 from Uzor13/uzor-dev
Fixed some typos and add missing links
2022-10-10 14:39:24 +02:00
Uzochukwu Precious
eb65bd7dd6 role link added to note 2022-10-10 12:34:14 +01:00
Tooba Jamal
aa101a7aff Update index.rst 2022-10-10 15:36:10 +05:00
ikeadeoyin
743406e60d made the necessary changes 2022-10-10 10:50:49 +01:00
Chidinma Udo
7f191ea5e8 Applied suggestions from code review
Co-authored-by: Min RK <benjaminrk@gmail.com>
2022-10-10 10:41:57 +01:00
Tooba Jamal
915fab2d26 Update index.rst 2022-10-10 12:55:16 +05:00
ikeadeoyin
b961925bbc improved the quickstart docker guide 2022-10-10 08:48:43 +01:00
Tooba Jamal
3425269cb2 Update index.rst 2022-10-10 12:34:09 +05:00
Min RK
9280621ca8 Merge pull request #4063 from minrk/resolve-excluded-scopes
Fully resolve requested scopes in oauth
2022-10-10 09:24:43 +02:00
ruqayaahh
2661eab54b updated obsolete links and made wordings clearer 2022-10-10 06:07:38 +01:00
pre-commit-ci[bot]
18b1df8bc6 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-09 19:07:30 +00:00
Deborah Udoh
674c441935 Improve documentation 2022-10-09 19:37:59 +01:00
Uzochukwu Precious
e324d89f8a review update 2022-10-09 17:44:32 +01:00
Chidinma Udo
433bb09e9e fixed broken link 2022-10-09 17:13:53 +01:00
Chidinma Udo
facf8039c3 fixed some typos and embedded links 2022-10-09 17:02:27 +01:00
Shloka
395b1a5681 Modifications is testing docs 2022-10-09 19:07:20 +05:30
Goodness Chris-Ugari
65caf37d71 Update setup.rst
This PR improves the setup page and is part of issue #41
2022-10-09 12:37:52 +01:00
Uzochukwu Precious
f5cb617ce7 fixed some typos and also added links #41 2022-10-08 23:16:44 +01:00
pre-commit-ci[bot]
204bfaf8f4 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-08 17:13:41 +00:00
Shloka
f0c825cc1e Modification in community channels 2022-10-08 22:40:22 +05:30
Erik Sundell
fd5705b74b Align test variables' naming with tested function's terminology 2022-10-08 17:03:50 +02:00
Min RK
7585026f81 consistent naming, docstrings for disallowed scopes 2022-10-07 10:45:14 -07:00
Min RK
a4fd0980a3 Back off removal of read:servers -> read:users:name
Only remove it when using the !server filter, which doesn't make sense for read:users:name
2022-10-07 10:29:48 -07:00
Erik Sundell
c126cc3f9b Merge pull request #4064 from minrk/oauth-deprecado
set stacklevel for oauth_scopes deprecation warning
2022-10-06 12:51:04 +02:00
Min RK
f70b11af11 resolve full scope intersection for oauth
allows subset filters in oauth (e.g. server requests scope!server while user has scope!user)
2022-10-05 19:53:54 -07:00
Min RK
6024a9780f remove implicit grant of read:users:name from read:servers
results in weird extra permission that aren't needed
2022-10-05 19:53:54 -07:00
Min RK
63c391641a set stacklevel for oauth_scopes deprecation warning
so it's visible where the deprecated API is called
2022-10-05 18:49:32 -07:00
Erik Sundell
7a6c2038d8 Merge pull request #4061 from Temidayo32/main
modified the contributing documentation
2022-10-03 16:12:37 +02:00
Temidayo
83fb49e7cf Merge branch 'jupyterhub:main' into main 2022-10-02 14:52:24 +01:00
Temidayo
15bf61df2a modified the contributing documentation 2022-10-02 14:39:51 +01: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
Min RK
387e983543 Merge pull request #4053 from danilopeixoto/callable-named-server-limit
Set named_server_limit_per_user type as integer or callable
2022-09-30 09:44:15 +02:00
Danilo Peixoto
37d35953bc Set named_server_limit_per_user type as integer or callable 2022-09-30 09:28:04 +02:00
Min RK
666b3cb36e Merge pull request #4054 from jupyterhub/dependabot/github_actions/char0n/swagger-editor-validate-1.3.2
Bump char0n/swagger-editor-validate from 1.3.1 to 1.3.2
2022-09-30 09:24:41 +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
vpopescu
6f6d60297c Merge branch 'group_property_feature' of https://github.com/vladfreeze/jupyterhub into group_property_feature 2022-09-29 16:55:41 +02:00
vpopescu
c8f0bed963 Made error disappear if keys have been fixed 2022-09-29 16:55:27 +02:00
pre-commit-ci[bot]
a1212a8503 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-09-29 14:48:32 +00:00
vpopescu
40eae6c685 Changed error to alert.alert-danger 2022-09-29 16:46:08 +02:00
dependabot[bot]
2c897a7ca3 Bump char0n/swagger-editor-validate from 1.3.1 to 1.3.2
Bumps [char0n/swagger-editor-validate](https://github.com/char0n/swagger-editor-validate) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/char0n/swagger-editor-validate/releases)
- [Commits](https://github.com/char0n/swagger-editor-validate/compare/v1.3.1...v1.3.2)

---
updated-dependencies:
- dependency-name: char0n/swagger-editor-validate
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-26 05:27:06 +00:00
Min RK
1a0b46a5c8 Merge pull request #4046 from Neeraj-Natu/main
mentioning limitations of spawner.environment
2022-09-23 13:32:50 +02:00
pre-commit-ci[bot]
596f9669d7 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-09-23 11:25:40 +00:00
neerajnatu
55fbb0b5fe review comments address 2022-09-23 16:54:53 +05:30
Min RK
a3795ad672 Merge pull request #4035 from manics/docker-yarn
setup.py: require npm, check that NPM CSS JSX commands succeed
2022-09-23 10:49:44 +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
pre-commit-ci[bot]
e205d05ec8 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-09-22 13:36:49 +00:00
vpopescu
2cdba6f42a Added type checks 2022-09-22 15:36:17 +02:00
vpopescu
6219c206e9 Merge branch 'group_property_feature' of https://github.com/vladfreeze/jupyterhub into group_property_feature 2022-09-22 15:23:48 +02:00
vpopescu
9d82a64a85 Removed setpropkeys and setpropvalues for testing 2022-09-22 15:23:46 +02:00
pre-commit-ci[bot]
7a4a00e5c1 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-09-22 13:12:51 +00:00
vpopescu
f28b613ccb Merge branch 'group_property_feature' of https://github.com/vladfreeze/jupyterhub into group_property_feature 2022-09-22 15:11:42 +02:00
vpopescu
20f5c2690b Added check for current_propobject 2022-09-22 15:11:40 +02:00
Min RK
38afbcc0d0 Merge pull request #4045 from miwig/fix_crash_when_removing_scopes
Fix crash when removing scopes attribute from an existing role
2022-09-22 15:08:27 +02:00
pre-commit-ci[bot]
f9b3ff58f9 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-09-22 11:02:27 +00:00
vpopescu
0a1811e86c Made DynamicTable functional 2022-09-22 13:01:53 +02:00
Vlad Vifor
e8ae58f6b5 Merge branch 'jupyterhub:main' into group_property_feature 2022-09-22 12:34:30 +02:00
mouse1203
08b71e7f56 adding asyncio.sleep into test_invalid_credantials
added asyncio.sleep into test_invalid_credantials
2022-09-19 16:28:33 +02:00
mouse1203
9d90496549 updating regarding to the review
removed time.sleep(), removed inrelevant comments, removed unused packages, added few explanations for some functions (in progress), documenting  in progress, added to conftest.py package with Options class
2022-09-19 15:18:07 +02:00
Simon Li
df222de915 verify sdist can be installed without npm/yarn 2022-09-18 17:14:05 +01:00
pre-commit-ci[bot]
01e4f2b974 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-09-17 10:27:34 +00:00
neerajnatu
bffdf690d9 adding to contributor list 2022-09-17 15:49:26 +05:30
neerajnatu
0f06c9376a mentioning limitations of spawner.environment 2022-09-17 15:17:23 +05:30
pre-commit-ci[bot]
99eb8d6a2a [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-09-16 12:43:30 +00:00
Michael Wigard
3bb0d57e35 Fix crash when removing scopes attribute from an existing role 2022-09-16 14:27:12 +02:00
Min RK
29ffb23d67 Merge pull request #4039 from hjoliver/fix-launch-instance 2022-09-13 17:05:11 +02:00
Min RK
729099f87d test coverage for launch_instance(argv) 2022-09-13 12:02:02 +02:00
Hilary James Oliver
daf395c2c3 Pass launch_instance args on correctly. 2022-09-13 09:27:49 +12:00
Simon Li
8b68286486 setup.py: require npm, check that NPM CSS JSX commands succeed 2022-09-10 17:59:53 +01:00
Erik Sundell
ad44b16104 Merge pull request #4034 from manics/docker-yarn
Fix Dockerfile yarn JSX build
2022-09-10 16:42:04 +02:00
Simon Li
fa33faeefa Dockerfile: check static/js/admin-react.js exists 2022-09-10 12:31:27 +01:00
Simon Li
a3b20bb220 Dockerfile: install yarn with npm 2022-09-10 12:24:17 +01:00
Simon Li
b644052cb4 Dockerfile: Use python -m build to match release workflow 2022-09-10 12:12:58 +01:00
Min RK
02dead8ab1 Bump to 3.1.0.dev 2022-09-09 08:37:18 +02:00
Min RK
24506888ea Bump to 3.0.0 2022-09-09 08:32:58 +02:00
Min RK
457ad3ec85 Merge pull request #4029 from consideRatio/pr/update-changelog-for-3.0.0
Update changelog for 3.0.0
2022-09-09 08:16:24 +02:00
Min RK
75e8274a7b date for 3.0.0 2022-09-09 08:16:07 +02:00
Min RK
dd69213a3c [capacity doc]: add concurrent user section 2022-09-07 12:42:41 +02:00
Min RK
1aafdb1d1b doc: More suggestions from review
- add costs, links
- labels for use cases
- literal math formatting
2022-09-07 12:29:09 +02:00
pre-commit-ci[bot]
9a84b9d9a1 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-09-07 09:56:00 +00:00
Min RK
bf6786c55b Apply suggestions from code review
Co-authored-by: Chris Holdgraf <choldgraf@gmail.com>
2022-09-07 11:55:33 +02:00
Erik Sundell
2a3ceff29f Update changelog for 3.0.0 2022-09-07 09:58:17 +02:00
Min RK
1e9614b218 Add capacity planning doc 2022-09-06 12:25:39 +02:00
Erik Sundell
5e29605341 Merge pull request #4018 from minrk/reset-offset
reset offset to 0 on name filter change
2022-09-05 18:46:08 +02:00
Min RK
34b6bc3a3f call reducers in some tests
allows testing reducer functionality

workaround bug preventing mocked useSelector from behaving realistically
2022-09-05 15:09:11 +02:00
Min RK
485190e5af make selenium tests opt-in
avoids running them over and over again
2022-09-02 14:00:19 +02:00
Min RK
b90200667f fix headless firefox option 2022-09-02 14:00:19 +02:00
mouse1203
5885f88d79 Update jupyterhub/tests/selenium/conftest.py
Co-authored-by: Min RK <benjaminrk@gmail.com>
2022-09-02 13:43:20 +02:00
mouse1203
b87561d396 remove conditional for FireFox
removing conditionals for FF
2022-09-02 13:32:11 +02:00
mouse1203
10aba2c038 Merge branch 'main' of https://github.com/jupyterhub/jupyterhub 2022-09-02 13:14:28 +02:00
mouse1203
09c4fee780 add selenium tests 2022-09-02 13:12:31 +02:00
pre-commit-ci[bot]
4033dbbd3f [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-08-25 12:37:08 +00:00
vpopescu
85da3be6af Merge branch 'group_property_feature' of https://github.com/vladfreeze/jupyterhub into group_property_feature 2022-08-25 14:36:38 +02:00
vpopescu
59d43edea1 Removed redirect to /groups when clicking on apply 2022-08-25 14:36:35 +02:00
pre-commit-ci[bot]
4a93cffb52 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-08-25 12:33:48 +00:00
vpopescu
7fb6df1c18 Fixed bug where inputs remained in the fields after already being added 2022-08-25 14:31:17 +02:00
Erik Sundell
7a48da1916 Merge pull request #4022 from possiblyMikeB/token-template-correction
Use correct expiration labels in drop-down menu on token page.
2022-08-24 20:01:20 +02:00
possiblyMikeB
5eaf59dd72 correct token expiration time labels 2022-08-23 18:29:15 -04:00
Simon Li
73a33ed5fc Merge pull request #4019 from minrk/sync-groups-repeat
avoid database error on repeated group name in sync_groups
2022-08-19 16:54:06 +01:00
vpopescu
f17fb36501 fixed button naming 2022-08-19 16:04:35 +02:00
vpopescu
3ff1afa88b Merge branch 'group_property_feature' of https://github.com/vladfreeze/jupyterhub into group_property_feature 2022-08-19 16:03:09 +02:00
vpopescu
faf3b4b477 fixed button naming 2022-08-19 16:01:14 +02:00
pre-commit-ci[bot]
452891148e [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-08-19 13:51:05 +00:00
vpopescu
b76a9ff146 fixed redirect bug when adding properties 2022-08-19 15:50:25 +02:00
Min RK
0b9ae96a96 avoid database error on repeated group name in sync_groups 2022-08-19 10:53:21 +02:00
Min RK
2c9653bc0d reset offset to 0 on name filter change
move offset to redux state, rather than independent,
since it can come from two places (user_page and pagination footer). Keeps things in sync.

Adds reducers for setting offset, name filter explicitly.
2022-08-19 10:25:17 +02:00
vpopescu
08164fb0a7 Merge branch 'group_property_feature' of https://github.com/vladfreeze/jupyterhub into group_property_feature 2022-08-18 16:01:51 +02:00
vpopescu
ce4d8cf0f3 fixed typo 2022-08-18 16:01:48 +02:00
pre-commit-ci[bot]
224b14043a [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-08-18 14:00:40 +00:00
vpopescu
0fe08ad082 Fixed test issues 2022-08-18 15:59:39 +02:00
Vlad Vifor
516c394303 Merge branch 'jupyterhub:main' into group_property_feature 2022-08-18 15:40:35 +02:00
Erik Sundell
71e86f3064 Merge pull request #4016 from minrk/edituser-validate
admin: avoid redundant client-side username validation in edit-user
2022-08-16 14:13:49 +02:00
Min RK
8a1110f2c0 admin: avoid redundant client-side username validation
username validation is the server-side's responsibility
2022-08-16 13:48:36 +02:00
Min RK
bb52351a6e Merge pull request #4013 from minrk/test-311
Test 3.11
2022-08-10 11:36:14 +02:00
Min RK
87c745d3bf mock greenlet needs to raise ImportError 2022-08-10 11:02:53 +02:00
Min RK
374c6c848b it's actually greenlet 2022-08-10 10:45:57 +02:00
Min RK
af31ee8c94 condition brackets
Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2022-08-10 10:28:30 +02:00
Min RK
26a9883b93 add mock-gevent to allow install on Python 3.11
gevent is not actually required, but sqlalchemy lists it as a dependency (on linux only)
2022-08-10 10:08:08 +02:00
Min RK
bda3e0c931 test on Python 3.11.0-rc.1 2022-08-10 10:06:37 +02:00
Min RK
f3d17eb77e Merge pull request #4012 from minrk/doc-oauth-no-confirm
document oauth_no_confirm in services
2022-08-10 09:30:48 +02:00
Erik Sundell
5f92cfcc0e Merge pull request #4011 from minrk/trim-form-input
restore trimming of username input
2022-08-10 09:05:34 +02:00
Min RK
b55eaae51f document oauth_no_confirm in services 2022-08-10 08:57:35 +02:00
Min RK
c9e6d6afa3 restore trimming of username input
continue to not trim password or custom fields

trailing/leading space is explicitly forbidden in validate_username
2022-08-10 08:45:50 +02:00
Erik Sundell
2f1d340c42 Merge pull request #4006 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-08-09 08:09:29 +02:00
pre-commit-ci[bot]
2ba99656c1 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/PyCQA/flake8: 5.0.2 → 5.0.4](https://github.com/PyCQA/flake8/compare/5.0.2...5.0.4)
2022-08-08 22:58:55 +00:00
Erik Sundell
635f63c1cd Merge pull request #4005 from jupyterhub/dependabot/github_actions/docker/build-push-action-3.1.1
Bump docker/build-push-action from 3.1.0 to 3.1.1
2022-08-08 09:50:23 +02:00
dependabot[bot]
b9b49ff306 Bump docker/build-push-action from 3.1.0 to 3.1.1
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](1cb9d22b93...c84f382811)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-08 05:29:25 +00:00
Min RK
5640a1506e Merge pull request #4002 from naatebarber/admin-with-pagination-api
Integrate Pagination API into Admin JSX
2022-08-05 12:07:12 +02:00
vpopescu
d4532c64aa fixed base.py 2022-08-04 17:59:06 +02:00
pre-commit-ci[bot]
4767cfa4e9 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-08-04 14:18:27 +00:00
Nathan Barber
309d687c26 Update jsx/src/components/Groups/Groups.jsx
Co-authored-by: Min RK <benjaminrk@gmail.com>
2022-08-04 10:17:43 -04:00
Nathan Barber
df25c09962 Update jsx/src/components/PaginationFooter/PaginationFooter.jsx
Co-authored-by: Min RK <benjaminrk@gmail.com>
2022-08-04 10:17:35 -04:00
pre-commit-ci[bot]
5e94759fde [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-08-04 14:17:26 +00:00
vpopescu
b6a4b702ac update tests 2022-08-04 16:16:39 +02:00
vpopescu
7d902e87cd Updated test roles and scopes to correspond to new group structure 2022-08-04 16:06:41 +02:00
vpopescu
d4213a98d0 fixed test_app 2022-08-04 15:55:32 +02:00
vpopescu
6b67a1b146 fixed test_api 2022-08-04 15:47:21 +02:00
vpopescu
463e1fb9d7 app and orm 2022-08-04 15:30:08 +02:00
vpopescu
4440e56aa1 Added alembic and apihandlers 2022-08-04 15:26:55 +02:00
vpopescu
f59727b39f Added front-end 2022-08-04 15:22:27 +02:00
Nathan Barber
09d0909878 Update unit tests to spec 2022-08-03 12:50:29 -04:00
Nathan Barber
72db4624e0 Move user/group queries from app to component uE's 2022-08-03 12:28:05 -04:00
Nathan Barber
e9eca22e3b add useEffect, new pagination style 2022-08-03 12:18:28 -04:00
Nathan Barber
33d4f382d5 Use data.items to display users 2022-08-03 10:59:38 -04:00
pre-commit-ci[bot]
aa1eb32b4c [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-08-03 14:11:16 +00:00
vpopescu
d690cfad38 Updated test_app.py for load_groups feature 2022-08-03 16:08:24 +02:00
vpopescu
0b04bf1181 Merge branch 'group_property_feature' of https://github.com/vladfreeze/jupyterhub into group_property_feature 2022-08-03 15:09:58 +02:00
vpopescu
9450a69bd3 testing load_groups 2022-08-03 15:09:33 +02:00
pre-commit-ci[bot]
67573728ad [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-08-03 11:50:31 +00:00
vpopescu
7011bc12fe Updating test_load_groups 2022-08-03 13:48:51 +02:00
Vlad Vifor
9186594dc1 Merge branch 'jupyterhub:main' into group_property_feature 2022-08-03 12:24:35 +02:00
Min RK
562a24b651 Bump to 3.0.0b1 2022-08-02 15:10:28 +02:00
Simon Li
9318eb3fb2 Merge pull request #3994 from minrk/3.0-changelog
3.0 changelog
2022-08-02 14:05:38 +01:00
Min RK
0590b76cd0 3.0: refresh changelog entries 2022-08-02 14:42:33 +02:00
Min RK
8aac18c96d More documentation for 3.0 role/scope changes
a few more outdated `versionchanged` notes
2022-08-02 14:39:03 +02:00
Erik Sundell
6a6b8567c0 Merge pull request #3909 from minrk/include_stopped_servers
include stopped servers in user model
2022-08-02 14:31:14 +02:00
Min RK
78438bdfcc Begin 3.0 changelog
had to manually remove already-backported PRs
2022-08-02 14:29:16 +02:00
Erik Sundell
2096c956db Merge pull request #3877 from minrk/oauth_config
store scopes on oauth clients, too
2022-08-02 14:12:15 +02:00
Min RK
dfc2d4d4f1 Merge remote-tracking branch 'origin/main' into oauth_config 2022-08-02 13:53:51 +02:00
Min RK
5f57b72d6e fix version change in comment now that it's 3.0 2022-08-02 13:37:33 +02:00
Min RK
6a470b44e7 explicitly support async oauth_client_allowed_scopes 2022-08-02 13:37:32 +02:00
Min RK
a35a2ec8b7 less space
Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2022-08-02 13:34:42 +02:00
Min RK
978b71c8bb Merge pull request #4001 from minrk/info-table-sort
admin: format user/server-info tables
2022-08-02 13:18:06 +02:00
Min RK
f3b328a4d8 format user/server-info tables
- sort keys for consistent presentation
- use text list for roles, groups, which aren't well rendered by the table-formatter (number index isn't helpful)
- render timestamps
- leave empty name for default server, instead of '[MAIN]' which isn't terminology used anywhere else
2022-08-02 12:28:13 +02:00
Min RK
9da78880e6 Merge pull request #4000 from minrk/jsx-deps
[admin] update, clean jsx deps
2022-08-02 12:27:12 +02:00
Vlad Vifor
4d38087fa8 Merge branch 'jupyterhub:main' into group_property_feature 2022-08-02 11:58:16 +02:00
Min RK
f2871cfc3c update to maintained recompose fork 2022-08-02 11:58:01 +02:00
Min RK
24efd12ab5 jsx: move dev dependencies to devDependencies
doesn't really make a difference since it's not a real package, but cleaner.

updates webpack-dev-server
2022-08-02 11:05:42 +02:00
Erik Sundell
9b2e6b1c1d Merge pull request #3992 from minrk/avoid-deprecated-clear-current-singleuser
Avoid IOLoop.current in singleuser mixins
2022-08-02 10:06:43 +02:00
Erik Sundell
9f62d83568 Merge pull request #3998 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-08-02 08:54:33 +02:00
pre-commit-ci[bot]
7eb3575502 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.37.2 → v2.37.3](https://github.com/asottile/pyupgrade/compare/v2.37.2...v2.37.3)
- [github.com/PyCQA/flake8: 4.0.1 → 5.0.2](https://github.com/PyCQA/flake8/compare/4.0.1...5.0.2)
2022-08-01 23:15:08 +00:00
Min RK
6afa0d6311 include stopped servers in user model
opt-in, behind ?include_stopped_servers

Adds `stopped` field to server model to more easily select stopped servers
2022-08-01 15:47:36 +02:00
Erik Sundell
d170601678 Merge pull request #3997 from minrk/inaccurate-cookie
Remove outdated cookie-secret note in security docs
2022-08-01 14:20:20 +02:00
Min RK
01a33d150f Remove outdated cookie-secret note in security docs
this was true when we used shared cookie auth long ago
2022-08-01 13:28:13 +02:00
Simon Li
28b11d2165 Merge pull request #3969 from consideRatio/pr/set-announcement-properly
Fix disabling of individual page template announcements
2022-07-30 17:38:47 +01:00
Erik Sundell
83b5e8f3da Only blank strings to disable a specific page's announcement
Co-authored-by: Min RK <benjaminrk@gmail.com>
2022-07-30 11:53:00 +02:00
Min RK
e4e4bf5ff4 next release is 3.0, not 2.4 2022-07-29 15:35:08 +02:00
Min RK
ab3a01b9f6 even latest jupyter-server requires current event loop
for nbconvert handler lock
2022-07-29 15:31:50 +02:00
Min RK
8548472b6e Avoid IOLoop.current in singleuser mixins
- define our own init_ioloop
- call it ASAP
- put init_httpserver in IOLoop.run_sync because instantiating a server accesses the current loop
- run cleanup via asyncio.run
2022-07-29 14:51:30 +02:00
Erik Sundell
ab776e3989 Merge pull request #3974 from minrk/avoid-deprecated-clear-current
Avoid deprecated 'IOLoop.current' method
2022-07-29 12:03:52 +02:00
Min RK
b0b7378e2b Avoid deprecated 'IOLoop.current' method
Deprecated in tornado 6.2, only access running loop from inside coroutines
2022-07-29 11:30:39 +02:00
Erik Sundell
75e03ef1d9 Merge pull request #3976 from minrk/bump-versions
Require Python 3.7
2022-07-29 10:42:15 +02:00
Min RK
986de0b5db use str-format for ssl.Purposes
rather than default, which is a weird repr
2022-07-29 09:26:21 +02:00
Min RK
6959c9dde3 Merge pull request #3985 from jupyterhub/dependabot/npm_and_yarn/jsx/terser-5.14.2
Bump terser from 5.12.1 to 5.14.2 in /jsx
2022-07-29 08:30:05 +02:00
Min RK
53087e50e4 Merge pull request #3989 from rpwagner/patch-1
bump moment.js 2.29.4
2022-07-29 08:27:46 +02:00
Erik Sundell
dee830a56f Merge pull request #3975 from minrk/dockerfile-base
Bump Dockerfile base image to 22.04
2022-07-27 20:38:42 +02:00
Rick Wagner
45179c53b7 bump moment.js 2.29.4 2022-07-26 10:21:55 -07:00
Erik Sundell
6c7cb65224 Merge pull request #3988 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-07-26 10:30:45 +02:00
pre-commit-ci[bot]
0038b3c2e8 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.37.1 → v2.37.2](https://github.com/asottile/pyupgrade/compare/v2.37.1...v2.37.2)
2022-07-25 22:16:38 +00:00
Erik Sundell
17bb8a9ba4 Unpin Dockerfile's ubuntu base image 2022-07-25 15:27:50 +02:00
Erik Sundell
9756c13f13 Merge pull request #3987 from jupyterhub/dependabot/github_actions/docker/build-push-action-3.1.0
Bump docker/build-push-action from 3.0.0 to 3.1.0
2022-07-25 10:03:26 +02:00
dependabot[bot]
be84b06ca6 Bump docker/build-push-action from 3.0.0 to 3.1.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](e551b19e49...1cb9d22b93)

---
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>
2022-07-25 05:30:44 +00:00
dependabot[bot]
3ee88d99da Bump terser from 5.12.1 to 5.14.2 in /jsx
Bumps [terser](https://github.com/terser/terser) from 5.12.1 to 5.14.2.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-20 22:58:57 +00:00
Erik Sundell
16b0a2ac3b Merge pull request #3978 from minrk/warn-stacklevel
Increase stacklevel for decorated warnings
2022-07-15 08:44:12 +02:00
Min RK
a82d2e4903 Merge pull request #3977 from minrk/unpin-nbclassic
unpin nbclassic
2022-07-14 21:16:54 -07:00
Min RK
cef241a80b test: handle possibility that notebook is unavailable
no longer a strict dependency of other test deps
2022-07-14 21:07:57 -07:00
Min RK
eab6a1a112 typo in jinja env name
use loop variable, not hardcoded string
2022-07-14 20:34:07 -07:00
Min RK
827bfc99ec Merge pull request #3962 from manics/ConfigurableHTTPProxy-log_level
Add ConfigurableHTTPProxy.log_level
2022-07-14 20:22:41 -07:00
Min RK
b5bd307999 urllib.quote doesn't escape ~ starting with Python 3.7
3.7 adds ~ to the 'unreserved' (always safe) set,
but it's not safe in domain names.
so do it ourselves. Formalize in a `_dns_quote` private function,
with notes about issues.

The only usernames that change in this PR are those containing `_` or `/`,
the latter of which would have failed.
2022-07-14 20:19:50 -07:00
Min RK
d02d029e88 adjust Python test order 2022-07-14 16:02:01 -07:00
Min RK
e41885c458 Increase stacklevel for decorated warnings
otherwise warning just shows as being triggered in the decorator function
2022-07-14 16:00:27 -07:00
Simon Li
78ac9946e3 Use CaselessStrEnum instead of Enum 2022-07-14 21:51:14 +01:00
Simon Li
bd8e8eaa09 Add ConfigurableHTTPProxy.log_level 2022-07-14 21:51:12 +01:00
Min RK
a2a01755ec simplify make_ssl_context
pass ssl.Purpose explicitly, deprecate verify/check_hostname

3.10 disallows 'purpose=SERVER_AUTH' from creating server sockets.
Instead:

- pass purpose directly
- always verify
- no need to set check_hostname, already covered by purpose defaults
2022-07-14 11:02:44 -07:00
Min RK
a593c6187f can't test 3.11 yet because greenlet cannot be installed
sqlalchemy requires greenlet on linux, even though we don't use it
2022-07-14 10:10:58 -07:00
Min RK
b159cbfeef unpin nbclassic
0.4.3 is out, see if it fixes things
2022-07-14 09:09:25 -07:00
Min RK
a7cced506b Remove 3.6 compatibility shims
- asyncio.all_tasks/current_task
- pytest-asyncio 0.17
- contextmanager.nullcontext
2022-07-14 09:05:01 -07:00
Min RK
e8469af763 fixup: remove redundant check 2022-07-14 09:05:01 -07:00
Min RK
d2c6b23bf9 update python versions in test matrix 2022-07-14 09:05:01 -07:00
Min RK
c657498d75 require Python 3.7
drops support for Python 3.6
2022-07-14 09:05:01 -07:00
Min RK
001d0c9af1 call legacy notebook matrix entry legacy_notebook
instead of nbclassic, which is explicitly classic nb ui on jupyter-server (the opposite of these tests)
2022-07-14 09:05:01 -07:00
Min RK
0d0368c042 Bump Dockerfile base image to 22.04 2022-07-14 09:03:53 -07:00
Min RK
6fdd0ff7c5 Merge pull request #3967 from minrk/validate-extra-routes
validate proxy.extra_routes
2022-07-14 09:01:12 -07:00
Vlad Vifor
6a8b1be940 Merge branch 'jupyterhub:main' into group_property_feature 2022-07-14 12:23:08 +02:00
Min RK
dee671b640 Merge pull request #3883 from minrk/async-hub-auth
allow HubAuth to be async
2022-07-13 20:38:36 -07:00
Min RK
c289a422c3 validate proxy.extra_routes
- add trailing slash if missing, and warn
- raise if leading slash is wrong (must not be present with host routing, must be present otherwise)
2022-07-13 20:33:39 -07:00
Erik Sundell
fa47529cf1 Merge pull request #3971 from minrk/nbclassic-renamed
nbclassic extension name has been renamed
2022-07-12 08:06:29 +02:00
Erik Sundell
6769de5b01 Merge pull request #3970 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-07-12 08:03:49 +02:00
Min RK
c8a8892292 nbclassic extension name has been renamed
our patches to the jinja env need updating to find the new env
2022-07-11 20:37:29 -07:00
pre-commit-ci[bot]
273b25cb6f [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.34.0 → v2.37.1](https://github.com/asottile/pyupgrade/compare/v2.34.0...v2.37.1)
2022-07-11 21:54:26 +00:00
Erik Sundell
71e06a4cd7 Merge pull request #3958 from minrk/autocomplete-annotation
add correct autocomplete fields for login form
2022-07-10 12:11:04 +02:00
Erik Sundell
827310aca6 Fix disabling of individual page template announcements 2022-07-10 12:05:48 +02:00
Min RK
b9c83cf7ab allow HubAuth to be async
Switches requests to tornado AsyncHTTPClient instead of requests

For backward-compatibility, use opt-in `sync=False` arg for all public methods that _may_ be async

When sync=True (default), async functions still used, but blocking via ThreadPool + asyncio run_until_complete
2022-07-09 16:45:41 -07:00
Min RK
8a44748324 Bump to 2.4.0.dev 2022-07-09 16:44:24 -07:00
Min RK
e4f469ef73 Merge pull request #3968 from minrk/test-nbclassic
pin nbclassic in dev requirements
2022-07-09 16:41:27 -07:00
Min RK
4cf4566fff pin nbclassic < 0.4
0.4 doesn't actually load at all
2022-07-09 10:05:15 -07:00
Min RK
55c866f340 note why we depend on nbclassic
Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2022-07-08 12:15:41 -07:00
Min RK
fd550e223e add nbclassic to dev requirements
ensures `/tree/` handler is present
2022-07-08 10:32:13 -07:00
Min RK
225ace636a call client-allowed scopes JUPYTERHUB_OAUTH_CLIENT_ALLOWED_SCOPES 2022-07-08 10:18:59 -07:00
Erik Sundell
ee4c8b835b Merge pull request #3964 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-07-05 10:56:02 +02:00
pre-commit-ci[bot]
f43ad0c176 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/psf/black: 22.3.0 → 22.6.0](https://github.com/psf/black/compare/22.3.0...22.6.0)
2022-07-04 22:34:28 +00:00
Min RK
95de2618a3 Merge pull request #3960 from cqzlxl/cqzlxl-patch-1
Fix GET /api/proxy with pagination
2022-06-30 21:18:09 +02:00
Min RK
48c9f6ca50 Test proxy API endpoint with pagination 2022-06-30 12:09:20 -07:00
cqzlxl
2d56bb74eb FIX a bug
it's an obvious bug.
2022-06-27 22:42:33 +08:00
Min RK
42cc3cae8e add correct autocomplete fields for login form 2022-06-24 10:37:50 +02:00
Min RK
02da11e06e Merge pull request #3955 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-06-21 09:58:36 +02:00
pre-commit-ci[bot]
eb1061a910 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pre-commit/mirrors-prettier: v2.6.2 → v2.7.1](https://github.com/pre-commit/mirrors-prettier/compare/v2.6.2...v2.7.1)
2022-06-20 21:02:45 +00:00
Vlad Vifor
5d9967d3bd Merge branch 'jupyterhub:main' into group_property_feature 2022-06-17 13:59:31 +02:00
Min RK
d852d9e37c Merge pull request #3953 from silenius/freebsd_pw
FreeBSD, missing -n for pw useradd
2022-06-16 11:33:06 +02:00
Julien Cigar
1392aee195 -n is required 2022-06-15 17:23:13 +02:00
pre-commit-ci[bot]
3b4c8fe827 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-06-14 14:44:41 +00:00
vpopescu
052bf17292 Simplified hasDuplicates function 2022-06-14 16:44:08 +02:00
vpopescu
8df935829d Merge branch 'group_property_feature' of https://github.com/vladfreeze/jupyterhub into group_property_feature 2022-06-14 16:35:21 +02:00
vpopescu
39479609ca Added key check on users 2022-06-14 16:35:19 +02:00
pre-commit-ci[bot]
4344b0c0b0 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-06-14 14:27:38 +00:00
vpopescu
13ea058bbb Merge branch 'group_property_feature' of https://github.com/vladfreeze/jupyterhub into group_property_feature 2022-06-14 16:26:59 +02:00
vpopescu
8fe4bc201e Added properties to documentation for load_groups + example 2022-06-14 16:25:04 +02:00
pre-commit-ci[bot]
f6a35de542 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-06-14 14:22:53 +00:00
vpopescu
d7fbe494dd Added properties support in app.py 2022-06-14 16:22:15 +02:00
vpopescu
1ccf282170 Merge commit '63b7defe1a40b3abc3582a65a0402c1e82a2e230' into group_property_feature 2022-06-14 14:57:06 +02:00
Erik Sundell
63b7defe1a Merge pull request #3950 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-06-14 00:43:29 +02:00
pre-commit-ci[bot]
00803f039a [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.32.1 → v2.34.0](https://github.com/asottile/pyupgrade/compare/v2.32.1...v2.34.0)
- [github.com/pre-commit/pre-commit-hooks: v4.2.0 → v4.3.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.2.0...v4.3.0)
2022-06-13 22:29:26 +00:00
Erik Sundell
2b1c246c13 Merge pull request #3947 from jupyterhub/dependabot/github_actions/char0n/swagger-editor-validate-8829b79e438e100191c1e6ec1519daf0b66fed34
Bump char0n/swagger-editor-validate from 182d1a5d26ff5c2f4f452c43bd55e2c7d8064003 to 1.3.1
2022-06-13 13:48:53 +02:00
Erik Sundell
4f6dd69cb1 Merge pull request #3949 from jupyterhub/dependabot/github_actions/actions/setup-python-4
Bump actions/setup-python from 2 to 4
2022-06-13 13:48:43 +02:00
Erik Sundell
4fde1d2b65 Apply suggestions from code review 2022-06-13 13:48:21 +02:00
Erik Sundell
ccceebe257 Merge pull request #3948 from jupyterhub/dependabot/github_actions/actions/upload-artifact-3
Bump actions/upload-artifact from 2 to 3
2022-06-13 13:47:09 +02:00
Erik Sundell
499dac9ee2 ci: fix typo in test-docs workflow triggers 2022-06-13 13:46:09 +02:00
Erik Sundell
1d26e61f7e Apply suggestions from code review 2022-06-13 13:46:09 +02:00
dependabot[bot]
c40e20a3e3 Bump actions/setup-python from 2 to 4
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2...v4)

---
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>
2022-06-13 11:38:08 +00:00
dependabot[bot]
549b2b8e95 Bump actions/upload-artifact from 2 to 3
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2...v3)

---
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>
2022-06-13 11:38:04 +00:00
Erik Sundell
15665c0363 Merge pull request #3944 from jupyterhub/dependabot/github_actions/actions/setup-node-3
Bump actions/setup-node from 1 to 3
2022-06-13 13:38:01 +02:00
dependabot[bot]
226f993e7d Bump char0n/swagger-editor-validate
Bumps [char0n/swagger-editor-validate](https://github.com/char0n/swagger-editor-validate) from 182d1a5d26ff5c2f4f452c43bd55e2c7d8064003 to 1.3.1. This release includes the previously tagged commit.
- [Release notes](https://github.com/char0n/swagger-editor-validate/releases)
- [Commits](182d1a5d26...8829b79e43)

---
updated-dependencies:
- dependency-name: char0n/swagger-editor-validate
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-13 11:38:00 +00:00
dependabot[bot]
9081265dab Bump actions/setup-node from 1 to 3
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 1 to 3.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v1...v3)

---
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>
2022-06-13 11:37:44 +00:00
Erik Sundell
de14f18be8 Merge pull request #3946 from consideRatio/pr/weekly-05
ci: run dependabot updates weekly monday 05:00 UTC+0 time
2022-06-13 13:37:39 +02:00
Erik Sundell
da276f0c6b Merge pull request #3945 from jupyterhub/dependabot/github_actions/actions/checkout-3
Bump actions/checkout from 2 to 3
2022-06-13 13:36:59 +02:00
Erik Sundell
5a3c98a849 Merge pull request #3943 from jupyterhub/dependabot/github_actions/docker/setup-qemu-action-2
Bump docker/setup-qemu-action from 1.0.2 to 2
2022-06-13 13:35:53 +02:00
Erik Sundell
51fa0af3fe Merge pull request #3942 from jupyterhub/dependabot/github_actions/docker/setup-buildx-action-2
Bump docker/setup-buildx-action from 1.1.2 to 2
2022-06-13 13:35:37 +02:00
Erik Sundell
fcdce01ae6 Merge pull request #3941 from jupyterhub/dependabot/github_actions/docker/build-push-action-3
Bump docker/build-push-action from 2.4.0 to 3
2022-06-13 13:35:19 +02:00
dependabot[bot]
9af9a7bff7 Bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [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/v2...v3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-13 11:32:36 +00:00
dependabot[bot]
1eef021704 Bump docker/setup-qemu-action from 1.0.2 to 2
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 1.0.2 to 2.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](25f0500ff2...8b122486ce)

---
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>
2022-06-13 11:32:27 +00:00
dependabot[bot]
a308a0c9b4 Bump docker/setup-buildx-action from 1.1.2 to 2
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1.1.2 to 2.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](2a4b53665e...dc7b9719a9)

---
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>
2022-06-13 11:32:23 +00:00
dependabot[bot]
726b8243eb Bump docker/build-push-action from 2.4.0 to 3
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.4.0 to 3.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](e1b7f96249...e551b19e49)

---
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>
2022-06-13 11:32:17 +00:00
Erik Sundell
88cea51561 Run updates weekly monday 05:00 UTC+0 time 2022-06-13 13:32:12 +02:00
Erik Sundell
ec0bcb1f1b Merge pull request #3940 from turrisxyz/Dependabot-GitHub-Actions
chore: add dependabot config for github actions
2022-06-13 13:31:32 +02:00
naveen
2df1808c4e chore: Included githubactions in the dependabot config
This should help with keeping the GitHub actions updated on new releases. This will also help with keeping it secure.

Dependabot helps in keeping the supply chain secure https://docs.github.com/en/code-security/dependabot

GitHub actions up to date https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot

https://github.com/ossf/scorecard/blob/main/docs/checks.md#dependency-update-tool
Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
2022-06-13 01:30:37 +00:00
Erik Sundell
c85e90a71b Merge pull request #3939 from turrisxyz/Pinned-Dependencies-GitHub
chore: Set permissions for GitHub actions
2022-06-12 10:19:14 +02:00
naveen
1013a49db2 chore: Set permissions for GitHub actions
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
2022-06-12 00:30:04 +00:00
Erik Sundell
f6eec29aa2 Merge pull request #3937 from minrk/importlib
switch to importlib_metadata for entrypoints
2022-06-08 15:23:54 +02:00
Min RK
64b99d5587 switch to importlib_metadata for entrypoints
standalone entrypoints package is deprecated
now that similar functionality is in the stdlib

need importlib_metadata >= 3.6 backport on Python < 3.10
2022-06-08 15:14:50 +02:00
Erik Sundell
75b07fc0d6 Merge pull request #3936 from minrk/add-user-validate
admin: Hub is responsible for username validation
2022-06-08 14:55:52 +02:00
Erik Sundell
d64068da66 Merge pull request #3935 from minrk/spawn-page-url
admin: Fix spawn page link for default server
2022-06-08 14:51:26 +02:00
Min RK
62b38934e5 store scopes on oauth clients, too
rather than roles, matching tokens

because oauth clients are mostly involved with issuing tokens,
they don't have roles themselves (their owners do).

This deprecates the `oauth_roles` config on Spawners and Services, in favor of `oauth_allowed_scopes`.

The ambiguously named `oauth_scopes` is renamed to `oauth_access_scopes`.
2022-06-08 12:26:48 +02:00
Min RK
14d8e23135 trim user input forms 2022-06-08 12:09:11 +02:00
Min RK
0908a15848 Server is responsible for username validation
Don't reimplement in the client
2022-06-08 11:06:33 +02:00
Min RK
2e878fb5ca fix spawn page link 2022-06-08 10:48:04 +02:00
Min RK
62d24341ca fix static url in admin page 2022-06-08 10:47:14 +02:00
Yuvi Panda
f2085fdf0f Merge pull request #3931 from consideRatio/pr/add-changelog-to-main
Add changelog for 2.3.0 and 2.3.1
2022-06-06 19:53:56 +05:30
Erik Sundell
a19c211612 Add changelog for 2.3.1 2022-06-06 16:18:03 +02:00
Min RK
9bbcf594ea One more in the changelog 2022-06-06 16:17:55 +02:00
Min RK
da89155503 changelog for 2.3 2022-06-06 16:17:54 +02:00
Min RK
3b59c4861f Merge pull request #3904 from manics/named-servers-escape
Escape named server name
2022-06-03 17:09:58 +02:00
Min RK
6f5764fd3d Merge pull request #3921 from manics/pages-unreachable
pages.py: Remove unreachable code
2022-06-03 16:58:33 +02:00
Simon Li
3c059f3acf Need to escape URLs in spawn-pending too 2022-06-02 19:56:52 +01:00
Simon Li
3a022f1ae3 pages.py: Remove unreachable code 2022-06-02 19:13:25 +01:00
Min RK
049a59f2ed Merge pull request #3920 from jupyterhub/dependabot/npm_and_yarn/jsx/eventsource-1.1.1
Bump eventsource from 1.1.0 to 1.1.1 in /jsx
2022-06-02 09:51:36 +02:00
Min RK
ed9ea4e6cc Merge pull request #3914 from manics/setuppy-yarn-jsx
Build admin app in setup.py
2022-06-02 09:51:22 +02:00
dependabot[bot]
c415be2db3 Bump eventsource from 1.1.0 to 1.1.1 in /jsx
Bumps [eventsource](https://github.com/EventSource/eventsource) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/EventSource/eventsource/releases)
- [Changelog](https://github.com/EventSource/eventsource/blob/master/HISTORY.md)
- [Commits](https://github.com/EventSource/eventsource/compare/v1.1.0...v1.1.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-01 22:51:13 +00:00
Simon Li
2bc5061e22 Don't escape servername in json blobs 2022-06-01 22:21:00 +01:00
pre-commit-ci[bot]
cedf12baeb [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-06-01 20:28:55 +00:00
Simon Li
b403c41c15 Remove old comment, include description in servername error
Co-authored-by: Min RK <benjaminrk@gmail.com>
2022-06-01 21:28:24 +01:00
Simon Li
acd75d85c7 Move installed data file check to script 2022-06-01 20:44:40 +01:00
Simon Li
5e5dad9512 check sdist files in release workflow 2022-06-01 20:43:28 +01:00
Simon Li
95e343395d Ensure jsx is in sdist 2022-06-01 20:43:02 +01:00
Yuvi Panda
6a29e5193b Merge pull request #3919 from minrk/jupyter-server-templates
ensure custom template is loaded with jupyter-server notebook extension
2022-06-01 22:59:33 +05:30
Min RK
1cb7177597 ensure custom template is loaded with jupyter-server notebook extension
our patches to page.html didn't affect nbclassic,
which gets its own jinja environment

regression test included
2022-06-01 16:13:10 +02:00
Yuvi Panda
50e863ca52 Merge pull request #3910 from minrk/optimize-prefix-lookup
use equality to filter token prefixes
2022-06-01 19:05:45 +05:30
Yuvi Panda
8cdd7ca2d2 Merge pull request #3918 from minrk/default-url-priority
set default_url via config
2022-06-01 19:04:55 +05:30
Min RK
6fbf8411ec Merge pull request #3915 from manics/contrib-docs
Update Contributing documentation
2022-05-31 19:52:30 +02:00
Min RK
fa200fed98 set default_url via config
avoids accidental overrides of `@default('default_url')` in subclasses,
e.g. SingleUserLabApp
2022-05-31 17:05:58 +02:00
Simon Li
7d7d30bcae Don't build admin app on readthedocs 2022-05-29 19:23:57 +01:00
Simon Li
85a4bbc28e Update Contributing documentation
Adds yarn, moves most of CONTRIBUTING.md into https://jupyterhub.readthedocs.io/en/stable/contributing/index.html to reduce duplication
2022-05-29 19:11:57 +01:00
Simon Li
0b161627c2 yarn: allow jlpm to be used instead 2022-05-29 17:14:14 +01:00
Simon Li
36e7898ed4 Update CI so that setup.py can build admin app 2022-05-29 16:52:24 +01:00
Simon Li
3537722208 Include generated admin-react.js.LICENSE.txt 2022-05-29 16:52:24 +01:00
Simon Li
dfcaa29c8a Build react admin app in setup.py 2022-05-29 16:52:20 +01:00
Simon Li
92c6d69bc8 Remove share/jupyterhub/static/js/admin-react.js jsx/build 2022-05-29 16:12:29 +01:00
Simon Li
7b8a2ae57b Escape server-name in URLs returned by API 2022-05-27 23:06:55 +01:00
Simon Li
b444fe478c Ensure server-name is escaped in proxy add_route 2022-05-27 22:44:09 +01:00
Simon Li
50fb1a016c Move server-name / check to higher up, add test 2022-05-27 22:06:19 +01:00
Min RK
e229c63e11 use equality to filter token prefixes
otherwise, index isn't used

note: this means changing the token prefix size requires revoking all tokens,
where before only _increasing_ the token prefix size required doing that.
2022-05-25 15:54:34 +02:00
Erik Sundell
9649a57e34 Merge pull request #3908 from minrk/fail-fail-auth-state
allow auth_state_hook to halt spawn
2022-05-25 12:43:39 +02:00
Erik Sundell
ac85d63013 Merge pull request #3907 from minrk/bump-moment
bump moment.js 2.29.2
2022-05-25 12:39:34 +02:00
Min RK
4b2ba1f6c0 allow auth_state_hook to halt spawn
hooks prior to start should raise and stop the whole thing

only hooks during cleanup need to be passed over
2022-05-25 11:36:32 +02:00
Min RK
886d15b622 bump moment.js 2.29.2 2022-05-25 11:32:06 +02:00
Min RK
d517ce37e7 Merge pull request #3906 from fabianbaier/patch-1
Force add existing certificates
2022-05-25 11:23:58 +02:00
Min RK
85f0cec33e Merge pull request #3903 from manics/jupyter-troubleshoot
`jupyter troubleshooting` ➡️  `jupyter troubleshoot`
2022-05-25 11:18:35 +02:00
pre-commit-ci[bot]
5c37569b2a [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-05-25 05:04:07 +00:00
Fabian Baier
956b96967e Update app.py to fix certipy.CertExistsError 2022-05-24 21:58:33 -07:00
Simon Li
f51faa25ed Ban / from server-name 2022-05-24 17:46:08 +01:00
Simon Li
aa8c85f404 Test explicitly escaped servername from client 2022-05-24 17:08:21 +01:00
Simon Li
98540f0f6d Need to escape server name in part of proxy 2022-05-24 16:56:15 +01:00
Simon Li
841c89769a Add test for special chars in named servers 2022-05-24 16:55:48 +01:00
Simon Li
84cb9761e8 Escape named servers when used in URL paths 2022-05-22 23:31:47 +01:00
Simon Li
178e340223 jupyter troubleshooting ➡️ jupyter troubleshoot 2022-05-22 15:18:42 +01:00
Min RK
b18a05c2c8 Merge pull request #3895 from yuvipanda/document-display
Document the 'display' attribute of services
2022-05-13 11:56:58 +02:00
Min RK
3466de1473 Merge pull request #3899 from manics/admin_access_deprecated
`admin_access` no longer works as it is overridden by RBAC scopes
2022-05-13 11:53:58 +02:00
Simon Li
4be4e41fa7 admin_access no longer works as it is overridden by RBAC scopes
The `admin_access` variable is still referenced elsewhere and I considered removing it, but I couldn't work out exactly how/if it's used so this is just a docs change for now.
2022-05-12 12:31:50 +01:00
YuviPanda
3264463366 Document the 'display' attribute of services
Ref https://github.com/2i2c-org/infrastructure/issues/1301
2022-05-11 19:04:58 +05:30
Simon Li
8252504dad Merge pull request #3885 from minrk/deprecate-db
Deprecate Authenticator.db, Spawner.db
2022-05-10 17:48:20 +01:00
Min RK
ac3ef1efc1 Deprecate Authenticator.db, Spawner.db
These objects should not access the shared db session;
add a warning pointing to Issue about their removal if it is accessed
2022-05-10 10:24:32 +02:00
Min RK
54cb259882 Merge pull request #3891 from bbrauns/main
remove apache NE flag as it prevents opening folders and renaming fil…
2022-05-10 10:22:01 +02:00
Min RK
04d0291fa0 Merge pull request #3889 from johnkpark/jp--remove-admin-table-head
admin: make user-info table selectable
2022-05-10 10:21:06 +02:00
Erik Sundell
c8d6700406 Merge pull request #3892 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-05-10 07:01:25 +02:00
pre-commit-ci[bot]
e61f2d74a8 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.32.0 → v2.32.1](https://github.com/asottile/pyupgrade/compare/v2.32.0...v2.32.1)
2022-05-09 20:54:37 +00:00
Björn Braunschweig
a0b9a1fe86 remove apache NE flag as it prevents opening folders and renaming files with whitespace characters. apache returns Bad Request 2022-05-09 11:36:14 +02:00
John Park
27d2e95c43 add regeneratorRuntime back in 2022-05-06 14:03:05 -07:00
John Park
819e59292d yarn lint / place 2022-05-05 16:34:28 -07:00
John Park
f3ef16b948 remove admin-table-head class 2022-05-05 16:21:29 -07:00
Simon Li
5e1e44057d Merge pull request #3886 from minrk/cleanup-api-shutdown
Cleanup everything on API shutdown
2022-05-05 20:16:43 +01:00
Min RK
bf2e322c22 Cleanup everything on API shutdown
via app.stop()
2022-05-05 12:53:21 +02:00
Min RK
585b47051f Merge pull request #3882 from yuvipanda/mo-exceptions
Use log.exception when logging exceptions
2022-05-05 11:37:42 +02:00
Min RK
5ca96fa758 Merge pull request #3878 from minrk/admin-ui-scope
add 'admin-ui' scope for access to the admin ui
2022-05-03 11:20:23 +02:00
YuviPanda
aba6eb962f Use log.exception when logging exceptions
This provides the stack trace in the log file, incredibly
useful when debugging
2022-05-02 17:36:31 -07:00
Georgiana Elena
107dc02fd0 Merge pull request #3876 from minrk/disallow-next-check
don't confuse :// in next_url query params for a redirect hostname
2022-04-29 13:13:21 +03:00
Min RK
debac715bf add 'admin-ui' scope for access to the admin ui 2022-04-29 11:54:02 +02:00
Min RK
c6ed41e322 don't confuse :// in next_url query params for a redirect hostname 2022-04-28 13:35:37 +02:00
Min RK
ec2c90c73f Merge pull request #3874 from code-review-doctor/fix-probably-meant-fstring
Missing `f` prefix on f-strings fix
2022-04-26 15:15:55 +02:00
Min RK
6c2c5e5a90 Don't let spawner._log_name fail when running without user in tests 2022-04-26 14:27:39 +02:00
code-review-doctor
f0b2d8c4eb Fix issue probably-meant-fstring found at https://codereview.doctor 2022-04-24 17:30:49 +01:00
Min RK
a588a0bfa3 Merge pull request #3851 from minrk/service-filter
!service and !server filters
2022-04-21 12:32:31 +02:00
Simon Li
c07358a526 Merge pull request #3869 from jupyterhub/dependabot/npm_and_yarn/jsx/async-2.6.4
Bump async from 2.6.3 to 2.6.4 in /jsx
2022-04-15 21:06:19 +01:00
dependabot[bot]
9058fa42dd Bump async from 2.6.3 to 2.6.4 in /jsx
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-15 19:08:43 +00:00
Min RK
55d7ebe006 Merge pull request #3867 from consideRatio/pr/black-detail
ci: update black configuration
2022-04-15 21:08:07 +02:00
Erik Sundell
6edbfdad89 ci: update black configuration 2022-04-15 19:16:51 +02:00
vpopescu
b2a6a5a82f Updated jsx-admin 2022-04-14 17:26:36 +02:00
pre-commit-ci[bot]
60cd4ff872 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-04-14 15:17:53 +00:00
Vlad Vifor
35f4c76982 Merge branch 'main' into group_property_feature 2022-04-14 17:17:21 +02:00
Erik Sundell
715a4a25cf Merge pull request #3864 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-04-12 11:04:12 +01:00
pre-commit-ci[bot]
e15447c8b8 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.31.1 → v2.32.0](https://github.com/asottile/pyupgrade/compare/v2.31.1...v2.32.0)
- [github.com/pre-commit/pre-commit-hooks: v4.1.0 → v4.2.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.1.0...v4.2.0)
2022-04-11 21:25:48 +00:00
Min RK
ab8eec164c Merge pull request #3863 from NarekA/narek/fix-search-bar
[Bug Fix] Search bar disabled on admin dashboard
2022-04-11 11:15:05 +02:00
Narek Amirbekian
b1177cd2ce Improve user search tests 2022-04-08 12:23:27 -07:00
Narek Amirbekian
40d95dc142 Fix search bar in admin dashboard 2022-04-08 11:27:41 -07:00
Min RK
d78bd42cfc call owner_name user_name since it's only defined when the owner is a user 2022-04-08 20:17:12 +02:00
Min RK
b6210dc225 add !service and !server scope filters
allows oauth clients to issue scopes that only grant access to the issuing service

e.g. access:service!service or access:servers!server

especially useful with custom scopes
2022-04-08 20:10:23 +02:00
Erik Sundell
b05a89a3e0 Merge pull request #3862 from cmd-ntrf/readme-rest-api
Fix typo in [rest api] link in README.md
2022-04-08 17:21:31 +02:00
Félix-Antoine Fortin
13e99b904b Fix typo in [rest api] link 2022-04-08 09:56:18 -04:00
Simon Li
01a4b9c4b4 Merge pull request #3859 from minrk/get_env_modify
Do not store Spawner.ip/port on spawner.server during get_env
2022-04-07 22:03:14 +01:00
Min RK
d6df1be272 Merge pull request #3850 from minrk/cache-scopes
memoize some scope functions
2022-04-07 12:56:19 +02:00
Min RK
85ef5cf807 Do not store Spawner.ip/port on spawner.server
This was part of an attempt to get the url from self.server.bind_url that didn't end up getting used

shouldn't mutate db state when getting the environment
2022-04-07 10:56:49 +02:00
Min RK
ff020cb5a4 needs_db typo
Co-authored-by: Simon Li <orpheus+devel@gmail.com>
2022-04-07 09:42:25 +02:00
Min RK
5c54ac9aa1 Merge pull request #3853 from jwclark/patch-1
Fix xsrf_cookie_kwargs ValueError
2022-04-05 20:28:03 +02:00
Erik Sundell
e48662423a Merge pull request #3856 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-04-05 01:00:08 +02:00
pre-commit-ci[bot]
f124f06c2d [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/psf/black: 22.1.0 → 22.3.0](https://github.com/psf/black/compare/22.1.0...22.3.0)
- [github.com/pre-commit/mirrors-prettier: v2.6.1 → v2.6.2](https://github.com/pre-commit/mirrors-prettier/compare/v2.6.1...v2.6.2)
2022-04-04 20:23:56 +00:00
Joseph Clark
f2faf0ee43 Fix ValueError
Fixes ValueError: too many values to unpack (expected 2)
2022-04-01 15:44:28 -06:00
Min RK
ab2913008e more docs, comments, asserts about immutable scope functions 2022-04-01 11:54:32 +02:00
Min RK
eebc0f485d Apply suggestions from code review
Co-authored-by: Simon Li <orpheus+devel@gmail.com>
2022-04-01 11:36:06 +02:00
Min RK
bb6427ea9b Add FrozenDict for caching parsed_scopes dicts
Since we need them to be immutable
2022-04-01 11:36:05 +02:00
Min RK
29b73563dc cache common scope operations
we expand/parse the same scopes _a lot_.
We can save time with some caching.

Main change: cached functions must return immutable frozenset instead of mutable set,
to avoid mutating the result of subsequent returns.

Some functions can only be cached _sometimes_ (e.g. group lookups in db cannot be cached),
for which we have a DoNotCache(result) exception
2022-04-01 11:35:05 +02:00
Erik Sundell
aa0ce1c88a Merge pull request #3852 from minrk/isort
Use isort for import formatting
2022-04-01 11:07:28 +02:00
Min RK
7a9778249f run pre-commit with isort 2022-03-31 12:33:26 +02:00
Min RK
c41b732fbd switch to isort for import formatting
isort produces nicer imports without wasting a huge amount of space
2022-03-31 12:32:11 +02:00
Vlad Vifor
6ede428990 Merge branch 'jupyterhub:main' into group_property_feature 2022-03-30 11:25:53 +02:00
Erik Sundell
d9b85a819e Merge pull request #3849 from huage1994/patch-1
The word `used` is duplicated in upgrade.md
2022-03-30 08:26:08 +02:00
nihua
6d00eb501a Update upgrade.md 2022-03-30 14:20:30 +08:00
Erik Sundell
318c95342d Merge pull request #3833 from minrk/token-scopes
Tokens have scopes instead of roles
2022-03-29 23:49:35 +02:00
Erik Sundell
cde0f12f07 Merge pull request #3848 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-03-28 22:41:22 +02:00
pre-commit-ci[bot]
6668fb39f9 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pre-commit/mirrors-prettier: v2.6.0 → v2.6.1](https://github.com/pre-commit/mirrors-prettier/compare/v2.6.0...v2.6.1)
2022-03-28 19:36:33 +00:00
Min RK
4691fae90a Merge pull request #3845 from jupyterhub/dependabot/npm_and_yarn/jsx/minimist-1.2.6
Bump minimist from 1.2.5 to 1.2.6 in /jsx
2022-03-28 09:03:51 +02:00
Min RK
0fccbc69ff Merge pull request #3834 from NarekA/narek/server-details-in-dashboard
Admin Dashboard - Collapsible Details View
2022-03-28 09:03:26 +02:00
dependabot[bot]
d699f794ac Bump minimist from 1.2.5 to 1.2.6 in /jsx
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-26 13:42:02 +00:00
Min RK
29a9ca18fe Merge pull request #3841 from minrk/asyncio-mode
adopt pytest-asyncio asyncio_mode='auto'
2022-03-26 14:41:29 +01:00
Erik Sundell
72ae21d6dc Merge pull request #3843 from minrk/doc-typos
Some typos in docs
2022-03-24 16:25:47 +01:00
Min RK
310d9621e5 limit server->read:users:name filter to read: scopes
it shouldn't be included in _access_ scopes, for instance
2022-03-24 16:13:57 +01:00
Min RK
0f4258d00c update more test expectations 2022-03-24 15:47:02 +01:00
Min RK
78b5aa150c avoid always-adding identify scope to everything
add it to token permissions _before_ intersecting with owner
2022-03-24 15:36:56 +01:00
Min RK
3cfb14b9e5 rerender rest-api 2022-03-24 15:16:21 +01:00
Min RK
7e22614a4e [squash me] token progress
tokens have scopes

    instead of roles, which allow tokens to change permissions over time

    This is mostly a low-level change,
    with little outward-facing effects.

    - on upgrade, evaluate all token role assignments to their current scopes,
      and store those scopes on the tokens
    - assigning roles to tokens still works, but scopes are evaluated and validated immediately,
      rather than lazily stored as roles
    - no longer need to check for role permission changes on startup, because token permissions aren't affected
    - move a few scope utilities from roles to scopes
    - oauth allows specifying scopes, not just roles.
      But these are still at the level specified in roles,
      not fully-resolved scopes.
    - more granular APIs for working with scopes and roles

    Still to do later:

    - expose scopes config for Spawner/service
    - compute 'full' intersection of requested scopes, rather than on the 'raw' scope list in roles
2022-03-24 15:05:50 +01:00
Min RK
66ecaf472a fix some outdated references to 'all' metascope
it is called 'inherit', but not all docs were updated
2022-03-24 14:06:05 +01:00
Min RK
3ba262f6f6 fix heading level in changelog
sphinx has started to error with this
2022-03-24 14:06:04 +01:00
vpopescu
bfc9c880b9 Removed duplicate files 2022-03-23 13:54:07 +01:00
vpopescu
ef113a9040 Merge branch 'group_property_feature' of https://github.com/vladfreeze/jupyterhub into group_property_feature 2022-03-23 13:52:04 +01:00
vpopescu
ca4342a010 Removed git error 2022-03-23 13:31:55 +01:00
Vlad Vifor
e627e91fa6 Merge branch 'jupyterhub:main' into group_property_feature 2022-03-23 13:21:25 +01:00
Min RK
b935190da8 adopt pytest-asyncio asyncio_mode
removes need for our own implementation of the same behavior

but keep it around while we still support Python 3.6,
since the version (0.17) introducing asyncio_mode drops support for Python 3.6
2022-03-23 09:25:22 +01:00
Erik Sundell
7cd5c1c12b Merge pull request #3840 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-03-22 06:35:53 +01:00
pre-commit-ci[bot]
4708fce4f8 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pre-commit/mirrors-prettier: v2.5.1 → v2.6.0](https://github.com/pre-commit/mirrors-prettier/compare/v2.5.1...v2.6.0)
2022-03-21 23:39:32 +00:00
Narek Amirbekian
93fda7c96b Change layout 2022-03-21 13:05:56 -07:00
Erik Sundell
912e0ad53f Merge pull request #3839 from yuvipanda/log-docs-1
Document version mismatch log message
2022-03-21 11:40:49 +01:00
YuviPanda
3e9ce8bc03 Document version mismatch log message 2022-03-19 14:10:24 -07:00
Min RK
a08aa3398c ensure literal_binds is set in order
Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2022-03-18 15:25:46 +01:00
Min RK
3076845927 tokens have scopes
instead of roles, which allow tokens to change permissions over time

This is mostly a low-level change,
with little outward-facing effects.

- on upgrade, evaluate all token role assignments to their current scopes,
  and store those scopes on the tokens
- assigning roles to tokens still works, but scopes are evaluated and validated immediately,
  rather than lazily stored as roles
- no longer need to check for role permission changes on startup, because token permissions aren't affected
- move a few scope utilities from roles to scopes
- oauth allows specifying scopes, not just roles.
  But these are still at the level specified in roles,
  not fully-resolved scopes.
- more granular APIs for working with scopes and roles
2022-03-18 14:13:16 +01:00
pre-commit-ci[bot]
b1c0ebd521 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-03-18 11:59:17 +00:00
Vlad Vifor
e6c4ca1f25 Merge branch 'jupyterhub:main' into group_property_feature 2022-03-18 12:58:20 +01:00
Erik Sundell
cb25d29b0b Merge pull request #3837 from minrk/fix-import-error
ensure _import_error is set when JUPYTERHUB_SINGLEUSER_APP is unavailable
2022-03-18 10:03:18 +01:00
Min RK
2e8d303ad8 ensure _import_error is set when JUPYTERHUB_SINGLEUSER_APP is unavailable 2022-03-18 09:24:22 +01:00
Erik Sundell
a754d56433 Merge pull request #3835 from minrk/rm-distutils
remove lingering reference to distutils
2022-03-17 13:28:43 +01:00
Min RK
775a16dc50 remove lingering reference to distutils 2022-03-17 12:16:44 +01:00
Narek Amirbekian
16824dcadb Use .toHaveClass instead of .contains 2022-03-16 16:42:17 -07:00
Narek Amirbekian
f949cda227 Add test for details view 2022-03-16 16:36:34 -07:00
Erik Sundell
454e356e4d Merge pull request #3713 from minrk/custom-scopes
allow user-defined custom scopes
2022-03-16 08:52:55 +01:00
Min RK
9a87b59e84 improve custom scope docstrings 2022-03-16 08:44:52 +01:00
Narek Amirbekian
93d82a9012 Fix tests 2022-03-15 17:09:26 -07:00
Narek Amirbekian
564458b106 Set defaults for name_filter 2022-03-15 15:13:04 -07:00
Narek Amirbekian
b38e9c45bf Improved layout 2022-03-15 13:40:44 -07:00
Narek Amirbekian
85d4c5bd7a Remove unused state object 2022-03-15 12:14:38 -07:00
Narek Amirbekian
6a9d27ceb4 Server details in server dashboard 2022-03-15 12:01:22 -07:00
Min RK
d2eaf90df2 authorize subsets of roles
- oauth clients can request a list of roles
- authorization will proceed with the _subset_ of those roles held by the user
- in the future, this subsetting will be refined to the scope level
2022-03-15 11:54:42 +01:00
Min RK
fa8cd90793 Merge pull request #3827 from NarekA/narek/admin-dashboard-search
[Admin Dash] Add search bar for user name
2022-03-15 11:35:57 +01:00
Narek Amirbekian
7dafae29fb Update compiled files 2022-03-15 02:40:27 -07:00
Narek Amirbekian
89a6c745b5 Add base_url to spawner 2022-03-15 02:33:17 -07:00
Erik Sundell
821d9e229d Merge pull request #3831 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-03-15 07:10:27 +01:00
Narek Amirbekian
db7619fa7a Fix server url 2022-03-14 21:02:18 -07:00
Narek Amirbekian
1ed9423530 Update compiled jsx 2022-03-14 18:06:10 -07:00
Narek Amirbekian
147a578f7a Fix index error on assertion 2022-03-14 18:03:56 -07:00
Narek Amirbekian
3a59a15164 Add front end tests for user search 2022-03-14 17:54:51 -07:00
pre-commit-ci[bot]
1b7aded7f9 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-03-14 23:25:52 +00:00
pre-commit-ci[bot]
bc45d77365 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.31.0 → v2.31.1](https://github.com/asottile/pyupgrade/compare/v2.31.0...v2.31.1)
- [github.com/asottile/reorder_python_imports: v2.7.1 → v3.0.1](https://github.com/asottile/reorder_python_imports/compare/v2.7.1...v3.0.1)
2022-03-14 23:24:13 +00:00
Narek Amirbekian
1b3b005ca4 Add test for name_filter 2022-03-14 13:33:05 -07:00
pre-commit-ci[bot]
e0be811b2c [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-03-14 19:17:28 +00:00
Narek Amirbekian
3627251246 Merge branch 'main' into narek/admin-dashboard-search 2022-03-14 12:16:50 -07:00
Erik Sundell
8d056170d7 Bump to 2.3.0.dev 2022-03-14 12:32:56 +01:00
Erik Sundell
3590d16e30 Bump to 2.2.2 2022-03-14 12:32:25 +01:00
Erik Sundell
572d258cd2 Merge pull request #3828 from consideRatio/pr/changelog-2.2.2
Add changelog for 2.2.2
2022-03-14 12:30:27 +01:00
Min RK
11d0954551 Merge pull request #3826 from consideRatio/pr/add-dedicated-jsx-tests 2022-03-14 12:27:59 +01:00
Erik Sundell
650d47d5c1 Add changelog for 2.2.2 2022-03-14 12:15:54 +01:00
Erik Sundell
945fc824d8 Remove autoformat added new line for generated file 2022-03-12 01:12:29 +01:00
Erik Sundell
a8aa737b00 Don't autoformat generated admin-react.js 2022-03-12 01:12:29 +01:00
Erik Sundell
cd689a1fab ci: test jsx in a dedicated workflow along with src->dist check 2022-03-12 01:12:29 +01:00
Narek Amirbekian
b3f04e7c66 Add search bar for user name 2022-03-11 15:12:53 -08:00
Erik Sundell
fbcf857991 Add inline comments to .pre-commit-config.yaml 2022-03-12 00:00:27 +01:00
Erik Sundell
6c5e5452bc Merge pull request #3825 from NarekA/narek/fix-admin-table-sorting-2
Update admin-react.js
2022-03-11 18:33:33 +01:00
pre-commit-ci[bot]
2f5ba7ba30 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-03-11 17:15:21 +00:00
Narek Amirbekian
a045eefa64 React file not updated 2022-03-11 09:13:14 -08:00
Min RK
6ea4f2af0d Bump to 2.3.0.dev 2022-03-11 17:00:28 +01:00
Min RK
3d3ad2929c Bump to 2.2.1 2022-03-11 16:59:52 +01:00
Erik Sundell
00287ff5ba Merge pull request #3824 from minrk/221
changelog for 2.2.1
2022-03-11 16:17:11 +01:00
Min RK
805d063d1d changelog for 2.2.1 2022-03-11 15:52:41 +01:00
Min RK
e6bacf7109 Merge pull request #3822 from NarekA/narek/fix-admin-table-sorting
Fix admin dashboard table sorting
2022-03-11 15:48:45 +01:00
Min RK
33ccfa7963 handle null user.server
Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2022-03-11 14:16:30 +01:00
Min RK
fdf23600c0 allow custom scopes
defined with

    c.JupyterHub.custom_scopes = {
        'custom:scope': {'description': "text shown on oauth confirm"}
    }

Allows injecting custom scopes to roles,
allowing extension of granular permissions to service-defined custom scopes.

Custom scopes:

- MUST start with `custom:`
- MUST only contain ascii lowercase, numbers, colon, hyphen, asterisk, underscore
- MUST define a `description`
- MAY also define `subscopes` list(s), each of which must also be explicitly defined

HubAuth can be used to retrieve and check for custom scopes to authorize requests.
2022-03-11 11:37:26 +01:00
Erik Sundell
593404f558 Merge pull request #3823 from minrk/clear-cookie-kwargs
Fix clearing cookie with custom xsrf cookie options
2022-03-11 09:53:43 +01:00
Min RK
e7bc282c80 clear_cookie only accepts path, domain cookie args 2022-03-11 09:24:31 +01:00
pre-commit-ci[bot]
b939b482a1 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-03-11 06:38:13 +00:00
Narek Amirbekian
8afc2c9ae9 Fix admin table sorting 2022-03-10 22:20:01 -08:00
Chris Holdgraf
d11eda14ed Merge pull request #3820 from yuvipanda/log-docs 2022-03-10 16:38:01 -08:00
Yuvi Panda
ab79251fe2 Reword for clarity
Co-authored-by: Chris Holdgraf <choldgraf@gmail.com>
2022-03-10 15:54:42 -08:00
Yuvi Panda
484dbf48de Merge pull request #3819 from minrk/raise-no-orm-spawner
allow Spawner.server to be mocked without underlying orm_spawner
2022-03-10 13:46:49 -08:00
YuviPanda
6eb526d08a Add a little more structure 2022-03-10 13:45:28 -08:00
YuviPanda
e0a17db5f1 Add some docs on common log messages
When debugging errors and outages, looking at the logs emitted by
JupyterHub is very helpful. This document tries to document some common
log messages, and what they mean.

I currently added just one log message, but we can add more
over time.

Ref https://github.com/2i2c-org/infrastructure/issues/1081
where this would've been useful troubleshooting
2022-03-10 12:45:09 -08:00
Min RK
45132b7244 allow Spawner.server to be mocked without underlying orm_spawner 2022-03-10 15:40:01 +01:00
Min RK
c23cddeb51 Bump to 2.2.0 2022-03-07 14:35:46 +01:00
Erik Sundell
672e19a22a Merge pull request #3815 from minrk/changelog-2.2
Changelog for 2.2
2022-03-07 14:32:56 +01:00
Min RK
4a6c9c3a01 Prepare changelog for 2.2 2022-03-07 14:27:31 +01:00
Erik Sundell
2b79bc44da Merge pull request #3802 from minrk/fresh-spawner
Replace failed spawners when starting new launch
2022-03-07 14:23:22 +01:00
Min RK
7861662e17 Replace failed spawners when starting new launch
Avoids leaving stale state when re-using a spawner that failed the last time it started

we keep failed spawners around to track their errors,
but we don't want to re-use them when it comes time to start a new launch.

adds User.get_spawner(server_name, replace_failed=True) to always get a non-failed Spawner
2022-03-07 14:03:48 +01:00
Simon Li
4a1842bf8a Merge pull request #3809 from minrk/page_config_hook
Add user token to JupyterLab PageConfig
2022-03-04 21:27:34 +00:00
Min RK
8f18303e50 fix some links revealed by myst
mostly pre-myst markdown links
2022-03-04 10:41:20 +01:00
Min RK
bcad6e287d Merge pull request #3812 from ktaletsk/patch-1
Update example to not reference an undefined scope
2022-03-04 10:03:53 +01:00
Min RK
9de1951952 Merge pull request #3813 from rzo1/apache-sec
Apache2 Documentation: Updates Reverse Proxy Configuration (TLS/SSL, Protocols, Headers)
2022-03-04 10:03:01 +01:00
pre-commit-ci[bot]
99cb1f17f0 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-03-03 15:41:17 +00:00
Richard Zowalla
10d5157e95 Apache2 Documentation: Updates Reverse Proxy Configuration (TLS/SSL, Protocols, Headers) 2022-03-03 16:40:38 +01:00
Konstantin Taletskiy
2fc4f26832 Update example to not reference an undefined scope
Fixes #3811
2022-03-01 12:25:54 -08:00
Simon Li
f6230001bb Merge pull request #3810 from minrk/server-trait
Keep Spawner.server in sync with underlying orm_spawner.server
2022-03-01 17:40:33 +00:00
Min RK
960f7cbeb9 Keep Spawner.server in sync with underlying orm_spawner.server
Rather than one-time sets of ._server allowing it to become out-of-sync
with underlying orm_spawner.server
2022-03-01 15:59:16 +01:00
Erik Sundell
76f06a6b55 Merge pull request #3808 from manics/apache-x-forwarded-proto
Apache: set X-Forwarded-Proto header
2022-03-01 14:14:34 +01:00
Min RK
9c498aa5d4 Document HubOAuth.get_token for requests on behalf of users 2022-03-01 10:05:17 +01:00
Min RK
a0b60f9118 place JupyterHub token in JupyterLab PageConfig
restores token field useful for javascript-originating API requests,
removed in 1.5 / 2.0 for security reasons because it was the wrong token.

This places the _user's_ token in PageConfig,
so it should have the right permissions.

requires jupyterlab_server 2.9, has no effect on earlier versions.
2022-03-01 09:45:14 +01:00
Min RK
27cb56429b HubAuth.get_token returns oauth token stored in cookie
Useful for backend services that want to use the user's token.

Added `in_cookie` bool argument to exclude cookies (previous behavior),
since notebook servers do some things differently when auth is in query param or header vs cookies
2022-03-01 09:43:01 +01:00
Simon Li
b1ffd4b10b Apache: set X-Forwarded-Proto header 2022-02-28 21:46:53 +00:00
dependabot[bot]
a9ea064202 Merge pull request #3807 from jupyterhub/dependabot/npm_and_yarn/jsx/url-parse-1.5.10 2022-02-28 09:56:10 +00:00
dependabot[bot]
687a41a467 Bump url-parse from 1.5.7 to 1.5.10 in /jsx
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.7 to 1.5.10.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.7...1.5.10)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-28 04:27:03 +00:00
Erik Sundell
5348451b2e Merge pull request #3803 from tmtabor/patch-1
idle-culler example config missing closing bracket
2022-02-22 23:09:15 +01:00
Thorin Tabor
55f0579dcc idle-culler example config missing closing bracket 2022-02-22 13:16:37 -08:00
Simon Li
a3ea0f0449 Merge pull request #3799 from jupyterhub/dependabot/npm_and_yarn/jsx/url-parse-1.5.7
Bump url-parse from 1.5.3 to 1.5.7 in /jsx
2022-02-19 08:11:52 +00:00
dependabot[bot]
78492a4a8e Bump url-parse from 1.5.3 to 1.5.7 in /jsx
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.3 to 1.5.7.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.3...1.5.7)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-19 07:35:42 +00:00
Vlad Vifor
0643b8280e Merge branch 'jupyterhub:main' into group_property_feature 2022-02-16 11:35:57 +01:00
Min RK
f22203f50e Merge pull request #3793 from satra/patch-1
show insecure-login-warning for all authenticators
2022-02-15 11:24:09 +01:00
Simon Li
500b354a00 Merge pull request #3795 from jupyterhub/dependabot/npm_and_yarn/jsx/follow-redirects-1.14.8
Bump follow-redirects from 1.14.7 to 1.14.8 in /jsx
2022-02-14 09:52:27 +00:00
dependabot[bot]
9d4093782f Bump follow-redirects from 1.14.7 to 1.14.8 in /jsx
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.8)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-14 08:52:00 +00:00
Min RK
43b3cebfff Merge pull request #3791 from rcthomas/async-options
Enable options_from_form(spawner, form_data) from configuration file
2022-02-14 09:45:04 +01:00
Min RK
63c381431d Merge pull request #3787 from minrk/stop_open_session_default
Stop opening PAM sessions by default
2022-02-14 09:43:12 +01:00
Min RK
bf41767b33 Merge pull request #3790 from NarekA/narek/admin-named-servers
Add Missing Features In Admin Console
2022-02-14 09:25:25 +01:00
Satrajit Ghosh
83d6e4e993 fix: insecure-login-warning for all authenticators 2022-02-11 22:19:39 -05:00
pre-commit-ci[bot]
d64a2ddd95 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-02-11 21:11:10 +00:00
Rollin Thomas
392176d873 Add tests for both forms of options_from_form 2022-02-11 12:55:09 -08:00
Narek Amirbekian
58420b3307 Merge remote-tracking branch 'origin' into narek/admin-named-servers 2022-02-11 10:52:21 -08:00
Narek Amirbekian
a5e3b66dee One edit user button per user 2022-02-11 10:50:58 -08:00
Rollin Thomas
a9fbe5c9f6 Enable options_from_form w/spawner from configuration 2022-02-11 10:06:38 -08:00
Erik Sundell
71bbbe4a67 Merge pull request #3792 from minrk/short-circuit
short-circuit token permission check if token and owner share role
2022-02-11 17:36:07 +01:00
Min RK
3843885382 short-circuit token permission check if token and owner share role
No need to compute intersection when we know it's a subset already
2022-02-11 15:20:14 +01:00
Narek Amirbekian
25ea559e0d Pull out button components 2022-02-09 15:21:12 -08:00
Narek Amirbekian
c18815de91 Fix failing tests 2022-02-09 14:04:38 -08:00
Narek Amirbekian
50d53667ce Add start server back 2022-02-09 13:15:27 -08:00
pre-commit-ci[bot]
68e2baf4aa [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-02-09 21:04:22 +00:00
Narek Amirbekian
6fc9d40e51 Merge remote-tracking branch 'origin/narek/admin-named-servers' into narek/admin-named-servers 2022-02-09 13:02:19 -08:00
Narek Amirbekian
0b25694b40 Add "spawn new" button 2022-02-09 12:59:34 -08:00
pre-commit-ci[bot]
bf750e488f [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-02-09 19:58:05 +00:00
Narek Amirbekian
359f9055fc Admin missing features 2022-02-09 11:43:06 -08:00
Min RK
b84dd5d735 Stop opening PAM sessions by default
We don't do it correctly, so don't try by default

It does work _sometimes_, but most of the time it does work, it's because it's a no-op.
Turning it off by default makes it more likely folks will see the caveat that it may not work.
2022-02-07 15:45:38 +01:00
pre-commit-ci[bot]
6e9ca0dc4a [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-02-02 10:41:47 +00:00
Vlad Vifor
42af51a1a5 Merge branch 'main' into group_property_feature 2022-02-02 11:40:50 +01:00
Vlad Vifor
0d90b81cb6 Removed test add properties 2022-02-02 11:38:24 +01:00
Erik Sundell
3ed345f496 Merge pull request #3784 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-01-31 23:57:45 +01:00
pre-commit-ci[bot]
6633f8ef28 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-01-31 22:17:11 +00:00
pre-commit-ci[bot]
757053a9ec [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/reorder_python_imports: v2.6.0 → v2.7.1](https://github.com/asottile/reorder_python_imports/compare/v2.6.0...v2.7.1)
- [github.com/psf/black: 21.12b0 → 22.1.0](https://github.com/psf/black/compare/21.12b0...22.1.0)
2022-01-31 22:16:31 +00:00
Erik Sundell
36cad38ddf Merge pull request #3781 from cqzlxl/cqzlxl-patch-1
Log proxy's public_url only when started by JupyterHub
2022-01-29 09:16:29 +01:00
pre-commit-ci[bot]
1e9a1cb621 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-01-29 05:59:52 +00:00
cqzlxl
9f051d3172 Update jupyterhub/app.py
Co-authored-by: Min RK <benjaminrk@gmail.com>
2022-01-29 13:59:20 +08:00
cqzlxl
53576c8f82 Update app.py
When we run the proxy separately,  defaults of `hub.bind_url` may be different from proxy's public url. Actually, the hub has no ways to know about which address the proxy is serving at if we do not configure its `bind_url` explicitly.
2022-01-27 21:05:05 +08:00
Min RK
bb5ec39b2f Merge pull request #3548 from C4IROcean/authenticator_user_group_management
Authenticator user group management
2022-01-25 14:36:41 +01:00
Min RK
4c54c6dcc8 Bump to 2.2.0.dev 2022-01-25 14:36:24 +01:00
Min RK
39da98f133 Bump to 2.1.1 2022-01-25 14:36:02 +01:00
Erik Sundell
29e69aa880 Merge pull request #3779 from minrk/changelog-211
changelog for 2.1.1
2022-01-25 12:18:37 +01:00
Min RK
0c315f31b7 specify nodejs, python versions in readthedocs
rather than use ancient system node

does v2 require the new .readthedocs.yaml filename?
Docs suggest it does.
2022-01-25 10:43:50 +01:00
Min RK
508842a68c changelog for 2.1.1 2022-01-25 09:37:58 +01:00
Min RK
4b31615a05 Merge pull request #3778 from minrk/missing-metrics
add missing read:metrics scope to admin role
2022-01-24 16:12:09 +01:00
Min RK
17b64280e8 add missing metrics scope to admin role
new scope defined, but not added to admin

In the future, the admin list should probably be derived automatically
2022-01-24 15:35:57 +01:00
Min RK
88be7a9967 test coverage for Authenticator.managed_groups
- tests
- docs
- ensure all group APIs are rejected when auth is in control
- use 'groups' field in return value of authenticate/refresh_user, instead of defining new method
- log group changes in sync_groups
2022-01-24 13:45:35 +01:00
Simon Li
4ca2344af7 Merge pull request #3777 from jupyterhub/dependabot/npm_and_yarn/jsx/nanoid-3.2.0
Bump nanoid from 3.1.23 to 3.2.0 in /jsx
2022-01-22 08:50:45 +00:00
dependabot[bot]
4c050cf165 Bump nanoid from 3.1.23 to 3.2.0 in /jsx
Bumps [nanoid](https://github.com/ai/nanoid) from 3.1.23 to 3.2.0.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.1.23...3.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-22 04:38:13 +00:00
Min RK
5e2ccb81fa Bump to 2.2.0.dev 2022-01-21 11:36:55 +01:00
Min RK
b8dc3befab Bump to 2.1.0 2022-01-21 11:35:49 +01:00
Erik Sundell
2f29848757 Merge pull request #3776 from minrk/cl21
Changelog for 2.1.0
2022-01-21 10:54:09 +01:00
Min RK
4f3d6cdd0c changelog for 2.1.0 2022-01-21 10:42:25 +01:00
Min RK
67733ef928 Merge pull request #3773 from IgorBerman/issue-3772-user_options-returns-empty-jupyterhub-restart
Using orm_spawner in server model user_options
2022-01-21 09:38:37 +01:00
Erik Sundell
e657754e7f Merge pull request #3775 from minrk/on_rtd_edit
DOCS: Add github metadata for edit button
2022-01-20 19:39:35 +01:00
Igor Berman
2d6087959c issue-3772: populating user_options from orm_spawner; adding test 2022-01-20 20:07:43 +02:00
Min RK
08a913707f define html_context needed for edit_page_button 2022-01-20 18:56:41 +01:00
Igor Berman
9c8a4f287a issue-3772: populating user_options from orm_spawner, cleanup 2022-01-20 18:04:35 +02:00
Igor Berman
64d6f0222c issue-3772: populating user_options from orm_spawner 2022-01-20 18:01:57 +02:00
Erik Sundell
538abdf084 Merge pull request #3763 from minrk/page-scopes
apply scope checks to some admin-or-self situations
2022-01-20 16:21:51 +01:00
Thomas Li Fredriksen
144abcb965 Added authenticator hook for synchronizing user groups
- Added hook function stub to authenticator base class
- Added new config option `manage_groups` to base `Authenticator` class
- Call authenticator hook from `refresh_auth`-function in `Base` handler class
- Added example
2022-01-20 13:30:03 +01:00
Min RK
6e5c307edb apply scope checks to some admin-or-self pages
Some non-api spawn and redirect checks still had `self or admin`,
when they should have checked directly for the appropriate permissions

This removes the long-deprecated redirect from `/user/other` -> `/user/self` _if_ the other server is not running.
The result is a more consistent behavior whether the requested server is running or not,
and whether the user has _access_ to the running server or not.
2022-01-20 13:27:43 +01:00
Igor Berman
67ebe0b0cf Update base.py 2022-01-19 21:45:45 +02:00
Min RK
dcf21d53fd Merge pull request #3765 from twalcari/patch-2
Improve documentation about spawner exception handling
2022-01-19 10:01:51 +01:00
Erik Sundell
f5bb0a2622 Merge pull request #3770 from minrk/metrics-scope
Add `read:metrics` scope for metrics endpoint
2022-01-18 17:51:50 +01:00
Min RK
704712cc81 Add read:metrics scope for metrics endpoint
and ensure token auth is accepted
2022-01-18 15:02:24 +01:00
Erik Sundell
f86d53a234 Merge pull request #3764 from minrk/progress-error-message
relay custom messages in exception.jupyterhub_message in progress API
2022-01-18 13:18:29 +01:00
Thijs Walcarius
5466224988 Improve documentation about spawner error messages 2022-01-18 09:18:01 +01:00
Min RK
f9fa21bfd7 relay custom messages in exception.jupyterhub_message in progress API
matches the message shown on the HTML spawn-failed page

For consistency, also support `jupyterhub_html_message` to populate the `html_message` field
2022-01-18 09:15:58 +01:00
Simon Li
e4855c30f5 Merge pull request #3768 from jupyterhub/dependabot/npm_and_yarn/jsx/follow-redirects-1.14.7
Bump follow-redirects from 1.13.0 to 1.14.7 in /jsx
2022-01-15 13:56:47 +00:00
dependabot[bot]
f1c4fdd5a2 Bump follow-redirects from 1.13.0 to 1.14.7 in /jsx
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.13.0 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.13.0...v1.14.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-15 08:58:31 +00:00
Vlad Vifor
020738a7ea Merge branch 'jupyterhub:main' into group_property_feature 2022-01-13 12:55:23 +01:00
Min RK
e58cf06706 Merge pull request #3762 from DougTrajano/main
Add the capability to inform a connection to Alembic Migration Script
2022-01-12 14:02:09 +01:00
pre-commit-ci[bot]
91f4918cff [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-01-11 11:55:37 +00:00
Douglas Trajano
b15ccfa4ae Add connection parameter 2022-01-11 08:50:20 -03:00
Min RK
5102fde2f0 Bump to 2.1.0.dev 2022-01-10 13:54:49 +01:00
Min RK
f5dc005a70 Bump to 2.0.2 2022-01-10 13:54:24 +01:00
Min RK
5fd8f0f596 Merge pull request #3759 from minrk/cl-202
changelog for 2.0.2
2022-01-10 13:53:34 +01:00
Min RK
26ceafa8a3 changelog for 2.0.2 2022-01-10 13:30:14 +01:00
Min RK
2e2ed8a4ff Merge pull request #3760 from minrk/admin-th-macro
remove unused macro with missing references
2022-01-10 13:28:10 +01:00
Min RK
6cc734f884 Merge pull request #3750 from consideRatio/pr/ci-refactor-docs-workflows
ci: refactor to avoid triggering all tests on changes to docs
2022-01-10 13:27:57 +01:00
Erik Sundell
4f7f07d3b7 Fix missing docs requirements 2022-01-10 11:18:22 +01:00
Min RK
d436c97e3d remove unused macro with missing references
The th macro is unused and doesn't work
because it references `sort` template variable,
which has been removed
2022-01-10 11:09:34 +01:00
Erik Sundell
807c5b8ff9 Make the generate-scope-table script autoformat its output 2022-01-10 10:48:01 +01:00
Erik Sundell
8da06d1259 Fix git CLI flag ordering 2022-01-10 10:33:23 +01:00
Erik Sundell
1c1be8a24b Generate yaml formatted to match prettier better 2022-01-10 10:31:30 +01:00
Min RK
897606b00c Merge pull request #3754 from jupyterhub/doc-theme-config
DOCS: Update theme configuration
2022-01-10 09:34:51 +01:00
Simon Li
615af5eb33 Merge pull request #3757 from minrk/get-browser-proto
use outermost proxied entry when looking up browser protocol
2022-01-09 22:44:07 +00:00
Erik Sundell
85f94c12fc Merge pull request #3748 from jupyterhub/DOC-allowed-users
DOC: Add note about allowed_users not being set
2022-01-08 18:59:24 +01:00
Min RK
ccfee4d235 use outermost proxied entry when checking for browser protocol
wee care about what the browser sees, so trust the outermost entry instead of the innermost

This is not secure _in general_, in that these values can be spoofed by malicious proxies,
but for CORS and cookie purposes, we only care about what the browser sees,
however many hops there may be.

A malicious proxy in the chain here isn't a concern because what matters is the immediate
hop from the _browser_, not the immediate hop from the _server_.
2022-01-07 14:03:11 +01:00
Min RK
a2ba55756d Merge pull request #3746 from manics/more-cors-tests
Extra test_cors_check tests
2022-01-07 12:37:37 +01:00
pre-commit-ci[bot]
515cadd079 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-01-07 09:42:31 +00:00
Vlad Vifor
5e5830185d Merge branch 'jupyterhub:main' into group_property_feature 2022-01-07 10:41:33 +01:00
pre-commit-ci[bot]
1b3e94db6c [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-01-04 22:23:45 +00:00
Chris Holdgraf
614d9d89d0 DOCS: Update theme configuration 2022-01-04 14:22:45 -08:00
Chris Holdgraf
05a3f5aa9a Update docs/source/getting-started/authenticators-users-basics.md
Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2022-01-04 13:32:39 -08:00
Erik Sundell
4f47153123 ci: cleanup comments for readability 2022-01-04 00:53:33 +01:00
Erik Sundell
a14d9ecaa1 ci: refactor to avoid triggering all tests on changes to docs 2022-01-04 00:53:33 +01:00
Erik Sundell
6815f30d36 Merge pull request #3749 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-01-03 22:33:13 +01:00
pre-commit-ci[bot]
13172e6856 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-01-03 21:06:46 +00:00
pre-commit-ci[bot]
ebc9fd7758 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.29.1 → v2.31.0](https://github.com/asottile/pyupgrade/compare/v2.29.1...v2.31.0)
2022-01-03 21:06:11 +00:00
Chris Holdgraf
0761a5db02 DOC: Add note about allowed_users not being set 2022-01-03 10:27:10 -08:00
Erik Sundell
46e7a231fe Merge pull request #3747 from minrk/https-typo
localhost URL is http, not https
2022-01-03 15:54:14 +01:00
Min RK
ffa5a20e2f localhost URL is not https 2022-01-03 15:41:54 +01:00
Simon Li
2088a57ffe Extra test_cors_check tests 2022-01-03 13:55:04 +00:00
Erik Sundell
345805781f Merge pull request #3740 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2021-12-27 22:53:25 +01:00
pre-commit-ci[bot]
9eb52ea788 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pre-commit/pre-commit-hooks: v4.0.1 → v4.1.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.0.1...v4.1.0)
2021-12-27 21:10:45 +00:00
Vlad Vifor
26c65339a7 Merge branch 'jupyterhub:main' into group_property_feature 2021-12-23 12:54:23 +01:00
Min RK
fb1405ecd8 Bump to 2.1.0.dev 2021-12-22 14:16:34 +01:00
Min RK
3f01bf400b Bump to 2.0.1 2021-12-22 14:15:53 +01:00
Erik Sundell
c528751502 Merge pull request #3728 from minrk/changelog-2.0.1
Changelog for 2.0.1
2021-12-22 12:32:00 +01:00
Min RK
0018184150 Changelog for 2.0.1 2021-12-22 12:01:30 +01:00
Min RK
7903f76e11 Merge pull request #3723 from sgaist/use_login_url_from_authenticator
Use URL from authenticator on default login form
2021-12-22 10:50:26 +01:00
Samuel Gaist
d5551a2f32 Use URL from authenticator also for local authenticator
This patch is related to the implementation of the
MultiAuthenticator in jupyterhub/oauthenticator#459

The issue will be triggered when using more than one local provider
or mixing with oauth providers.

With multiple providers the template generates a set of buttons to
choose from to continue the login process.

For OAuth, the user will be sent to the provider login page and
the redirect at the end will continue nicely the process.

Now for the tricky part: using a local provider (e.g. PAM), the
user will be redirected to the "same page" thus the same template
will be rendered but this time to show the username/password dialog.

This will trip the workflow because of the action URL coming from
the settings and not from the authenticator. Therefore when the button
is clicked, the user will come back to the original multiple choice page
rather than continue the login.
2021-12-22 10:41:24 +01:00
Erik Sundell
ca564a5948 Merge pull request #3735 from minrk/admin-users-roles
initialize new admin users with default roles
2021-12-22 10:28:20 +01:00
Erik Sundell
0fcc559323 Merge pull request #3726 from minrk/service-whoami-update
update service-whoami example
2021-12-22 10:19:02 +01:00
Min RK
a746e8e7fb update service-whoami example
- update models with 2.0.0
- different scopes for oauth, api
  shows model depends on permissions
- update text with more details about scopes
- fix outdated reference to local-system credentials
2021-12-22 10:10:16 +01:00
Min RK
b2ce6023e1 initialize new admin users with default roles
it was possible for a user in `admin_users` to not get the `user` role
2021-12-22 10:00:08 +01:00
Erik Sundell
39b331df1b Merge pull request #3733 from manics/missing-f
Fix missing f-string modifier
2021-12-22 00:37:37 +01:00
Simon Li
a69140ae1b Fix missing f-string modifier 2021-12-21 23:26:45 +00:00
Erik Sundell
225ca9007a Merge pull request #3731 from minrk/allow-token-auth-user-url
accept token auth on `/hub/user/...`
2021-12-20 17:42:41 +01:00
Erik Sundell
11efebf1e2 Merge pull request #3722 from minrk/ensure-user-login
always assign default roles on login
2021-12-20 17:39:40 +01:00
Erik Sundell
3e5082f265 Merge pull request #3727 from minrk/grant-role-twice
clarify `role` argument in grant/strip_role
2021-12-20 17:38:27 +01:00
Min RK
36cb1df27e accept token auth on /hub/user/... which are probably requests to non-running servers
otherwise, requests get redirected to `/hub/login` instead of failing with 404/503
2021-12-20 13:37:47 +01:00
Min RK
fcad2d5695 clarify role argument in grant/strip_role
I got confused with a variable called `rolename` that was actually an orm.Role

casting types in a signature is confusing,
but now `role` input can be Role or name,
and in the body it will always be a Role that exists

Behavior is unchanged
2021-12-20 11:39:50 +01:00
Min RK
2ec722d3af Merge pull request #3708 from minrk/user-role-startup
Avoid clearing user role membership when defining custom user scopes
2021-12-20 10:48:03 +01:00
Min RK
390f50e246 Merge pull request #3705 from minrk/intersect-token-scopes
use intersect_scopes utility to check token permissions
2021-12-20 10:30:13 +01:00
Min RK
3276e4a58f Merge pull request #3720 from minrk/fix-initial-user-role
simplify default role assignment
2021-12-20 10:30:01 +01:00
pre-commit-ci[bot]
e59e7f534c [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2021-12-16 14:50:38 +00:00
vpopescu
25b0133979 Merge commit '92c6a23a13cc75a45e750f25bc5d76ed5cb49445' into group_property_feature 2021-12-16 15:48:50 +01:00
Min RK
2a8428dbb0 always assign default roles on login
successful authentication of a user always grants 'user' role

rather than only on first user creation in db
2021-12-16 12:42:47 +01:00
Min RK
7febb3aa06 simplify default role assignment
- always assign 'user' role, not just when no other roles are assigned
- 'admin' role is in addition, not instead
2021-12-16 12:15:31 +01:00
Simon Li
92c6a23a13 Merge pull request #3716 from minrk/pre_spawn_start_msg
Fix error message about Authenticator.pre_spawn_start
2021-12-15 14:00:18 +00:00
Min RK
bb75081086 Fix error message about pre_spawn_start
This isn't the only or even main thing likely to raise here,
so don't blame it, which is confusing, especially in a message shown to users.

Log the full exception, and show a more opaque message to the user to avoid confusion
2021-12-15 12:44:14 +01:00
Min RK
915c244d02 Test loading user/admin role membership from config
Cover different combinations of:

- existing assignments in db
- additive allowed_users/admin_users config
- strict users membership assignment in load_roles
2021-12-15 12:40:54 +01:00
Min RK
b5e0f46796 rbac_upgrade detection only when users already exist in the db
Instead of just checking for absent roles, also check for present users

otherwise, this will run on all first launches post-2.0, which we don't want
2021-12-15 12:37:55 +01:00
Min RK
34e8e2d828 Avoid clearing user role membership when defining custom user role
If the user role was defined but did not specify a user membership list,
users granted access by the Authenticator would lose their status

Instead, do nothing on an undefined user membership list,
leaving any users with their existing default role assignment
2021-12-15 12:37:55 +01:00
Min RK
c2cbeda9e4 Merge pull request #3714 from team-monolith-product/main
Grant role after user creation during config load
2021-12-15 12:36:53 +01:00
이창환
92a33bd358 Use assign_default_role not grant_role 2021-12-15 20:27:18 +09:00
이창환
e19700348d Move grant role into _get_or_create_user 2021-12-15 19:05:16 +09:00
Simon Li
04ac02c09d Merge pull request #3717 from minrk/allowed-roles-type
fix Spawner.oauth_roles config
2021-12-14 15:46:07 +00:00
Min RK
2b61c16c06 fix Spawner.oauth_roles config
missing cast to orm.Role from config when populating oauth client

test included
2021-12-14 13:20:11 +01:00
Min RK
028722a5ac Merge pull request #3719 from minrk/dist-upgrade-apt
check for db clients before requesting install
2021-12-14 13:12:28 +01:00
Min RK
ca7e07de54 check for db clients before requesting install
workaround weird issue where mysql-client install fails because it's present with a weird pinning
2021-12-14 11:51:39 +01:00
Min RK
c523e74644 Merge pull request #3715 from naatebarber/pass-base-url
Pass Base Url
2021-12-14 10:43:40 +01:00
pre-commit-ci[bot]
dd932784ed [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2021-12-14 01:46:27 +00:00
Nathan Barber
4704217dc5 Fix bug with umwarranted error messages 2021-12-13 20:36:00 -05:00
Nathan Barber
3893fb6d2c Pass base_url 2021-12-13 19:55:23 -05:00
이창환
59b2b36a27 Grant role after user creation during config load 2021-12-13 21:32:25 +09:00
Vlad Vifor
3b7e4d8550 Updated alembic revision 2021-12-09 18:21:25 +01:00
vpopescu
2b6666e114 Cleaned the alembic revision 2021-12-09 16:56:36 +01:00
vpopescu
06b2b78ffc test 2021-12-09 16:53:04 +01:00
Min RK
f6eaaebdf4 use intersect_scopes utility to check token permissions
we didn't have this function when we started checking token scopes
2021-12-07 13:55:32 +01:00
Erik Sundell
bb20002aea Merge pull request #3704 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2021-12-06 22:18:08 +01:00
pre-commit-ci[bot]
d1995ba7eb [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/psf/black: 21.11b1 → 21.12b0](https://github.com/psf/black/compare/21.11b1...21.12b0)
- [github.com/pre-commit/mirrors-prettier: v2.5.0 → v2.5.1](https://github.com/pre-commit/mirrors-prettier/compare/v2.5.0...v2.5.1)
2021-12-06 21:09:54 +00:00
Yuvi Panda
b06f4cda33 Merge pull request #3697 from naatebarber/react-error-handling
React Error Handling
2021-12-03 12:22:22 +05:30
Erik Sundell
9d7a235107 Merge pull request #3701 from minrk/extra-cors-check
cors: handle mismatched implicit/explicit ports in host header
2021-12-02 12:46:26 +01:00
Vlad Vifor
2dd2b7d60c Merge branch 'jupyterhub:main' into group_property_feature 2021-12-02 12:32:49 +01:00
Erik Sundell
18459bad11 Merge pull request #3698 from minrk/separate-jest
run jsx tests in their own job
2021-12-02 12:30:43 +01:00
vladfreeze
c7cb4138ee Fixed bug where users where deleted when changing group properties 2021-12-02 11:29:31 +01:00
vladfreeze
d812d0f11c Removed a duplicate key error output for further testing 2021-12-02 11:29:29 +01:00
vladfreeze
7fe565cc05 updated test_scopes and access map in base.py to fit in group properties 2021-12-02 11:29:27 +01:00
vladfreeze
5aed99b4a6 Improved design 2021-12-02 11:29:26 +01:00
vladfreeze
4c30e9e1d1 Updated code to fit with latest version 2021-12-02 11:29:24 +01:00
vladfreeze
7a56cadfb5 Improved design of input fields to match template 2021-12-02 11:29:22 +01:00
vladfreeze
21231d2f23 Removed automatically generated comments from alembic 2021-12-02 11:29:20 +01:00
vladfreeze
b11814c95b Added alembic revision for upgrading databases with no properties columns. 2021-12-02 11:29:11 +01:00
vladfreeze
471e492c11 Added changes for group properties editing 2021-12-02 11:29:00 +01:00
Min RK
ced941a6aa cors: handle mismatched implicit/explicit ports in host header
http://host:80 should match http://host

cors tests are parametrized to make it easier to add more cases
2021-12-02 11:02:21 +01:00
Min RK
85e37e7f8c Merge pull request #3195 from kylewm/x-forwarded-host
add option to use a different Host header for referer checks
2021-12-02 10:03:33 +01:00
Min RK
53067de596 finalize forwarded_host_header tests 2021-12-02 09:37:02 +01:00
Kyle Mahan
9c13861eb8 add configuration value to use a different Host key for CORS checks 2021-12-02 09:18:38 +01:00
Min RK
b0ed9f5928 run jsx tests in their own job
no need to re-run them for each entry in our Python matrix
2021-12-02 08:57:45 +01:00
Min RK
ff0d15fa43 Bump to 2.1.0.dev 2021-12-02 08:53:50 +01:00
Nathan Barber
81bb05d0ef Merge branch 'jupyterhub:main' into react-error-handling 2021-12-01 10:27:40 -05:00
Min RK
95649a3ece Bump to 2.0.0 2021-12-01 14:58:11 +01:00
Erik Sundell
08288f5b0f Merge pull request #3696 from minrk/changelog-2.0
Changelog for 2.0
2021-12-01 14:56:30 +01:00
Min RK
01b1ce3995 Link to upgrading doc from the changelog 2021-12-01 14:36:07 +01:00
Min RK
cbe93810be remove redundant admin/upgrading ref target
confuses myst to have a ref: and doc: target with the same name
2021-12-01 14:36:06 +01:00
Min RK
75309d9dc4 Changelog for 2.0
ready to go!
2021-12-01 14:36:06 +01:00
pre-commit-ci[bot]
8594b3fa70 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2021-12-01 06:54:56 +00:00
Nathan Barber
1e956df4c7 Re-lint withAPI 2021-12-01 01:54:18 -05:00
Nathan Barber
8ba2bcdfd4 Merge branch 'react-error-handling' of github.com:naatebarber/jupyterhub into react-error-handling 2021-12-01 01:52:59 -05:00
Nathan Barber
999cc0a37c Clean and lint 2021-12-01 01:52:18 -05:00
pre-commit-ci[bot]
a6611e5999 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2021-12-01 06:45:29 +00:00
Nathan Barber
c0d5778d93 Merge branch 'jupyterhub:main' into react-error-handling 2021-12-01 01:35:14 -05:00
Nathan Barber
293fe4e838 Updated ServerDashboard to testing-library, added tests 2021-12-01 01:32:19 -05:00
Nathan Barber
dfee471e22 Updated Groups to testing-library 2021-12-01 00:20:16 -05:00
Nathan Barber
db7cdc4aa7 Updated GroupEdit to testing-library. Added tests 2021-12-01 00:03:56 -05:00
Nathan Barber
c048ad4aac Updated CreateGroup, EditUser to testing-library. Added tests 2021-11-30 23:23:52 -05:00
Nathan Barber
9e245379e8 Begin replacing enzyme with react-testing-library 2021-11-30 22:23:22 -05:00
Nathan Barber
496f414a2e Update structure for AddUser tests, add tests 2021-11-30 16:43:55 -05:00
Nathan Barber
df67a75893 Add UI error dialogues to api requests 2021-11-30 15:35:00 -05:00
Erik Sundell
249b4af59f Merge pull request #3695 from minrk/service-auth-doc
Service auth doc
2021-11-30 16:09:12 +01:00
Min RK
db3b2d8961 refine service auth docs
favor HubOAuth, as that should really be the default for most services

- Remove some outdated 'new in' text
- Remove docs for some deprecated features (hub_users, hub_groups)
- more detail on what's required
2021-11-30 10:48:53 +01:00
Min RK
7d44a0ffc8 add tornado to intersphinx 2021-11-30 10:45:38 +01:00
Min RK
202b2590e9 doc: remove redundant TOC from services doc
The same TOC is automatically generated on the sidebar, no need for a manual copy
2021-11-30 09:18:57 +01:00
Erik Sundell
c98ef547a8 Merge pull request #3693 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2021-11-29 22:16:35 +01:00
pre-commit-ci[bot]
8a866a9102 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pre-commit/mirrors-prettier: v2.4.1 → v2.5.0](https://github.com/pre-commit/mirrors-prettier/compare/v2.4.1...v2.5.0)
2021-11-29 20:06:06 +00:00
Min RK
b186bdbce3 Bump to 2.0.0rc5 2021-11-26 09:07:15 +01:00
Min RK
36fe6c6f66 Merge pull request #3692 from minrk/clrc5
changelog for 2.0.0rc5
2021-11-26 09:06:21 +01:00
Min RK
8bf559db52 changelog for 2.0.0rc5 2021-11-26 09:05:21 +01:00
Simon Li
750085f627 Merge pull request #3690 from minrk/gha-singleuser
build jupyterhub/singleuser along with other images
2021-11-25 20:17:12 +00:00
Min RK
2dc2c99b4a Merge pull request #3640 from minrk/doc-api-only
add api-only doc
2021-11-25 20:26:25 +01:00
pre-commit-ci[bot]
e703555888 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2021-11-25 19:16:41 +00:00
Min RK
7e102f0511 Apply suggestions from code review
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2021-11-25 20:16:10 +01:00
Min RK
facde96425 build jupyterhub/singleuser along with other images
got lost in the migration to GHA docker builds
2021-11-24 21:15:59 +01:00
Erik Sundell
608c746a59 Merge pull request #3689 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2021-11-22 22:26:25 +01:00
pre-commit-ci[bot]
a8c834410f [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.29.0 → v2.29.1](https://github.com/asottile/pyupgrade/compare/v2.29.0...v2.29.1)
- [github.com/psf/black: 21.10b0 → 21.11b1](https://github.com/psf/black/compare/21.10b0...21.11b1)
2021-11-22 20:51:45 +00:00
Min RK
bda14b487a Bump to 2.0.0rc4 2021-11-18 15:33:12 +01:00
Min RK
fd5cf8c360 Merge pull request #3687 from minrk/rc4-changelog
update 2.0 changelog
2021-11-18 15:32:27 +01:00
Min RK
03758e5b46 update 2.0 changelog
prep for rc4
2021-11-18 14:50:10 +01:00
Erik Sundell
e540d143bb Merge pull request #3685 from minrk/session-id-model
Add Session id to token/identify models
2021-11-18 13:39:34 +01:00
Erik Sundell
b2c5ad40c5 Merge pull request #3686 from minrk/login_with_token
Hub: only accept tokens in API requests
2021-11-18 13:27:41 +01:00
Min RK
edfdf672d8 Hub: only accept tokens in API requests
do not allow token-based access to pages

Tokens are only accepted via Authorization header, which doesn't make sense to pass to pages,
so disallow it explicitly to avoid surprises
2021-11-18 09:36:49 +01:00
Min RK
39f19aef49 add session_id to token model 2021-11-17 09:46:26 +01:00
Min RK
8813bb63d4 update to openapi 3.0
easier to implement oneOf schemas

document scopes, session_id in /api/user model
2021-11-17 09:44:38 +01:00
Yuvi Panda
7c18d6fe14 Merge pull request #3681 from minrk/log-app-versions
Log single-user app versions at startup
2021-11-16 00:11:32 +05:30
Erik Sundell
d1fe17d3cb Merge pull request #3682 from minrk/relpath
always use relative paths in data_files
2021-11-08 14:06:20 +01:00
Min RK
b8965c2017 always use relative paths in data_files
instead of absolute paths for sources

seems to have started failing on Windows
2021-11-08 13:29:26 +01:00
Min RK
733d7bc158 Log single-user app versions at startup
Reports jupyterlab, jupyter_server versions during startup
2021-11-08 09:21:32 +01:00
Min RK
88f31c29bb add api-only doc
Describe how to use JupyterHub as a "behind the scenes" implementation detail,
rather than a user-facing application.
2021-11-04 17:16:59 +01:00
Min RK
3caf3cfda8 Bump to 2.0.0rc3 2021-11-04 15:52:37 +01:00
Erik Sundell
d076c55cca Merge pull request #3679 from minrk/forward-1.5
Forward-port fixes from 1.5.0 security release
2021-11-04 15:30:04 +01:00
Min RK
3e185022c8 changelog for 1.5.0 2021-11-04 15:04:40 +01:00
Min RK
857ee2885f jupyterlab: don't use $JUPYTERHUB_API_TOKEN in PageConfig.token 2021-11-04 15:03:12 +01:00
Min RK
cd8dd56213 Revert "store tokens passed via url or header, not only url."
This reverts commit 53c3201c17.

Only tokens in URLs should be persisted in cookies.
Tokens in headers should not have any effect on cookies.
2021-11-04 15:03:12 +01:00
Erik Sundell
f06902aa8f Merge pull request #3675 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2021-11-02 01:56:07 +01:00
pre-commit-ci[bot]
bb109c6f75 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/psf/black: 21.9b0 → 21.10b0](https://github.com/psf/black/compare/21.9b0...21.10b0)
2021-11-01 20:25:25 +00:00
Erik Sundell
e525ec7b5b Merge pull request #3674 from minrk/verify-login-role
verify that successful login assigns default role
2021-10-30 17:50:01 +02:00
Min RK
356b98e19f verify that successful login assigns default role
and that repeated login after revoked role doesn't reassign role
2021-10-30 14:30:33 +02:00
Erik Sundell
8c803e7a53 Merge pull request #3673 from minrk/main
more calculators
2021-10-30 14:21:17 +02:00
Min RK
2e21a6f4e0 more calculators 2021-10-30 14:07:04 +02:00
Min RK
cfd31b14e3 Bump to 2.0.0rc2 2021-10-30 13:36:54 +02:00
Erik Sundell
f03a620424 Merge pull request #3672 from minrk/prerelease
use v2 of jupyterhub/action-major-minor-tag-calculator
2021-10-30 13:29:43 +02:00
Min RK
440ad77ad5 use v2 of jupyterhub/action-major-minor-tag-calculator
needed for handling of prerelease tags
2021-10-30 12:42:29 +02:00
Min RK
68835e97a2 Bump to 2.0.0rc1 2021-10-30 12:37:39 +02:00
Min RK
ce80c9c9cf Merge pull request #3669 from minrk/bumpversion
use tbump to tag versions
2021-10-30 12:34:28 +02:00
Min RK
3c299fbfb7 use tbump for bumping versions
avoids needing to manually keep files in sync,
and dramatically reduces RELEASE steps
2021-10-30 12:18:14 +02:00
Min RK
597f8ea6eb Merge pull request #3670 from manics/support-bot
Add support-bot
2021-10-30 12:17:47 +02:00
Erik Sundell
d1181085bf Merge pull request #3665 from minrk/openapi-test
Tests for our openapi spec
2021-10-29 16:05:05 +02:00
Simon Li
913832da48 Add support-bot
The old support-bot was disabled https://github.com/jupyterhub/.github/issues/15
This is the recommended replacement https://github.com/dessant/support-requests/issues/8
2021-10-29 14:09:49 +01:00
Min RK
42f57f4a72 Merge pull request #3662 from minrk/2.0rc-changelog
changelog for 2.0 release candidate
2021-10-29 13:40:34 +02:00
Min RK
d01a518c41 add updating rest-api version to release
and make real release checklist, to match other repos
2021-10-29 13:13:41 +02:00
Min RK
65ce06b116 test feedback
use global PYTEST_ARGS for nicer, simpler always-on arguments for pytest
2021-10-29 13:13:41 +02:00
Min RK
468aa5e93c render openapi spec client-side
- move spec to _static/rest-api.yml, since the original yaml must be served
- copy javascript rendering code from FastAPI (uses swagger-ui)
- remove link to pet store, since there isn't a big enough difference to duplicate it
- remove bootprint rendering with node
2021-10-29 13:13:41 +02:00
Min RK
5c01370e6f set version as long as we are rewriting the file 2021-10-29 13:13:41 +02:00
Min RK
21d08883a8 resolve rest-api validation errors
- regen scopes by running generate-scopes.py
2021-10-29 13:13:41 +02:00
Min RK
59de506f20 validate the rest-api
both with github action that runs openapi validation,
and a couple local tests to verify some maintenance tasks are done
2021-10-29 13:13:41 +02:00
Erik Sundell
b34120ed81 Merge pull request #3663 from minrk/clarify-default-roles
clarify some log messages during role assignment
2021-10-29 12:19:45 +02:00
Erik Sundell
617978179d Merge pull request #3667 from minrk/autodoc-traits
use stable autodoc-traits
2021-10-29 12:16:30 +02:00
Min RK
0985d6fdf2 use stable autodoc-traits 2021-10-29 11:32:02 +02:00
Min RK
2049fb0491 clarify some log messages during role assignment
and only commit on change
2021-10-29 11:22:12 +02:00
Erik Sundell
a58fc6534b Merge pull request #3664 from minrk/create-groups-on-startup
create groups declared in roles
2021-10-28 03:30:25 +02:00
Min RK
a14f97b7aa create groups declared in roles
matches behavior of users
2021-10-27 21:00:49 +02:00
Min RK
0a4cd5b4f2 add auto-changelog for 2.0rc 2021-10-27 16:22:43 +02:00
Min RK
dca6d372df Merge pull request #3661 from minrk/owner-metascope
Rename 'all' metascope to more descriptive 'inherit'
2021-10-27 16:20:29 +02:00
pre-commit-ci[bot]
3898c72921 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2021-10-27 14:01:05 +00:00
Min RK
b25517efe8 Rename 'all' metascope to more descriptive 'inherit'
since it means 'inheriting' the owner's permissions

'all' prompted the question 'all of what, exactly?'

Additionally, fix some NameErrors that should have been KeyErrors
2021-10-27 16:00:21 +02:00
Erik Sundell
392dffd11e Merge pull request #3659 from minrk/deprecate-admin-only
deprecate instead of remove `@admin_only` auth decorator
2021-10-25 23:32:01 +02:00
Erik Sundell
510f6ea7e6 Merge pull request #3660 from minrk/scope-error
minor refinement of excessive scopes error message
2021-10-25 15:53:43 +02:00
Min RK
296a0ad2f2 minor refinement of excessive scopes error message
show the role name
2021-10-25 14:10:57 +02:00
Min RK
487c4524ad deprecate instead of remove @admin_only auth decorator
no harm in keeping it around for a deprecation cycle
2021-10-25 13:00:45 +02:00
Erik Sundell
b2f0208fcc Merge pull request #3658 from minrk/better-timeout-message
improve timeout handling and messages
2021-10-20 22:15:26 +02:00
Min RK
84b9c3848c more detailed error messages for start timeouts
these are the most common error for any number of reasons spawn may fail
2021-10-20 20:08:34 +02:00
Min RK
9adbafdfb3 consistent handling of any timeout error
some things raise standard TimeoutError, others may raise tornado gen.TimeoutError (gen.with_timeout)

For consistency, add AnyTimeoutError tuple to allow catching any timeout, no matter what kind

Where we were raising `TimeoutError`,
we should have been raising `asyncio.TimeoutError`.

The base TimeoutError is an OSError for ETIMEO, which is for system calls
2021-10-20 20:07:45 +02:00
Erik Sundell
9cf2b5101e Merge pull request #3657 from edgarcosta/patch-1
docs: fix typo in proxy config example
2021-10-20 09:12:30 +02:00
Edgar Costa
725fa3a48a typo 2021-10-19 22:39:41 -04:00
Erik Sundell
534dda3dc7 Merge pull request #3653 from minrk/admin-no-such-user
raise 404 on admin attempt to spawn nonexistent user
2021-10-15 15:23:18 +02:00
Min RK
b0c7df04ac raise 404 on admin attempt to spawn nonexistent user 2021-10-15 14:40:47 +02:00
Min RK
61b0e8bef5 2.0.0b3 2021-10-14 12:49:20 +02:00
Erik Sundell
64f3938528 Merge pull request #3649 from minrk/cl-beta-3
add 424 status code change to changelog
2021-10-13 09:52:33 +02:00
Min RK
85bc92d88e Merge pull request #3646 from joegasewicz/joegasewicz-New-user-token-returns-200-instead-of-201-1
new user token returns 200 instead of 201
2021-10-13 09:24:30 +02:00
Min RK
7bcda18564 add 424 status code change to changelog 2021-10-13 09:17:47 +02:00
Erik Sundell
86da36857e Merge pull request #3647 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2021-10-12 00:13:22 +02:00
pre-commit-ci[bot]
530833e930 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/PyCQA/flake8: 3.9.2 → 4.0.1](https://github.com/PyCQA/flake8/compare/3.9.2...4.0.1)
2021-10-11 19:42:10 +00:00
Joe Gasewicz
3b0850fa9b Fixed test_roles 2021-10-07 23:14:10 +01:00
josefgasewicz
1366911be6 Fixed tests & set status after writing json 2021-10-07 22:21:16 +01:00
Joe Gasewicz
fe276eac64 Update users.py
New user token returns 200 instead of 201 Fixes #3642
2021-10-07 16:31:23 +01:00
Min RK
9209ccd0de Merge pull request #3636 from yuvipanda/404
Fail suspected API requests with 424, not 503
2021-10-05 15:16:18 +02:00
YuviPanda
3b2a1a37f9 Update tests that were looking for 503s 2021-10-05 18:10:52 +05:30
YuviPanda
6007ba78b0 Preserve older 503 behavior behind a flag 2021-10-05 17:56:51 +05:30
YuviPanda
9cb19cc342 Use 424 rather than 404 to indicate non-running server
404 is also used to identify that a particular resource
(like a kernel or terminal) is not present, maybe because
it is deleted. That comes from the notebook server, while
here we are responding from JupyterHub. Saying that the
user server they are trying to request the resource (kernel, etc)
from does not exist seems right.
2021-10-05 17:44:17 +05:30
YuviPanda
0f471f4e12 Fail suspected API requests with 404, not 503
Non-running user servers making requests is a fairly
common occurance - user servers get culled while their
browser tabs are left open. So we now have a background level
of 503s responses on the hub *all* the time, making it
very difficult to detect *real* 503s, which should ideally
be closely monitored and alerted on.

I *think* 404 is a more appropriate response, as the resource
(API) being requested is no longer present.
2021-10-05 03:00:16 +05:30
Erik Sundell
68db740998 Merge pull request #3635 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2021-10-04 22:38:05 +02:00
pre-commit-ci[bot]
9c0c6f25b7 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.28.0 → v2.29.0](https://github.com/asottile/pyupgrade/compare/v2.28.0...v2.29.0)
2021-10-04 19:48:13 +00:00
Min RK
5f0077cb5b Merge pull request #3445 from rpwagner/patch-1
Initial SECURITY.md
2021-09-29 09:42:59 +02:00
Min RK
a6a2056cca 2.0.0b2 2021-09-29 09:41:57 +02:00
Erik Sundell
fb1e81212f Merge pull request #3628 from minrk/beta-2
add latest changes to 2.0 changelog
2021-09-28 18:32:14 +02:00
Min RK
17f811d0b4 add latest changes to 2.0 changelog
- nullauthenticator
- lab by default
2021-09-28 15:28:59 +02:00
Min RK
34398d94de Merge pull request #3627 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2021-09-28 15:23:00 +02:00
Min RK
6bf94fde48 extend deadline for docker build test
it's building 4 images, 10 minutes isn't always enough, bump to 20
2021-09-28 14:46:33 +02:00
Min RK
ee18fed04b Merge pull request #3619 from manics/nullauthenticator
Add NullAuthenticator to jupyterhub
2021-09-28 11:36:41 +02:00
Simon Li
28f56ba510 Simplify NullAuthenticator, add test 2021-09-27 23:05:53 +01:00
pre-commit-ci[bot]
c8d3dbb7b1 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2021-09-27 19:45:58 +00:00
pre-commit-ci[bot]
a76a093638 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.26.0 → v2.28.0](https://github.com/asottile/pyupgrade/compare/v2.26.0...v2.28.0)
2021-09-27 19:43:18 +00:00
Erik Sundell
27908a8e17 Merge pull request #3616 from minrk/delete-scopes
add delete scopes for users, groups, servers
2021-09-27 14:01:51 +02:00
Erik Sundell
8a30f015c9 Merge pull request #3626 from minrk/token-log
server-api example typo: trim space in token file
2021-09-27 12:51:07 +02:00
Min RK
8cac83fc96 add delete scopes for users, groups, servers
e.g. cull-idle services do not need permission to start servers in order to be able to stop them
2021-09-27 12:43:56 +02:00
Min RK
9ade4bb9b2 server-api example: trim space in token file
avoids invalid newlines in the auth header
2021-09-27 12:42:23 +02:00
Min RK
874c91a086 Merge pull request #3615 from minrk/lab-by-default
2.0: jupyterlab by default
2021-09-27 12:39:31 +02:00
Min RK
a906677440 Merge pull request #3625 from albertmichaelj/main
Added base_url to path for jupyterhub-session-id cookie
2021-09-27 12:27:15 +02:00
pre-commit-ci[bot]
3f93942a24 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2021-09-26 19:55:05 +00:00
Michael Albert
aeb3130b25 Added base_url to path for jupyterhub_session_id cookie 2021-09-26 15:33:08 -04:00
Simon Li
8a6b364ca5 nullauthenticator: missing import 2021-09-23 20:40:00 +01:00
Simon Li
2ade7328d1 nullauthenticator: relative imports, entrypoint, doc 2021-09-23 20:39:54 +01:00
Min RK
2bb9f4f444 implement null authenticator 2021-09-23 19:14:07 +01:00
Simon Li
b029d983f9 Merge pull request #3607 from minrk/recommend-nodesource
update quickstart requirements
2021-09-23 17:31:18 +01:00
Min RK
4082006039 2.0: jupyterlab by default
swaps from default nbclassic and opt-in to lab, to now default to lab and opt-in to nbclassic

defaults to jupyterlab *if* lab 3.1 is available,
so should still work without configuration if lab is unavailable (or too old)
2021-09-23 14:52:14 +02:00
Min RK
69aa0eaa7a update quickstart requirements
- remove mention of outdated nodejs-legacy
- mention nodesource for more recent node
- mention jupyterlab
- initial localhost request will be on http, not https
2021-09-23 13:59:21 +02:00
Min RK
3674ada640 Merge pull request #3614 from jupyterhub/dependabot/npm_and_yarn/jsx/nth-check-2.0.1
Bump nth-check from 2.0.0 to 2.0.1 in /jsx
2021-09-23 13:56:00 +02:00
dependabot[bot]
48accb0a64 Bump nth-check from 2.0.0 to 2.0.1 in /jsx
Bumps [nth-check](https://github.com/fb55/nth-check) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/fb55/nth-check/releases)
- [Commits](https://github.com/fb55/nth-check/compare/v2.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: nth-check
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-22 09:01:52 +00:00
Simon Li
70ac143cfe Merge pull request #3613 from jupyterhub/dependabot/npm_and_yarn/jsx/tmpl-1.0.5
Bump tmpl from 1.0.4 to 1.0.5 in /jsx
2021-09-22 10:01:15 +01:00
dependabot[bot]
b1b2d531f8 Bump tmpl from 1.0.4 to 1.0.5 in /jsx
Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/daaku/nodejs-tmpl/releases)
- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-22 07:21:19 +00:00
Simon Li
e200783c59 Merge pull request #3610 from mriedem/patch-1
Fix 1.3 level
2021-09-20 21:28:54 +01:00
Erik Sundell
a7e57196c6 Merge pull request #3611 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2021-09-20 22:16:29 +02:00
pre-commit-ci[bot]
b5f05e6cd2 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/psf/black: 21.8b0 → 21.9b0](https://github.com/psf/black/compare/21.8b0...21.9b0)
- [github.com/pre-commit/mirrors-prettier: v2.4.0 → v2.4.1](https://github.com/pre-commit/mirrors-prettier/compare/v2.4.0...v2.4.1)
2021-09-20 19:57:49 +00:00
Matt Riedemann
5fe5b35f21 Fix 1.3 level
The 1.3 section was a sub-section of 1.4
which makes it harder to find 1.3 release notes
in the changelog from the navigation.
2021-09-20 13:40:45 -05:00
Min RK
4f6ef54b50 publish releases on push to tags 2021-09-17 12:29:48 +02:00
Min RK
601c144368 2.0.0b1 2021-09-17 12:00:59 +02:00
Erik Sundell
5e175f4b63 Merge pull request #3602 from minrk/2.0-changelog
2.0 changelog
2021-09-17 11:58:14 +02:00
Min RK
ee00ac227e expand detail about upgrade revoking tokens 2021-09-17 11:56:53 +02:00
Min RK
14997152b9 admonition about installing the beta 2021-09-17 10:54:43 +02:00
Min RK
5f19989467 suggest roles instead of admin_users
and make admin link permission check match admin page

it would be nice if this could be consolidated (maybe an `admin:ui` permission?)
2021-09-16 11:57:36 +02:00
Min RK
9d2ceaa156 Merge pull request #3604 from yuvipanda/debug
Reduce logging verbosity of 'checking routes'
2021-09-14 14:19:58 +02:00
YuviPanda
af1686dbe6 Reduce logging verbosity of 'checking routes'
Of 18355 lines of logs in a 5day old hub instance,
8228 are just this message. That's 44% of the logs! We now
have prometheus metrics to monitor performance of this if
needed, and people can always turn on debug logging.
2021-09-14 13:37:21 +05:30
Erik Sundell
ed6f2ada60 Merge pull request #3603 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2021-09-13 23:02:14 +02:00
Erik Sundell
cc8e5f351f Apply suggestions from code review 2021-09-13 22:16:34 +02:00
pre-commit-ci[bot]
2543c27035 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2021-09-13 19:39:37 +00:00
pre-commit-ci[bot]
8d5ec6577f [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.25.0 → v2.26.0](https://github.com/asottile/pyupgrade/compare/v2.25.0...v2.26.0)
- [github.com/pre-commit/mirrors-prettier: v2.3.2 → v2.4.0](https://github.com/pre-commit/mirrors-prettier/compare/v2.3.2...v2.4.0)
2021-09-13 19:39:06 +00:00
Min RK
12ab53fb37 changelog for 2.0
remove suggestions of `admin` permissions, in favor of roles and scopes
2021-09-13 13:44:32 +02:00
Min RK
559b626046 remove unused Pagination class
used only for 1.4 admin page, not api
2021-09-13 13:16:35 +02:00
Min RK
47292d9af2 make api_page_max_limit configurable 2021-09-13 12:59:47 +02:00
Erik Sundell
50e78fa7d6 Merge pull request #3601 from manics/update-readme
Update/cleanup README
2021-09-11 14:55:28 +02:00
Simon Li
cfd2ca9065 Update README
- circle CI no longer used
- ubuntu/debian nodejs may be too old (12.0+ required)
- remove mention of mailing list
- Python 3.6 required
- Emphasise JupyterLab over notebook
2021-09-11 13:39:41 +01:00
Simon Li
905b1b999b Merge pull request #3593 from minrk/email-typo
mailto link typo
2021-09-03 13:47:32 +01:00
Min RK
857f7271ca email-typo 2021-09-03 14:32:24 +02:00
Min RK
12c6ab4ca1 Merge pull request #3575 from VaishnaviHire/add_content_type
Validate Content-Type Header for api POST requests
2021-09-01 10:16:39 +02:00
Min RK
44988b626e move content-type check to base APIHandler
so it can be applied to all cookie-authenticated POST requests

also parse the content-type header to handle e.g. `Content-Type: application/json; charset`
2021-09-01 09:51:23 +02:00
Vaishnavi Hire
e59556f020 Validate Content-Type Header for api/users
The content-type of Hub API requests used for user management, specifically for creating a user
is not validated and so the ‘text/plain’ type is accepted, where it must be ‘application/json’.
This commit adds validation for `Content-type` header for the /hub/api/users endpoint to only
allow requests with content-type as `application/json`
2021-08-31 11:49:52 -04:00
Simon Li
2bc3a22acc Merge pull request #3591 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2021-08-31 10:00:12 +01:00
pre-commit-ci[bot]
77a79484c4 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.24.0 → v2.25.0](https://github.com/asottile/pyupgrade/compare/v2.24.0...v2.25.0)
- [github.com/psf/black: 21.7b0 → 21.8b0](https://github.com/psf/black/compare/21.7b0...21.8b0)
2021-08-30 19:24:04 +00:00
Erik Sundell
5d6eb642d8 Merge pull request #3586 from consideRatio/pr/pyupgrade-3-add-config
Add pyupgrade --py36-plus to pre-commit config
2021-08-26 17:38:38 +02:00
Erik Sundell
0644677a6a Add pyupgrade --py36-plus to pre-commit config 2021-08-26 16:56:51 +02:00
Erik Sundell
409b72ff23 Merge pull request #3585 from consideRatio/pr/pyupgrade-2-rest
pyupgrade: run pyupgrade --py36-plus and black on all but tests
2021-08-26 16:55:50 +02:00
Erik Sundell
bc71ad6d73 Apply suggestions from code review
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2021-08-26 16:23:38 +02:00
Erik Sundell
d6c48b15fe pyupgrade: run pyupgrade --py36-plus and black on all but tests 2021-08-26 16:23:38 +02:00
Erik Sundell
580d8fd9e2 Merge pull request #3584 from consideRatio/pr/pyupgrade-1-tests
pyupgrade: run pyupgrade --py36-plus and black on jupyterhub/tests
2021-08-26 16:23:17 +02:00
Erik Sundell
c8c7418ed2 pyupgrade: run pyupgrade --py36-plus and black on jupyterhub/tests 2021-08-26 16:05:18 +02:00
Min RK
2c62c4f7ef Merge pull request #3535 from minrk/pagination-gate
add opt-in model for paginated list results
2021-08-26 15:21:55 +02:00
Min RK
b38e3a05f4 symmetry in description of list:services scope 2021-08-26 15:17:30 +02:00
Min RK
ebc3b6f4e5 set minimum pagination limit to 1 2021-08-26 14:42:09 +02:00
Min RK
50219764a0 make order_by explicit in list endpoints
when implicit, ordering is not guaranteed (at least with postgres)
2021-08-24 13:56:11 +02:00
Min RK
d0c2bc051a test pagination limits on users endpoint 2021-08-24 13:56:11 +02:00
Min RK
911d1b5081 default to max page size if pagination is not explicitly requested
improves backward compatibility for clients that haven't implemented pagination
by requesting the max page size by default instead of the new default page size
2021-08-24 13:56:11 +02:00
Min RK
7f480445f6 warn about truncated replies without pagination 2021-08-24 13:56:11 +02:00
Min RK
fd644476a7 add opt-in model for paginated list results
use `Accept: application/jupyterhub-pagination+json`  to opt-in to the new response format

With a paginated API, we need to return pagination info (next page arguments, whether a next page exists, etc.),
but a simple list response doesn't give a good way to do that.

We can follow precedents and use a dict with an `items` field for the actual items,
and a `_pagination` field for info about pagination, including offset, limit, url for the next request
2021-08-24 13:56:11 +02:00
Min RK
8603723dbb add list:users|groups|services scopes
and govern GET /users|groups|services endpoints with these

Greatly simplifies filtering and pagination,
because these filters can be expressed in db filters,
unlike the potentially complex `read:users`.

Now the query itself will never return a model that should be excluded.

While writing the tests, I added more cleanup between tests.
We now ensure cleanup of all users and groups after each test,
which required updating some group tests which relied on this state leaking
2021-08-24 13:56:11 +02:00
Min RK
9f3663769e Merge pull request #3574 from jupyterhub/dependabot/npm_and_yarn/jsx/url-parse-1.5.3
Bump url-parse from 1.5.1 to 1.5.3 in /jsx
2021-08-24 13:27:52 +02:00
Min RK
1b1980c6bf Merge pull request #3582 from minrk/user-model-debug
Remove a couple every-request debug statements
2021-08-24 13:27:28 +02:00
Min RK
3f82a8ff00 Merge pull request #3581 from minrk/doc-override-server-role
[doc] add example specifying scopes for a default role
2021-08-24 13:25:04 +02:00
Min RK
e4dbc22cdf Remove a couple every-request debug statements
logging all scopes every request and for every user model retrieval gets noisy
2021-08-24 09:44:23 +02:00
Min RK
7533cb7602 [doc] add example specifying scopes for a default role 2021-08-24 09:04:08 +02:00
Min RK
dd7f035158 Merge pull request #3543 from dolfinus/fix_zombie_process
Avoid zombie processes in case of using LocalProcessSpawner
2021-08-23 11:06:26 +02:00
Min RK
59b2581370 Merge pull request #3565 from minrk/doc-waiting-server
Add detailed doc for starting/waiting for servers via api
2021-08-18 10:36:26 +02:00
Min RK
1cb4078fed Merge pull request #3564 from minrk/no-rm-servers
don't omit server model if it's empty
2021-08-18 10:36:02 +02:00
Min RK
9a8fec4060 Merge pull request #3572 from eruditehassan/patch-1
Improved Grammar for the Documentation
2021-08-18 10:35:02 +02:00
dependabot[bot]
ed10ac2433 Bump url-parse from 1.5.1 to 1.5.3 in /jsx
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.1 to 1.5.3.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.1...1.5.3)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-18 08:34:41 +00:00
Min RK
c60ec5a18e Merge pull request #3573 from jupyterhub/dependabot/npm_and_yarn/jsx/path-parse-1.0.7
Bump path-parse from 1.0.6 to 1.0.7 in /jsx
2021-08-18 10:34:08 +02:00
Yuvi Panda
441d0f0e52 Merge pull request #3558 from minrk/rm-deprecated-db
remove very old backward-compat for LocalProcess subclasses
2021-08-18 04:24:24 +05:30
dependabot[bot]
0ac8930270 Bump path-parse from 1.0.6 to 1.0.7 in /jsx
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-13 01:44:01 +00:00
Hassan Raza Bukhari
56c10e8799 Update README.md 2021-08-13 01:16:05 +05:00
Hassan Raza Bukhari
f6178ae51d Improved Grammar for the Documentation
Slight improvements in grammar were done in the ReadMe file.
2021-08-12 21:43:42 +05:00
Min RK
17ba49117c Merge pull request #3566 from nsshah1288/feature/shahn3_explicitRollback
explicit DB rollback for 500 errors
2021-08-10 15:36:19 +02:00
Min RK
3bcc542e27 finish up db rollback checks
- move catch_db_error to utils
- tidy catch/propagate errors in prepare, get_current_user
2021-08-10 15:03:41 +02:00
SHAHN3
044fb23a70 add explicit db rollback
add context manager/decorator for db rollback

add db rollback in top level prepare method

Co-authored-by: Sarath Babu <sbreached@gmail.com>
2021-08-10 14:49:37 +02:00
Min RK
9d96997eae Merge pull request #3568 from paccorsi/proxy-statsd-cmd
Stop injecting statsd parameters into the configurable HTTP proxy
2021-08-10 14:35:45 +02:00
Erik Sundell
7c471fa7e6 Merge pull request #3569 from dolfinus/auth_state_hook_exception_log
Fix wrong name of auth_state_hook in the exception log
2021-08-10 12:00:34 +02:00
Maxim Martynov
c5272604f2 Fix wrong name of auth_state_hook in the exception log 2021-08-10 12:38:27 +03:00
Pierre Accorsi
75e7c95d5c Stop injecting statsd parameters into the configurable HTTP proxy command 2021-08-09 17:07:44 -04:00
Min RK
a32986e9cc server-api doc: final touches 2021-08-06 10:55:43 +02:00
Yuvi Panda
1a1a60b02b Merge pull request #3559 from minrk/support-show-config
support inherited `--show-config` flags from base Application
2021-08-04 21:22:53 +05:30
Min RK
2cad292103 support inherited --show-config args from base traitlets.config.Application
inherits flags & aliases from base classes
2021-08-04 14:34:30 +02:00
Min RK
4f6fa3ddf7 Apply suggestions from code review
Co-authored-by: Simon Li <orpheus+devel@gmail.com>
2021-08-04 14:11:17 +02:00
Min RK
b1b6a9e76c Add detailed doc for starting/stopping/waiting for servers via api
and complete implementation in examples/server-api
2021-08-04 12:49:12 +02:00
Min RK
add69e8b52 Merge pull request #3563 from minrk/404-user
ensure admin requests for missing users 404
2021-08-04 10:55:07 +02:00
Min RK
468738a3df don't omit server model if it's empty
if request has access to read servers, leave it present and empty

only omit it if there's no access to read server models
2021-08-03 20:44:09 +02:00
Min RK
e98890b9ca ensure admin requests for missing users 404 2021-08-03 20:23:12 +02:00
Erik Sundell
71e9767307 Merge pull request #3561 from minrk/rm-old-tasks
remove old, unused tasks.py
2021-08-03 12:38:06 +02:00
Erik Sundell
8c941d25cf Merge pull request #3562 from minrk/rm-distutils
remove use of deprecated distutils
2021-08-03 12:37:50 +02:00
Min RK
6082c1965a remove use of deprecated distutils
distutils is slated for deprecation in the stdlib

we can use packaging for version parsing and setuptools in setup.py

packaging is technically an extra dependency, but rarely missing because it's so widespread
2021-08-03 12:22:31 +02:00
Min RK
9475af1b69 remove old, unused tasks.py
we haven't used this for quite some time

releases are made on CI now
2021-08-03 12:13:33 +02:00
Min RK
d55518b1ca Merge pull request #3526 from dolfinus/allow_all
Fix allow_all check
2021-08-03 11:01:42 +02:00
Min RK
da4a2a43b6 remove very old backward-compat for LocalProcess subclasses
0.6 introduced start returning connection info instead of relying on db state
2021-08-02 14:45:14 +02:00
Min RK
4ad9af5832 Merge pull request #3546 from AbdealiJK/ajk-pyproxy
doc: Mention a list of known proxies available
2021-08-02 14:38:09 +02:00
Min RK
35204b725b Merge pull request #3552 from dolfinus/token_expire_date_ui
Add expiration date dropdown to Token page
2021-08-02 14:37:44 +02:00
Erik Sundell
95037ae534 Merge pull request #3539 from consideRatio/pr/changelog-for-1.4.2
Update changelog for 1.4.2 in main branch
2021-08-02 10:22:49 +02:00
Maxim Martynov
10c142c104 Add expiration date dropdown to Token page 2021-07-28 12:54:01 +03:00
Erik Sundell
3800ceaf9e Merge pull request #3550 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2021-07-26 21:39:05 +02:00
pre-commit-ci[bot]
3ba4bfff71 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/reorder_python_imports: v2.5.0 → v2.6.0](https://github.com/asottile/reorder_python_imports/compare/v2.5.0...v2.6.0)
2021-07-26 18:03:56 +00:00
AbdealiJK
d5d05b8777 doc: Mention a list of known proxies available 2021-07-22 07:13:56 +05:30
Erik Sundell
187fe911ed Merge pull request #3542 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2021-07-20 02:11:16 +02:00
pre-commit-ci[bot]
b55dafc445 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/psf/black: 21.6b0 → 21.7b0](https://github.com/psf/black/compare/21.6b0...21.7b0)
2021-07-19 22:12:44 +00:00
Maxim Martynov
9975b8001f Avoid zombie processes in case of using LocalProcessSpawner 2021-07-20 00:48:15 +03:00
Erik Sundell
017579afd1 docs: fix conda-forge badge link in README 2021-07-16 14:16:39 +02:00
Erik Sundell
00e927f60d changelog for 1.4.2 2021-07-16 14:14:59 +02:00
Min RK
d9860aa98c Merge pull request #3537 from consideRatio/pr/backport-changelog-for-1.4.1
Retrospectively update changelog for 1.4.1 in main branch
2021-07-14 11:20:26 +00:00
Min RK
262bb20dc5 changelog for 1.4.1 2021-07-14 13:13:08 +02:00
Martynov Maxim
60b13224c5 Merge branch 'main' into allow_all 2021-07-05 14:43:02 +03:00
Min RK
c0b9250376 Merge pull request #3531 from consideRatio/pr/reproduce-required-api-token
Fix regression where external services api_token became required
2021-07-02 06:31:56 +00:00
Erik Sundell
b8023cbd83 Fix regression where external services require api_token 2021-06-29 23:03:16 +02:00
Erik Sundell
d86612c8e5 Add test to reproduce regression, external services requires api_token 2021-06-29 23:02:29 +02:00
Erik Sundell
f7b26c02dc Merge pull request #3530 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2021-06-28 21:27:20 +02:00
pre-commit-ci[bot]
18c5b6a17a [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2021-06-28 17:44:35 +00:00
pre-commit-ci[bot]
63315feb56 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/reorder_python_imports: v1.9.0 → v2.5.0](https://github.com/asottile/reorder_python_imports/compare/v1.9.0...v2.5.0)
- [github.com/psf/black: 20.8b1 → 21.6b0](https://github.com/psf/black/compare/20.8b1...21.6b0)
- [github.com/pre-commit/mirrors-prettier: v2.2.1 → v2.3.2](https://github.com/pre-commit/mirrors-prettier/compare/v2.2.1...v2.3.2)
- https://gitlab.com/pycqa/flake8https://github.com/PyCQA/flake8
- [github.com/PyCQA/flake8: 3.8.4 → 3.9.2](https://github.com/PyCQA/flake8/compare/3.8.4...3.9.2)
- [github.com/pre-commit/pre-commit-hooks: v3.4.0 → v4.0.1](https://github.com/pre-commit/pre-commit-hooks/compare/v3.4.0...v4.0.1)
2021-06-28 17:44:07 +00:00
Min RK
c00c3fa287 Merge pull request #3438 from jupyterhub/rbac
Roles and Scopes (RBAC)
2021-06-25 07:40:54 +00:00
Min RK
e35dde8112 Merge pull request #3520 from IvanaH8/rbac-docs-update
[rbac] Docs updates
2021-06-25 07:15:29 +00:00
Min RK
8b4c146719 Merge pull request #3524 from minrk/rm-pre-commit-gha
Remove pre-commit from GHA
2021-06-24 07:01:28 +00:00
Martynov Maxim
c7c9990c3d Fix allow_all check 2021-06-23 14:47:05 +03:00
IvanaH8
a6471670c2 Update upgrade section 2021-06-23 11:44:40 +02:00
IvanaH8
8764f6493b Add scope variable nomenclature and update tech implementation 2021-06-23 11:33:48 +02:00
IvanaH8
024e8fca30 Add !user filter explanation 2021-06-22 17:16:06 +02:00
IvanaH8
eb0f995886 Add scope hierarchy duplicates explanation 2021-06-22 16:22:51 +02:00
Min RK
e5345514ab remove unused defaults.run
this is leftover and has no effect
2021-06-22 15:27:43 +02:00
Min RK
7c9a80b4f0 Remove pre-commit from GHA
we are trying out pre-commit.ci, which means these steps in GHA are redundant
2021-06-22 15:27:24 +02:00
Min RK
778231726b Merge pull request #3519 from sgaist/improve_scope_relationships_generation
Refactor scope relationships creation
2021-06-21 08:28:07 +00:00
Min RK
e38509ca42 Merge pull request #3521 from icankeep/fix-readme-link
Fix contributor documentation's link
2021-06-21 07:51:28 +00:00
passer
bab5532b98 Fix contributor documentation's link 2021-06-19 12:37:08 +08:00
IvanaH8
f767a082f8 Fix user/admin default role assignment in roles.md 2021-06-18 13:10:02 +02:00
IvanaH8
a137134d3a Update roles.md for rbac docs with role creation/deletion and assignment changes 2021-06-18 12:28:30 +02:00
IvanaH8
12ffc42114 Fix docstring indentation and reference to flask example in docs
example using flask for Implementing your own Auth with JupyterHub was not displayed
2021-06-18 11:07:33 +02:00
Samuel Gaist
5a4314ea8c Refactor scope relationships creation
This version reduces the number of access to dictionaries data.
2021-06-17 16:06:59 +02:00
Min RK
e9686376ca Merge pull request #3517 from 0mar/resolve_rbac_todos
[rbac] Resolve small issues
2021-06-17 13:00:07 +00:00
0mar
2f8f7ad0b0 Resolves sql warnings on 3.6 and fixes for scope expansion bug 2021-06-17 14:38:14 +02:00
0mar
0381b51648 Raise error if role_spec bearers are invalid 2021-06-16 14:32:31 +02:00
0mar
a6a048c546 WIP: dealing with users only in load_roles 2021-06-16 12:28:36 +02:00
0mar
1bfe4be634 Added test for admin pages scope guard 2021-06-16 11:59:48 +02:00
0mar
5094baf797 Added scope checker 2021-06-16 11:45:02 +02:00
0mar
528ab28871 Raise error when hub has no roles defined 2021-06-16 11:37:23 +02:00
0mar
4359b6dc3c Added test for service role defaults 2021-06-16 11:36:49 +02:00
Min RK
280c11ca73 Merge pull request #3514 from minrk/start-services
[rbac] ensure managed services work with internal ssl
2021-06-16 08:39:45 +00:00
Min RK
c3308b1fc6 Merge pull request #3515 from 0mar/revoke_exceeding_tokens
[rbac] Revoke tokens for OAuth services if roles expand permissions
2021-06-16 07:44:40 +00:00
Min RK
c7a3015f94 Merge pull request #3516 from 0mar/refactor_scopes
[rbac] Refactor scopes (additional fix)
2021-06-16 07:41:35 +00:00
Min RK
0a231fe8ba ensure managed services work with internal ssl
- ensure create_certs is called for managed services
- wait for services with http, which checks ssl connections (without http, only tcp was checked, which doesn't verify it works!)
2021-06-16 09:41:09 +02:00
0mar
684cac4dc9 Fixed newlines 2021-06-16 09:15:27 +02:00
0mar
f75df12648 Small db fix 2021-06-15 15:50:39 +02:00
0mar
ac7625306b Revoke tokens for oauth if their roles expand permissions 2021-06-15 15:50:39 +02:00
Min RK
360075c98c Merge pull request #3513 from 0mar/refactor_scopes
[rbac] Refactored scope names
2021-06-15 13:10:46 +00:00
0mar
ceed989e77 Generate REST API scope descriptions from source code 2021-06-15 13:49:24 +02:00
0mar
7a3b237bb3 Refactored scope names and updated docs to reflect this 2021-06-15 13:00:15 +02:00
Min RK
6988d74001 Merge pull request #3512 from jupyterhub/dependabot/npm_and_yarn/jsx/ini-1.3.8
Bump ini from 1.3.5 to 1.3.8 in /jsx
2021-06-15 09:07:12 +00:00
Min RK
e8a7704b42 Merge pull request #3511 from jupyterhub/dependabot/npm_and_yarn/jsx/y18n-4.0.3
Bump y18n from 4.0.0 to 4.0.3 in /jsx
2021-06-15 09:07:04 +00:00
Min RK
5789806cf7 Sync rbac with main 2021-06-15 11:06:11 +02:00
dependabot[bot]
7ae736b085 Bump ini from 1.3.5 to 1.3.8 in /jsx
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-15 07:26:58 +00:00
dependabot[bot]
8ed49e200b Bump y18n from 4.0.0 to 4.0.3 in /jsx
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.3.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/y18n-v4.0.3/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/compare/v4.0.0...y18n-v4.0.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-15 07:24:32 +00:00
Min RK
f2eb40cd1a Merge pull request #3501 from jupyterhub/dependabot/npm_and_yarn/jsx/postcss-8.3.0
Bump postcss from 8.1.8 to 8.3.0 in /jsx
2021-06-15 06:30:30 +00:00
Min RK
c9ea3d9e06 Merge pull request #3500 from jupyterhub/dependabot/npm_and_yarn/jsx/browserslist-4.16.6
Bump browserslist from 4.14.7 to 4.16.6 in /jsx
2021-06-15 06:30:13 +00:00
Min RK
cda9e3aa30 Merge pull request #3499 from jupyterhub/dependabot/npm_and_yarn/jsx/lodash-4.17.21
Bump lodash from 4.17.20 to 4.17.21 in /jsx
2021-06-15 06:30:00 +00:00
Min RK
1c25ad3cce Merge pull request #3502 from jupyterhub/dependabot/npm_and_yarn/jsx/hosted-git-info-2.8.9
Bump hosted-git-info from 2.8.8 to 2.8.9 in /jsx
2021-06-15 06:29:49 +00:00
Min RK
f5adfcd3d5 Merge pull request #3498 from jupyterhub/dependabot/npm_and_yarn/jsx/ws-6.2.2
Bump ws from 6.2.1 to 6.2.2 in /jsx
2021-06-15 06:29:37 +00:00
Min RK
e3a64e0114 Merge pull request #3497 from jupyterhub/dependabot/npm_and_yarn/jsx/url-parse-1.5.1
Bump url-parse from 1.4.7 to 1.5.1 in /jsx
2021-06-15 06:29:27 +00:00
Min RK
4d61bf6da2 Merge pull request #3496 from jupyterhub/dependabot/npm_and_yarn/jsx/dns-packet-1.3.4
Bump dns-packet from 1.3.1 to 1.3.4 in /jsx
2021-06-15 06:29:11 +00:00
Min RK
7fd3f280d4 Merge pull request #3495 from jupyterhub/dependabot/npm_and_yarn/jsx/ua-parser-js-0.7.28
Bump ua-parser-js from 0.7.22 to 0.7.28 in /jsx
2021-06-15 06:28:57 +00:00
Erik Sundell
c7b9b14724 Merge pull request #3510 from minrk/bump-autodoc
bump autodoc-traits
2021-06-15 08:20:41 +02:00
Min RK
b664f02f58 Merge pull request #3504 from 0mar/authorization-page
[rbac] Authorization page for OAuth services
2021-06-15 06:13:44 +00:00
Min RK
77e4e8aab7 bump autodoc-traits
for sphinx compatibility fix
2021-06-15 08:07:40 +02:00
0mar
244624579f Added tests for auth page 2021-06-14 14:54:27 +02:00
Min RK
744983e53f sync rbac with main
# Conflicts:
#	docs/rest-api.yml
#	jupyterhub/oauth/provider.py
2021-06-14 12:53:39 +02:00
Min RK
fc2081d9dd Merge pull request #3507 from minrk/service.allowed_roles
[rbac] fix allowed_role assignment from service config
2021-06-14 10:49:41 +00:00
Min RK
e097faff15 Merge pull request #3508 from minrk/user-role-list
[rbac] Fix self scope list
2021-06-14 10:49:14 +00:00
Erik Sundell
98ec8991f9 Merge pull request #3509 from manics/docker/release/check/branch/name
release docker workflow: 'branchRegex: ^\w[\w-.]*$'
2021-06-14 00:00:35 +02:00
Simon Li
f4cced06f9 release docker workflow: 'branchRegex: ^\w[\w-.]*$' 2021-06-13 22:21:22 +01:00
Min RK
be61bbc530 Fix self scope list
adding `read:` to everything isn't right because not everything has a `read:` counterpart and not every `read:` has a write counterpart

includes a test verifying that every scope has a definition
2021-06-11 15:17:52 +02:00
Min RK
e6810b7ec5 fix allowed_role assignment from service config
Service.oauth_roles is list of names, OAuthClient.allowed_roles is list of orm.Roles
2021-06-11 15:03:19 +02:00
0mar
1ecce476ea Outlined tests and updated oauth page 2021-06-11 14:41:46 +02:00
0mar
8864780bfb Adjusted documentation for auth pages 2021-06-11 13:32:20 +02:00
0mar
03e2e7f3b0 Fix auth page logic 2021-06-11 13:23:23 +02:00
Min RK
df0ca1069e Merge pull request #3506 from jupyterhub/sgibson91-patch-1
Add research study participation notice to readme
2021-06-11 11:17:10 +00:00
Sarah Gibson
c4e711178a Update README.md 2021-06-11 11:57:01 +01:00
Sarah Gibson
ba660cdeab Add research study participation notice to readme 2021-06-11 11:54:43 +01:00
Erik Sundell
8907943c70 Merge pull request #3505 from minrk/skip-dependabot-docker
exclude dependabot push events from release workflow
2021-06-11 12:52:31 +02:00
Min RK
1229965f30 exclude dependabot push events from release workflow 2021-06-11 12:37:36 +02:00
0mar
5e3201cfe3 Minor formatting change 2021-06-11 12:27:40 +02:00
0mar
73a6b3477a Fixed typos and formatting 2021-06-11 11:59:18 +02:00
0mar
d169359d51 Refactored scope description to be usable for both docs and authorization page 2021-06-11 11:44:10 +02:00
0mar
a605ad9c44 Merge branch 'rbac' into authorization-page 2021-06-11 10:34:20 +02:00
Min RK
06ce287747 Merge pull request #3492 from 0mar/read_roles
Read scopes
2021-06-11 06:46:19 +00:00
0mar
1023653aaf Fixed scopes and added tests 2021-06-10 17:45:25 +02:00
0mar
981ad5b05a Implemented suggestions and adjusted tests 2021-06-09 16:29:11 +02:00
dependabot[bot]
bb92e4f17d Bump hosted-git-info from 2.8.8 to 2.8.9 in /jsx
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

---
updated-dependencies:
- dependency-name: hosted-git-info
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-09 13:20:24 +00:00
dependabot[bot]
ed5a06ce1a Bump postcss from 8.1.8 to 8.3.0 in /jsx
Bumps [postcss](https://github.com/postcss/postcss) from 8.1.8 to 8.3.0.
- [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.1.8...8.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-09 13:20:23 +00:00
dependabot[bot]
76a79c7ef5 Bump browserslist from 4.14.7 to 4.16.6 in /jsx
Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.14.7 to 4.16.6.
- [Release notes](https://github.com/browserslist/browserslist/releases)
- [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/browserslist/browserslist/compare/4.14.7...4.16.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-09 13:20:21 +00:00
dependabot[bot]
f713841b86 Bump lodash from 4.17.20 to 4.17.21 in /jsx
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-09 13:20:20 +00:00
dependabot[bot]
f301e2b16f Bump ws from 6.2.1 to 6.2.2 in /jsx
Bumps [ws](https://github.com/websockets/ws) from 6.2.1 to 6.2.2.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/6.2.1...6.2.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-09 13:20:19 +00:00
dependabot[bot]
91307715f8 Bump url-parse from 1.4.7 to 1.5.1 in /jsx
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.4.7 to 1.5.1.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.4.7...1.5.1)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-09 13:20:19 +00:00
dependabot[bot]
8069f50caa Bump dns-packet from 1.3.1 to 1.3.4 in /jsx
Bumps [dns-packet](https://github.com/mafintosh/dns-packet) from 1.3.1 to 1.3.4.
- [Release notes](https://github.com/mafintosh/dns-packet/releases)
- [Changelog](https://github.com/mafintosh/dns-packet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mafintosh/dns-packet/compare/v1.3.1...v1.3.4)

---
updated-dependencies:
- dependency-name: dns-packet
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-09 13:20:18 +00:00
dependabot[bot]
ee959c1586 Bump ua-parser-js from 0.7.22 to 0.7.28 in /jsx
Bumps [ua-parser-js](https://github.com/faisalman/ua-parser-js) from 0.7.22 to 0.7.28.
- [Release notes](https://github.com/faisalman/ua-parser-js/releases)
- [Commits](https://github.com/faisalman/ua-parser-js/compare/0.7.22...0.7.28)

---
updated-dependencies:
- dependency-name: ua-parser-js
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-09 13:20:18 +00:00
Min RK
046df41f04 Merge pull request #3398 from naatebarber/master
Make JupyterHub Admin page into a React app
2021-06-09 13:19:33 +00:00
Min RK
b97b05343c WIP: show permissions on authorize page
incomplete because the current text isn't formatted appropriately for the "will be able to do..." framing of an authorization page
2021-06-09 15:07:51 +02:00
Min RK
deb03d4006 Fix user role list
adding `read:` to everything isn't right because not everything has a `read:` counterpart and not every `read:` has a write counterpart
2021-06-09 14:52:45 +02:00
Min RK
1d93d6e99b fix allowed_role assignment from service config
Service.oauth_roles is list of names, OAuthClient.allowed_roles is list of orm.Roles
2021-06-09 14:48:48 +02:00
0mar
b983445794 Merge branch 'rbac' into read_roles 2021-06-09 13:21:36 +02:00
Min RK
e6c307c19d Merge pull request #3493 from 0mar/rbac_service_default
Removed default service roles from upgrade and docs
2021-06-09 11:14:59 +00:00
Erik Sundell
81fa41574f Merge pull request #3494 from davidbrochart/typo
Fix typo
2021-06-09 11:34:32 +02:00
David Brochart
fb1ff5e644 Fix typo 2021-06-09 11:32:15 +02:00
0mar
c121a17310 Removed default service roles from upgrade and docs 2021-06-09 09:10:51 +02:00
0mar
bb577fca04 Resolved merge conflicts and updated tests 2021-06-08 15:55:49 +02:00
0mar
c92d39659b Merge branch 'rbac' into read_roles 2021-06-08 15:37:16 +02:00
0mar
32d1e3cbea Merge branch 'rbac' into read_roles 2021-06-08 15:31:30 +02:00
0mar
0233faf19d Added tests 2021-06-08 15:26:06 +02:00
0mar
18623dc9de Unified service model 2021-06-08 15:18:57 +02:00
0mar
2ac1cfe4ac finegrained service model access 2021-06-08 14:01:04 +02:00
Min RK
2113f3424b Merge pull request #3466 from minrk/access-scope
[rbac] Access scopes
2021-06-08 08:03:00 +00:00
Min RK
1dab57af6f remove invalid access scope test 2021-06-08 09:48:11 +02:00
Min RK
4a0fed1a5b address review in services doc 2021-06-08 09:35:45 +02:00
Min RK
3270bc76af readme typo
Co-authored-by: Ivana <IvanaH8@users.noreply.github.com>
2021-06-08 09:35:45 +02:00
Min RK
fbea31d00a support groups in _intersect_scopes
Requires db resolution
2021-06-08 09:35:45 +02:00
Min RK
40de16e0e1 Update service examples and documentation with access scopes and roles 2021-06-07 14:02:13 +02:00
Min RK
69d2839ba3 test access scopes in authorize handler
- provider.add_client returns the client
- fix Spawner access scopes
- debug logging in mock spawners
- Assign service access scopes
2021-06-07 14:02:10 +02:00
Min RK
0ba222b288 move role/scope fixtures to conftest
so they can be more easily reused
2021-06-07 14:01:38 +02:00
Min RK
72b1dd2204 oauth: use client_id for description if empty
that way description can never be empty on retrieval
2021-06-07 14:00:54 +02:00
Min RK
e2076e6c91 implement access scopes
- access:services for services
- access:users:servers for servers
- tokens automatically have access to their issuing client (if their owner does, too)
- Check access scope in HubAuth integration
2021-06-07 14:00:50 +02:00
Min RK
e5198b4039 create boolean columns with create_constraint=False
matches new default behavior in sqlalchemy 1.4
2021-06-07 13:58:27 +02:00
Min RK
57f4c08492 get upgrade working on sqlite with foreign key naming convention 2021-06-07 13:58:27 +02:00
Min RK
7e46d5d0fc store relationship between oauth client and service/spawner
so that we can look up the spawner/service from the oauth client and vice versa
2021-06-07 13:58:27 +02:00
Min RK
563146445f add scopes.check_scope_filter
Extracted from APIHandler.get_scope_filter for easier re-use

and mve get_scope_filter to BaseHandler from APIHandler since it will be needed on oauth
2021-06-07 13:58:27 +02:00
Min RK
8eaed91f79 Merge pull request #3444 from minrk/oauth-details
Oauth details docs
2021-06-07 11:56:49 +00:00
Min RK
657d7ed8c3 Merge pull request #3480 from IvanaH8/rbac-scope-naming-convention
[rbac] Synchronize variable nomenclature across rbac utils
2021-06-07 11:56:34 +00:00
IvanaH8
335320fd14 Rename raw_scopes attr for base handler to expanded_scopes 2021-06-04 09:26:48 +02:00
IvanaH8
e6845a68f5 Clarify some function names in rbac utils 2021-06-04 09:26:48 +02:00
IvanaH8
2ab6c61e9a Synchronize scope variable nomenclature and docstrings across rbac utils 2021-06-04 09:26:45 +02:00
Min RK
a7ac412b2f Merge pull request #3460 from 0mar/fix_role_init
Fix role assignment on startup
2021-06-04 07:19:14 +00:00
0mar
d6bb1e6318 Fixed upgrade test 2021-06-03 13:26:06 +02:00
Min RK
11f00dbbe7 Merge pull request #3488 from yuvipanda/oauth2-autologin
Support auto login when used as a OAuth2 provider
2021-06-03 09:55:03 +00:00
YuviPanda
f566ee1e4b Support auto login when used as a OAuth2 provider
Fixes #3487
2021-06-03 14:55:22 +05:30
Min RK
d4ae68267c Merge pull request #3484 from weisdd/bugfix/oauth-expires-at
Bug: save_bearer_token (provider.py) passes a float value to the expires_at field (int)
2021-06-02 07:01:45 +00:00
Igor Beliakov
ea5346bf8b Fixed expires_at for save_bearer_token
Signed-off-by: Igor Beliakov <demtis.register@gmail.com>
2021-06-02 09:00:17 +02:00
0mar
8f2bbd4d11 Test still fails, issue with emulating hub restart 2021-06-01 23:42:50 +02:00
Rick Wagner
3610454a12 adding initial security policy 2021-06-01 09:51:20 -07:00
0mar
246ce6797c Fixed some bugs and implemented suggestions, save one weird test case 2021-06-01 15:35:04 +02:00
0mar
2bf8e57e2c Fixed whitespace bug 2021-06-01 13:27:49 +02:00
0mar
9aac6b55ee Merge branch 'fix_role_init' of github.com:0mar/jupyterhub into fix_role_init 2021-06-01 12:42:05 +02:00
0mar
03f968fea0 wip: fixing errors and suggestions 2021-06-01 12:41:29 +02:00
0mar
2b36c662b6 Merge branch 'rbac' into fix_role_init 2021-06-01 12:33:13 +02:00
Min RK
2b1ed086a5 Merge pull request #3481 from IvanaH8/rbac-scope-hierarchy
[rbac] Use scopes.scope_definitions to expand scopes
2021-05-28 10:38:28 +00:00
IvanaH8
05f6892e37 Get subscopes directly from scopes.scope_definitions
no need for _get_scope_hierarchy()
2021-05-27 18:11:33 +02:00
Ivana
320ad75b12 Update jupyterhub/roles.py
Co-authored-by: Min RK <benjaminrk@gmail.com>
2021-05-27 11:04:46 +02:00
0mar
587ea28581 Added error for duplicate roles 2021-05-27 10:36:23 +02:00
Min RK
f1f95bd7d1 Merge pull request #3482 from ChameleonCloud/main
Add Chameleon to JupyterHub deployment gallery
2021-05-27 08:24:30 +00:00
Jason Anderson
20a3ba2b41 Add Chameleon to JupyterHub deployment gallery 2021-05-26 15:07:11 -05:00
0mar
290a697df2 Fixed service admin declaration 2021-05-26 16:55:20 +02:00
IvanaH8
b399158060 Create scope_hierarchy dict automatically from scope_definitions 2021-05-26 16:45:53 +02:00
0mar
3ba8e11553 Added tests and fixed bugs 2021-05-26 15:39:45 +02:00
Min RK
d39673eea2 Flesh out oauth details doc
adress review, add emoji, expand details, examlpes, and add discussion of caching and revocation.
2021-05-26 12:28:59 +02:00
0mar
c9188a67a9 Merge branch 'rbac' into fix_role_init 2021-05-25 13:54:30 +02:00
0mar
c13ad804fe Added default roles for users and unified admin check 2021-05-25 13:51:43 +02:00
0mar
1a01302e27 Fixed bug in scope test fixture teardown 2021-05-25 11:17:24 +02:00
Min RK
2ad80fd69c Merge pull request #3476 from IvanaH8/rbac-scope-table-makefile
[rbac] Generate scope table for docs
2021-05-25 09:18:08 +02:00
Min RK
1ba1ddfcf2 Merge pull request #3477 from minrk/group-extend-roles
fix appending group roles to user roles
2021-05-25 09:14:25 +02:00
0mar
d2f3020ae8 Merge branch 'rbac' into fix_role_init 2021-05-24 14:55:06 +02:00
0mar
5a5cdb418e (wip): update role init process 2021-05-24 14:53:20 +02:00
0mar
915fee2734 Added strict admin check to role assignment 2021-05-24 13:36:59 +02:00
Erik Sundell
e0439bc310 Apply suggestions from code review
Co-authored-by: Ivana <IvanaH8@users.noreply.github.com>
2021-05-23 11:38:53 +02:00
IvanaH8
800f3cf79f Add trigger to conf.py to call generate-scope-table 2021-05-21 17:03:24 +02:00
IvanaH8
4a1459195e Move scope_definitions dict to jupyterhub/scopes.py 2021-05-21 16:58:45 +02:00
Min RK
3fde458c07 fix appending group roles to user roles
ensure we are using a fresh list before calling extend

otherwise, we are extending the user's own roles
2021-05-21 16:43:51 +02:00
Min RK
be7ad39b10 Merge pull request #3475 from minrk/async-check-db-locks
handle async functions in check_db_locks
2021-05-21 15:36:20 +02:00
Min RK
478ae8a744 typo in comment
Co-authored-by: Ivana <IvanaH8@users.noreply.github.com>
2021-05-21 15:36:14 +02:00
Min RK
d2dc38d773 Sync with main 2021-05-21 12:53:37 +02:00
Min RK
5a9ca0c710 Merge pull request #3470 from kinow/patch-2
(docs) Fix DummyAuthenticator class reference
2021-05-21 12:01:26 +02:00
Min RK
05f47b14f3 Merge pull request #3381 from minrk/rm-redundant-args
Stop specifying `--ip` and `--port` on the command-line
2021-05-21 10:09:16 +02:00
IvanaH8
e61cacf5e8 Add message to run make clean before make html 2021-05-20 14:59:49 +02:00
IvanaH8
7914c01099 Call scope table generation in makefile and include in scopes.md 2021-05-20 14:52:28 +02:00
IvanaH8
948179ee0e Generate scope table in separate markdown file 2021-05-20 14:49:28 +02:00
IvanaH8
65f3933da4 Create scope dictionary 2021-05-20 14:36:21 +02:00
Bruno P. Kinoshita
5a10107da8 (docs) Fix DummyAuthenticator class 2021-05-21 00:19:44 +12:00
Min RK
02619b687f cleanup after failure to create token due to permisison errors
have to delete tokens explicitly if we fail to finish creating them
2021-05-20 13:48:37 +02:00
Min RK
af6884bb7d oldest suppported sqlalchemy doesn't have session context managers 2021-05-20 13:33:02 +02:00
Min RK
1cd37a1396 Merge pull request #3474 from datalayer-externals/rbac-external-oauth
[RBAC] Fixexternal oauth example
2021-05-20 13:29:10 +02:00
Min RK
6e2c4d8357 handle async functions in check_db_locks
check_db_locks checks for db lock state after the end of a function,
but wasn't properly waiting when it wrapped an async function,
meaning it would run the check while the async function was still outstanding,
causing possible spurious failures
2021-05-20 13:27:42 +02:00
Eric Charles
16636ce3c0 Fix Service oauth client ids must start with 'service-' in the service launcher 2021-05-20 12:00:56 +02:00
Eric Charles
fdf57b271e Fix Service oauth client ids must start with 'service-' 2021-05-20 11:58:42 +02:00
Nathan Barber
5db40d096d Pass front-end the api page limit with Jinja 2021-05-19 10:01:00 -04:00
Nathan Barber
21c14454cc Set webpack to build production 2021-05-17 13:43:45 -04:00
Nathan Barber
97b6b71983 Remove unused imports and variables 2021-05-17 13:37:54 -04:00
Nathan Barber
7e85b2ec3e Fix CreateGroup state update, add info alerts 2021-05-17 12:44:16 -04:00
Min RK
afe43f32f7 Merge pull request #3464 from minrk/intersect_scopes
add scopes.unparse_scopes, refine intersect_scopes
2021-05-12 16:08:36 +02:00
Min RK
4e41a39b30 Sync with main 2021-05-12 16:08:03 +02:00
Min RK
a13813e61f add scopes.unparse_scopes, refine intersect_scopes
and fix warning condition for intersection overlap

- only warn when there's a group only on one side and a user or server only on the other,
  otherwise there is no lost information to warn about (group and/or defined on both sides)
- correctly resolve servers as sub-scopes of user
2021-05-12 15:21:09 +02:00
Min RK
915fa4bfcc Apply suggestions from code review
thanks Carol!

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2021-05-12 11:05:47 +02:00
Min RK
6be3160d74 Merge pull request #3462 from minrk/master-main
prepare to rename default branch to main
2021-05-12 11:00:30 +02:00
0mar
ae17a8c11c Merge branch 'rbac' into fix_role_init 2021-05-12 10:01:38 +02:00
Min RK
12316559f5 Merge pull request #3463 from minrk/rbac-merge
[rbac] Finish resync with master
2021-05-11 11:44:45 +02:00
Min RK
8408e3aa76 update tests after merge into rbac 2021-05-11 11:09:43 +02:00
Min RK
e7d249bb3d Sync with master 2021-05-11 10:52:46 +02:00
Min RK
63a61bcc2f prepare to rename default branch to main
- update references to default branch name in docs, workflows
- use HEAD in github urls, which always works regardless of default branch name
- fix petstore URLs since the old petstore links seem to have stopped working
2021-05-11 10:40:04 +02:00
Min RK
42c7ffe5cf Merge pull request #3443 from minrk/rm-deprecated-cookie-auth
Deprecate and remove some old auth bits (shared cookie auth for services)
2021-05-11 10:22:36 +02:00
Nathan Barber
b8dda5a088 Merge remote-tracking branch 'upstream/master' 2021-05-10 18:18:48 -04:00
Nathan Barber
f57a52e1a1 Merge pull request #4 from naatebarber/ui-pagination
UI pagination
2021-05-10 18:04:08 -04:00
Nathan Barber
a3794642f7 Latest bundle placed 2021-05-10 18:02:31 -04:00
Nathan Barber
d112863330 Updates to README, set pg. limit to 50 2021-05-10 18:00:29 -04:00
Nathan Barber
6378505305 Fix bug on validateUser / housekeeping 2021-05-10 17:59:06 -04:00
Nathan Barber
8d4c276652 Update unit tests for pagination 2021-05-10 17:48:46 -04:00
Nathan Barber
16c37cd5fe Improve GroupEdit, username input with validation and alerts 2021-05-10 12:02:19 -04:00
0mar
b2b040da6c Added scope for reading roles, test setup 2021-05-07 16:49:29 +02:00
0mar
988bc376ac Added tests for user role configuration 2021-05-07 16:20:16 +02:00
0mar
0eb5e3b6ce Split role creation and role assignment 2021-05-07 15:31:03 +02:00
Nathan Barber
5409983e4a Fix README 2021-05-05 18:51:34 -04:00
Nathan Barber
0439a0d274 Add UI pagination, update Redux and API service lib 2021-05-05 18:41:48 -04:00
Min RK
77691ae402 Merge pull request #3457 from consideRatio/pr/fix-ci-pipeline
ci: fix typo in environment variable
2021-05-05 20:58:53 +02:00
Erik Sundell
4be8e911ef ci: fix typo in environment variable 2021-05-05 20:46:43 +02:00
Erik Sundell
1ee71d51ba Merge pull request #3454 from minrk/more-delete-forever
define Spawner.delete_forever on base Spawner
2021-05-05 20:26:37 +02:00
Erik Sundell
77843303f6 Merge pull request #3456 from minrk/debug-loops
avoid re-using asyncio.Locks across event loops
2021-05-05 20:21:32 +02:00
Nathan Barber
5e2ca7bcff Update ServerDashboard unit test for async pagination check 2021-05-05 13:19:35 -04:00
Nathan Barber
f1ddb58d7d Add persistent URL / stateful pagination for users 2021-05-05 12:55:36 -04:00
Nathan Barber
144a018705 Merge branch 'master' of https://github.com/jupyterhub/jupyterhub 2021-05-05 10:17:54 -04:00
0mar
bbf251ed13 Merge branch 'rbac' into fix_role_init 2021-05-05 16:01:03 +02:00
Min RK
5b69564e86 avoid re-using asyncio.Locks across event loops
should never occur in real applications where only one loop is run,
but may occur in tests if the Proxy object lives longer than the loop in which it runs

I suspect this is the source of our intermittent test failures with

> got Future <Future pending> attached to a different loop
2021-05-05 14:27:59 +02:00
Min RK
863b4c7d50 Deprecate and remove some old auth bits
- remove long-deprecated `POST /api/authorizations/token` for creating tokens
- deprecate but do not remove `GET /api/authorizations/token/:token` in favor of GET /api/user
- remove shared-cookie auth for services from HubAuth, rely on OAuth for browser-auth instead
- use `/hub/api/user` to resolve user instead of `/authorizations/token` which is now deprecated
2021-05-05 14:07:14 +02:00
Min RK
3d3c84a2b3 Merge pull request #3448 from IvanaH8/rbac-update-scope-hierarchy
[rbac] Update scope hierarchy
2021-05-05 12:37:56 +02:00
Min RK
b9a7aa069f Merge pull request #3437 from minrk/always-patch-both
patch base handlers from both jupyter_server and notebook
2021-05-05 12:04:42 +02:00
Min RK
9f81ff5fb2 define Spawner.delete_forever on base Spawner
instead of on the test class

and fix the logic for when it is called a bit:

- call on *all* Spawners, not just the default
- call on named server deletion when remove=True
2021-05-05 12:03:09 +02:00
Min RK
1f7e54f652 Merge pull request #3413 from naatebarber/pagination
Support Pagination in the REST API
2021-05-05 11:27:27 +02:00
Min RK
e63eac4ad8 Merge pull request #3452 from davidbrochart/fix_doc
Fix documentation
2021-05-05 10:40:12 +02:00
Min RK
401f583c5a always pass JUPYTERHUB_SERVICE_URL
- default Spawner.ip is 127.0.0.1, matching earlier behavior when unspecified
- default Spawner.port is random (dynamic default instead of 0
2021-05-05 10:35:27 +02:00
Min RK
3602da550c more spawner docs for environment variables, cli args, ips and ports 2021-05-05 10:21:32 +02:00
David Brochart
49e10fdbe9 Fix documentation 2021-05-04 18:36:50 +02:00
Min RK
f28b92a99e remove all CLI args from default Spawner implementation
use only env variables, which are safer to ignore and easier to handle in multiple ways
2021-05-04 12:30:39 +02:00
0mar
c61b8e60c2 Removed configuration options to assign roles to tokens 2021-04-30 17:27:26 +02:00
IvanaH8
e3eac92da0 Resolve merge conflicts 2021-04-30 15:31:09 +02:00
IvanaH8
cc35d84f25 Revert "Change read:users(services):admin scope to read:users(services):roles"
read:users(services):roles scopes will be added together with changes to api handlers
2021-04-30 15:13:29 +02:00
Min RK
f45f1c250f Merge pull request #3446 from IvanaH8/rbac-fix-server-scope
[rbac] Add !user filter for "owner-only" scopes
2021-04-29 13:32:19 +02:00
Min RK
f30db42405 Merge branch 'rbac' into rbac-fix-server-scope 2021-04-29 13:17:25 +02:00
Min RK
ff9b9cdf8b Merge pull request #3439 from 0mar/oauth_allowed_roles
Add service.oauth_roles configuration
2021-04-29 13:11:06 +02:00
Min RK
1337a53a9f consistent docstrings, config for services/spawner oauth_roles 2021-04-29 12:58:16 +02:00
0mar
7022a4c558 Fixed review comments and added allowed roles to spawner configuration 2021-04-29 10:03:25 +02:00
IvanaH8
60c73de8b2 Change read:users(services):admin scope to read:users(services):roles 2021-04-29 09:23:43 +02:00
IvanaH8
b2c2866915 Update admin role scopes list 2021-04-29 09:14:24 +02:00
IvanaH8
cdc99580de Update scope hierarchy in roles.py and tests 2021-04-29 09:13:28 +02:00
IvanaH8
b3887b07ba Add more filter intersection tests, note and warning for containing filters 2021-04-28 16:52:59 +02:00
IvanaH8
91af87310e Add more tests for server role 2021-04-27 09:51:40 +02:00
IvanaH8
bf9ca1d3be Test server token posting activity 2021-04-24 13:02:16 +02:00
IvanaH8
71d3457adf Add test for resolving token scope permissions with horizontal filters 2021-04-24 12:10:25 +02:00
Rick Wagner
abc4bbebe4 Initial SECURITY.md
Proposing a basic security policy, similar to the README or contributors guide, based on the [GitHub documentation](https://docs.github.com/en/code-security/security-advisories/adding-a-security-policy-to-your-repository) and current Project Jupyter recommendations. This may be better as a [default file for the organization](https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file).
2021-04-23 23:12:51 -07:00
Erik Sundell
3fec19d191 Merge pull request #3433 from minrk/rm-oauth-client-0.8-handling
Remove handling of jupyterhub 0.8 oauth client ids
2021-04-23 23:20:14 +02:00
IvanaH8
0d637b49cb Include horizontal scope filters check in resolving token permissions
Avoids discarding token scopes with valid horizontal filters
2021-04-23 16:43:21 +02:00
Min RK
148257de12 DOC: details of oauth in jupyterhub 2021-04-23 14:12:46 +02:00
IvanaH8
f98dd0cdeb Test for no expansion when !user=username filter instead of !user filter 2021-04-23 11:01:16 +02:00
0mar
cb8c02366d Placeholder for roles in spawner 2021-04-23 09:46:42 +02:00
0mar
a5af48ef24 Added list of allowed roles to service 2021-04-23 09:30:02 +02:00
IvanaH8
b2ecbfd491 Stop server in test_server_token_role() 2021-04-22 18:32:19 +02:00
IvanaH8
b0479ea5e5 Test server token gets server role upon creation 2021-04-22 17:37:30 +02:00
IvanaH8
411ff954f1 Temporarily fix test_spawn_fails() test
Checking server token permissions against its owner was failing as the user is just manually added to db without role
2021-04-22 17:14:28 +02:00
IvanaH8
97a9ad76a8 Ignore horizontal scope filters in get_scopes_for() func
Avoids discarding token scopes such as users:activity!user=george for user george who has scope users:activity (e.g. if george is admin)
2021-04-22 17:11:26 +02:00
IvanaH8
3a183c1b55 Assign server token server role on creation 2021-04-22 16:58:34 +02:00
Min RK
cf4b25ac56 sync with master 2021-04-22 14:14:02 +02:00
Min RK
eb71e39c77 Merge pull request #3435 from 0mar/token_handler
Fixed scope checking in UserTokenListAPIHandler
2021-04-22 13:52:13 +02:00
Min RK
ad090560d0 Merge pull request #3366 from IvanaH8/rbac-docs
[rbac] Add RBAC documentation with myst-parser
2021-04-22 13:50:58 +02:00
Min RK
a2b76bceb9 minor copy-editing, TODOs in rbac docs 2021-04-22 13:39:36 +02:00
Min RK
a709df8042 patch base handlers from both jupyter_server and notebook
and clarify warning when a base handler isn't patched

- reorganize patch steps into functions for easier re-use
- patch notebook and jupyter_server handlers if they are already imported
- run patch after initialize to ensure extensions have done their importing before we check
2021-04-22 13:09:35 +02:00
IvanaH8
842ca75121 Resolve merge conflicts 2021-04-22 09:24:51 +02:00
Min RK
84d2e5de93 Merge pull request #3436 from consideRatio/pr/gha-security 2021-04-21 18:56:09 +02:00
Nathan Barber
7bd660d899 Revert documentation updates on /groups/{name} 2021-04-21 10:05:50 -04:00
Nathan Barber
ab130309ec Add get_api_pagination method to base handler, revert group.users pagination 2021-04-21 09:57:30 -04:00
Erik Sundell
5d18883543 ci: github workflow security, pin action to sha etc 2021-04-21 12:00:49 +02:00
0mar
103c6a406a Changed error code of UserTokenListAPIHandler back to 403 2021-04-21 09:43:24 +02:00
Min RK
fe37ff4ede Merge pull request #3431 from minrk/persist-roles
Persist roles through OAuth process
2021-04-21 07:50:24 +02:00
Nathan Barber
5d095c0234 Merge remote-tracking branch 'upstream/master' into pagination 2021-04-20 22:07:48 -04:00
IvanaH8
4687a76a6f Add role name conventions to docs/source/rbac/roles.md 2021-04-20 17:28:41 +02:00
IvanaH8
79b57b7f3b Add admin:users:auth_state/server_state to docs/rest-api.yml 2021-04-20 16:48:56 +02:00
IvanaH8
cab84500c5 Add !user filter to users:activity scope and its expansion 2021-04-20 16:39:22 +02:00
Min RK
0c7c1ed6b4 scopes.get_scopes_for is the only roles/scopes API to allow User wrapper
all else requires orm objects
2021-04-20 15:21:14 +02:00
Min RK
d8ded9aed8 resolve self in _get_subscopes
avoids inconsistent behavior in different uses of _get_subscopes where 'self' is left unmodified,
leading to errors
2021-04-20 14:58:34 +02:00
0mar
399203e5d3 Fixed scope checking in UserTokenListAPIHandler 2021-04-20 14:55:36 +02:00
Min RK
be76b5ebba tests for oauth roles 2021-04-20 14:49:42 +02:00
Min RK
4728325bf7 persist roles through oauth process
- Attach role limit to OAuthClient
- Attach authorized roles to OAuthCode
- pass roles from code to API token on completion

standard 'scopes' in oauth process are matched against our 'roles' instead of our low-level scopes
2021-04-20 14:29:29 +02:00
Min RK
53f0d88505 hook up oauthlib's logger to ours
for better debugging
2021-04-20 14:29:29 +02:00
Min RK
b9958e9069 Merge pull request #3434 from 0mar/server_permissions
Server permissions
2021-04-20 12:14:28 +02:00
0mar
8de2138566 Merge branch 'rbac' into server_permissions 2021-04-20 11:05:32 +02:00
0mar
ef1351b441 Added todo for future PR 2021-04-20 11:04:04 +02:00
Min RK
3b9e5b1cfe Remove handling of jupyterhub 0.8
These only affected servers upgrading directly from 0.8 or earlier with still-running servers

0.8 was a long time ago, it's okay to require restarting servers for an upgrade that long
2021-04-20 09:51:03 +02:00
Erik Sundell
1d83721117 Merge pull request #3432 from minrk/strict-role-names
be strict about role names
2021-04-19 17:30:35 +02:00
Min RK
639523a27c back to dev 2021-04-19 13:42:46 +02:00
Min RK
574d343881 release 1.4.0 2021-04-19 13:41:28 +02:00
Min RK
863ab1eb12 allow unreserved RFC3986 characters in role names: _-~. 2021-04-19 13:37:21 +02:00
Yuvi Panda
c205385023 Merge pull request #3424 from minrk/changelog-1.4
more changelog for 1.4
2021-04-19 17:06:23 +05:30
Min RK
9e0ac1594c more changelog for 1.4 2021-04-19 13:13:29 +02:00
Min RK
2fd434f511 Merge pull request #3430 from yuvipanda/additional_routes
Support Proxy.extra_routes
2021-04-19 13:12:11 +02:00
Min RK
24245a029f be strict about role names
- 3-255 characters
- ascii lowercase, numbers, -
- must start with letter
- must not end with -

this lets us avoid url escaping issues in e.g. oauth params
2021-04-19 13:10:43 +02:00
YuviPanda
af39f39082 Mark extra proxy routes properly 2021-04-19 16:27:05 +05:30
YuviPanda
ab751bda5c Accomodate for host based routing 2021-04-19 16:26:09 +05:30
YuviPanda
f84078627f Add a little more documentation to extra_routes 2021-04-19 16:16:03 +05:30
YuviPanda
3ec3dc5195 Support Proxy.extra_routes
When the hub is running in API-only mode, it's
very useful to have the proxy know where to send
URLs that would normally be serviced by the hub.
For example, / might go to a service that renders
a home page, while `/user` might go to a service that
tells the user their server is dead.

Right now, this happens 'out of band', with a process
that has to talk to the proxy directly. This is a
bit messy - the routes need to be re-added when the
proxy restarts, the hub might try to remove them, etc.
By adding support for this in the hub itself, all
this complexity is now removed and the hub continues
to own all the routes in the proxy
2021-04-19 16:14:28 +05:30
Simon Li
73102e7aeb Merge pull request #3429 from minrk/push-auth
typos in onbuild, demo images for push
2021-04-19 09:19:57 +01:00
Min RK
b039e2985b typos in onbuild, demo images for push
it's jupyterhub/jupyterhub-onbuild not jupyterthub-onbuild/jupyterhub
2021-04-19 09:09:49 +02:00
Min RK
6d7863d56a Merge pull request #3428 from Carreau/doc-1
DOC: Conform to numpydoc.
2021-04-19 08:56:42 +02:00
Min RK
aba32e7200 Merge pull request #3425 from manics/docker-arm64
Disable docker jupyterhub-demo arm64 build
2021-04-19 08:33:45 +02:00
Matthias Bussonnier
a71823c5ab DOC: Conform to numpydoc.
Minor syntax update
2021-04-18 21:23:03 -07:00
Nathan Barber
30e4972f34 Remove unused variable from groups.py 2021-04-16 13:16:09 -04:00
Nathan Barber
3c328385a4 Add default limit and max limit config vars 2021-04-16 13:11:57 -04:00
IvanaH8
5a95681853 Add %TODO: flag for generating the table in docs/source/rbac/scopes.md 2021-04-16 17:26:19 +02:00
IvanaH8
a6b9fb160e Resolve merge conflicts 2021-04-16 17:20:22 +02:00
IvanaH8
0638783939 Synchronize docs/rest-api.yml with Available scopes table in docs/source/rbac/scopes.md 2021-04-16 17:11:46 +02:00
IvanaH8
b0f4548753 Add read:users(services):roles scopes to docs/source/rbac/scopes.md 2021-04-16 16:49:15 +02:00
IvanaH8
c6e3e06af9 Add Upgrade section to docs/source/rbac/upgrade.md 2021-04-16 16:31:01 +02:00
0mar
46e2f72fa6 Test server start/stop 2021-04-16 14:54:04 +02:00
0mar
b233859028 Refactored scope_filter 2021-04-16 14:03:31 +02:00
Nathan Barber
100111ed2c Add pagination info to docs 2021-04-15 17:37:57 -04:00
Nathan Barber
ec4afa3e5e Add pagination tests for users/groups/group users 2021-04-15 16:42:33 -04:00
Simon Li
fcf9122519 jupyterhub/action-major-minor-tag-calculator@v1
Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2021-04-15 20:35:21 +01:00
Nathan Barber
bc518f20ba Add pagination to /hub/api/proxy 2021-04-15 13:04:39 -04:00
Nathan Barber
63b53162f8 Change group.users pagination to use slices 2021-04-15 12:27:13 -04:00
Nathan Barber
7f006726e7 Add pagination for users in group 2021-04-15 12:05:25 -04:00
0mar
cb104ffe42 Fixed tests 2021-04-15 17:30:13 +02:00
Simon Li
6c3fc41176 jupyterhub/action-major-minor-tag-calculator@main 2021-04-15 16:14:51 +01:00
0mar
7544965145 Fixed server model, removed some auth decorators 2021-04-15 16:34:46 +02:00
Min RK
5eef89e5cd Merge pull request #3426 from IvanaH8/rbac-fix-log
[rbac] Fix log message for modifying existing roles
2021-04-15 14:26:06 +02:00
Simon Li
0bdb1bac4d GHW docker: use default tag for PRs
This allows testing with a localhost:5000 registry
2021-04-15 11:11:12 +01:00
Simon Li
35c76221fe Disable linux/arm64 jupyterhub-demo build
Installing notebook requires additional compilation dependencies
2021-04-15 10:21:32 +01:00
Simon Li
ffb092721c GHW docker: push to localhost if not releasing 2021-04-15 10:19:06 +01:00
IvanaH8
0e55064056 Remove duplicate scopes assignment for expand_roles_to_scopes() 2021-04-15 10:48:04 +02:00
IvanaH8
6093f9d444 Fix log message about modifying roles 2021-04-15 10:45:39 +02:00
Min RK
8758b3af27 Merge pull request #3422 from olifre/login-page-customization
login-template: Add a "login_container" block inside the div-container.
2021-04-15 09:31:23 +02:00
Min RK
5202cdff8c Merge pull request #3421 from manics/docker-arm64
Docker arm64 builds
2021-04-15 09:31:04 +02:00
Simon Li
ce0cb95282 docker release: fix build-arg BASE_IMAGE tag 2021-04-14 23:17:16 +01:00
Simon Li
ee421f6427 GHW: Remove unnecessary echo, add docker test timeout 2021-04-14 22:47:17 +01:00
Simon Li
268da21bbf GH workflow docker: 'input device is not a TTY' 2021-04-14 22:44:34 +01:00
Simon Li
4ad5f61bc7 Bump onbuild/README.md example version 2021-04-14 22:28:27 +01:00
Simon Li
3df3850b3a Remove Docker hub automated build hooks 2021-04-14 22:28:07 +01:00
Simon Li
50733efa1b Move circleci docker test to gh workflow 2021-04-14 22:27:28 +01:00
Simon Li
98230ee770 docker release: jupyterhub-onbuild jupyterhub-demo 2021-04-14 22:26:25 +01:00
Simon Li
37f250b4d7 Push some branches, use variable to determine whether to push 2021-04-14 22:26:21 +01:00
Oliver Freyermuth
869661bf25 login-template: Add a "login_container" block inside the div-container.
This allows for more flexible customization of the login page,
since it allows to re-use the login form in an extending template
by reusing the new block.

This was not cleanly possible before since the main container
was part of the very same block as the form code.

fixes #3414
2021-04-14 20:11:04 +02:00
Min RK
92c044eb79 Merge pull request #3380 from minrk/rm-oauth-tokens
Merge OAuth and API tokens
2021-04-14 16:27:14 +02:00
Min RK
75fc1544bc cleanup rbac db upgrade 2021-04-14 13:27:30 +02:00
Min RK
2d02a433fa Merge pull request #3397 from 0mar/roles_interface
Refactor scopes tests
2021-04-14 13:24:03 +02:00
Min RK
c8821b7700 init default oauth client in init_db
ensures jupyterhub client is present,
which is required for creation of tokens, etc.
2021-04-14 13:11:19 +02:00
0mar
834694ca7e Refactored names and suggested fixes 2021-04-13 18:08:51 +02:00
Simon Li
009fa955ed Add Docker multi-arch publish 2021-04-13 15:35:03 +01:00
Simon Li
7c8f7e9fcb Don't pin Dockerfile parent hash 2021-04-13 15:34:14 +01:00
Yuvi Panda
14539c4e0f Merge pull request #3373 from minrk/only-hub-route
allow the hub to not be the default route
2021-04-13 17:12:21 +05:30
Min RK
d85c316928 update db names in init-db.sh for generating upgrade databases
for new upgrade-from versions
2021-04-13 13:23:53 +02:00
Min RK
8f36e26b2d create initial oauth client in db fixture 2021-04-13 13:23:53 +02:00
Min RK
ad9ebdd60f add missing session_id to newly merged API tokens
and remove grant_type which is not a property of the tokens themselves
2021-04-13 13:23:53 +02:00
Min RK
e504fa4bf5 resolve special scopes for self in 'self' handler
instead of `_resolve_scopes` on all requests
2021-04-13 13:23:53 +02:00
Min RK
900c2f1ed3 Drop support for db upgrade from before 1.0
- define jupyterhub oauth client during token app
2021-04-13 13:23:53 +02:00
Min RK
0b56fd9e62 remove separate oauth tokens
- merge oauth token fields into APITokens
- create oauth client 'jupyterhub' which owns current API tokens
- db upgrade is currently to drop both token tables, and force recreation on next start
2021-04-13 13:23:45 +02:00
Min RK
2fdf820fe5 bump dev version to 2.0 2021-04-13 13:21:53 +02:00
Min RK
a11a292cd9 test custom hub routespecs 2021-04-13 13:16:59 +02:00
Min RK
5890064191 duplicate metrics, health handlers on /api/
these should probably have been on `/api/` all along,
but must be on /api/ for api-only hub routing
2021-04-13 13:16:59 +02:00
Min RK
1f30e693ad allow overriding JupyterHub.hub_routespec
Rare, but can make sense for api-only deployments

allows easier override of the default route,
e.g. for mybinder.org custom error pages
2021-04-13 13:16:59 +02:00
Min RK
ebb13ed39f Merge master into rbac 2021-04-13 13:07:30 +02:00
Min RK
32976f3d42 Merge pull request #3403 from kafonek/fastapi-example
Fastapi example
2021-04-13 12:58:43 +02:00
Min RK
30bc23f102 Merge pull request #3418 from jiajunjie/log-exception
Log the exception raised in Spawner.post_stop_hook instead of raising it
2021-04-13 12:56:38 +02:00
Jia Junjie
786c7039d6 Log the exception raised in Spawner.post_stop_hook instead of raising it 2021-04-13 08:01:59 +00:00
Erik Sundell
19c3b02155 Merge pull request #3417 from manics/fix-hard-way-link
Fix link to jupyterhub/jupyterhub-the-hard-way
2021-04-13 07:49:33 +02:00
Simon Li
1a80524772 Fix link to jupyterhub/jupyterhub-the-hard-way 2021-04-12 21:49:59 +01:00
Erik Sundell
699a1cc01b Merge pull request #3415 from minrk/changelog-1.4
Changelog for 1.4
2021-04-12 17:26:33 +02:00
0mar
a7f2247331 Minor fixes 2021-04-12 17:04:26 +02:00
0mar
4577266d95 Refactored scope test suite with proper fixtures and teardowns 2021-04-12 17:04:26 +02:00
0mar
be17ae68ee Upgraded to log warning, resolved comment 2021-04-12 17:04:26 +02:00
Min RK
29ae04c921 Changelog for 1.4 2021-04-12 16:57:26 +02:00
Matt Kafonek
62a1652cc9 Add files via upload 2021-04-11 21:41:45 -04:00
Kafonek, Matt
290e031034 updating gif 2021-04-11 21:40:11 -04:00
Nathan Barber
e72b13be3a Clean up offset/limit conditional 2021-04-09 17:14:13 -04:00
Nathan Barber
2fa331bd36 Paginate listing users and groups 2021-04-09 16:57:32 -04:00
Kafonek, Matt
7642302d17 docs 2021-04-09 15:01:59 +00:00
Kafonek, Matt
aebf833530 Hit /user instead of /authorizations/token/<token> 2021-04-09 15:01:48 +00:00
Kafonek, Matt
86b51804c1 comment update 2021-04-09 15:01:22 +00:00
Kafonek, Matt
aa12afa34d User groups is List[str] not List[Group] 2021-04-09 15:01:03 +00:00
Min RK
6121411aec Merge pull request #3393 from 0mar/additional_scopes
Added `auth_state` and `server_state` and fixed `self`
2021-04-09 15:51:47 +02:00
0mar
07436a0ff0 Added test for access through groups 2021-04-09 15:31:08 +02:00
Yuvi Panda
2ff6d2b36c Merge pull request #3411 from minrk/oauth-token-expiry-config
make oauth token expiry configurable
2021-04-09 18:14:56 +05:30
Min RK
e5f7aa6c2a default oauth token expiry to cookie_max_age_days
so changing cookie age changes oauth token expiry,
since these are what are stored in those cookies anyway,
it makes sense for them to expire at the same time
2021-04-09 14:35:09 +02:00
Min RK
e3811edd87 make oauth token expiry configurable
and default to 1 day instead of 1 hour
2021-04-09 14:06:38 +02:00
0mar
e67647c4c2 Added todo 2021-04-09 13:17:56 +02:00
0mar
95759b25f2 Fixed config role token assignment 2021-04-09 12:06:21 +02:00
Min RK
55cd9d806b Merge pull request #3407 from yuvipanda/upsert-oauth-clients
Don't delete all oauth clients on startup
2021-04-09 09:26:54 +02:00
YuviPanda
96789f5945 Add oauth client to orm only when it's new
- Existing orm_client objects are updated automatically
  in the session.
- Add some logging
- Remove TODO about safety in doing updates without upsert
  in JupyterHub, per @minrk:
  https://github.com/jupyterhub/jupyterhub/pull/3407#discussion_r610390785
2021-04-09 12:50:02 +05:30
Nathan Barber
204c7bf81d Merge pull request #3 from naatebarber/redux-hooks
Redux hooks
2021-04-08 18:40:49 -04:00
Nathan Barber
51deaa36f3 Combine API props, update tests for redux hooks 2021-04-08 18:28:49 -04:00
Nathan Barber
21f4988f24 Convert redux state access to hooks 2021-04-08 17:21:02 -04:00
Nathan Barber
c7dcb4db85 Fix /jsx with prettifier 2021-04-08 15:50:54 -04:00
0mar
70dbe2f049 Merge branch 'additional_scopes' of github.com:0mar/jupyterhub into additional_scopes 2021-04-08 17:39:11 +02:00
0mar
12dc231b1c Fixed code base and tests after merge 2021-04-08 17:36:18 +02:00
0mar
b0b1350ec0 Merge branch 'rbac' into additional_scopes 2021-04-08 16:55:25 +02:00
IvanaH8
c9f8141cb4 Fix rbac-api-request-chart in docs/source/images 2021-04-08 16:48:20 +02:00
IvanaH8
d38a7b9aa7 Change scope for PATCH /users API in rest-api.yml 2021-04-08 16:08:43 +02:00
IvanaH8
649524d357 Add available scopes table in docs/source/rbac/scopes.md 2021-04-08 16:03:17 +02:00
kafonek
81d481a110 pre-commit run -a 2021-04-08 09:28:46 -04:00
0mar
1b999b76f4 Merge branch 'rbac' of github.com:jupyterhub/jupyterhub into rbac 2021-04-08 14:53:54 +02:00
0mar
d38460bfa9 Added tests and removed model flags 2021-04-08 14:52:01 +02:00
YuviPanda
054c7f276e Don't delete all oauth clients on startup
When an oauth client changes, we delete all the tokens
associated with that client. This invalidates all user sessions
for that oauth client, and the oauth client's users will need to
go through the OAuth workflow again after the cache period (specified
by cache_max_age in HubAuth, 5min by default). This is fine in theory,
since oauth client information doesn't change frequently.

However, we were deleting and re-adding all oauth clients each time
the hub started! This was unnecessary, since the data was going to
be the same 99% of the time. Rest of the time, we should just update,
preventing unnecessary churn.

This PR does that.

Ref https://github.com/yuvipanda/jupyterhub-configurator/issues/2
Ref https://github.com/berkeley-dsep-infra/datahub/issues/2284
2021-04-08 17:55:28 +05:30
IvanaH8
f5bbe78dbd Resolve merge conflicts with rbac 2021-04-08 11:32:41 +02:00
Min RK
52885b68ea Merge pull request #3330 from IvanaH8/rbac-group-roles
[rbac] Group roles and scopes checking
2021-04-08 10:03:06 +02:00
IvanaH8
949ec5cc75 Add and update scopes, roles, charts and text in docs/source/rbac docs 2021-04-08 09:39:01 +02:00
Nathan Barber
89a430cc13 Update AdminHandler for React / fix missing auth 2021-04-07 22:51:08 -04:00
Nathan Barber
d267c6cc40 Install yarn with other node dependencies 2021-04-07 22:40:27 -04:00
Nathan Barber
557a2abaec Merge pull request #2 from naatebarber/naatebarber-patch-1
Delete admin-react.js
2021-04-07 22:35:18 -04:00
Nathan Barber
54d0e195bf Delete admin-react.js
Remove hot-testing bundle from repository
2021-04-07 22:34:16 -04:00
Nathan Barber
f06c4c0857 Merge pull request #1 from naatebarber/functional
Functional Components
2021-04-07 22:24:20 -04:00
Nathan Barber
fca5841a1a Add jest testing to github actions 2021-04-07 22:20:29 -04:00
Nathan Barber
cadcb686c9 Lint and make App (Component) functional 2021-04-07 15:36:17 -04:00
Nathan Barber
1d705193cb Remove unused testing libraries from modules 2021-04-07 15:30:27 -04:00
Nathan Barber
4768751125 Reconfigure tests to work with hook approach 2021-04-07 15:25:21 -04:00
Matt Kafonek
1220673e61 Add files via upload 2021-04-07 14:34:10 -04:00
Kafonek, Matt
815274e966 please to be deleted old gif. 2021-04-07 18:33:32 +00:00
Kafonek, Matt
f1503b5a21 trying to get this new gif up
Merge branch 'fastapi-example' of github.com:kafonek/jupyterhub into fastapi-example
2021-04-07 18:31:30 +00:00
Kafonek, Matt
4dcdf84d32 remove old gif 2021-04-07 18:27:40 +00:00
Matt Kafonek
dda0b611e2 Add files via upload 2021-04-07 14:26:09 -04:00
Kafonek, Matt
a23bfd1769 raise warning if PUBLIC_HOST is not set 2021-04-07 18:18:02 +00:00
Kafonek, Matt
a55ccce64e Use Pydantic models 2021-04-07 18:17:25 +00:00
Kafonek, Matt
42c5030b0e Add models, remove cookie auth
get_current_user returns a User model instead of a dict.
using cookies for Hub auth is deprecated, so removed
that option and refactored get_current_user
2021-04-07 18:15:48 +00:00
Kafonek, Matt
be3df52b4f Add Pydantic models for Hub objects and exceptions 2021-04-07 18:15:26 +00:00
Kafonek, Matt
0ca5eb4997 updated docs 2021-04-07 18:15:10 +00:00
Nathan Barber
b230745d64 Fix useState sort method assignment bug 2021-04-07 12:53:27 -04:00
Nathan Barber
405d78a9d4 Fix EditUser submit bug 2021-04-07 12:37:36 -04:00
Nathan Barber
7e132f22e6 Make ServerDashboard functional 2021-04-07 12:27:01 -04:00
Nathan Barber
c3fc549bd6 Make Multiselect functional 2021-04-07 12:15:23 -04:00
Nathan Barber
752d6305fd Remove component import from functional JSX 2021-04-07 12:11:04 -04:00
Nathan Barber
6a1a4de329 Make Groups functional 2021-04-07 12:06:38 -04:00
Nathan Barber
816eeeb2fc Make GroupEdit functional 2021-04-07 12:04:11 -04:00
Nathan Barber
0f5e86ff06 Make functional AddUser/CreateGroup/EditUser 2021-04-07 11:56:45 -04:00
IvanaH8
a512867a1e Update scopes in docs/rest-api.yml 2021-04-07 14:10:38 +02:00
Yuvi Panda
9eeb84158e Merge pull request #3401 from maxshowarth/master
Added Azure AD as a supported authenticator.
2021-04-07 17:37:32 +05:30
0mar
2f34557689 Resolve comments 2021-04-07 10:37:49 +02:00
Kafonek, Matt
37c2be778c pre-commit formatting 2021-04-07 02:14:54 +00:00
Kafonek, Matt
dc1b2c810d review 2021-04-07 02:13:12 +00:00
Kafonek, Matt
88c7f188e0 Merge branch 'fastapi-example' of github.com:kafonek/jupyterhub into fastapi-example 2021-04-07 02:06:45 +00:00
Kafonek, Matt
4181cc7065 add gif 2021-04-07 02:05:07 +00:00
Matt Kafonek
69e3fc2016 demo.gif 2021-04-06 22:00:42 -04:00
Kafonek, Matt
56269f0226 fastapi service example 2021-04-07 01:55:43 +00:00
Nathan Barber
dc4bbc01bb Fix ServerDashboard layout (container / noborder) 2021-04-06 14:38:36 -04:00
Nathan Barber
0141dc8fb0 Add create group / delete group functionality 2021-04-06 14:22:18 -04:00
Max
e446eff311 Added Azure AD as a supported authenticator. 2021-04-06 09:48:37 -07:00
Max
00042de04c remove 2021-04-06 09:41:29 -07:00
Max
82e0af763d Added AzureAD to list of supported authenticators. 2021-04-06 09:40:07 -07:00
IvanaH8
933e4d555b Add TO DO flag for users:activity scope in server role 2021-04-06 10:39:50 +02:00
Nathan Barber
30198306a8 Fix comma/semicolon typo in jsx root.css 2021-04-05 19:36:22 -04:00
Nathan Barber
5ebf652f47 Update readme, update license 2021-04-05 19:33:06 -04:00
Nathan Barber
11cb9523e8 Add React Admin and modify AdminHandler 2021-04-05 16:51:22 -04:00
0mar
5017ccc977 Merge branch 'roles_interface' into additional_scopes 2021-04-02 12:01:39 +02:00
0mar
71a5842ad2 Removed user model flags, scope-guarded server model with new scopes 2021-04-01 17:26:34 +02:00
Tim Head
c5bfd28005 Merge pull request #3394 from yuvipanda/secreter-secret 2021-03-31 13:47:07 +02:00
YuviPanda
0ffa5715fd Fix formatting to make pre-commit happy 2021-03-30 12:59:52 +05:30
0mar
db66443793 No more reinitialization of roles on each startup 2021-03-30 08:50:20 +02:00
0mar
1515747b1e Refactored role methods 2021-03-29 21:26:34 +02:00
Yuvi Panda
139312149e Merge pull request #3392 from minrk/deprecated-tablenames 2021-03-29 17:09:23 +05:30
Yuvi Panda
29740b0af6 Merge branch 'master' into secreter-secret 2021-03-29 17:08:17 +05:30
YuviPanda
9f6467be05 Use 'secrets' module to generate secrets
Python 3.6+ has this
2021-03-29 17:07:03 +05:30
0mar
036a4eb934 Revert to using user roles for services 2021-03-28 18:54:31 +02:00
0mar
c5c44f6dbe Replaced auth_state and server_state with scopes 2021-03-26 13:47:01 +01:00
Min RK
caae99aa09 avoid deprecated engine.table_names
deprecated in sqlalchemy 1.4

use recommended inspect(engine).get_table_names() instead
2021-03-26 12:54:40 +01:00
0mar
b74075d945 Fixed self scope for services with tests 2021-03-26 10:51:17 +01:00
0mar
37588fb780 Merge branch 'rbac' of github.com:jupyterhub/jupyterhub into additional_scopes 2021-03-24 19:23:12 +01:00
0mar
c9ca066060 prepull commit 2021-03-24 19:22:33 +01:00
IvanaH8
36b18c1571 Merge branch 'rbac' into rbac-group-roles to fix CircleCI test 2021-03-24 14:30:40 +01:00
IvanaH8
bdc4bd4763 Resolve merge conflicts with Vertical Filtering and improve tests 2021-03-24 13:39:59 +01:00
Min RK
9b81780a21 Merge master into rbac 2021-03-23 14:41:00 +01:00
Min RK
1ab6cbe824 Merge pull request #3388 from minrk/rbac-token-auth
[rbac] ensure /authorizations/token can read the owner model of the token itself
2021-03-23 14:39:54 +01:00
Min RK
97e1a5cb26 add scopes.identify_scopes helper 2021-03-23 13:56:46 +01:00
Min RK
58a80e5050 ensure MockAPIHandler has request.path defined 2021-03-23 13:27:00 +01:00
IvanaH8
e26e8f9c36 Prevent deleting default roles 2021-03-23 11:47:50 +01:00
Min RK
8f2b14429f Merge pull request #3386 from minrk/bump-alpine
alpine dockerfile: avoid compilation by getting some deps from apk
2021-03-23 09:28:48 +01:00
Min RK
5947a718f0 Merge pull request #3389 from IvanaH8/rbac-service-role
[rbac] Add temporary default service role (no scopes)
2021-03-22 20:00:50 +01:00
IvanaH8
64089b40bc Add temporary default service role (no scopes) 2021-03-22 17:14:05 +01:00
Min RK
665e5c7427 ensure /authorizations/token can read the owner model of the token itself 2021-03-22 16:32:14 +01:00
Min RK
43a6767276 run pre-commit after merge 2021-03-22 15:57:52 +01:00
Min RK
b552e364f3 Merge master into rbac 2021-03-22 12:29:48 +01:00
Min RK
af0d81436d alpine dockerfile: avoid compilation by getting some deps from apk
cryptography is the big one, which needs rust and is a huge pain
2021-03-22 12:17:47 +01:00
Min RK
410668d97c Merge pull request #3363 from 0mar/vertical_filtering
RBAC: Vertical filtering
2021-03-19 17:18:12 +01:00
Min RK
477ee23ad3 Merge pull request #3383 from IvanaH8/fix-sqlalchemy-interfaces-deprecation 2021-03-18 14:25:01 +01:00
IvanaH8
27bcac5e8b Fix sqlachemy.interfaces.PoolListener deprecation for testing older JupyterHub versions 2021-03-18 14:13:10 +01:00
IvanaH8
8064cda47a Update RBAC docs implementing review suggestions 2021-03-17 17:13:09 +01:00
0mar
6f6561122b Implemented revision and test suite bug 2021-03-17 16:01:22 +01:00
0mar
f3fc0e96de Fixed OAuth token behavior, invalid user handling and name clashes 2021-03-16 19:10:57 +01:00
IvanaH8
7d5fc27f7c Make some funcs in roles.py private 2021-03-16 11:03:18 +01:00
0mar
5997245cad Added tests to verify token scope behavior 2021-03-14 17:50:36 +01:00
IvanaH8
b6221f6cb1 Fix tests 2021-03-12 17:40:38 +01:00
IvanaH8
064e8f4000 Resolve merge conflicts 2021-03-12 16:45:13 +01:00
IvanaH8
bdc7b3ab8d Account for horizontal filtering in get_subscopes() 2021-03-12 16:09:23 +01:00
0mar
c5ebee0ca0 Fixed scope related tests 2021-03-12 09:40:36 +01:00
0mar
7496fda089 Implemented default token roles, self scope for users and tokens for mockservices 2021-03-11 19:33:05 +01:00
Min RK
e75dd1b79c Stop specifying --ip and --port on the command-line
JUPYTERHUB_SERVICE_URL env is already enough and has been around for some time

Specifying CLI args can cause some issues for custom entrypoints
2021-03-11 15:49:35 +01:00
IvanaH8
01f3286620 Add check that scopes exists when adding new/modifying existing role 2021-03-11 15:30:11 +01:00
IvanaH8
39fc501d50 Add warnings and errors when creating new roles 2021-03-10 10:32:50 +01:00
0mar
bf333d8e35 Changed metascope all meaning 2021-03-09 15:48:24 +01:00
Erik Sundell
6535cc6bab Merge pull request #3377 from minrk/count-redirects-differently
always start redirect count at 1 when redirecting /hub/user/:name -> /user/:name
2021-03-09 14:04:16 +01:00
0mar
9832a87ac4 Fixed some tests and unified scope read:user:name 2021-03-09 10:29:52 +01:00
Min RK
8173bbbf75 always start redirect count at 1 when redirecting /hub/user/:name -> /user/:name
/hub/user/:name is now only reasonably visited as a result of redirect from /user/:name
2021-03-09 09:57:04 +01:00
Min RK
2146eef150 Merge pull request #3375 from manics/remove-hard-way
Remove the hard way guide
2021-03-08 13:28:34 +01:00
0mar
9d19ffe457 Reimplemented scope logic to account for tokens 2021-03-07 15:29:50 +01:00
Simon Li
97b7ccbee4 Mark installation-guide-hard orphan 2021-03-05 19:13:55 +00:00
Simon Li
8eb98409d5 Remove installation-guide-hard 2021-03-05 19:08:26 +00:00
Min RK
a4390a1f4f Merge pull request #3370 from minrk/raise-failed-tokens
Always raise on failed token creation
2021-03-05 11:02:03 +01:00
0mar
0eb275e863 Removed regex. Fixed small bugs, changed status of scope module functions 2021-03-04 13:20:15 +01:00
Min RK
f42f7dd01f raise on failed token creation
the logic was there but at the wrong indentation level
causing it to only raise sometimes
2021-03-02 14:32:33 +01:00
0mar
9c6c688810 Moved scope parsing to scopes module, implemented filter caching and filters now take orm objects 2021-02-26 15:47:40 +01:00
Min RK
0ca2ef68f0 Merge pull request #3326 from dtaniwaki/docker-host
Allow to set spawner-specific hub connect URL
2021-02-26 12:57:22 +01:00
0mar
970e3a57fa Cleanup commit 2021-02-25 07:57:07 +01:00
0mar
8d1ec9f301 Merge branch 'vertical_filtering' of github.com:0mar/jupyterhub into vertical_filtering 2021-02-25 07:32:46 +01:00
0mar
1c789fcbb5 Removed database calls and made scope filter a callable 2021-02-25 07:30:41 +01:00
Ivana
5a15fba8b7 Applied text improvement suggestions from code review by @manics
Co-authored-by: Simon Li <orpheus+devel@gmail.com>
2021-02-23 15:05:41 +01:00
IvanaH8
c03ca796ab removed recommonmark from docs/source/conf.py 2021-02-19 14:07:25 +01:00
IvanaH8
bc1e370d7d updated tech implementation section 2021-02-19 12:37:20 +01:00
0mar
6123f34b80 Replaced implicit member call with dict 2021-02-19 09:49:09 +01:00
0mar
e198770c76 Merge branch 'vertical_filtering' of github.com:0mar/jupyterhub into vertical_filtering 2021-02-18 17:24:15 +01:00
0mar
f6c98f6aaf Caching database calls 2021-02-18 17:22:12 +01:00
IvanaH8
10c82d6272 resolved conflicts with rbac branch 2021-02-17 16:31:46 +01:00
IvanaH8
45a0945a6b updated requirements.txt 2021-02-17 15:46:10 +01:00
Min RK
c3ca924ba8 Merge pull request #3362 from consideRatio/pr/pre-commit-maintenance
Update pre-commit hooks versions
2021-02-17 13:11:40 +00:00
0mar
364baee355 Resolved todos and added docs 2021-02-15 16:49:31 +01:00
0mar
2ebd74e5d2 Test vertical and cross-filtering 2021-02-15 16:39:11 +01:00
IvanaH8
7d1b6a2021 split the docs in docs/source/rbac folder 2021-02-15 16:19:13 +01:00
0mar
6a3274e33c Fixed get_self OAuth test 2021-02-15 15:23:18 +01:00
0mar
746be73e56 Fixed vertical filtering in user models, but does not work for OAuth yet 2021-02-15 14:03:37 +01:00
Erik Sundell
0155e6dc34 Run pre-commit requirements-txt-fixer 2021-02-12 19:24:22 +01:00
Erik Sundell
727f9a0d49 Update pre-commit hook versions 2021-02-12 19:23:46 +01:00
Erik Sundell
d31af27888 Merge pull request #3360 from minrk/prettier
add (and run) prettier pre-commit hook
2021-02-12 19:21:29 +01:00
Min RK
9331dd13da run pre-commit (prettier) 2021-02-12 15:25:58 +01:00
Min RK
3c7203741f add prettier pre-commit hook
will autoformat md, js, yaml, etc.
2021-02-12 15:22:26 +01:00
IvanaH8
be34146d29 back-up with commenting out only 2021-02-12 09:55:21 +01:00
Erik Sundell
4e79360567 Merge pull request #3359 from minrk/move-custom-html
move get_custom_html to base Authenticator class
2021-02-11 22:41:17 +01:00
Min RK
529273d105 move get_custom_html to base Authenticator class
so it's always available

it was accidentally added to PAM instead of the base
2021-02-11 21:42:02 +01:00
0mar
de2e8ff355 Implemented vertical filtering in user method 2021-02-11 14:08:26 +01:00
0mar
d9e8c7fe48 Moved parsing, started implementation of vertical filtering 2021-02-08 18:51:17 +01:00
Min RK
2e198396c1 Merge pull request #3347 from minrk/mixin-get-user
make_singleuser_app: patch-in HubAuthenticatedHandler at lower priority
2021-02-04 13:41:39 +00:00
Daisuke Taniwaki
259c7512b8 Fix a lint issue 2021-02-02 00:30:59 +09:00
Daisuke Taniwaki
59b29f4c42 Refactor the code 2021-02-02 00:27:34 +09:00
Daisuke Taniwaki
bf3615aa96 Fix path 2021-02-02 00:11:43 +09:00
Daisuke Taniwaki
06a505f6df Fix comment 2021-02-02 00:09:25 +09:00
Daisuke Taniwaki
c8d6c6aaa8 Fix spawner hub connect URL 2021-02-02 00:04:42 +09:00
Daisuke Taniwaki
cc2859a826 Merge remote-tracking branch 'upstream/master' into docker-host 2021-02-01 22:35:46 +09:00
Daisuke Taniwaki
26ccf6fd57 Fix hub_connect_url 2021-02-01 22:29:43 +09:00
Min RK
f220bbca84 Merge pull request #3315 from dtaniwaki/improve-handler
Make Authenticator Custom HTML Flexible
2021-02-01 11:42:27 +00:00
Min RK
4fb3f02870 Merge pull request #3349 from minrk/pr-artifacts
publish release outputs as artifacts
2021-02-01 11:20:03 +00:00
Min RK
471d1f0a2f simplify and clarify override of methods that could be defined on BaseHandler 2021-02-01 11:40:11 +01:00
Min RK
1b12107c54 specify that mock.patch is temporary
Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2021-02-01 07:05:24 +00:00
Min RK
b3a4adcbdd add link to action
Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2021-02-01 07:03:31 +00:00
Min RK
12c69c6a94 publish release outputs as artifacts
makes testing a PR even easier since we build an sdist and wheel for every PR and push

since artifacts are double-archived, it's not quite as simple as giving a URL to install from,
but this at least makes it available. To use:

- download and unpack zip
- `pip install path/to/whl`
2021-01-29 14:32:18 +01:00
Min RK
d3147f3fb7 make_singleuser_app: patch-in HubAuthenticatedHandler at lower priority
apply patch directly to BaseHandler instead of each handler instance
so that overrides can still take effect (i.e. APIHandler raising 403 instead of redirecting)
2021-01-29 14:07:05 +01:00
Daisuke Taniwaki
47265786e3 Add versionadded 2021-01-27 20:49:47 +09:00
Min RK
1d9795c577 Merge pull request #3345 from stv0g/service-template
Allow customization of service menu via templates
2021-01-27 11:39:55 +00:00
Min RK
4dac580d3d Merge master into rbac 2021-01-27 12:39:02 +01:00
Min RK
490a6503cc Merge pull request #3323 from 0mar/merge_api_with_orm
Reconciliating API with scopes from database
2021-01-27 11:38:53 +00:00
Steffen Vogel
e35b84b419 convert tabs to whitespaces 2021-01-26 17:42:35 +01:00
Steffen Vogel
5a57b03b61 allow customization of service menu via templates 2021-01-26 17:39:48 +01:00
0mar
b160a0e344 Consistent messages regardless of whether resources exist or not 2021-01-26 16:08:23 +01:00
Min RK
e526f36b81 Merge pull request #3344 from minrk/no-auth-header-create
[TST] Do not implicitly create users in auth_header
2021-01-26 13:42:32 +00:00
0mar
590bd1a849 Fixed tests 2021-01-26 14:20:39 +01:00
Min RK
d289cd1e02 Merge pull request #3343 from consideRatio/pr/cookie-secret-as-hex
Allow cookie_secret to be set to a hexadecimal string
2021-01-26 12:11:10 +00:00
Erik Sundell
4c3a32b51f Apply suggestions from code review
Co-authored-by: Min RK <benjaminrk@gmail.com>
2021-01-26 12:44:17 +01:00
Min RK
6c65624942 [TST] Do not implicitly create users in auth_header
implicit user creation results in surprising behavior when the user shouldn't exist
2021-01-26 11:54:47 +01:00
0mar
89d7cdc882 Merge branch 'merge_api_with_orm' of github.com:0mar/jupyterhub into merge_api_with_orm 2021-01-26 09:25:06 +01:00
Erik Sundell
cba22751b4 Test setting cookie_secret to a hexadecimal string 2021-01-25 22:29:48 +01:00
Erik Sundell
c5d0265984 Allow cookie_secret to be a hexadecimal string
With this, we coerce hexadecimal strings into Bytes. This can be helpful
as YAML/JSON cannot represent raw bytes.
2021-01-25 22:28:50 +01:00
0mar
d0369197d4 Fixed a bug, added some docs, but running into DB/API issues 2021-01-25 21:36:52 +01:00
Daisuke Taniwaki
fc772e1c39 Fix a lint issue 2021-01-25 23:33:17 +09:00
Daisuke Taniwaki
d70157e72a Fix the spawner test 2021-01-25 23:30:11 +09:00
Min RK
91359bcaa7 Merge pull request #3337 from nsshah1288/feature/shahn3_pvcDeletion
Add Spawner.delete_forever
2021-01-25 13:59:54 +00:00
Min RK
22fc580275 Merge pull request #3341 from dtaniwaki/clear-cookie
Clear tornado xsrf cookie on logout
2021-01-25 13:58:36 +00:00
Daisuke Taniwaki
2f304bffcc Clear tornado cookie on logout 2021-01-24 20:21:17 +09:00
SHAHN3
162076c5dd added docstring 2021-01-23 15:58:32 -05:00
SHAHN3
9bd97db90b added try except, also changed to await and async 2021-01-21 16:21:18 -05:00
Daisuke Taniwaki
3a25b32ce6 Update Spawner.hub_connect_url help message 2021-01-21 10:32:37 +09:00
SHAHN3
8fcc4b48a5 removed await 2021-01-20 14:44:03 -05:00
SHAHN3
289dee5996 new method delete_forever 2021-01-20 14:34:32 -05:00
Min RK
b1b7954e93 Merge pull request #3338 from minrk/log-slow-responses
always log slow requests at least at info-level
2021-01-20 09:18:41 +00:00
Erik Sundell
35a55c6cbf Merge pull request #3339 from minrk/alembic-min
specify minimum alembic 1.4
2021-01-20 09:50:24 +01:00
Min RK
cd06f3fb12 specify minimum alembic
this gets us *older* alembic in the old-dependencies test

since alembic 1.5 doesn't support sqlalchemy 1.1
2021-01-20 09:34:42 +01:00
Min RK
796d22d0d8 Merge pull request #3335 from rcthomas/pagination-named-servers
Fix pagination with named servers
2021-01-20 08:29:44 +00:00
Min RK
be4357ad7a Merge pull request #3332 from jiajunjie/fix-help
Fix the help related to the proxy check
2021-01-20 08:27:25 +00:00
Min RK
202d6f93d4 always log slow requests at least at info-level
if health or static responses are taking longer than 1s, it's useful to know
2021-01-20 09:23:26 +01:00
SHAHN3
8b9b69ce22 trying to mock 2021-01-19 17:40:59 -05:00
SHAHN3
c40b3a4ad6 reformatted code 2021-01-19 16:32:59 -05:00
SHAHN3
c7f1b89f6c delete user's PVC when delete user is called 2021-01-19 16:08:33 -05:00
Rollin Thomas
dcff08ae13 Add back outerjoin that made spawner sorts work 2021-01-16 09:15:34 -08:00
Rollin Thomas
b0bf348908 Need to format as subquery 2021-01-15 22:53:12 -08:00
Rollin Thomas
b73eca91ca Fix pagination with named servers 2021-01-15 11:19:57 -08:00
IvanaH8
f90b4e13df added token role check during loading config file and logs for role creation/changes/assignements 2021-01-15 15:32:58 +01:00
Jia Junjie
3db5eae9a9 Run pre-commit 2021-01-14 20:52:59 +08:00
Min RK
adb5f6ab2a Merge pull request #3333 from trallard/trallard-patch-1
📝 Fix telemetry section
2021-01-14 12:01:24 +01:00
0mar
3f47860d17 Fixed test error 2021-01-14 10:25:17 +01:00
Min RK
2a84353a51 Merge pull request #3329 from Zsailer/docs-jupyter_server
Mention Jupyter Server as optional single-user backend in documentation
2021-01-13 15:04:48 +01:00
Jia Junjie
ca4fb3187f Fix the help related to the proxy check 2021-01-13 21:59:38 +08:00
Tania Allard
8ab25e7c3d 📝 Fix telemetry section 2021-01-13 11:43:05 +00:00
Zsailer
f69ef9f846 add docs describing jupyter_server 2021-01-12 09:11:23 -08:00
0mar
e9ad8ca8ac Stacking scope decorators works 2021-01-11 20:51:04 +01:00
0mar
7e30e1998c Fixed test 2021-01-11 20:39:22 +01:00
IvanaH8
a2378fe718 resolved merge conflicts 2021-01-11 12:57:11 +01:00
IvanaH8
1a513f8dd9 added roles to groups 2021-01-11 12:08:50 +01:00
Daisuke Taniwaki
ba2608c643 Allow to set spawner-specific hub connect URL 2021-01-08 23:39:05 +09:00
Erik Sundell
c3f5ad8b6d Merge pull request #3325 from andrewisplinghoff/master
Fix mixup in comment regarding the sync parameter
2021-01-08 11:46:37 +01:00
Andre Wisplinghoff
4dbe5490f8 Fix mixup in comment regarding the sync parameter 2021-01-08 11:39:09 +01:00
Erik Sundell
711080616e Merge pull request #3324 from consideRatio/pr/manually-trigger-tests-and-readme-badge
ci: github actions, allow for manual test runs and fix badge in readme
2021-01-08 01:28:27 +01:00
Erik Sundell
8e603e5212 docs: update README.md badge for github actions 2021-01-08 01:16:29 +01:00
Erik Sundell
147167e589 ci: allow tests to be run manually through github UI 2021-01-08 01:16:06 +01:00
Omar Richardson
82c837eb89 Refactored orm.get_class, improved resource filtereing 2021-01-05 19:58:39 +01:00
Omar Richardson
e21713c24f Improved group expansion by reducing SQL queries 2021-01-05 12:57:26 +01:00
Omar Richardson
662017f260 Refactored scope module. Implemented filter in *ListApiHandlers 2021-01-05 11:42:53 +01:00
Omar Richardson
82bebfaff2 Added unit tests and fixed bugs in scope filter 2021-01-04 22:44:23 +01:00
0mar
f4ba57b1d7 Implemented filter list skeleton 2021-01-04 16:24:50 +01:00
Erik Sundell
cebb1f3e22 Merge pull request #3314 from timgates42/bugfix_typo_function
docs: fix simple typo, funciton -> function
2020-12-23 10:24:50 +01:00
Daisuke Taniwaki
0b085a91b6 Fix format issues 2020-12-23 13:50:27 +09:00
Daisuke Taniwaki
ca3ceac4f3 Add comment 2020-12-23 13:42:51 +09:00
Daisuke Taniwaki
c833fae901 Allow to use base URL in custom HTML 2020-12-23 13:39:59 +09:00
Daisuke Taniwaki
8d3a7b704c Render custom html 2020-12-23 13:03:27 +09:00
Tim Gates
1e53fd1f8c docs: fix simple typo, funciton -> function
There is a small typo in jupyterhub/orm.py.

Should read `function` rather than `funciton`.
2020-12-23 11:54:51 +11:00
IvanaH8
5e8864f29d fixed default roles for mocked services 2020-12-18 15:04:14 +01:00
0mar
6ad757f7e7 Merge remote-tracking branch 'upstream/rbac' into merge_api_with_orm 2020-12-17 09:22:44 +01:00
Min RK
8c5cd005fa Merge pull request #3308 from IvanaH8/rbac-service-roles-fix
fixed default roles for mocked services
2020-12-17 08:44:23 +01:00
0mar
f10fc0f0c0 No more need for mock roles 2020-12-16 14:46:08 +01:00
IvanaH8
8a7320b318 fixed default roles for mocked services 2020-12-16 11:17:43 +01:00
0mar
3eccf7abdd Changed scopes from list to set and made filters additive 2020-12-14 17:39:06 +01:00
Erik Sundell
166b00867f Merge pull request #3305 from minrk/github-release
publish releases from github actions
2020-12-11 16:39:42 +01:00
Min RK
7c474396f1 publish releases from github actions 2020-12-11 12:27:34 +01:00
Min RK
f6f6b3afa3 back to dev 2020-12-11 12:08:22 +01:00
Min RK
a91197635a release 1.3.0 2020-12-11 12:07:55 +01:00
Min RK
88706d4c27 final changelog edits for 1.3.0 2020-12-11 12:07:06 +01:00
Min RK
29fac11bfe Merge pull request #3295 from minrk/changelog-1.3
begin changelog for 1.3
2020-12-11 12:02:15 +01:00
Erik Sundell
947ef67184 Merge pull request #3303 from Sangarshanan/patch-1
Remove the extra parenthesis in service.md
2020-12-11 09:39:28 +01:00
sangarshanan
8ede924956 Remove extra paranthesis 2020-12-11 13:15:13 +05:30
sangarshanan
55c2d3648e Add the missing parenthesis in service.md 2020-12-11 01:53:35 +05:30
0mar
62c56ec2c8 Started work on fixing tests 2020-12-09 17:34:49 +01:00
0mar
16657e0c88 Integrated scopes with roles 2020-12-09 17:34:33 +01:00
0mar
e47d96e016 Merge remote-tracking branch 'upstream/rbac' into merge_api_with_orm 2020-12-09 15:24:48 +01:00
Min RK
4cc2f0a363 Merge pull request #3215 from IvanaH8/implementing-default-roles
[RBAC] Implementing roles as collections of permission scopes
2020-12-09 15:02:01 +01:00
IvanaH8
9de9070641 fixed scope test attr error for older_requirements.txt test 2020-12-09 14:50:50 +01:00
Min RK
2cf8e48fb5 start changelog for 1.3
I noticed that our jinja async feature is new in 2.9, and matured in 2.11, so explicitly require that
2020-12-09 14:31:10 +01:00
Min RK
ae77038a64 Merge pull request #3293 from minrk/services-whoami
allow services to call /api/user to identify themselves
2020-12-09 13:25:46 +01:00
0mar
4ab2e3aa0a Fixed merge request after cherrypick 2020-12-09 12:25:33 +01:00
Min RK
ffed8f67a0 Merge pull request #3294 from minrk/paginate-per-page
fix increasing pagination limits
2020-12-08 10:03:51 +01:00
Ivana
f9a3eec147 Merge branch 'rbac' into implementing-default-roles 2020-12-08 08:41:04 +01:00
IvanaH8
c514259f1a addressed review comments from Omar 2020-12-08 08:28:23 +01:00
Erik Sundell
1efd7da6ee Merge pull request #3300 from mxjeff/fixed-doc-services
Fixed idle-culler references.
2020-12-04 11:46:04 +01:00
Geoffroy Youri Berret
6e161d0140 Fixed idle-culler references.
Merge request #3257 fixed #3256 only on getting-started/services-basics.md
There is still a reference to jupyterhub example cull-idle in reference/services.md
2020-12-04 09:28:02 +01:00
IvanaH8
ab297a7747 added scope expansion unit testing 2020-12-03 14:53:53 +01:00
Min RK
5f4144cc98 Merge pull request #3298 from coffeebenzene/master
Fix asyncio deprecation asyncio.Task.all_tasks
2020-12-03 11:16:46 +01:00
coffeebenzene
f866bbcf45 Use variable instead of monkey patching asyncio 2020-12-02 19:50:49 +00:00
coffeebenzene
ed6231d3aa Fix asyncio deprecation asyncio.Task.all_tasks 2020-12-02 17:57:28 +00:00
Min RK
9d38259ad7 fix increasing pagination limits
setting per_page in constructor resolves before max_per_page limit is updated from config,
preventing max_per_page from being increased beyond the default limit

we already loaded these values anyway in the first instance,
so remove the redundant Pagination object
2020-12-02 12:52:42 +01:00
Min RK
4b254fe5ed Merge pull request #3243 from agp8x/master
[Metrics] Add prefix to prometheus metrics to group all jupyterhub metrics
2020-12-02 12:22:32 +01:00
Min RK
f8040209b0 allow services to call /api/user to identify themselves 2020-12-02 12:21:25 +01:00
Min RK
e59ee33a6e note versionchanged in metrics module docstring 2020-12-02 11:36:13 +01:00
Min RK
ff15ced3ce Merge pull request #3225 from cbanek/configurable_options_from_form
Allow options_from_form to be configurable
2020-12-02 11:32:24 +01:00
Min RK
75acd6a67b Merge pull request #3264 from tlvu/add-user-agreement-to-login-screen
Add optional user agreement to login screen
2020-12-02 11:31:23 +01:00
Min RK
73ac6207af Merge pull request #3244 from mhwasil/fix-https-redirect-issues
[Docs] Fix https reverse proxy redirect issues
2020-12-02 11:30:09 +01:00
Min RK
6fc3dc4c01 Merge master into rbac 2020-12-02 11:28:53 +01:00
Min RK
e435fe66a5 Merge pull request #3292 from minrk/oldest-metrics
bump oldest-required prometheus-client
2020-12-02 11:27:27 +01:00
Min RK
5540859460 Merge pull request #3212 from 0mar/implement_scopes
Implementing RBAC scope checking in API handlers
2020-12-02 11:23:24 +01:00
Min RK
d7569d6f8e bump oldest-required prometheus-client
oldest-dependency tests caught an error with our base required version
2020-12-02 11:20:30 +01:00
Min RK
ba6c2cf854 Merge pull request #3266 from 0mar/reduce_ssl_testing
Test internal_ssl separately
2020-12-02 10:59:39 +01:00
0mar
970b25d017 Added docstrings 2020-12-01 10:49:10 +01:00
0mar
671ef0d5ef Moved ssl options to proxy 2020-12-01 10:30:44 +01:00
IvanaH8
de04ae1471 verifying api requested token roles permissions against the token owner permissions 2020-12-01 08:44:29 +01:00
Omar Richardson
73020a70f2 Mocked request.path 2020-11-30 23:16:00 +01:00
Erik Sundell
77220d6662 Merge pull request #3289 from minrk/user-count
fix and test TOTAL_USERS count
2020-11-30 15:21:48 +01:00
Min RK
7e469f911d fix and test TOTAL_USERS count
Don't assume UserDict contains all users

which assumption led to double-counting when a user in the db was loaded into the dict cache
2020-11-30 13:27:52 +01:00
Erik Sundell
18393ec6b4 Merge pull request #3287 from minrk/bump-black
bump black pre-commit hook to 20.8
2020-11-30 10:26:55 +01:00
Min RK
28fdbeb0c0 update back pre-commit hook
specify minimum target_version as py36

results in some churn
2020-11-30 10:13:10 +01:00
Tim Head
5664e4d318 Merge pull request #3286 from Sangarshanan/patch-1
Fix curl in jupyter announcements
2020-11-30 07:47:27 +01:00
sangarshanan
24c83e721f Fix curl in jupyter announcements
Running the Curl as is return a 500 with ```json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
```  Converting the payload to a proper Json
2020-11-28 17:50:44 +05:30
0mar
cc73ab711e Disabled ssl testing 2020-11-27 17:50:47 +01:00
0mar
2cfe4474ac Submitting reason for skiptest 2020-11-27 17:26:44 +01:00
0mar
74766e4786 Resolving merge conflichts 2020-11-27 17:18:40 +01:00
0mar
ed461ff4a7 Merge branch 'tmp' into reduce_ssl_testing
# Conflicts:
#	jupyterhub/tests/test_proxy.py
2020-11-27 17:05:26 +01:00
0mar
184d87ff2a Skip SSL-free tests if not on SSL matrix 2020-11-27 17:00:09 +01:00
Min RK
06ed7dc0cf Merge pull request #3284 from minrk/12-cl
Changelog for 1.2.2
2020-11-27 14:41:08 +01:00
Min RK
a0b229431c Update docs/source/changelog.md
Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2020-11-27 14:40:59 +01:00
0mar
2a06c8a94c WIP: Attempt to access SSL parameters, failing due to self-signed certificate error 2020-11-27 13:26:32 +01:00
Min RK
91159d08d3 Changelog for 1.2.2 2020-11-27 10:09:54 +01:00
Erik Sundell
06a83f146b Merge pull request #3281 from olifre/patch-1
CONTRIBUTING: Fix contributor guide URL
2020-11-27 09:53:41 +01:00
Oliver Freyermuth
7b66d1656b CONTRIBUTING: Fix contributor guide URL
The link has been changed.
2020-11-27 09:39:29 +01:00
0mar
40176a667f Attempt to patch proxy, unsuccessful 2020-11-26 12:22:43 +01:00
Omar Richardson
e02345a4e8 WIP: Moved ssl options to new method 2020-11-26 09:24:44 +01:00
Long Vu
1408e9f5f4 Merge remote-tracking branch 'origin/master' into add-user-agreement-to-login-screen 2020-11-25 10:31:38 -05:00
Long Vu
b66d204d69 login page: no javascript needed for the optional accept terms and conditions feature
Bonus user gets a pop-up notification to check the checkbox.

Tested on Mozilla Firefox
(https://user-images.githubusercontent.com/11966697/100246404-18115e00-2f07-11eb-9061-d35434ace3aa.gif)
and Google Chrome.

Feedback from @minrk.
2020-11-25 10:30:22 -05:00
Omar Richardson
f6d635997c Changed logging call 2020-11-24 10:03:16 +01:00
Omar Richardson
d7d27ad97a Fixed scopes and added more specific logs/errors 2020-11-23 13:26:36 +01:00
Omar Richardson
164447717f Fix formulation 2020-11-20 15:30:23 +01:00
Omar Richardson
0472ef0533 Central internal_ssl switch 2020-11-20 15:27:50 +01:00
Erik Sundell
202efae6d8 Merge pull request #3177 from minrk/user-state-filter
add ?state= filter for GET /users
2020-11-20 11:06:15 +01:00
Min RK
2e043241fb Merge pull request #3261 from minrk/next-append-query
Only preserve params when ?next= is unspecified
2020-11-20 09:47:20 +01:00
Min RK
fa61f06fed Merge pull request #3237 from alexweav/cleanup-leftover-proxy
[proxy.py] Improve robustness when detecting and closing existing proxy processes
2020-11-20 09:45:53 +01:00
Min RK
8b19413fa1 Merge pull request #3242 from consideRatio/pr/py36-async-await
Assume py36 and remove @gen.coroutine etc.
2020-11-20 09:31:43 +01:00
Min RK
7c2e7692b0 Merge pull request #3265 from ideonate/master
Fix RootHandler when default_url is a callable
2020-11-20 09:14:46 +01:00
Min RK
31a99b5b2c Merge pull request #3169 from IvanaH8/yaml-adding-scopes
First step for implementing oauth scopes - update to rest-api.yml
2020-11-20 08:59:48 +01:00
Omar Richardson
d5e7a42135 More scope unit tests 2020-11-19 17:06:31 +01:00
Tim Head
ce11959b1a Merge pull request #3267 from slemonide/patch-1
Update services.md
2020-11-19 14:07:56 +01:00
fyrzbavqr
097974d57d Update services.md
Fix small typo
2020-11-19 04:14:54 -08:00
Omar Richardson
09ff03ca4f Superfluous import statement 2020-11-19 13:10:48 +01:00
Omar Richardson
313f050c42 Reduced ssl on for active tests only 2020-11-19 12:58:38 +01:00
Omar Richardson
4862831f71 Trying with different configuration 2020-11-19 12:08:10 +01:00
Omar Richardson
c46beb976a Moving ssl tests to testing matrix 2020-11-19 11:59:03 +01:00
Omar Richardson
71d99e1180 Update with expand group test 2020-11-19 09:57:50 +01:00
IvanaH8
18ed1b58cc added roles to token model and POST /users/{name}/tokens request body 2020-11-19 09:17:03 +01:00
IvanaH8
c0cadc384d adding roles to tokens 2020-11-19 08:22:52 +01:00
Long Vu
11a85d1dc5 login page: allow full override of the optional accept terms and conditions feature
The text was already overridable but the endblock was at the wrong
location.

Now the javascript can also be overridden.
2020-11-18 14:25:49 -05:00
0mar
54cb31b3a9 Removed circular import 2020-11-18 17:29:15 +01:00
Omar Richardson
99c3f77c58 WIP Implemented scopes 2020-11-18 17:12:26 +01:00
Dan Lester
67c4a86376 Fix RootHandler when default_url is a callable 2020-11-18 12:55:44 +00:00
Long Vu
e00ef1aef1 Merge remote-tracking branch 'origin/master' into add-user-agreement-to-login-screen 2020-11-17 17:27:30 -05:00
Long Vu
fb5f98f2fa login page: add optional feature to accept terms and conditions in order to login
The feature is disabled by default.

If enabled (by setting `login_term_url`), user will have to check the
checkbox to accept the terms and conditions in order to login.
2020-11-17 17:24:38 -05:00
Alex Weaver
82a1ba8402 Import psutil and perform cmdline check on Windows onlyy 2020-11-17 13:02:35 -06:00
Alex Weaver
7f53ad52fb Assume that fapermission errors when getting process metadata indicate a non-running proxy 2020-11-17 12:55:34 -06:00
agp8x
73cdd687e9 fix formatting 2020-11-17 15:36:30 +01:00
agp8x
af09bc547a change metric prefix to jupyterhub 2020-11-17 15:29:37 +01:00
Min RK
3ddc796068 verify that tornado gen.coroutine and run_on_executor are awaitable
- our APIs require that methods return 'awaitables'
- make sure that the older ways to create tornado 'yieldables' still produce 'awaitables'
2020-11-17 12:38:42 +01:00
Min RK
3c071467bb require tornado 5.1, async_generator 1.9
- maybe_future relies on changes in 5.1, not in 5.0
- async_generator.asynccontextmanager is new in 1.9
2020-11-17 12:23:39 +01:00
Min RK
0c43feee1b run tests with oldest-supported versions
to catch any cases where we make assumptions about more recent versions than we claim to support
2020-11-17 12:22:46 +01:00
Min RK
5bcbc8b328 Merge pull request #3252 from cmd-ntrf/signin
Standardize "Sign in" capitalization on the login page
2020-11-17 11:59:26 +01:00
Min RK
87e4f458fb only preserve params when ?next= is not specified 2020-11-17 11:58:28 +01:00
Min RK
808e8711e1 Merge pull request #3176 from yuvipanda/async_template
Enable async support in jinja2 templates
2020-11-17 11:46:23 +01:00
YuviPanda
19935254a7 Fix pre-commit errors 2020-11-17 15:58:38 +05:30
YuviPanda
a499940309 Remove extreneous coroutine creation
You can 'pass through' coroutines like this without
yield.
2020-11-17 15:41:40 +05:30
YuviPanda
74544009ca Remove extreneous print statement
Was a debugging aid
2020-11-17 15:41:22 +05:30
YuviPanda
665f9fa693 Drop Python 3.5 support
See https://github.com/jupyterhub/jupyterhub/pull/3176#issuecomment-694315759

For Travis, I push the version cascade down one step.
Should preserve our test coverage while conserving test
duration
2020-11-17 15:39:55 +05:30
YuviPanda
24b555185a Revert "Run templates synchronously for Python 3.5"
This reverts commit f1155d6c2afbcbd875c7addc88784313c77da8e9.

Instead, let's stop supporting 3.5!
2020-11-17 15:39:26 +05:30
YuviPanda
24f4b7b6b6 Run templates synchronously for Python 3.5
jinja2's async support requires Python 3.6+. That should
be an implementation detail - so we render it in the main
thread (current behavior) but pretend we did not
2020-11-17 15:39:26 +05:30
YuviPanda
217dffa845 Fix typo in format string 2020-11-17 15:39:26 +05:30
YuviPanda
a7b796fa57 Autoformat with black 2020-11-17 15:39:21 +05:30
YuviPanda
6c5fb5fe97 F-strings are Python 3.6, not 3.5 2020-11-17 15:38:29 +05:30
Yuvi Panda
20ea322e25 Fix typo
Co-authored-by: Tim Head <betatim@gmail.com>
2020-11-17 15:38:29 +05:30
YuviPanda
4f9664cfe2 Provide sync versions of render_template too
write_error is a synchronous method called by an async
method from inside the event loop. This means we can't just
schedule an async render_templates in the same loop and wait
for it - that would deadlock.

jinja2 compiled your code differently based on wether you
enable async support or not. Templates compiled with async
support can't be used in cases like ours, where we already
have an event loop running and calling a sync function. So
we maintain two almost identical jinja2 environments
2020-11-17 15:38:29 +05:30
YuviPanda
be211a48ef Enable async jinja2 template rendering
Follows https://jinja.palletsprojects.com/en/2.11.x/api/#async-support

- This blocks the main thread fewer times
- We can use async methods inside templates too
2020-11-17 15:38:29 +05:30
Min RK
553ee26312 preserve url params in ?next from root page 2020-11-17 10:45:11 +01:00
0mar
2e9ecfff02 WIP: implementing expanding groups 2020-11-17 09:56:48 +01:00
Erik Sundell
7e6111448a Merge pull request #3253 from minrk/wait-admin-form
wait for pending spawns in spawn_form_admin_access
2020-11-16 02:39:11 +01:00
Erik Sundell
ccc0294f2e Merge pull request #3257 from manics/jupyterhub_idle_culler
Update services-basics.md to ues jupyterhub_idle_culler
2020-11-14 17:37:17 +01:00
Simon Li
3232ad61aa Update services-basics.md to ues jupyterhub_idle_culler
Closes https://github.com/jupyterhub/jupyterhub/issues/3256
2020-11-14 15:59:56 +00:00
Min RK
202a5bf9a5 Merge pull request #3255 from fcollonval/patch-1
Environment marker on pamela
2020-11-13 10:28:28 +01:00
Frédéric Collonval
47136f6a3c Environment marker on pamela 2020-11-13 09:57:20 +01:00
Min RK
5d3161c6ef wait for pending spawns in spawn_form_admin_access
copy logic from test_spawn_admin_access
2020-11-12 10:16:48 +01:00
Félix-Antoine Fortin
9da4aa236e Standardize Sign in capitalization on the login page 2020-11-11 13:01:14 -05:00
Erik Sundell
d581cf54cb Retain an assertion and update comments 2020-11-11 15:40:54 +01:00
Erik Sundell
fca2528332 Retain explicit pytest mark asyncio of our coroutines 2020-11-11 14:47:41 +01:00
Erik Sundell
5edd246474 Replace @async_generator/yeild_ with async/yeild 2020-11-11 14:47:29 +01:00
Erik Sundell
77ed2faf31 Replace gen.multi(futures) with asyncio.gather(*futures) 2020-11-11 14:47:24 +01:00
Erik Sundell
4a17441e5a Replace gen.sleep with asyncio.sleep 2020-11-11 14:40:59 +01:00
Erik Sundell
e1166ec834 Replace @gen.coroutine/yield with async/await 2020-11-11 14:36:56 +01:00
Erik Sundell
2a1d341586 Merge pull request #3250 from minrk/test-condition
remove push-branch conditions for CI
2020-11-11 12:21:52 +01:00
Min RK
55a59a2e43 remove push-branch conditions for CI
testing other branches is useful, and there's little cost to removing the conditions:

- we don't run PRs from our repo, so test runs aren't duplicated on the repo
- testing on a fork without opening a PR is still useful (I use this often)
- if we push a branch, it should probably be tested (e.g. backport branch), and filters make this extra work
- the cost of running a few extra tests is low, especially given actions' current quotas and parallelism
2020-11-11 09:12:58 +01:00
Min RK
e019a33509 Merge pull request #3246 from consideRatio/pr/migrate-to-gh-actions-from-travis
Migrate from travis to GitHub actions
2020-11-11 09:06:58 +01:00
Erik Sundell
737dcf65eb Fix mysql/postgresql auth and comment struggles 2020-11-10 19:20:47 +01:00
Erik Sundell
9deaeb1fa9 Final variable name update 2020-11-10 16:19:22 +01:00
Erik Sundell
bcfc2c1b0d Cleanup use of database related environment variables 2020-11-10 16:16:28 +01:00
Erik Sundell
f71bacc998 Apply suggestions from code review
Co-authored-by: Min RK <benjaminrk@gmail.com>
2020-11-10 15:39:46 +01:00
Erik Sundell
ff14b1aa71 CI: use --maxfail=2 2020-11-10 11:14:59 +01:00
Erik Sundell
ebbbdcb2b1 Refactor ci/docker-db and ci/init-db 2020-11-10 11:14:40 +01:00
Erik Sundell
d0fca9e56b Reword comment 2020-11-10 10:03:53 +01:00
Erik Sundell
517737aa0b Add notes about not needing "set -e" etc. 2020-11-10 02:17:44 +01:00
Erik Sundell
5dadd34a87 Help GitHub UI present the job parameterization + inline comments 2020-11-10 02:17:40 +01:00
Erik Sundell
df134fefd0 Refactor pre-commit to its own job 2020-11-10 01:17:30 +01:00
Erik Sundell
47cec97e63 Let pytest fail on first error 2020-11-10 01:16:12 +01:00
0mar
9f6d37cf48 Parametrized scope test suite 2020-11-09 16:07:09 +01:00
0mar
14468b3849 Changed scopes 2020-11-09 16:06:53 +01:00
0mar
365921d162 Added filtering to decorator and added tests 2020-11-09 14:25:02 +01:00
Erik Sundell
0b8b87d7d0 Remove debugging trigger 2020-11-09 07:43:42 +01:00
Erik Sundell
3bf1d72905 Test in Ubuntu 20.04 2020-11-09 07:42:45 +01:00
Erik Sundell
8cdd449cca Unpin mysql-connector-python and resolve errors 2020-11-09 07:42:12 +01:00
Erik Sundell
6fc3c19763 For CI readability, exit on first failure 2020-11-09 07:41:05 +01:00
Erik Sundell
265dc07c78 Remove .travis.yml, add GitHub workflow 2020-11-09 07:40:15 +01:00
Erik Sundell
1ae039ddef Remove py3.7+ breaking test variation (has~x)
The jupyterhub/tests/test_spawner.py::test_spawner_routing[has~x] test
failed in py37+ but not in py36, and I think it is foundational to the
socket library of Python that has changed.

This is a stacktrace from Python/3.7.9/x64/lib/python3.7/site-packages/urllib3/util/connection.py:61

```
>       for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
E       socket.gaierror: [Errno -2] Name or service not known
```

Here is relevant documentation about socket.getaddrinfo.

https://docs.python.org/3.7/library/socket.html#socket.getaddrinfo
2020-11-09 07:32:11 +01:00
Erik Sundell
378d34b213 Don't ignore outer env vars 2020-11-09 07:31:16 +01:00
0mar
fad0679ce4 Refactored api method param names 2020-11-05 16:35:42 +01:00
0mar
154edebbf4 Added scope utilities and tests for them 2020-11-05 15:40:00 +01:00
Mohammad Wasil
9657430cac Fix reverse proxy redirect from https 2020-11-04 17:59:28 +01:00
Mohammad Wasil
6271535f46 Merge pull request #1 from jupyterhub/master
Merge from jupyterhub/jupyterhub master
2020-11-04 17:02:28 +01:00
agp8x
2bef5ba981 Add prefix to prometheus metrics to group all jupyter metrics (see #1585) 2020-11-04 13:54:31 +01:00
Alex Weaver
efb1f3c824 Run precommit hooks, fix formatting issue 2020-10-30 12:35:01 -05:00
Alex Weaver
53050a5836 Merge branch 'master' of https://github.com/jupyterhub/jupyterhub into cleanup-leftover-proxy 2020-10-30 12:14:08 -05:00
Alex Weaver
6428ad9f0b Check proxy cmd before shutting down, cleaner shutdown on Windows 2020-10-30 12:13:50 -05:00
0mar
422fbf8dcc Fixed scoping and authentication 2020-10-30 15:07:10 +01:00
0mar
496832d7b4 Adjusted tests to allow for scopes 2020-10-30 15:06:48 +01:00
Min RK
9068ff2239 back to dev 2020-10-30 13:22:14 +01:00
Min RK
fc6cd33ce0 release 1.2.1 2020-10-30 13:20:43 +01:00
Erik Sundell
b0b8e2d058 Merge pull request #3235 from minrk/changelog-1.2.1
Changelog for 1.2.1
2020-10-30 13:19:52 +01:00
Erik Sundell
6bfa402bfa Apply suggestions from code review 2020-10-30 13:19:18 +01:00
Min RK
b51a0bba92 Changelog for 1.2.1 2020-10-30 13:15:19 +01:00
Erik Sundell
2d3f962a1d Merge pull request #3234 from gesiscss/master
Make external JupyterHub services' oauth_no_confirm configuration work as intentend
2020-10-30 13:07:39 +01:00
Kenan Erdogan
625242136a fix checking if oauth confirm is needed 2020-10-30 10:39:02 +01:00
Min RK
f92560fed0 back to dev 2020-10-29 14:06:20 +01:00
Min RK
8249ef69f0 release jupyterhub 1.2.0 2020-10-29 14:03:34 +01:00
Min RK
c63605425f Merge pull request #3233 from minrk/1.2.0-final
latest changelog since 1.2.0b1
2020-10-29 14:03:01 +01:00
Min RK
5b57900c0b 1.2.0 heading in changelog
Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2020-10-29 14:02:35 +01:00
Erik Sundell
d0afdabd4c order changelog entries systematically 2020-10-29 13:13:02 +01:00
Min RK
618746fa00 latest changelog since 1.2.0b1 2020-10-29 13:02:04 +01:00
Min RK
e7bc6c2ba9 Merge pull request #3229 from minrk/configurable-pagination
make pagination configurable
2020-10-29 10:53:29 +01:00
Min RK
e9f86cd602 make pagination configurable
add some unittests for pagination

reorganize pagination a bit to make it easier to configure
2020-10-29 09:24:34 +01:00
Erik Sundell
6e8517f795 Merge pull request #3232 from consideRatio/pr/travis-badge
Update travis-ci badge in README.md
2020-10-28 23:01:04 +01:00
Erik Sundell
5fa540bea1 Update travis-ci badge in README.md 2020-10-28 22:59:44 +01:00
0mar
e26fa682c1 Implemented mock scopes in tests and fixed scopes 2020-10-28 17:45:58 +01:00
0mar
21ea4ad2b6 Implemented mock scopes 2020-10-28 16:23:21 +01:00
Min RK
99f597887c Merge pull request #3223 from consideRatio/pr/proxy-api_request-retries
Make api_request to CHP's REST API more reliable
2020-10-28 15:21:23 +01:00
IvanaH8
087c763d41 adding roles to services 2020-10-28 11:16:03 +01:00
Erik Sundell
352526c36a Merge pull request #3226 from xlotlu/patch-1
Fix typo in documentation
2020-10-28 08:09:11 +01:00
Ionuț Ciocîrlan
cbbed04eed fix typo 2020-10-28 03:00:31 +02:00
Christine Banek
b2e7b474ff Allow options_from_form to be configurable 2020-10-27 12:11:48 -07:00
Erik Sundell
b2756fb18c Retry on >=500 errors on hub to proxy REST API reqeusts 2020-10-27 16:53:53 +01:00
Erik Sundell
37b88029e4 Revert improved logging attempt 2020-10-27 16:28:56 +01:00
Erik Sundell
4b7413184e Adjust hub to proxy REST API requests' timeouts 2020-10-27 16:23:40 +01:00
Min RK
41ef0da180 Merge pull request #3219 from elgalu/patch-3
Fix #2284 must be sent from authorization page
2020-10-27 15:41:05 +01:00
Erik Sundell
a4a8b3fa2c Fix scope mistake 2020-10-27 13:38:34 +01:00
Erik Sundell
02e5984f34 Let API requests to CHP retry on 429,500,503,504 as well 2020-10-27 12:52:14 +01:00
0mar
dece64d248 Separated scope from other decorators 2020-10-27 09:43:43 +01:00
Erik Sundell
b91c5a489c Rely on HTTPError over pycurl assumed CurlError 2020-10-26 20:39:20 +01:00
Erik Sundell
c47c3b2f9e Make api_request to CHP's REST API more reliable 2020-10-25 02:35:36 +01:00
Min RK
eaa1353dcd typos in use of partition 2020-10-23 14:16:46 +02:00
Leo Gallucci
b9a3b0a66a Fix #2284 must be sent from authorization pageUpdate jupyterhub/apihandlers/auth.py
Co-authored-by: Min RK <benjaminrk@gmail.com>
2020-10-22 11:36:15 +02:00
Leo Gallucci
929b805fae Fix #2284 must be sent from authorization page
Fix #2284 Authorization form must be sent from authorization page
2020-10-21 17:57:14 +02:00
IvanaH8
4142dc1bc0 update to roles utils 2020-10-21 16:36:50 +02:00
IvanaH8
ced80f9e6b removing rest-api.yml changes 2020-10-20 08:11:42 +02:00
IvanaH8
10a1280f84 Include latest changes from master 2020-10-20 08:03:15 +02:00
IvanaH8
f1ed74bae1 creating roles module 2020-10-19 19:57:55 +02:00
IvanaH8
ff38a9e383 scope schema definitions for rest-api 2020-10-19 19:50:46 +02:00
0mar
b6fa353201 Implemented scope-based access in API handlers 2020-10-19 13:09:26 +02:00
Min RK
082f6516a1 1.2.0b1 2020-10-16 10:14:32 +02:00
Erik Sundell
1aa21f1d6c Merge pull request #3192 from consideRatio/pr/changelog-for-1.2.0b1
changelog for 1.2.0b1
2020-10-15 15:30:30 +02:00
Erik Sundell
cec9702796 changelog for 1.2.0b1 updated 2020-10-15 14:56:43 +02:00
Erik Sundell
f8cbda9c3c Merge pull request #3208 from minrk/traitlets-list-allow-none
avoid specifying default_value=None in Command traits
2020-10-15 14:47:36 +02:00
Min RK
71aee05bc0 use /api/status to test server
workaround 404 issue with /api/spec.yaml in jupyter-server 1.0.4
2020-10-15 13:23:02 +02:00
Erik Sundell
772de55a0d Merge pull request #3209 from minrk/rtd-docs
stop building docs on circleci
2020-10-15 12:14:40 +02:00
Min RK
e6f92238b1 stop building docs on circleci
RTD CI is enabled now
2020-10-15 11:41:11 +02:00
Min RK
db76b52e35 avoid specifying default_value=None in Command traits
causes issues with traitlets dev where 'unspecified' should be Undefined, not specified-None

Best to leave it out if it's really unspecified
2020-10-15 11:38:08 +02:00
Min RK
e6e994e843 add changelog highlights for 1.2.0 2020-10-15 11:01:26 +02:00
Min RK
284e379341 Merge pull request #3204 from kreuzert/exponential_backoff_overflow_exception
Prevent OverflowErrors in exponential_backoff()
2020-10-15 10:39:28 +02:00
Erik Sundell
3ce1cc63af Merge pull request #3207 from kinow/patch-2
[docs] Remove duplicate line in changelog for 1.1.0
2020-10-15 00:34:56 +02:00
Bruno P. Kinoshita
9945a7f7be Update changelog.md
Remove duplicate changelog from 1.1.0
2020-10-15 09:59:04 +13:00
Tim Kreuzer
004c964cc1 Update utils.py 2020-10-13 10:37:31 +02:00
Tim Kreuzer
0f0d6d12d3 Update jupyterhub/utils.py
Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2020-10-13 10:30:05 +02:00
Tim Kreuzer
c97e4d4e2f Update utils.py
Prevent exponential_backoff() to crash with an Vverflow Error
2020-10-12 17:25:25 +02:00
IvanaH8
a220899bf9 fix for scope names in rest-api.yml 2020-10-08 13:49:04 +02:00
Erik Sundell
53d496aff5 changelog for 1.2.0b1 2020-10-04 07:04:42 +02:00
Min RK
032ae29066 Merge pull request #3184 from rainwoodman/patch-1
Mention the PAM pitfall on fedora.
2020-10-02 10:50:17 +02:00
Yu Feng
21caa57e7b remove sshauthenticator reference. 2020-10-01 09:13:37 -07:00
Yu Feng
37ee104afa Update docs/source/reference/config-sudo.md
Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2020-10-01 09:11:15 -07:00
Erik Sundell
dac75ff996 Merge pull request #3019 from stv0g/remove-unused-imports
Remove unused imports
2020-10-01 13:17:36 +02:00
Erik Sundell
67e06e5a18 Fix order of imports 2020-10-01 12:44:51 +02:00
Erik Sundell
4cbc0bad34 Merge branch 'master' into remove-unused-imports 2020-10-01 12:07:37 +02:00
Erik Sundell
9f8c1decc4 Merge pull request #2891 from rajat404/auto-gen-docs
Generate prometheus metrics docs
2020-10-01 11:40:05 +02:00
Erik Sundell
1244533387 Merge pull request #3185 from rainwoodman/patch-2
Add SELinux configuration for nginx
2020-10-01 11:15:32 +02:00
Erik Sundell
8c30724f17 monitoring docs: fixes following monitoring section relocation 2020-10-01 10:45:11 +02:00
Erik Sundell
50868f5bb5 monitoring docs: relocate monitoring section under technical reference 2020-10-01 10:36:19 +02:00
Erik Sundell
e15b6ad52e Makefile: let make html depend on generated metrics.rst 2020-10-01 10:13:31 +02:00
Rajat Goyal
b194135a0f Generate list of prometheus metrics in reStructuredText rather than markdown 2020-09-30 23:52:29 +05:30
Rajat Goyal
5b8a7fd191 Remove unused dependency 2020-09-30 23:25:22 +05:30
Rajat Goyal
be272ffb2a Formatted text for better readability 2020-09-30 23:14:21 +05:30
Rajat Goyal
8ee60ce0c7 Add metrics documentation generation step in CircleCI & RTD configs
Also rename generated metrics documentation directory `_gen` from `gen`
2020-09-30 22:57:46 +05:30
Rajat Goyal
e553bcb7e2 Unpin dependencies from their patch versions 2020-09-30 22:08:50 +05:30
Rajat Goyal
c0288ec6f6 Update docs/source/monitoring/index.rst
- Fixes typo (eolving -> evolving)
- re-use the word current instead of momentary for comprehensibility
- references JupyterHubs current state with its instead of the for comprehensibility

Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2020-09-30 22:08:50 +05:30
Rajat Goyal
65b83f5f00 Update docs/source/monitoring/index.rst
Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2020-09-30 22:08:50 +05:30
Rajat Goyal
dcd520179c Made changes in monitoring docs as per the feedback on PR review 2020-09-30 22:08:50 +05:30
Rajat Goyal
c830d964d5 Apply suggestions from code review
Co-authored-by: Min RK <benjaminrk@gmail.com>
2020-09-30 22:08:50 +05:30
rajat404
9e5993f1da Docs: Fix typo; Add generate task as sub-task in html 2020-09-30 22:08:50 +05:30
rajat404
7ed3e0506b Extract doc generation logic in separate method 2020-09-30 22:08:50 +05:30
rajat404
7045e1116c Inspect metrics and generate metric list in docs; Add monitoring section in Docs 2020-09-30 22:08:50 +05:30
Yu Feng
fb56fd406f Add SELinux configuration for nginx
On a Fedora workstation these steps are needed.
2020-09-22 22:08:42 -07:00
Yu Feng
5489395272 Mention the PAM pitfall on fedora. 2020-09-22 21:51:08 -07:00
Yuvi Panda
6ecda96dd6 Merge pull request #3174 from AngelOnFira/upgrade-jquery-dep
Upgraded Jquery dep
2020-09-17 22:42:26 +05:30
Min RK
30b8bc3664 add ?state= filter for GET /users
allows selecting users based on the 'ready' 'active' or 'inactive' states of their servers

- ready: users who have any servers in the 'ready' state
- active: users who have any servers in the 'active' state (i.e. ready OR pending)
- inactive: users who have *no* servers in the 'active' state (inactive + active = all users, no overlap)

Does not change the user model, so a user with *any* ready servers will still return all their servers
2020-09-17 12:31:16 +02:00
Forest Anderson
80ad455fc7 Upgraded jquery dep 2020-09-14 13:01:27 -04:00
IvanaH8
3d7e4458fc correction of scope for GET /authorizations/token/{token} 2020-09-11 11:07:03 +02:00
IvanaH8
f1940c7c61 added read:all scope (whoami) to GET /authorizations/token/{token} 2020-09-09 15:12:06 +02:00
IvanaH8
eac2e75fe4 adding scopes on operational level for API endpoints 2020-09-09 10:38:00 +02:00
Min RK
21eaf0dd9f Merge pull request #3077 from kinow/add-config-reference
Add Configuration Reference section to docs
2020-09-08 16:40:10 +02:00
Min RK
84d2524025 jupyterhub_config.py filename typo 2020-09-08 16:39:51 +02:00
Min RK
959dfb145a Merge pull request #3121 from rkdarst/clear-state-after-post-stop-hook
jupyterhub/user: clear spawner state after post_stop_hook
2020-09-08 16:38:18 +02:00
Min RK
998c18df42 Merge pull request #3133 from ideonate/master
Allow JupyterHub.default_url to be a callable
2020-09-08 16:36:52 +02:00
Richard Darst
88b10aa2f5 jupyterhub/user: Remember to save the state in the database 2020-09-08 13:48:27 +03:00
Dan Lester
d8f5758e08 Fix rst in default_url docstring 2020-09-08 09:55:03 +01:00
Min RK
47e45a4d3f Merge pull request #3136 from pabepadu/add_footer_block
Add a footer block + wrap the admin footer in this block
2020-09-08 09:38:21 +02:00
Min RK
3e31ff4ac7 Merge pull request #3160 from rcthomas/control-service-display
Control service display
2020-09-08 09:37:12 +02:00
Min RK
ff30396a8e Merge pull request #3028 from possiblyMikeB/ui-feedback-onsubmit
UI Feedback on Submit
2020-09-08 09:36:39 +02:00
Min RK
196a7fbc65 Merge pull request #3072 from minrk/purge-expired
synchronize implementation of expiring values
2020-09-08 09:35:25 +02:00
IvanaH8
14ed312414 adding security definition (with scopes) for oauth 2020-09-07 16:44:18 +02:00
Richard Darst
c66e8bb4c9 jupyterhub/user: remuve extraneous = {}
- Thanks to review from @minrk
2020-09-07 17:21:23 +03:00
Min RK
5595146fe2 Merge pull request #3147 from jgwerner/fix/api-request-error
Get error description from error key vs error_description key
2020-09-07 16:18:21 +02:00
Min RK
76b688e574 Merge pull request #3137 from lydian/sort_on_spawner_last_activity
admin page sorts on spawner last_activity instead of user last_activity
2020-09-07 16:14:12 +02:00
Min RK
f00d0be4d6 Merge pull request #3156 from manics/docker-py38
Update Dockerfile to ubuntu:focal (Python 3.8)
2020-09-07 16:13:18 +02:00
Min RK
f9d815676f verify static files in docker tests 2020-09-07 16:06:48 +02:00
Min RK
94612d09a6 build wheel with setup.py bdist_wheel
pip wheel from scratch may not include files generated during build
2020-09-07 15:03:13 +02:00
Dan Lester
76ed65ed82 default_url takes handler object instead of user 2020-08-31 18:36:57 +01:00
Greg
560bab395b update based on pr suggestion
Signed-off-by: Greg <werner.greg@gmail.com>
2020-08-27 11:16:57 -04:00
Greg
c68b846eef get error key or error_description key if not available
Signed-off-by: Greg <werner.greg@gmail.com>
2020-08-27 11:12:18 -04:00
Greg
5896b2c9f7 get error description from error key vs error_description key
Signed-off-by: Greg <werner.greg@gmail.com>
2020-08-27 11:12:18 -04:00
Min RK
0317fd63fa Merge pull request #3103 from kinow/responsive-issues
Hide hamburger button menu in mobile/responsive mode and fix other minor issues
2020-08-27 11:15:50 +02:00
Min RK
7f6886c60f Merge pull request #3104 from cmd-ntrf/rest-api-version
Update version in docs/rest-api.yaml
2020-08-27 11:00:14 +02:00
Min RK
10bdca8901 Merge pull request #3142 from snickell/document-external-service-api-tokens-better
Document external service api_tokens better
2020-08-27 09:52:31 +02:00
Min RK
66cb2c0f3e Merge pull request #3128 from minrk/mix-it-in
Implement singleuser with mixins
2020-08-27 09:51:19 +02:00
Min RK
0152e29946 Merge pull request #3159 from synchronizing/patch-1
Added extra documentation for endpoint /users/{name}/servers/{server_name}.
2020-08-27 09:51:01 +02:00
Min RK
c6f0c07931 Merge pull request #3157 from manics/python-traitlets-latest
Don't allow 'python:3.8 + master dependencies' to fail
2020-08-27 09:45:50 +02:00
Min RK
51ceab9f6f Merge pull request #3149 from betatim/simplifiy-health-checks
Simplify code of the health check handler
2020-08-27 09:44:02 +02:00
Rollin Thomas
46ead8cd9d Add display variable to tests 2020-08-26 21:43:16 -07:00
Rollin Thomas
bfb3d50936 Reformat! 2020-08-26 21:29:28 -07:00
Rollin Thomas
962307475e Add service display to service API model 2020-08-26 19:15:21 -07:00
Rollin Thomas
80f4edcd20 Omit service if it is not OK to display 2020-08-26 18:57:17 -07:00
Rollin Thomas
1ad4035943 Control whether service is listed in UI or not 2020-08-26 18:56:03 -07:00
Felipe Faria
5ab735fea3 Added extra documentation for endpoint /users/{name}/servers/{server_name}. 2020-08-26 19:07:57 -04:00
Simon Li
e79cb0d376 Don't allow 'python:3.8 + master dependencies' to fail 2020-08-26 22:40:57 +01:00
Simon Li
f728cf89c6 Update Dockerfile to ubuntu:focal (Python 3.8) 2020-08-26 22:24:14 +01:00
Tim Head
8f719e21d2 Simplify code of the health check handler 2020-08-26 14:07:30 +02:00
Min RK
29de00ee3c Merge pull request #3140 from chancez/fix_ssl_http_client_master
jupyterhub/utils: Load system default CA certificates in make_ssl_context
2020-08-26 14:05:29 +02:00
Chance Zibolski
52291b0012 jupyterhub/utils: Load system default CA certificates in make_ssl_context
Fixes issues with OAuth flows when internal_ssl is enabled.
When internal_ssl was enabled requests to non-internal endpoints failed
because the system CAs were not being loaded.

This caused failures with public OAuth providers with public CAs since
they would fail to validate.
2020-08-25 09:09:58 -07:00
Georgiana Elena
e58c341290 Merge pull request #3150 from yhal-nesi/master
update prometheus metrics for server spawn when it fails with exception
2020-08-22 00:01:53 +03:00
yhal-nesi
f988a4939e Update jupyterhub/handlers/base.py
Ah makes sense, I was wandering why the tests fail.

Co-authored-by: Georgiana Elena <georgiana.dolocan@gmail.com>
2020-08-22 08:47:15 +12:00
Yuriy Halytskyy
60ee2bfc35 update prometheus metrics for server spawn when it fails with exception 2020-08-20 08:18:39 +12:00
Erik Sundell
42601c52cc Merge pull request #3151 from consideRatio/docs/move-cert-docstring
docs: please docs linter (move_cert docstring)
2020-08-19 14:10:54 +02:00
Erik Sundell
0679586b2c docs: please docs linter properly
We are users of the napoleon sphinx extension, which helps us parse our
Google Style Python Docstrings, and its syntax suggest we should use
indentation when we use more then one string for an entry in an
Arguments: or Returns: list.

For more details, see: https://github.com/jupyterhub/jupyterhub/pull/3151#issuecomment-676186565
2020-08-19 13:49:28 +02:00
Erik Sundell
be4201f7ee docs: please docs linter (move_cert docstring) 2020-08-19 13:14:46 +02:00
Min RK
11a73b5630 Merge pull request #3131 from rkevin-arch/healthcheck-head-request
Allow head requests for the health endpoint
2020-08-18 10:57:09 +02:00
Tim Head
f1efac41bf Merge pull request #3143 from basvandervlies/apache_reverse_proxy_doc
Needed NoEsacpe (NE)  option for apache
2020-08-14 14:54:23 +02:00
Bas van der Vlies
aa6921dd5a Needed NoEsacpe (NE) option for apache
Else %20 is esacped to %25%20 and we acan not rename "Untitled Folder'
or opening files with spaces or other special chars fails.
2020-08-14 11:24:27 +02:00
Seth Nickell
e94da17c3c Document external service api_tokens better
- Explicitly mention min-8-char constraint
- Connect the api_token in the configuration with the one mentioned in auth requests

Co-authored-by: Mike Situ <msitu@ceresimaging.net>
2020-08-13 12:28:17 -10:00
Min RK
e2ee18fa86 Merge pull request #3123 from alexweav/tornado-py38
app.py: Work around incompatibility between Tornado 6 and asyncio proactor event loop in python 3.8 on Windows
2020-08-10 09:18:24 +02:00
Lydian Lee
c5ec8ceba3 admin page sorts on spawner last_activity instead of user last_activity 2020-08-07 16:37:47 -07:00
pabepadu
3458c742cb Add a footer block + wrap the admin footer in this block 2020-08-07 02:19:21 +02:00
Georgiana Elena
d1a85e53dc Merge pull request #3132 from pabepadu/fix_services_dropdown_in_admin_page
Fix the services dropdown on the admin page
2020-08-07 00:13:37 +03:00
Dan Lester
d915cc3ff2 Allow JupyterHub.default_url to be a callable based on user 2020-08-05 11:59:25 +01:00
Georgiana Elena
b11c02c6e0 Merge pull request #3118 from minrk/tag-from-singleuser
only build tagged versions on docker tags
2020-08-05 12:44:23 +03:00
pabepadu
49f3bb53f4 Fix the services dropdown in the admin page 2020-08-05 05:29:21 +02:00
rkevin
9b7a94046b Allow head requests for the health endpoint 2020-08-03 00:20:17 -07:00
Min RK
62ef5ca2fe test with /api/spec.yaml
because /api/status is currently broken in jupyter_server
2020-07-31 12:44:42 +02:00
Min RK
028e0b0b77 include JUPYTERHUB_SINGLEUSER_APP in env_keep
since the child process is the one that inherits it anyway
2020-07-31 12:12:38 +02:00
Min RK
d2a42a69b0 simplify app mixin
get handler classes from instance attributes, rather than arguments

simplifies API
2020-07-31 12:12:11 +02:00
Min RK
1f21f283df Merge pull request #3127 from mriedem/3126-slow-spawn-timeout-warning
Don't log a warning when slow_spawn_timeout is disabled
2020-07-31 12:07:38 +02:00
Alex Weaver
7f35158575 Also apply patch before creating new event loop in atexit, just in case 2020-07-29 11:03:05 -05:00
Min RK
d0da677813 infer default mixins from $JUPYTERHUB_SINGLEUSER_APP
set to e.g. JUPYTERHUB_SINGLEUSER_APP=jupyterlab.labapp.LabApp for JupyterLab
2020-07-24 13:06:35 +02:00
Min RK
a0a02688c5 create singleuser app with mixins
for easier reuse with jupyter_server

mixins have a lot of assumptions about the NotebookApp structure.
Need to make sure these are met by jupyter_server (that's what tests are for!)
2020-07-24 12:57:05 +02:00
Min RK
2372842b8a Merge remote-tracking branch 'origin/master' into mix-it-in
# Conflicts:
#	.travis.yml
2020-07-24 09:53:02 +02:00
Matt Riedemann
7e205a9751 Don't log a warning when slow_spawn_timeout is disabled
When using the `KubeSpawner` it is typical to disable the
`slow_spawn_timeout` by setting it to 0. `zero-to-jupyterhub-k8s`
does this by default [1]. However, this causes an immediate `TimeoutError`
which gets logged as a warning like this:

>User hub-stress-test-123 is slow to start (timeout=0)

This avoids the warning by checking the value and if disabled simply
returns without logging the warning.

[1] https://github.com/jupyterhub/zero-to-jupyterhub-k8s/commit/b4738edc5

Closes #3126
2020-07-23 16:09:19 -05:00
Alex Weaver
e7fab5c304 Format and lint 2020-07-22 15:16:11 -05:00
Alex Weaver
8b8b512d06 Apply asyncio patch 2020-07-22 15:04:16 -05:00
Richard Darst
714072dbd8 jupyterhub/user: clear spawner state after post_stop_hook
- Related issue: #3120.  Closes: #3120.

- I realized that spawner.clear_state() is called before
  spawner.post_stop_hook().  This caused was a bit surprising to me,
  and caused some issues.

- I tried the naive strategy of moving clear_state to later and
  setting the orm_state to `{}` at the point where it used to be
  clear.

- This tries to maintain the exception behavior of clear_state and
  post_stop_hook, but is exactly identical.

- To review:

  - I'm not sure this is a good idea!

  - Carefully consider the implications of this.  I am not at all sure
    about unintended side-effects or what intended semantics are.
2020-07-22 10:06:21 +03:00
Min RK
6e8f39c22d only build tagged versions on docker tags
instead of building 'stable' from master
2020-07-20 10:14:35 +02:00
Erik Sundell
f3c3225124 Merge pull request #3114 from yuvipanda/no-cull-idle
Remove idle culler example
2020-07-14 17:03:12 +02:00
Georgiana Elena
614bfe77d8 Update examples/cull-idle/README.md 2020-07-14 14:22:51 +03:00
YuviPanda
1beea06ce5 Remove idle culler example
Has been moved to its own repo.

See https://github.com/jupyterhub/the-littlest-jupyterhub/pull/559
for more info
2020-07-12 17:14:14 +05:30
Erik Sundell
42adb44153 Merge pull request #3111 from mriedem/log-slow-stop-timeout
Log slow_stop_timeout when hit like slow_spawn_timeout
2020-07-11 02:56:13 +02:00
Matt Riedemann
d5a0202106 Log slow_stop_timeout when hit like slow_spawn_timeout
When `slow_spawn_timeout` is hit the configured timeout value
gets logged [1]. This does the same thing when `slow_stop_timeout`
is hit.

[1] https://github.com/jupyterhub/jupyterhub/blob/1.1.0/jupyterhub/handlers/base.py#L947
2020-07-10 11:38:26 -05:00
Georgiana Elena
3d524f2092 Merge pull request #3109 from kxiao-fn/proper_named_server_deletion
fix for stopping named server deleting default server and tests
2020-07-07 15:41:43 +03:00
Katherine Xiao
409835303e formatting 2020-07-06 17:45:08 -07:00
Katherine Xiao
acc8d15fec fixed test 2020-07-06 17:23:42 -07:00
Katherine Xiao
608cad6404 fix in base.py 2020-07-06 12:53:50 -07:00
Katherine Xiao
571a428375 fix deletion of default server when stopping named server and added corresponding test 2020-07-06 12:48:41 -07:00
Chris Holdgraf
1575adf272 Merge pull request #3107 from consideRatio/docs-logo-rem-unused-stuff
docs: unsqueeze logo, remove unused CSS and templates
2020-07-06 08:00:14 -07:00
Erik Sundell
4bc6d869f3 docs: unsqueeze logo, remove unused CSS and templates 2020-07-05 03:12:18 +02:00
Min RK
e5a6119505 Merge pull request #3090 from minrk/words-matter 2020-07-03 12:27:08 +02:00
Félix-Antoine Fortin
d80dab284d Update version in docs/rest-api.yaml 2020-06-30 08:59:29 -04:00
Bruno P. Kinoshita
9d556728bb Add padding for the span with user name and logout button (responsive mode only) 2020-06-25 23:31:54 +12:00
Bruno P. Kinoshita
4369e2cbfa Adjust jupyterhub logo margin-left in responsive mode 2020-06-25 23:31:54 +12:00
Bruno P. Kinoshita
ef4455bb67 Closes #2182 display hamburger menu only if user variable is present (in responsive mode) 2020-06-25 23:31:54 +12:00
Min RK
76c9111d80 Merge pull request #3089 from kinow/redirect-with-parameters 2020-06-25 11:08:17 +02:00
Bruno P. Kinoshita
946ed844c5 Update jupyterhub/handlers/base.py
Co-authored-by: Min RK <benjaminrk@gmail.com>
2020-06-25 19:41:46 +12:00
Min RK
cceb652039 TODO is TODONE
Co-authored-by: Georgiana Elena <georgiana.dolocan@gmail.com>
2020-06-24 20:19:44 +02:00
Min RK
6e988bf587 call it allowed_users
be clearer since it's users vs groups, etc.
2020-06-24 13:29:42 +02:00
Simon Li
dbc6998375 Merge pull request #3102 from minrk/unpin-telemetry
loosen jupyter-telemetry pin
2020-06-23 14:18:40 +01:00
Bruno P. Kinoshita
1bdc9aa297 Escape/encode parameters with the next URL, add more tests 2020-06-24 00:18:55 +12:00
Bruno P. Kinoshita
73f1211286 Update append_query_parameters to have exclude=["none"] by default,
and avoid using dicts with url_concat, to have consistent tests
as otherwise in Python 3.5 the generated URL's could have parameters
in random order.
2020-06-23 22:06:57 +12:00
Min RK
3fece09dda loosen jupyter-telemetry pin
we don't want strict pinning in package dependencies
2020-06-23 10:13:31 +02:00
Min RK
7ad4b0c7cb update allowed/blocked language in docs
our words matter, let's be more mindful
2020-06-23 10:10:07 +02:00
Min RK
252015f50d Merge pull request #3071 from minrk/userdict-get 2020-06-23 10:03:13 +02:00
Min RK
b3cc235c8a Merge pull request #3087 from fcollonval/patch-1 2020-06-23 10:02:34 +02:00
Min RK
47d7af8f48 Merge pull request #3100 from mriedem/remove-old-print 2020-06-23 09:58:00 +02:00
Matt Riedemann
8528684dc4 Remove old context-less print statement
This was added in PR #2721 and by default results in just printing
out "10" without any context when starting the hub service. This
simply removes the orphan print statement.

I'm open to changing this to a debug log statement with context if
someone finds that useful, e.g.:

`self.log.debug('Effective init_spawners_timeout: %s', init_spawners_timeout)`
2020-06-22 15:35:15 -05:00
Bruno P. Kinoshita
d4ce3aa731 Add unit tests 2020-06-20 22:51:16 +12:00
Min RK
ec710f4d90 test subclass priority when overriding old methods 2020-06-18 11:50:44 +02:00
Bruno P. Kinoshita
14378f4cc2 Include the query string parameters when redirecting to a new URL 2020-06-17 22:37:20 +12:00
Min RK
cc8e780653 rename white/blacklist allowed/blocked
- group_whitelist -> allowed_groups

still todo: handle deprecated signatures in check_whitelist methods while preserving subclass overrides
2020-06-15 14:40:44 +02:00
Frédéric Collonval
5bbf584cb7 Make delete_invalid_users configurable 2020-06-13 15:58:46 +02:00
Erik Sundell
b5defabf49 Merge pull request #3086 from manics/sshspawner
Replace zonca/remotespawner with NERSC/sshspawner
2020-06-13 14:05:05 +02:00
Simon Li
2d1f91e527 Replace zonca/remotespawner with NERSC/sshspawner
https://github.com/zonca/remotespawner is archived, the readme recommends https://github.com/jupyterhub/batchspawner
2020-06-13 11:47:34 +01:00
Tim Head
1653ee77ed Merge pull request #3084 from elgalu/patch-2
Remove already done named servers from roadmap
2020-06-13 09:55:26 +02:00
Leo Gallucci
10f09f4f70 Remove already done named servers from roadmap
Remove already done "UI for managing named servers" from the roadmap
2020-06-12 18:00:00 +02:00
Min RK
b7f277147b Merge pull request #3057 from GeorgianaElena/add_config_warn 2020-06-12 17:21:26 +02:00
Min RK
f3be735eeb Merge pull request #3082 from ChameleonCloud/fix-missing-static-files 2020-06-12 17:19:35 +02:00
Georgiana Elena
3e855eb1be Merge pull request #3083 from minrk/docker-demo-build
build jupyterhub/jupyterhub-demo image on docker hub
2020-06-12 12:10:27 +03:00
Min RK
98dc1f71db build jupyterhub/jupyterhub-demo image on docker hub 2020-06-12 10:03:34 +02:00
Jason Anderson
703703a648 Ensure client dependencies build before wheel
Bug #2852 describes an issue where templates cannot be found by
JupyterHub when using the Docker images built out of this repo. The
issue turned out to be due to missing node_modules at the time of build.

There is a hook in the `package.json` that causes node_modules to be
copied to the static/components directory post-install. If this is not
run, those components are not in the static directory and thus are not
included in the wheel when it is built.

Fix #2905 fixed one problem--the `bower-lite` hook script wasn't copied
to the Docker image, and so the hook couldn't run, but the other issue
is that the client dependencies are never explicitly built. They must be
built prior to the wheel build, and the hook script must have run so
they are copied to the ./static folder, which is included in the wheel
build thanks to [MANIFEST.in][1]

.. note::

   This removes the verbose flag from the wheel build command. The
   reason is that it generates a lot of writes to stdout. It seems that
   wheel can (or always) is switching to non-blocking mode, which can cause
   EAGAIN to be raised, which leads to fun errors like:

     BlockingIOError(.., 'write could not complete without blocking', ..)

   The wheels fail to build if this error is raised. Removing the verbosity
   flag is a quick solution (it drastically reduces writes to STDOUT), but
   comes at the cost of more trouble debugging a failed wheel build. Adding
   the "-v" back in the Dockerfile when debugging a build failure is still
   possible. [Credit: @vbraun][2]

.. note::

   This commit also removes some extraneous COPY operations during the
   Docker build, in particular the /src/jupyterhub/share directory is
   not used unless users have explicitly override their
   jupyterhub_config.py to include it somehow. If the default
   data_files_path behavior is used, JupyterHub should find the proper
   static directory when the application loads.

Fixes: #2852

[1]: https://packaging.python.org/guides/using-manifest-in/
[2]:
https://github.com/travis-ci/travis-ci/issues/4704#issuecomment-348435959
2020-06-11 15:15:56 -05:00
Yuvi Panda
8db8df6d7a Merge pull request #3081 from minrk/env-config-priority 2020-06-11 18:23:37 +05:30
Min RK
744430ba76 Merge pull request #3059 from GeorgianaElena/jh-demo-img 2020-06-11 10:45:01 +02:00
Min RK
45b858c5af Merge pull request #3055 from minrk/document-admin-service 2020-06-11 10:43:23 +02:00
Min RK
d4b5373c05 synchronize implementation of expiring values
- base Expiring class
- ensures expiring values (OAuthCode, OAuthAccessToken, APIToken) are not returned from `find`
- all expire appropriately via purge_expired
2020-06-11 10:40:06 +02:00
Min RK
aba55cc093 implement UserDict.get
behaves more like one would expect (same as try get-key, except: return default)
without relying on cache presence or underlying key type (integer only)
2020-06-11 10:32:55 +02:00
Min RK
5957a37933 Merge pull request #3079 from manics/allow_fail-masterdeps 2020-06-11 10:31:19 +02:00
Min RK
d20a33a0e4 Merge pull request #3078 from gatoniel/patch-1 2020-06-11 10:30:21 +02:00
Min RK
df35268bfe make Spawner.environment config highest priority
so that it can override 'default' env variables like JUPYTERHUB_API_URL

use with caution!
2020-06-11 09:45:18 +02:00
Simon Li
c357d02b56 Allow python:3.8 + master dependencies to fail
Follow-up from https://github.com/jupyterhub/jupyterhub/pull/3076
2020-06-10 14:53:58 +01:00
niklas netter
4eb22821f2 no_proxy does work 2020-06-10 14:51:37 +02:00
niklas netter
b92ea54eda proxy settings might cause authentication errors 2020-06-10 14:16:36 +02:00
Bruno P. Kinoshita
522ef3daea Add Configuration Reference 2020-06-08 23:49:31 +12:00
Tim Head
77edffd695 Merge pull request #3076 from Carreau/traitlets-master
Test with some master dependencies.
2020-06-07 09:33:23 +02:00
Matthias Bussonnier
a8bc4f8a4a Test with some master dependencies.
This does some of the test with the latest traitlets.
We are looking into making a 5.0 release and would like to have some
confidence that it does not break too many things.
2020-06-05 15:05:10 -07:00
Georgiana Elena
66c3760b02 Update jupyterhub/app.py
Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2020-06-03 14:30:51 +03:00
Erik Sundell
fd28e224f2 Merge pull request #3067 from Zsailer/telemetry-dependency
pin jupyter_telemetry dependency
2020-06-01 23:03:30 +02:00
Zsailer
da3fedb5aa pin jupyter_telemetry dependency 2020-06-01 12:41:22 -07:00
GeorgianaElena
e4e4d472b8 Add JupyterHub Demo docker image 2020-05-28 17:35:42 +03:00
GeorgianaElena
bcbc68dd82 Warn if both bind_url and ip/port/base_url are set 2020-05-27 21:05:01 +03:00
Simon Li
c7df0587d2 Merge pull request #3056 from GeorgianaElena/remove_issue_templates
Use the issue templates from the central repo
2020-05-26 15:56:11 +01:00
GeorgianaElena
cd36733858 Remove the issue templates so that the ones from the central repo jupyterhub/.github take effect 2020-05-26 14:49:36 +03:00
Min RK
6bf4f3b2aa document upgrading from api_tokens to services config 2020-05-26 13:40:21 +02:00
Simon Li
12d81ac07a Merge pull request #3054 from jtpio/black-github-link
Update links to the black GitHub repository
2020-05-25 18:49:27 +01:00
Jeremy Tuloup
d60fa9a400 Update links to the black GitHub repository 2020-05-25 16:10:08 +02:00
Min RK
81d423d6c6 Merge pull request #3040 from romainx/#1018 2020-05-19 15:06:37 +02:00
Min RK
069b477ff3 Merge pull request #3013 from twalcari/feature/spawn_query_arguments 2020-05-19 15:06:17 +02:00
Min RK
cf9046ea47 Merge pull request #3046 from ceocoder/patch-1 2020-05-19 14:58:14 +02:00
Min RK
71a25d4514 Merge pull request #3042 from rabsr/2925_start_my_server_fails 2020-05-19 14:57:44 +02:00
Tim Head
2ff7d05b15 Merge pull request #3047 from consideRatio/health-endpoint-debug-log 2020-05-15 14:39:08 +02:00
Tim Head
bdb29df82a Merge pull request #3048 from mhwasil/disable-proxy-buffering 2020-05-15 14:38:28 +02:00
Mohammad Wasil
0dbad9bd99 Disable proxy_buffering to make the progress bar working when using nginx reverse proxy 2020-05-15 13:51:50 +02:00
Erik Sundell
2991d2d1f1 Log successful /health requests on the debug level
They are less relevant than other request and could very well end up
cluttering the logs. It is not uncomming for these requests to be made
every second or every other second.
2020-05-15 11:48:48 +02:00
dp
a36a56b4ff docs: add proxy_http_version 1.1
add proxy_http_version 1.1 as it is required for KeepAlive connections
2020-05-14 16:16:07 -07:00
romainx
0e59ab003a Readme updated according to review 2020-05-11 14:54:32 +02:00
ragar64
d67b71b7ae " #2925 : Changing start my server button link to spawn url once server is stopped" 2020-05-08 21:47:41 +05:30
romainx
8859bf8842 #1018 PAM added in prerequisites 2020-05-08 06:06:42 +02:00
Thijs Walcarius
4e29342711 Test error path when parsing query arguments 2020-05-06 11:27:04 +02:00
Min RK
8a3790b01f Adding pagination in the admin panel (#2929)
Adding pagination in the admin panel
2020-05-06 11:09:54 +02:00
Min RK
0d245fe4e4 move pagination info next to pagination links
at the bottom
2020-05-06 10:47:08 +02:00
Min RK
da34c6cb34 remove hardcoded path from pagination links
allows pagination of other pages
2020-05-06 10:44:53 +02:00
Min RK
9c0e5ba9c2 Merge pull request #2971 from mriedem/issues/2970-singleuser-version-logging
Only log hub / singleuser version mismatch once
2020-05-06 09:23:04 +02:00
Tim Head
289c3bc3c1 Merge pull request #3035 from vilhelmen/server_ver 2020-05-05 10:00:27 +02:00
Yuvi Panda
3adfec0693 Merge pull request #3020 from stv0g/ipv6-spawner-ip
Support kubespawner running on a IPv6 only cluster
2020-05-04 08:14:01 +05:30
Will Starms
137591f458 remove fixed position, causes Z ordering issues with the bottom of the users list 2020-05-01 19:09:19 -05:00
Michael Blackmon
debd297494 restrict submit handler to only operate on targeted form 2020-04-20 11:33:38 -04:00
Michael Blackmon
10bb5ef3c0 wrap button & widget in feedback-container; add js block with onsubmit handler 2020-04-20 11:00:40 -04:00
Michael Blackmon
42e7d1a3fb put submit button & widget in feedback-container; extend template to include script block with form onsubmit handler 2020-04-20 10:59:34 -04:00
Michael Blackmon
5fbd2838c9 add style class for feedback, widget and container 2020-04-20 10:39:57 -04:00
Michael Blackmon
17dde3a2a9 remove margin styling from submit button 2020-04-20 10:38:19 -04:00
Tim Head
8d50554849 Merge pull request #3022 from joshmeek/docs/index_verbage 2020-04-18 21:17:21 +02:00
Tim Head
493eb03345 Merge branch 'master' into docs/index_verbage 2020-04-18 21:04:11 +02:00
Tim Head
1beac49f4a Merge pull request #3015 from jtpio/admin-template 2020-04-18 19:01:39 +02:00
Tim Head
f230be5ede Merge branch 'master' into admin-template 2020-04-18 15:44:05 +02:00
Steffen Vogel
6283e7ec83 support kubespawner running on a IPv6 only cluster 2020-04-17 19:36:56 +02:00
Thijs Walcarius
2438766418 Show error message when spawning via query-arguments failed. Add options_from_query function 2020-04-17 16:47:55 +02:00
Thijs Walcarius
6f2e409fb9 Allow bypassing of spawn form by calling options in query arguments of /spawn 2020-04-17 16:47:55 +02:00
Carol Willing
aa459aeb39 Merge pull request #3021 from rkdarst/fix-docs
Fix docs CI test failure: duplicate object description
2020-04-17 07:35:24 -07:00
Richard Darst
9d6e8e6b6f Temporary patch autodoc-traits to fix build error [temporary]
- This commit should be removed later after autodoc-traits is fixed upstream
2020-04-17 11:43:49 +03:00
Richard Darst
e882e7954c docs: use recommonmark as an extension
- source_parsers deprecated in sphinx 3.0
- Since sphinx 1.4, it can (should) be used as a direct extension:
  https://github.com/readthedocs/recommonmark/pull/43
2020-04-17 11:11:24 +03:00
Richard Darst
c234463a67 sphinx conf.py: update add_stylesheet -> add_css_file
- Seems to be added in 1.0:
  https://www.sphinx-doc.org/en/latest/changes.html#release-1-0-jul-23-2010
2020-04-17 11:11:24 +03:00
Georgiana Elena
391320a590 Merge pull request #3025 from twalcari/patch-1
Fix broken test due to BeautifulSoup 4.9.0 behavior change
2020-04-17 11:10:25 +03:00
Thijs Walcarius
8648285375 Fix broken test due to BeautifulSoup 4.9.0 behavior change
cfr. https://bugs.launchpad.net/beautifulsoup/+bug/1871335
2020-04-17 10:00:25 +02:00
Josh Meek
485c7b72c2 Fix use of auxiliary verb on index.rst 2020-04-16 09:36:52 -04:00
Steffen Vogel
e93cc83d58 remove unused imports 2020-04-16 12:12:22 +02:00
Jeremy Tuloup
39b9f592b6 Fix user_row endblock in admin template 2020-04-08 17:22:25 +02:00
Tim Head
1f515464fe Merge pull request #3010 from GeorgianaElena/pip_for_docs
Use pip instead of conda for building the docs on RTD
2020-04-02 13:50:27 +02:00
GeorgianaElena
854d0cbb86 Add package requirements to docs build 2020-04-02 10:32:11 +03:00
GeorgianaElena
87212a7414 Remove comment referencing conda environment 2020-04-02 08:55:04 +03:00
GeorgianaElena
2338035df2 Use latest rtd docker image 2020-04-01 14:25:08 +03:00
GeorgianaElena
ea132ff88d Downgrade bootprint 2020-04-01 14:23:35 +03:00
GeorgianaElena
78c14c05f3 Switch to pip on rtd 2020-04-01 14:23:35 +03:00
Erik Sundell
1d2b36e9b0 Merge pull request #3001 from GeorgianaElena/update_issue_templates
Update issue templates
2020-03-26 19:16:40 +01:00
Georgiana Elena
a929ff84c7 Update .github/ISSUE_TEMPLATE/config.yml
Co-Authored-By: Simon Li <orpheus+devel@gmail.com>
2020-03-26 20:03:02 +02:00
GeorgianaElena
0d5bbc16cf Hide comments 2020-03-26 18:30:50 +02:00
GeorgianaElena
ee1fd5a469 Have less issue templates 2020-03-26 18:14:26 +02:00
GeorgianaElena
a702f36524 Update issue templates 2020-03-26 18:14:26 +02:00
GeorgianaElena
59edc6d369 Redirect support questions to Discourse 2020-03-26 18:14:26 +02:00
Georgiana Elena
907b77788d Merge pull request #2978 from danlester/master
SpawnHandler POST with user form options displays the spawn-pending page
2020-03-26 17:13:08 +02:00
Georgiana Elena
914a3eaba5 Merge pull request #2997 from thuvh/fix_typo_installation_guide_hard
fix docs firewall instructions
2020-03-26 16:32:09 +02:00
Hoai-Thu Vuong
b1f048f2ef fix wrong name on firewall 2020-03-24 00:03:26 +07:00
Carol Willing
53d76ad3a2 Merge pull request #2995 from jupyterhub/choldgraf-patch-1
updating docs theme
2020-03-23 08:49:26 -07:00
Chris Holdgraf
7af70b92e9 Update conf.py 2020-03-23 08:29:52 -07:00
Chris Holdgraf
3425eca4ff updating docs theme 2020-03-23 08:10:49 -07:00
Carol Willing
9e0bf9cd9f Merge pull request #2944 from minrk/one-to-one
make spawner:server relationship explicitly one to one
2020-03-22 09:22:46 -07:00
Carol Willing
3118918098 Update jupyterhub/app.py
Minor comment edit
2020-03-22 09:09:49 -07:00
Carol Willing
6a995c822c Merge pull request #2972 from mriedem/contributor-docs
Update contributor docs
2020-03-22 09:04:29 -07:00
Matt Riedemann
a09f535e8f Log hub/singleuser version mismatch once per combo
In case there are multiple singleuser notebooks at different
versions we want to log each of those mismatches as a warning
so this changes the global _version_mismatch_warning_logged flag
from a bool to a dict keyed by the hub/singleuser version mismatch
combination. A test wrinkle is added for that scenario.

Part of #2970
2020-03-16 11:10:13 -04:00
Dan Lester
a60ac53c87 black formatting 2020-03-12 12:44:34 +00:00
Min RK
d2c81bc1d0 Merge pull request #2966 from mriedem/issues/2965-doc-user-options
api-ref: document user_options for server resource
2020-03-12 13:04:25 +01:00
Dan Lester
3908c6d041 SpawnHandler POST with user form options displays the spawn-pending page just like the GET handler always did 2020-03-10 16:17:01 +00:00
Matt Riedemann
c50e1f9852 Update contributor doc wording around sqlite
sqlite3 should be available from the python standard library
so there shouldn't be a need to install native packages.
2020-03-09 15:11:45 -04:00
Matt Riedemann
6954e03bb4 Update contributor docs
As a new contributor to jupyterhub it took awhile to get
up and running locally mainly because I didn't have sqlite
installed but also because I was flipping between README,
CONTRIBUTING and the actual contributing docs which are all
a little bit different.

This does a few things:

- Updates the contributor sphinx docs to mention that how
  one chooses to isolate their development environment is
  up to them with a link to the detailed forum thread on
  that topic.
- Updates the contributor sphinx docs to mention sqlite and
  database setup in general. While in here some trailing
  whitespaces are cleaned up.
- Leave a comment in CONTRIBUTING.md about the redundant
  information in the docs on getting a development environment
  setup. Long-term we should really get those merged so there
  is a single authoritative document on how to get a dev env
  setup for contributing to jupyterhub.
- Link to the jupyterhub gitter channel for asking questions.
2020-03-04 13:09:48 -05:00
Matt Riedemann
08eee9309e Only log hub / singleuser version mismatch once
If your jupyterhub and jupyterhub-singleuser instances
are running at different minor or greater versions a
warning gets logged per active server which can be a lot
when you have hundreds of active servers.

This adds a flag to that version mismatch logging logic
such that the warning is only logged once per restart
of the hub server.

Closes issue #2970
2020-03-04 11:40:23 -05:00
Juan Cruz-Benito
6ed41b38ed Improving pagination for last pages, show always the last page 2020-03-03 14:50:06 +01:00
Matt Riedemann
6b521e0b86 api-ref: document user_options for server resource
APIHandler.server_model unconditionally returns the Spawner's
user_options dict but it wasn't mentioned in the API reference
so it's added here. The description is taken from the docstring
on Spawner.user_options.

Closes issue #2965
2020-03-02 12:12:29 -05:00
Tim Head
1bdc66c75b Merge pull request #2960 from jtpio/named-servers-enter
Start named servers by pressing the Enter key
2020-03-02 10:11:32 +01:00
Jeremy Tuloup
e30b2ca875 Remove unused variables in home.js 2020-03-02 10:02:38 +01:00
Juan Cruz-Benito
1f3ed58570 Fixing pagination numbers. We begin at page 1 not 0 2020-02-28 18:03:29 +01:00
Juan Cruz-Benito
6a31b640c1 Removing more f-strings 2020-02-28 17:56:13 +01:00
Juan Cruz-Benito
ed97150311 Fixing check 2020-02-28 17:53:54 +01:00
Juan Cruz-Benito
78eb77f157 Enforcing checks of page number 2020-02-28 17:47:12 +01:00
Juan Cruz-Benito
f152288d76 Replacing f strings 2020-02-28 17:46:50 +01:00
Juan Cruz-Benito
492c5072b7 Removing print statements 🤦‍♂️ 2020-02-28 17:31:19 +01:00
Juan Cruz-Benito
534e251f97 Adding links generation inside the Pagination class 2020-02-28 17:15:19 +01:00
Jeremy Tuloup
cfcd85a188 Start named servers by pressing the Enter key 2020-02-28 15:24:37 +01:00
Erik Sundell
fd3b5ebbad Merge pull request #2959 from jtpio/patch-1
Add .vscode to gitignore
2020-02-28 15:05:34 +01:00
Jeremy Tuloup
1a2d5913eb Add .vscode to gitignore 2020-02-28 14:55:41 +01:00
Juan Cruz-Benito
8f46d89ac0 Adding info method to pagination and related items in admin template 2020-02-28 13:19:53 +01:00
Juan Cruz-Benito
e82c06cf93 Removing display_msg and record name since it can be coded directly as they're needed in the templates 2020-02-28 12:31:53 +01:00
Juan Cruz-Benito
392525571f Documenting get_page_args method 2020-02-28 12:14:59 +01:00
Juan Cruz-Benito
53927f0490 Pre-commit fixes 2020-02-28 12:05:50 +01:00
Juan Cruz-Benito
ede71db11a Moving Pagination class to its own file 2020-02-28 12:04:53 +01:00
Juan Cruz-Benito
a2e2b1d512 As pointed out in the PR, Pagination isn't a Handler 2020-02-28 12:01:56 +01:00
Tim Head
cff18992ad Merge pull request #2953 from minrk/auth-bearer
preserve auth type when logging obfuscated auth header
2020-02-28 11:48:10 +01:00
Tim Head
b2c0b5024c Merge pull request #2956 from manics/pin-sphinx-theme
[MRG] Pin sphinx theme
2020-02-28 11:28:21 +01:00
Simon Li
996483de94 Pin sphinx theme (https://github.com/jupyterhub/binderhub/pull/1070)
Closes https://github.com/jupyterhub/jupyterhub/issues/2955
2020-02-27 17:35:52 +00:00
Min RK
f4b7b85b02 preserve auth type when logging obfuscated auth header
Authorization header has the form "<type> <credentials>"

rather than checking for "token" only, preserve type value, which could be Bearer, Basic, etc.
2020-02-27 13:49:47 +01:00
Min RK
b4391d0f79 Merge pull request #2952 from kinow/fix-spawn-url
Keep the URL fragments after spawning an application
2020-02-26 14:05:45 +01:00
Juan Cruz-Benito
f49cc1fcf0 Improving description of potential parameters 2020-02-26 10:40:44 +01:00
Juan Cruz-Benito
18205fbf4a Fixing black formatting issues 2020-02-26 10:36:36 +01:00
Bruno P. Kinoshita
2f6ea71106 Add not_running.js to modify button spawn_url 2020-02-26 09:28:12 +13:00
Juan Cruz-Benito
7b6ac158cc Removing python-paginate package and adding minimal Pagination class to enable a pagination API for AdminHandler 2020-02-25 19:11:09 +01:00
Juan Cruz-Benito
facf52f117 Removing unneeded pass of request to the template 2020-02-25 17:03:01 +01:00
Juan Cruz-Benito
f36796dd85 Merge branch 'master' into add_pagination_admin 2020-02-25 17:01:01 +01:00
Min RK
0427f8090f Merge pull request #2773 from kinow/fix-ssl-url-message
Handle the protocol when ssl is enabled and log the right URL
2020-02-25 13:35:32 +01:00
Tim Head
da86eaad97 Merge pull request #2951 from kinow/typos-2
[doc] Fix couple typos in the documentation
2020-02-24 09:21:31 +01:00
Bruno P. Kinoshita
3b05135f11 Fix couple typos 2020-02-24 20:48:42 +13:00
Bruno P. Kinoshita
76afec8adb Update app.bind_url and proxy.public_url when (external) SSL is enabled 2020-02-24 15:51:09 +13:00
Tim Head
06da90ac76 Merge pull request #2950 from alexdriedger/patch-2
Docs: Fixed grammar on landing page
2020-02-23 09:11:43 +01:00
Alex Driedger
7e3caf7f48 Fixed grammar on landing page 2020-02-22 16:37:34 -08:00
Tim Head
e08552eb99 Merge pull request #2941 from minrk/allow-implicit-spawn
Allow implicit spawn via javascript redirect
2020-02-22 07:27:17 +01:00
Tim Head
5fb403af4b Merge pull request #2946 from minrk/user-redirect-faq
add general faq
2020-02-22 07:24:24 +01:00
Min RK
84acdd5a7f handle uselist=False in our relationship expiry 2020-02-21 14:10:36 +01:00
Min RK
3e6abb7a5e add general faq
and put a first q about user-redirect
2020-02-21 13:52:03 +01:00
Min RK
0315f986db Merge pull request #2940 from kinow/add-more-docs-for-cookies
[doc] Add more docs about Cookies used for authentication in JupyterHub
2020-02-21 10:18:29 +01:00
Min RK
7735c7ddd4 make spawner:server backref explicitly one-to-one
using backref(uselist=False), single_parent=True
2020-02-21 10:09:08 +01:00
Bruno P. Kinoshita
239a4c63a2 Add note that not all proxy implementations use an auth token 2020-02-21 10:35:30 +13:00
Bruno P. Kinoshita
f5bd5b7751 Incorporate review feedback 2020-02-21 10:32:11 +13:00
Bruno P. Kinoshita
287b0302d9 Add more docs about authentication and cookies, using text posted by MinRK on Discourse 2020-02-21 10:22:10 +13:00
Tim Head
44e23aad78 Merge pull request #2936 from minrk/make-it-fast-break-everything-maybe
make init_spawners check O(running servers) not O(total users)
2020-02-20 17:06:24 +01:00
Tim Head
606775f72d Remove unused variable 2020-02-20 16:56:03 +01:00
Min RK
9a6308f8d9 docs: use metachannel for faster environment solve (#2943)
docs: use metachannel for faster environment solve
2020-02-20 15:55:36 +01:00
Min RK
0c4db2d99f docs: use metachannel for faster environment solve
rtd is having memory issues with conda-forge, which should hopefully be fixed by metachannel

this should also make things quicker for anyone
2020-02-20 15:54:43 +01:00
Min RK
938970817c update docs environments (#2942)
update docs environments
2020-02-20 15:36:10 +01:00
Min RK
d2a1b8e349 update docs environments
- python 3.7
- node 12
- sync recommonmark 0.6
2020-02-20 15:32:55 +01:00
Min RK
4477506345 Merge pull request #2930 from JohnPaton/patch-1
Add favicon to the base page template
2020-02-20 14:23:06 +01:00
Min RK
0787489e1b maybe_future needs a future! 2020-02-20 12:53:15 +01:00
Min RK
436757dd55 handle implicit spawn with a javascript redirect
less dangerous than using a Location redirect, so remove conflicts

delay is a user-configurable timer (0 = no implicit spawn, default)
2020-02-20 12:43:39 +01:00
Min RK
a0b6d8ec6f add allow_implicit_spawn setting
- warn that there are known issues associated with enabling it
- it is inherently incompatible with named servers
2020-02-20 12:12:55 +01:00
Min RK
b92efcd7b0 spawner test assumed app.users is populated 2020-02-20 09:37:08 +01:00
Erik Sundell
3e17b47ec3 Merge pull request #2939 from kinow/fix-services-link
[doc] Use fixed commit plus line number in github link
2020-02-19 01:09:51 +01:00
Bruno P. Kinoshita
31c0788bd9 Move cookies to the end of the list (ssl, proxy, and then cookies) 2020-02-19 12:56:02 +13:00
Bruno P. Kinoshita
dec3244758 Use fixed commit plus line number in github link 2020-02-19 12:39:23 +13:00
Erik Sundell
91e385efa7 Merge pull request #2938 from kinow/fix-link-to-ssl-doc
[doc] Fix link to SSL encryption from troubleshooting page
2020-02-18 22:55:07 +01:00
Bruno P. Kinoshita
13313abb37 Fix link to SSL encryption from troubleshooting page 2020-02-19 10:46:49 +13:00
Min RK
79a51dfdce make init_spawners check O(running servers) not O(total users)
query on Server objects instead of User objects

avoids lots of ORM work on startup since there are typically a small number of running servers
relative to the total number of users

this also means that the users dict is not fully populated. Is that okay? I hope so.
2020-02-18 17:10:19 +01:00
JohnPaton
a999ac8f07 Use only rel="icon"
This is the officially recommended method from MDN
https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/The_head_metadata_in_HTML
2020-02-14 16:51:27 +01:00
John Paton
a3e3f24d2d Add favicon to the base page template
This was missing before. Giving it its own named block will let users customize it if they wish.
2020-02-14 16:35:48 +01:00
Juan Cruz-Benito
b2b85eb548 Improving comments 2020-02-14 11:47:43 +01:00
Juan Cruz-Benito
95c5ebb090 Fixing pre-commit errors 2020-02-14 11:14:07 +01:00
Juan Cruz-Benito
3d0da4f25a Adding python-paginate package and using it to paginate admin panel 2020-02-13 18:35:17 +01:00
Tim Head
bc7bb5076f Merge pull request #2914 from jgwerner/trouble-shooting
[MRG] Add troubleshooting topics
2020-02-13 08:06:20 +01:00
Greg
a80561bfc8 updates based on pr comments
Signed-off-by: Greg <werner.greg@gmail.com>
2020-02-05 16:13:15 -05:00
Erik Sundell
22f86ad76c Merge pull request #2917 from minrk/doc-remove
rest api: fix schema for remove parameter in rest api
2020-01-31 17:31:31 +01:00
Min RK
0ae9cfa42f fix schema for remove parameter in rest api
it wasn't showing up properly since it's a *property* of the body, not the body itself
2020-01-31 17:18:30 +01:00
Min RK
ff8c4ca8a3 update bootprint to v4 2020-01-31 17:16:57 +01:00
Greg
ed4ed4de9d simplify text
Signed-off-by: Greg <werner.greg@gmail.com>
2020-01-29 12:49:52 -05:00
Greg
d177b99f3a add trouble shooting topics
Signed-off-by: Greg <werner.greg@gmail.com>
2020-01-29 12:42:42 -05:00
Erik Sundell
65de8c4916 Merge pull request #2904 from reneluria/patch-doc
Several fixes to the doc
2020-01-24 17:25:36 +01:00
Min RK
178f9d4c51 Merge pull request #2905 from consideRatio/solve-docker-template-issue
Add what we need with some margin to Dockerfile's build stage
2020-01-23 09:57:12 +01:00
Min RK
9433564c5b bump reorder-imports hook (#2899)
bump reorder-imports hook
2020-01-23 09:54:46 +01:00
Erik Sundell
5deba0c4ba Copy all files to Dockerfile's build stage
Not exactly all though as some will be ignored by the .dockerignore
file. This change ensures we don't get future issues caused by a failure
to update what needs to be copied to the build stage and not like we've
had recently.
2020-01-23 07:20:53 +01:00
Erik Sundell
5234d4c7ae Add bower-lite script to Dockerfile
This fixes #2852 by adding a script part of package.json. But is this
enough? Should we perhaps look in MANIFEST.in and copy some more files
listed there?

This is all thanks to people coming together and helping out figuring
out the issue in https://github.com/jupyterhub/jupyterhub/issues/2852.
Thank you @shingo78 for spotting that we missed bower-lite and its role
and all others who reported and helped debug this!
2020-01-23 07:20:40 +01:00
Erik Sundell
1bea28026e Merge pull request #2907 from consideRatio/fix-generate-config-bug
Fix --generate-config bug when specifying a filename
2020-01-23 07:19:11 +01:00
Erik Sundell
9a5c8ff058 Fix --generate-config bug when specifying a filename
This commit fixes #2906 that was introduced due to #2824. See analysis
of issue in
https://github.com/jupyterhub/jupyterhub/issues/2906#issuecomment-577303510.
2020-01-22 19:30:16 +01:00
Rene Luria
2b183c9773 Several fixes to the doc
* sudo for configurable-http-proxy install
* fix sudo command for apt source
* fix $connection_upgrade variable in nginx configuration
2020-01-21 17:02:23 +01:00
Tim Head
5dee864afd fix: 'Non-ASCII character '\xc3' (#2901)
fix: 'Non-ASCII character '\xc3'
2020-01-20 09:15:56 +01:00
Greg
6fdf931515 update prometheus_log_method comments
Signed-off-by: Greg <werner.greg@gmail.com>
2020-01-17 12:32:50 -05:00
Greg
d126baa443 remove diaeresis
Signed-off-by: Greg <werner.greg@gmail.com>
2020-01-17 09:43:46 -05:00
Min RK
d1e2d593ff back to dev 2020-01-17 12:55:42 +01:00
Min RK
3663d7c8fc release 1.1.0 2020-01-17 12:54:06 +01:00
Min RK
a30e6b539f changelog for 1.1.0 (#2898)
changelog for 1.1.0
2020-01-17 12:54:04 +01:00
Min RK
800b6a6bc5 bump reorder-imports
removes (hopefully) unnecessarily specified language version
2020-01-17 12:48:17 +01:00
Min RK
ca3982337e changelog for 1.1.0 2020-01-17 12:40:38 +01:00
Min RK
159b3553a9 Merge pull request #2881 from minrk/auth-state-earlier
trigger auth_state_hook prior to options form, add auth_state to template namespace
2020-01-17 12:35:33 +01:00
Min RK
6821e63b71 Merge pull request #2897 from consideRatio/combine-py38-and-bionic-ci-test
Optimize CI jobs and default to bionic
2020-01-17 12:32:10 +01:00
Erik Sundell
c1c13930f7 Optimize CI jobs and default to bionic 2020-01-17 12:19:39 +01:00
Min RK
58f18bffff _render_form is async 2020-01-17 12:08:20 +01:00
Min RK
b80906b8c8 make auth_state available to page templates 2020-01-17 10:55:07 +01:00
Min RK
07aa077eae Merge pull request #2882 from ociule/master
LocalProcessSpawner should work on windows by using psutil.pid_exists
2020-01-17 09:47:37 +01:00
Min RK
3f74c30288 Merge pull request #2887 from krinsman/master
Fix implementation of default server name
2020-01-16 19:05:30 +01:00
Min RK
141cb04b27 fix assertion in custom user_redirect_hook
custom hook means overrides server_name insertion
2020-01-16 18:05:53 +01:00
Min RK
8769864f24 missing imports in test_named_servers 2020-01-14 22:16:06 +01:00
Min RK
8ee72dd80f define default_server_name fixture 2020-01-14 22:15:14 +01:00
William Krinsman
455475724a Attempt to add tests documenting default named server feature. 2020-01-14 10:20:18 -08:00
William Krinsman
794be0de8e Fix implementation of default server name 2020-01-14 10:02:50 -08:00
Ovidiu Ciule
1f633e188d Updated doc 2020-01-14 14:40:07 +01:00
Ovidiu Ciule
df0745985b Made _signal more readable 2020-01-14 14:38:00 +01:00
Ovidiu Ciule
cad027f3fc Use psutil on windows only. 2020-01-14 14:37:44 +01:00
Min RK
61a844b413 Merge pull request #2889 from minrk/openssl-error
catch connection error for ssl failures
2020-01-14 11:26:44 +01:00
Min RK
319b404ef4 misread which error propagates up
it's a ConnectionError (requests, not stdlib)
2020-01-14 11:05:19 +01:00
Min RK
19fb7eb7cc catch openssl error for ssl failures
python 3.8 with more recent openssl seems to raise a different error
2020-01-14 10:48:48 +01:00
Georgiana Elena
cb3b0ce266 Merge pull request #2842 from mangecoeur/master
Added guide 'install jupyterlab the hard way' #2110
2020-01-10 15:34:33 +02:00
Ovidiu Ciule
82d8e9c433 Reordered commits 2020-01-10 14:30:15 +01:00
mangecoeur
86ee4cad59 add newline 2020-01-10 14:28:13 +01:00
mangecoeur
add9666fcd Update installation-guide-hard.md
Updated capitalisation of names. Addressed revisions.

Fleshed out the prerequists and explanation of access control.

Added part of configuration section to set JupyterLab as the default interface.

corrected need for sudo

Added warning to reverse-proxy section to recommend use of HTTPS and firewall.
2020-01-10 12:28:00 +01:00
mangecoeur
c93687eaad Update docs/source/installation-guide-hard.md
Co-Authored-By: Georgiana Elena <GeorgianaElena@users.noreply.github.com>
2020-01-10 11:32:27 +01:00
mangecoeur
d848873685 Update docs/source/installation-guide-hard.md
Co-Authored-By: Georgiana Elena <GeorgianaElena@users.noreply.github.com>
2020-01-10 11:32:18 +01:00
mangecoeur
c27576a41f Update docs/source/installation-guide-hard.md
Co-Authored-By: Georgiana Elena <GeorgianaElena@users.noreply.github.com>
2020-01-10 11:31:59 +01:00
Ovidiu Ciule
6d3ed95b84 Added missing dependency psutil. Already used in proxy.py#L690 2020-01-10 11:14:51 +01:00
Ovidiu Ciule
ff7cd082ff Just use psutil.pid_exists, which uses os.kill(pid, 0) on Linux as
before and win-specific code on win
2020-01-10 11:09:10 +01:00
Ovidiu Ciule
3582ecc9cc Added _is_single_user_process_alive to allow subclasses to reimplement
this without reimplementing the whole poll method.
2020-01-09 16:39:44 +01:00
Min RK
5f626268ef trigger auth_state_hook prior to options form
- allow auth_state_hook to be async
- trigger it prior to start and options_form serving, rather than on home page
2020-01-09 13:04:45 +01:00
Min RK
6227f92b5f fixup allow_failures (#2880)
fixup allow_failures
2020-01-09 12:45:09 +01:00
Min RK
020ba08635 fixup allow_failures
jobs format doesn't create jobs under allow_failures

the old syntax used to do that. Instead, it uses key, value matches
2020-01-09 12:33:57 +01:00
Min RK
2ad175816a Pass tests on Python 3.8 (#2879)
Pass tests on Python 3.8
2020-01-09 12:28:09 +01:00
Min RK
3d46083dcc Stop allowing failures on Python 3.8
and simplify matrix without cross-references
2020-01-09 11:50:07 +01:00
Min RK
dad1417b23 loosen assertion for process exit
Python 3.8 captures exit codes differently.
All we care about is that it exited.
2020-01-09 11:18:26 +01:00
Min RK
9a3c2409d1 Update README's badges (#2867)
Update README's badges
2020-01-09 11:02:25 +01:00
Richard Darst
0efb16793e Bugfix: pam_normalize_username didn't return username
- A trivial bug caused by my last change to #2397 - made possible by
  the fact we didn't have a way to reliable test PAM stuff.
- Thanks to @narnish for noticing.
- Closes: #2875
2020-01-02 17:04:21 +02:00
Erik Sundell
68ad36e945 Try dist:bionic with py3.8 2019-12-28 18:51:10 +01:00
Erik Sundell
989ed216a7 Add travis-ci job names 2019-12-28 18:51:10 +01:00
Erik Sundell
319113024d Rework .travis.yml 2019-12-28 18:51:10 +01:00
Erik Sundell
399f7e7b80 Remove deprecated part in .travis.yml 2019-12-28 18:51:10 +01:00
Erik Sundell
b4a6e5c2fe Test docs only in CircleCI 2019-12-28 18:51:10 +01:00
Erik Sundell
1949ab892a Make TravisCI single out allowed-failuers 2019-12-28 18:51:10 +01:00
Erik Sundell
1ec34b256c Fixup .travis.yml
- We now default to ubuntu bionic (18.04) and try once with ubuntu xenial
(16.04).
- We now always test Python 3.8 but allow it to fail, as compared to not
allowing it to fail and only testing it on tagged commits. This is a
bugfix I'd say.
- We now no longer test Python 3.5 and Python 3.6 dedicatedly without
any custom configuration like usage of subdomain, which allows us to
reduce the number of build jobs in a way I think makes a great sense to
compromise.
2019-12-28 18:51:10 +01:00
Erik Sundell
3c12a99415 Update README's badges
Some notes:
- Added a conda-forge and DockerHub badge
- Added logo's and made us conform with the team-compass badges section
as can be found here:
  https://jupyterhub-team-compass.readthedocs.io/en/latest/building-blocks/readme-badges.html
- Concluded that our CircleCI badge is good because it let's us overview
the repo's build systems, but that it is bad because it is only is about
documentation preview in PRs which isn't useful in a README's header in
a way.
- Noted there was a CircleCI token in the badge, that I believe is meant
to be used with private repo access rather than public repo access. I'm
not sure we need that but I made it a markdown/html comment for now.
- Decided to not manually add a line break between badges. I figured it
could make sense to break manually before the social badges instead of
automatically letting it wrap at some point, but we don't really know
the size of the window viewing so it felt like a bad idea to hardcode
that.
2019-12-28 14:56:56 +01:00
Richard Darst
a8ced3a7ad Dockerfile: Copy share/ to the final image
- When the Dockerfile was turned into a multi-stage build, it seems
  the share/ directory was not copied to the final image.  This
  resulted in certain components (static/components/, static/css/)
  being missing, which resulted in the JupyterHub share directory not
  being findable (in jupyterhub/_data.py).  This led to all kinds of
  weird havoc, like templates not being findable (#2852).
- I am still unsure if this is the right fix, please check this well.
- Closes: #2852
2019-12-28 13:14:00 +01:00
Richard Darst
1af7deaeb3 Dockerfile: add build-essential to builder image
- While debugging another problem, I noticed some failures to build
  the C extensions in the logs.  Adding build-essential should fix
  that (also as mentioned in the logs themselves).
- Extensions failed for tornado, sqlalchemy, and pyrsistent(pvectorc)
  and can be found by searching the previous output for "fail".
2019-12-28 13:12:11 +01:00
Erik Sundell
861a7c5c5e back to dev 2019-12-26 18:20:06 +01:00
Erik Sundell
1d02915f26 release 1.1.0b1 2019-12-26 18:17:16 +01:00
Erik Sundell
90009f3c01 Set date and beta note in changelog 2019-12-26 18:05:17 +01:00
Erik Sundell
dbce653b5e Merge pull request #2830 from consideRatio/changelog-for-1.1
Changelog for 1.1.0
2019-12-18 14:46:40 +01:00
Georgiana Elena
b4443b1251 Merge pull request #2854 from minrk/startup-total-time
HUB_STARTUP_DURATION_SECONDS measures total startup time
2019-12-18 11:12:24 +02:00
Min RK
155c76b299 Merge branch 'master' into changelog-for-1.1 2019-12-18 10:07:52 +01:00
Min RK
553be3e1d4 add latest PRs 2019-12-18 09:56:39 +01:00
Min RK
e1e0a31afc add summary of 1.1 changes 2019-12-18 09:56:11 +01:00
Min RK
d78466507d HUB_STARTUP_DURATION_SECONDS measures total startup time
which is the main metric of interest for measuring disruptions due to restarts
2019-12-18 09:22:34 +01:00
Min RK
d9955a052d Merge pull request #2849 from gabber12/fix-ready
Cleanup if spawner stop fails
2019-12-18 09:06:18 +01:00
Min RK
2e40da09ea Merge pull request #2853 from jgwerner/dockerfile-updates
chore: Dockerfile updates
2019-12-18 09:05:38 +01:00
Greg
490cf2dd82 switch from container to base
Signed-off-by: Greg <werner.greg@gmail.com>
2019-12-16 12:59:50 -05:00
Greg
b0343ef8d8 update base version and add build stage alias
Signed-off-by: Greg <werner.greg@gmail.com>
2019-12-16 12:45:53 -05:00
mangecoeur
fb64b4f0a8 change title and small corrections 2019-12-13 10:41:42 +01:00
Shubham Sharma
5a747baeca Cleanup if spawner stop fails 2019-12-13 02:11:52 +05:30
Erik Sundell
c4ce7faea6 Update changelog 2019-12-11 23:34:23 +01:00
mangecoeur
3a810c4fc0 Added guide 'install jupyterlab the hard way' 2019-12-06 16:44:59 +01:00
Min RK
abb93ad799 Merge pull request #2840 from minrk/dockerfile-simplify
simplify Dockerfile
2019-12-05 15:34:11 +01:00
Min RK
f31101432e be consistent about $BASE_IMAGE arg 2019-12-03 15:36:57 +01:00
Min RK
a2c98d016e Greatly simplify Dockerfile
- use apt to get Python, nodejs
- use npm to get configurable-http-proxy
2019-12-03 14:53:12 +01:00
Min RK
5581a2ba7e changelog: recategorize a few PRs 2019-12-03 14:49:55 +01:00
Min RK
1fe01ae173 pin a couple versions in Dockerfile 2019-12-03 14:33:56 +01:00
Min RK
24706a1759 Merge pull request #2839 from minrk/dockerfile-quotes
docker: fix onbuild image arg
2019-12-03 14:32:54 +01:00
Min RK
182ac00e93 update 1.1 changelog
latest commit is now 92173c605
2019-12-03 14:31:30 +01:00
Min RK
ca81af2ae5 fix BASE_IMAGE arg in onbuild
BASE_IMAGE is a single arg, not two separate ones
2019-12-03 14:20:59 +01:00
Min RK
92173c6053 Add prometheus metric to measure hub startup time (#2799)
Add prometheus metric to measure hub startup time
2019-12-03 13:19:51 +01:00
Min RK
33e1a090d8 Merge pull request #2812 from jgwerner/update-tests-docs
docs: Update docs to run tests
2019-12-03 13:19:26 +01:00
Min RK
e407808f47 remove redundant pip package list in docs environment.yml (#2838)
remove redundant pip package list in docs environment.yml
2019-12-03 13:18:56 +01:00
Erik Sundell
7b53330b20 Prelim changelog for 1.1.0 2019-12-03 10:58:57 +01:00
Min RK
da02b024d6 remove redundant pip package list in docs environment.yml
instead rely on `-r requirements.txt`

should avoid "ERROR: Double requirement given" messages from pip
2019-12-03 10:24:44 +01:00
Min RK
5502367832 Merge pull request #2555 from rcthomas/auth-state-to-spawner
Add Spawner.auth_state_hook
2019-12-03 10:11:40 +01:00
Min RK
ddc61d2b62 Merge pull request #2828 from bitnik/patch-4
add block for scripts included in head
2019-12-03 10:10:06 +01:00
Min RK
dc049a88eb Merge pull request #2763 from rcthomas/link-services
Link services
2019-12-03 10:08:59 +01:00
Min RK
2b7a02697c Merge branch 'master' into hub-startup-times 2019-12-03 10:08:06 +01:00
Min RK
4e8acc71c6 updating to pandas docs theme (#2820)
updating to pandas docs theme
2019-12-03 10:03:27 +01:00
Min RK
3bc0c18974 Merge pull request #2798 from rajat404/proxy-poll-times
Add prometheus metric to measure proxy route poll times
2019-12-03 10:03:02 +01:00
rajat404
3004f04a34 Expose spawner initialization duration metric to prometheus 2019-12-01 19:37:04 +05:30
rajat404
e3f1fd0a16 Include Spawner initialization time in hub startup time 2019-12-01 19:32:14 +05:30
rajat404
8367606012 Add prometheus metric to measure hub startup time 2019-12-01 18:58:19 +05:30
Kenan Erdogan
6956ffd2a9 add block for scripts included in head 2019-11-22 10:56:49 +01:00
Chris Holdgraf
0b3ffe1a99 extra heading # to institutional faq for sidebar 2019-11-21 12:08:32 -08:00
Chris Holdgraf
e44ee6ed8a reordering requirements 2019-11-21 08:05:13 -08:00
Chris Holdgraf
45a4362bb3 fixing EOL 2019-11-21 08:04:20 -08:00
Chris Holdgraf
8e7df7ae7b index descriptions 2019-11-21 08:04:20 -08:00
Chris Holdgraf
676a0da5ff fixing links 2019-11-21 08:04:20 -08:00
Chris Holdgraf
e802df9668 updating hub logo 2019-11-21 08:04:20 -08:00
Chris Holdgraf
c8e4d68978 updating to pandas docs theme 2019-11-21 08:04:20 -08:00
Tim Head
5ee2994504 adding institutional faq (#2800)
adding institutional faq
2019-11-21 15:29:46 +01:00
Chris Holdgraf
c194cb079e single machine not vm in docs 2019-11-19 09:49:14 -08:00
Chris Holdgraf
1910bfacbd Update docs/source/getting-started/institutional-faq.md
Co-Authored-By: Tim Head <betatim@gmail.com>
2019-11-19 09:48:00 -08:00
Chris Holdgraf
e16ca97e1c Update docs/source/getting-started/institutional-faq.md
Co-Authored-By: Tim Head <betatim@gmail.com>
2019-11-19 09:45:06 -08:00
Min RK
4bcfd52bc7 Merge pull request #2816 from jgwerner/refactor_dockerfile
chore: Refactor Dockerfile
2019-11-19 14:58:19 +01:00
Tim Head
29df06f0b5 Merge pull request #2826 from consideRatio/inline-comment
Add inline comment to test
2019-11-18 20:01:03 +01:00
Erik Sundell
9ec4e6d1d1 Add inline comment to test 2019-11-18 18:56:08 +01:00
Tim Head
ce34c12349 Merge pull request #2824 from consideRatio/raise-error-on-missing-config
Raise error on missing specified config
2019-11-18 18:42:13 +01:00
Tim Head
7b5a5541cb chore: Update python versions in travis matrix (#2811)
chore: Update python versions in travis matrix
2019-11-18 09:30:34 +01:00
Greg
731faf29c8 revert to specify xenial with 3.7
Signed-off-by: Greg <werner.greg@gmail.com>
2019-11-17 21:16:09 -05:00
Erik Sundell
bef561511f Please reorder-python-imports 2019-11-17 14:38:40 +01:00
Erik Sundell
f0b5446ec3 Raise error on missing specified config
Closes #2819 by exiting JupyterHub directly with an error if a config
file has been specified for the config_file traitlet, for example
through the -f or --config flag, but isn't available on the file
system.
2019-11-17 14:32:40 +01:00
Erik Sundell
629e829f8a Test raise error on missing specified config 2019-11-17 14:32:17 +01:00
Chris Holdgraf
7c434adcb2 adding more organizations to institutional faq 2019-11-14 18:21:55 -08:00
Chris Holdgraf
3641abc70f more content for institutional faq 2019-11-14 18:14:15 -08:00
Chris Holdgraf
da790617e3 Update docs/source/getting-started/institutional-faq.md
Co-Authored-By: Tim Head <betatim@gmail.com>
2019-11-14 18:14:15 -08:00
Chris Holdgraf
35ba762c9c fleshing out institutional faq 2019-11-14 18:14:15 -08:00
Chris Holdgraf
42d9c31db7 adding institutional faq 2019-11-14 18:14:15 -08:00
Tim Head
703af1dd1e Merge pull request #2810 from jgwerner/pre-commit-config
chore: Bump package versions used in pre-commit config
2019-11-11 09:51:16 +01:00
Greg
1dd09094a5 commit files updated by black to avoid exiting out from build
Signed-off-by: Greg <werner.greg@gmail.com>
2019-11-10 11:52:53 -05:00
Greg
b8c9717862 add missing maintainer label
Signed-off-by: Greg <werner.greg@gmail.com>
2019-11-10 11:22:19 -05:00
Greg
06f89cb5ed remove lang layer
Signed-off-by: Greg <werner.greg@gmail.com>
2019-11-10 10:47:45 -05:00
Greg
b5602028e5 more updates
Signed-off-by: Greg <werner.greg@gmail.com>
2019-11-10 10:46:54 -05:00
Greg
b1e45cde1e dockerfile cleanup
Signed-off-by: Greg <werner.greg@gmail.com>
2019-11-10 10:03:48 -05:00
Greg
ca117c251c pre-commit updates 2019-11-09 20:15:43 -05:00
Rollin Thomas
e815210cc7 Make usable via config without subclassing 2019-11-08 13:45:08 -08:00
Rollin Thomas
f37864cfd3 Call hook in handler 2019-11-08 13:45:08 -08:00
Rollin Thomas
d05d92c03a Doesn't need this 2019-11-08 13:45:08 -08:00
Greg
948f4c44fd update docs
Signed-off-by: Greg <werner.greg@gmail.com>
2019-11-08 13:00:44 -05:00
Greg
5db76e6dcd remove async test setting
Signed-off-by: Greg <werner.greg@gmail.com>
2019-11-08 12:42:40 -05:00
Greg
c944c0e54a update python versions in matrix
Signed-off-by: Greg <werner.greg@gmail.com>
2019-11-08 12:14:13 -05:00
Greg
dd7fe85770 revert to 3.6
Signed-off-by: Greg <werner.greg@gmail.com>
2019-11-08 11:28:54 -05:00
Greg
b9c1831183 bump package versions used in pre-commit 2019-11-08 11:26:49 -05:00
Min RK
5bbb292ef5 Merge pull request #2794 from rkdarst/cull-idle-local-bind-vars
cull_idle_servers.py: rebind max_age and inactive_limit locally
2019-11-05 10:32:14 +01:00
Min RK
e589b5d82a Merge pull request #2795 from bnuhero/master
The proxy's REST API listens on port `8001`
2019-11-05 10:31:44 +01:00
Min RK
465fb0a686 Merge pull request #2803 from choldgraf/docs_theme
adding docs preview to circleci
2019-11-05 10:31:19 +01:00
Chris Holdgraf
9702c1756f adding docs preview to circleci 2019-10-31 16:48:17 -07:00
Georgiana Elena
9990100f89 Merge pull request #2788 from rajat404/master
Add prometheus metric to measure proxy route deletion times
2019-10-30 16:49:06 +02:00
rajat404
a611298f43 Add prometheus metric to measure proxy route poll times 2019-10-29 19:39:49 +05:30
Min RK
6a872b371e Merge pull request #2790 from yuvipanda/feat/custom-redirect
Allow admins to customize /user-redirect/ behavior
2019-10-28 22:09:43 +01:00
Raymond Liu
1e298fb053 The proxy's REST API listens on port 8001
By default, the proxy's REST API listens on port `8001` instead of `8081`.  The hub service listens on port `8081`.
2019-10-26 14:32:57 +08:00
YuviPanda
51e1a15d63 Reword docstring to appease linter 2019-10-25 11:11:18 -07:00
Yuvi Panda
46e6d95364 Fix typo
Co-Authored-By: Min RK <benjaminrk@gmail.com>
2019-10-25 10:20:29 -07:00
Richard Darst
52c099193d cull_idle_servers.py: rebind max_age and inactive_limit locally
- In the cull script, the max_age and inactive_limit are used from the
  outer scope.  In the case that you add extra logic, one may want to
  modify these values.
- In that case, you either have to rename them locally, or access the
  outer scope with "nonlocal", the first of which is too much work,
  the second of which has a high chance of introducing bugs (as it did
  for me).
- This change introduces a fix for everyone.  It doesn't change basic
  functionality, but makes local modifications simpler.
2019-10-25 14:36:16 +03:00
YuviPanda
9d5784efb9 Pass in base_url rather than app object
- Limits what we consider public API
- Still allows for redirects outside JupyterHub
2019-10-24 09:01:23 -07:00
Min RK
2847c3a90c Merge pull request #2755 from danielballan/expose-user-options-in-rest-api
Expose spawner.user_options in REST API.
2019-10-24 11:11:51 +02:00
YuviPanda
d66f0635a3 Add path and app as parameters 2019-10-22 11:27:41 -07:00
Min RK
244ad7d38c run black 2019-10-22 09:23:04 +02:00
YuviPanda
7fbf1826ea Don't use fstrings yet
We support older versions of python still
2019-10-21 15:17:29 -07:00
YuviPanda
b4a760234e Tweak user_redirect_hook API
- Pass in user object & request object only explicitly.
  Much better interface that is harder to break by internal
  refactoring. We can always add more  parameters if needed?
2019-10-21 14:29:59 -07:00
Min RK
72a38a599d Merge pull request #2789 from tirkarthi/fix-deprecation-warning
Fix deprecation warnings
2019-10-21 14:49:36 +02:00
Min RK
8134d3bfbc Merge pull request #2776 from vilhelmen/server_ver
Display server version on admin page
2019-10-21 14:47:58 +02:00
YuviPanda
3df4afe7af Add test for user_redirect_hook 2019-10-20 11:58:45 -07:00
YuviPanda
400c64b4ef Allow admins to customize /user-redirect/ behavior
/user-redirect/ is used to help link to a particular url
in the logged in user's authenticated notebook. For example,
if I'm logged in as user 'yuvipanda' and hit the URL
/hub/user-redirect/git-pull, it'll redirect me to
/user/yuvipanda/git-pull. This is extremely useful in
connecting hub links to notebook server extensions, such
as nbgitpuller.

Admins might want to customize how this redirection is done -
for example, redirect users to different running servers
based on the nbgitpuller repository they are linking from.
Adding a hook here helps accomplish that.
2019-10-20 11:33:24 -07:00
Rajat Goyal
44dccb292f Apply suggestions from code review: Re-raise error after measuring time; Catch Exception class
Co-Authored-By: Min RK <benjaminrk@gmail.com>
2019-10-20 16:00:33 +05:30
Karthikeyan Singaravelan
0070e68702 Use logger.warning since logger.warn is deprecated. 2019-10-19 20:25:36 +05:30
Karthikeyan Singaravelan
f3b1b5c7a6 Fix DeprecationWarning in escape sequences. 2019-10-19 20:25:07 +05:30
rajat404
175c8d0585 Add prometheus metric to measure proxy route deletion times 2019-10-19 11:47:55 +05:30
R. C. Thomas
bc425a78bb Keep admin-enabled services in the list 2019-10-17 18:27:47 -07:00
R. C. Thomas
e0c4f9fc23 No services accessible if user is None
Co-Authored-By: Min RK <benjaminrk@gmail.com>
2019-10-17 18:23:34 -07:00
Will Starms
2cac46fdb2 Remove server_tokens setting
Revert this if we decide this is a security issue, but we report the version through the API as well
2019-10-17 13:43:28 -05:00
Carol Willing
66f8d6a626 Merge pull request #2767 from minrk/oauth-whitelist
add `service.oauth_no_confirm` configuration
2019-10-17 11:07:30 +01:00
Min RK
f163559f4a Merge pull request #2774 from kinow/update-setupegg
Remove unused  setupegg.py
2019-10-17 11:10:38 +02:00
Bruno P. Kinoshita
a615f783a3 Remove unused setupegg.py 2019-10-17 22:07:46 +13:00
Min RK
3cafc7e49f remove versionadded from Service docstring
sphinx doesn't seem to like this here
2019-10-17 10:03:39 +02:00
Min RK
12ee42e8ae Merge pull request #2785 from rpwagner/master
chown jupyterhub dir in user home
2019-10-17 09:54:38 +02:00
Min RK
9e5c837d3d Merge pull request #2772 from gesiscss/master
fix named server checks
2019-10-17 09:45:37 +02:00
Min RK
91be46784e Merge pull request #2783 from GeorgianaElena/log_proxy_type
Log proxy class
2019-10-17 09:42:13 +02:00
Rick Wagner
60a1c93801 chown jupyterhub dir in user home 2019-10-16 16:45:25 -07:00
GeorgianaElena
3a0a581782 Log proxy class 2019-10-16 15:32:03 +03:00
Georgiana Elena
5cbf9399b2 Merge pull request #2782 from kinow/todo-contributing
Add docs for fixtures in CONTRIBUTING.md
2019-10-16 11:04:25 +03:00
Bruno P. Kinoshita
d942f52eeb Add docs for fixtures in CONTRIBUTING.md 2019-10-16 20:58:11 +13:00
Will Starms
8c1620e6c5 server version display
also tests
2019-10-15 19:23:08 -05:00
Tim Head
9fdab027da Merge pull request #2775 from kinow/fix-header-typo
Fix header project name typo
2019-10-12 11:11:24 +02:00
Bruno P. Kinoshita
bc32450005 Fix header project name typo 2019-10-12 13:54:01 +13:00
Kenan Erdogan
cc95d30dc1 fix test_named_server_spawn_form: add named_servers fixture 2019-10-11 16:10:09 +02:00
Kenan Erdogan
25ef67e8e0 fix: in SpawnHandler check if named servers are allowed before launching a named server, check also limit of named servers 2019-10-11 16:09:28 +02:00
Min RK
2ad1159f69 Apply suggestions from code review
Co-Authored-By: Carol Willing <carolcode@willingconsulting.com>
2019-10-10 10:49:55 +02:00
Min RK
561f4d0889 add service.oauth_no_confirm configuration
allows services to be explicitly blessed to skip the extra oauth confirmation page

added in 1.0

This confirmation page is unhelpful for many admin-managed services,
and is mainly intended for cross-user access.

The default behavior is unchanged, but services can now opt-out of confirmation
(as is done already for the user's own servers).

Use with caution, as this eliminates users' ability to confirm that a service
should be able to authenticate them.
2019-10-08 15:28:47 +02:00
Rollin Thomas
cd0b3e05e2 Add service links 2019-10-05 10:59:59 -07:00
Dan Allan
cdba57e96a Update expected test result to include user_options. 2019-10-01 20:13:05 -04:00
Dan Allan
f13bd59f6f Expose spawner.user_options in REST API. 2019-10-01 16:13:29 -04:00
Min RK
89b0c421d5 Merge pull request #2594 from vilhelmen/server_str_sanitization
WIP: Named server string sanitization and fixes
2019-09-27 12:44:11 +02:00
Min RK
83ddee10ed Merge pull request #2752 from consideRatio/log-version-on-startup
Log JupyterHub version on startup
2019-09-27 12:05:52 +02:00
Erik Sundell
8a03b73086 Log JupyterHub version on startup 2019-09-27 09:32:51 +02:00
Min RK
333b62f1fc Merge pull request #2751 from rkdarst/less_logging_2
Reduce verbosity for "Failing suspected API request to not-running server" (new)
2019-09-27 09:10:40 +02:00
Richard Darst
231d14e95d Reduce verbosity for "Failing suspected API request to not-running server"
- API requests to non-running servers are not uncommon when you cull
  servers and people leave tabs open and active. It returns with 503
  and logs all headers, which can take up half of our total log lines
- This avoids logging headers for all 502 and 503 return statuses.
  #2747 presented an alternative (more complex) implementation, but this
  turned out to be appropriate.
- Closes: #2747
2019-09-26 17:33:38 +03:00
Min RK
9817610dc3 Merge pull request #2687 from rgerkin/uid-track
Added support for consistent UIDs at user creation time
2019-09-26 15:35:39 +02:00
Erik Sundell
aaf365c907 Merge pull request #2750 from minrk/check-routes-first
wait for proxy before accepting requests
2019-09-26 15:34:00 +02:00
Min RK
0f93571ca5 verify proxy is accessible before listening on the hub
lighter weight than check_routes
2019-09-26 14:58:26 +02:00
Carol Willing
5b13f96162 Merge pull request #2744 from willingc/doc-build
Add missing package for json schema doc build
2019-09-24 13:22:18 -07:00
Carol Willing
b41a383eae fix trailing space in file 2019-09-24 12:20:42 -07:00
Carol Willing
1701149fd7 add missing package for json schema 2019-09-24 12:04:11 -07:00
Min RK
5f8664723e Merge pull request #2740 from kinow/remove-deprecated-tornado-asyncio-call
Remove tornado deprecated/unnecessary AsyncIOMainLoop().install() call
2019-09-24 15:51:50 +02:00
Min RK
18ce8eb5a6 Merge pull request #2739 from kinow/fix-deprecated
Fix deprecated call and true comparison
2019-09-24 15:51:30 +02:00
Min RK
d51d39728a Errant indentation 2019-09-24 14:40:34 +02:00
Min RK
2255de7847 Merge pull request #2743 from minrk/urllib3
blacklist urllib3 versions with encoding bug
2019-09-24 12:29:32 +02:00
Min RK
a8c0609eb9 blacklist urllib3 versions with encoding bug
I *think* this should only affect testing, not production
2019-09-24 11:32:23 +02:00
Min RK
66f29e0f5a Merge pull request #2735 from krinsman/master
Non empty default server names (useful for profiles?)
2019-09-24 11:09:57 +02:00
Min RK
ca00c0eab0 Merge pull request #2698 from Zsailer/eventlog-tests
Instrument JupyterHub to record events with jupyter_telemetry [Part II]
2019-09-24 11:08:45 +02:00
Min RK
54baa0c31a Merge pull request #2721 from minrk/async-init-spawners
Add JupyterHub.init_spawners_timeout
2019-09-24 11:08:16 +02:00
Bruno P. Kinoshita
5d3dc509bd Remove tornado deprecated/unnecessary call (>5) 2019-09-23 13:18:00 +12:00
Bruno P. Kinoshita
9cf22e4106 Replace deprecated calls 2019-09-22 23:07:53 +12:00
Zachary Sailer
898fea9fdc Minor typos found by @minrk 2019-09-19 11:23:41 -07:00
Min RK
f79495e6bf fix relative links for spawn 2019-09-19 16:12:29 +02:00
Min RK
f474b31c94 Merge branch 'master' into server_str_sanitization 2019-09-19 16:11:16 +02:00
Min RK
fafbe86b55 Merge pull request #2684 from GeorgianaElena/display_pre_spawn_start_exc
Handle pre_spawn_start possible exceptions
2019-09-19 15:53:08 +02:00
Min RK
82ad2dfbc6 Merge pull request #2705 from InfuseAI/clear-jupyterhub-user-when-logout
Reset _jupyterhub_user after login cookie cleared
2019-09-19 15:51:54 +02:00
Min RK
ac32ae496e run pre-commit hook 2019-09-19 15:51:02 +02:00
Min RK
949d8d0bfa avoid disabling existing loggers when invoking alembic
causes some weird behavior, such as event log not working
2019-09-19 15:46:09 +02:00
Min RK
7fd3271c9b rely on app fixture to get configured app
re-run init_eventlog to ensure event logging is hooked up
2019-09-19 15:16:51 +02:00
Georgiana Elena
6267b752ae Merge pull request #2736 from eslavich/remove-duplicate-spawner-traitlets
Remove duplicate hub and authenticator traitlets from Spawner
2019-09-19 14:42:40 +03:00
William Krinsman
7fcd6ad450 Added configurable default server name attribute to better match behavior described for user-redirect in urls.md in the docs 2019-09-18 15:49:35 -07:00
Ed Slavich
dcde9f6222 Remove duplicate hub and authenticator traitlets from Spawner 2019-09-18 18:34:05 -04:00
Carol Willing
2e8ddeb114 Merge pull request #2725 from willingc/update-templates
Update issue template
2019-09-08 20:17:37 +02:00
Carol Willing
e07aaa603a fix typo found by @blink1073 review 2019-09-08 15:59:58 +02:00
Carol Willing
0bcd6adde6 Edit bug report 2019-09-08 12:39:11 +02:00
Carol Willing
444029699a update the issue template 2019-09-08 12:30:44 +02:00
Carol Willing
b9bdc99c1d move pull request template 2019-09-08 12:14:59 +02:00
Min RK
c896fe05fd Merge pull request #2712 from chicocvenancio/master
ORM: allow removed MySQL variables to not exist
2019-09-07 15:09:29 +02:00
Min RK
424803bcd7 Merge pull request #2714 from bitnik/patch-3
Add New Server: change redirecting to relative to home page in js
2019-09-07 15:08:51 +02:00
Min RK
9024cf1614 Merge pull request #2723 from willingc/use-autodoc
Use autodoc-traits sphinx extension
2019-09-07 15:08:08 +02:00
Carol Willing
a239a25ae0 fix case 2019-09-07 02:19:19 +02:00
Carol Willing
36a1ad0078 remove sphinxext directory 2019-09-06 17:42:32 +02:00
Carol Willing
6d696758e4 use autodoc-traits extension for docbuild 2019-09-06 17:41:34 +02:00
Kenan Erdogan
2545cd9bb3 change redirecting to relative to home page in js 2019-09-02 19:04:59 +02:00
Chico Venancio
096b159c23 ORM: allow MySQL variables to not exist
In current versions of MySQL and MariaDB `innodb_file_format`
and `innodb_large_prefix` have been removed. This allows them to not
exist and makes sure the format for the rows are `Dynamic` (default
for current versions).
2019-08-30 13:00:56 -03:00
Min RK
74958d9397 catch some CancelledErrors
which can occur during app shutdown
2019-08-28 19:02:58 +02:00
Min RK
9db18439af Add JupyterHub.init_spawners_timeout
If init_spawners takes too long (default: 10 seconds) to complete,
app start will be allowed to continue while finishing in the background.

Adds new `check` pending state for the initial check.

Checking lots of spawners can take a long time,
so allowing this to be async limits the impact on startup time
at the expense of starting the Hub in a not-quite-fully-ready state.
2019-08-28 19:01:42 +02:00
Aaron Huang
2b6ad596d2 Remove user after login cookie cleared
Signed-off-by: Aaron Huang <aaroms9733@gmail.com>
2019-08-27 22:09:18 +08:00
Tim Head
917786f2f5 Merge pull request #2704 from katsar0v/master
Create a warning when creating a service implicitly from service_tokens
2019-08-24 17:12:30 +02:00
Katsarov
a800496f6c create a warning when creating a service implicitly from service_tokens 2019-08-24 11:58:37 +02:00
Tim Head
a92fee8a82 Merge pull request #2702 from rlukin/master
Fix mistypos
2019-08-23 22:04:18 +02:00
Richard C Gerkin
7b1c4aedcf Don't catch AttributeError 2019-08-23 08:19:32 -07:00
Roman Lukin
572e008f1d Fix mistypos 2019-08-23 16:14:11 +03:00
Georgiana Elena
0379727cc0 Merge pull request #2679 from katsar0v/master
Documentation update: hint for using services instead of service tokens.
2019-08-23 11:35:12 +03:00
Zsailer
c9d52bea43 verify test data was emitted 2019-08-22 12:19:46 -07:00
Zsailer
263c5e838e rename test fixture 2019-08-22 11:28:57 -07:00
Zsailer
439e4381f0 add tests for eventlog 2019-08-22 11:05:10 -07:00
Zsailer
c34bcabcb9 add docs for event-logging 2019-08-22 11:05:10 -07:00
yuvipanda
2b1bfa0ba7 Depend on the jupyter_telemetry package 2019-08-22 11:05:10 -07:00
yuvipanda
aea2eefa77 Add lots of documentation to event schema
Move it to YAML, since jupyter_telemetry supports these
natively.
2019-08-22 11:05:10 -07:00
yuvipanda
dcde4020c2 Use EventLog class from jupyter_telemetry
Full circle, since the code in jupyter_telemetry
came from here: https://github.com/jupyter/telemetry/pull/6
2019-08-22 11:05:10 -07:00
yuvipanda
1225ff47be Use dunder formatting for capsule 2019-08-22 11:05:10 -07:00
yuvipanda
5aaa5263fa Emitted schemas must be whitelisted by admins
Privacy by default!
2019-08-22 11:05:10 -07:00
yuvipanda
eca4f33afc Don't use f strings yet
jupyterhub still supports Python 3.5
2019-08-22 11:05:10 -07:00
yuvipanda
1e578a25d3 Add jsonschema and python-json-logger as dependencies
They're pure python, and should be ok
2019-08-22 11:05:10 -07:00
yuvipanda
41b2e6e401 Add eventlogging infrastructure
- Introduce the EventLog class from BinderHub for emitting
  structured event data
- Instrument server starts and stops to emit events
- Defaults to not saving any events anywhere
2019-08-22 11:05:10 -07:00
Richard C Gerkin
ced45d101a Update jupyterhub/auth.py
Co-Authored-By: Min RK <benjaminrk@gmail.com>
2019-08-22 09:33:15 -07:00
GeorgianaElena
03693c379e Removed unnecesary check 2019-08-22 15:53:40 +03:00
GeorgianaElena
0058ed803d Address feedback 2019-08-22 15:06:08 +03:00
Georgiana Elena
7d9a93ab5f Merge pull request #2696 from mattjshannon/community-link-in-readme
Add Jupyter community link
2019-08-22 14:19:57 +03:00
GeorgianaElena
8a61eb1738 Test pre_spawn_start exception 2019-08-22 14:11:08 +03:00
GeorgianaElena
cbbead3780 Fix uncaught exception in pre_spawn_start 2019-08-22 14:11:08 +03:00
Min RK
146aec7e0c Merge pull request #2695 from GeorgianaElena/fix_failing_tests
Fix failing travis tests
2019-08-22 11:24:55 +02:00
GeorgianaElena
f7e5904c5b No need to start mysql service 2019-08-22 10:04:11 +03:00
Matt Shannon
077727595c Add Jupyter community link 2019-08-21 13:05:04 -07:00
GeorgianaElena
4bfc69dc80 Pin mysql-connector-python to 8.0.11 on travis 2019-08-21 22:01:43 +03:00
GeorgianaElena
8d7f55ce92 Fix postgres test 2019-08-21 13:59:25 +03:00
Rick Gerkin
cda7f73cfa Added support for consistent UIDs at user creation time 2019-08-16 04:59:51 +00:00
Georgiana Elena
915664ede2 Merge pull request #2682 from rcthomas/fix-not-running-with-named-servers
Add `server_name` to `spawn_url`
2019-08-13 13:28:31 +03:00
Rollin Thomas
037730761c Reformat 2019-08-12 10:06:22 -07:00
Rollin Thomas
1d1e108e09 Add server_name to spawn_url 2019-08-12 09:14:25 -07:00
Katsarov
6e71e617ed update the pending deprecation message in api_tokens to recommend services, not service_tokens 2019-08-10 21:22:40 +02:00
Tim Head
9e0bb5cc71 Replace header logo: jupyter -> jupyterhub (#2672)
Replace header logo: jupyter -> jupyterhub
2019-08-08 23:48:28 +02:00
Erik Sundell
5fa268dab1 Apply black autoformatting 2019-08-07 00:37:30 +02:00
Tim Head
1a26c1fb81 Merge pull request #2670 from GeorgianaElena/redirect_admin_to_login
/hub/admin redirect to login
2019-08-05 22:03:38 +02:00
Erik Sundell
2cc0eb885a Replace header logo: jupyter -> jupyterhub 2019-08-05 13:54:37 +02:00
GeorgianaElena
749b9e0997 /hub/admin redirect to login 2019-08-05 14:42:48 +03:00
Georgiana Elena
669dbfd449 Merge pull request #2662 from kinow/patch-1
Update spawn-form example
2019-08-01 14:21:04 +03:00
Bruno P. Kinoshita
444f0ba00c Update spawn-form example 2019-07-26 14:29:29 +12:00
Tim Head
e46e724a70 Merge pull request #2658 from cmd-ntrf/fix_services_flask_doc
Update flask hub authentication services example in doc
2019-07-24 21:37:20 +02:00
Félix-Antoine Fortin
2e67a534cf Update flask hub authentication services example in doc
The flask example in the documentation was still using the
input argument `cookie_cache_max_age` when instantiating
`HubAuth` object. `cookie_cache_max_age` is deprecated since
JupyterHub 0.8 and should be replaced by `cache_max_age`.
2019-07-24 09:33:23 -04:00
Min RK
24c0829289 Merge pull request #2648 from nicorikken/feature/debug-403-error
fix: spawn redirect for users whose names need escaping
2019-07-22 14:49:57 +02:00
Min RK
60f5ce0ff8 Merge pull request #2640 from nicorikken/feature/user-url-encoding
Escape usernames in the frontend
2019-07-22 14:12:39 +02:00
Tim Head
0325be3e13 Merge pull request #2649 from bitnik/patch-2
close `<div class="container">` tag in home.html
2019-07-17 20:29:21 +02:00
Eric Dill
e243812745 Some suggestions from reading through the docs
Thanks to @willingc, @minrk and @manics for the review so far.
This commit is the PR so far rebased onto master and squashed.
2019-07-17 11:51:20 -04:00
Nico Rikken
b37b13a939 chore: satisfy black checker 2019-07-17 11:05:35 +02:00
Kenan Erdogan
37642408a4 close <div class="container"> tag in home.html 2019-07-17 10:44:44 +02:00
Nico Rikken
9d2823e84b fix: user.escaped_name in base.py urls 2019-07-17 09:37:10 +02:00
Nico Rikken
ae7974564c fix: use user.escaped_name in page urls 2019-07-17 09:37:00 +02:00
Nico Rikken
30c69f94c8 fix: spawn redirect for users with backslash
The 302 redirect served after the spawn POST was not escaping the backslash.
2019-07-17 08:28:43 +02:00
Carol Willing
47cf1915ff Merge pull request #2646 from ilee38/fix-typos-tech-reference
fix typos on technical reference documentation
2019-07-16 16:43:19 -07:00
Carol Willing
9f32fc1854 Merge pull request #2647 from Carreau/fix-theme
Some theme updates; no double NEXT/PREV buttons.
2019-07-16 16:41:31 -07:00
Matthias Bussonnier
8a2eba1156 Some theme updates; no double NEXT/PREV buttons.
- Install pip in the docs conda env (or conda complains).
- Do not override page.html, the next/previous buttons are now handled by
  alabaster_jupyterhub (this actually remove the duplicated next/prev
  buttons)
- use alabaster_jupyterhub when building locally, this make it easy for
  new contributor to get the _exact_ same appearance than on
  readthedocs.
2019-07-16 13:48:37 -07:00
Iram Lee
254687e841 fix typos on technical reference documentation 2019-07-16 14:33:54 -05:00
Carol Willing
aa59b1fca3 Merge pull request #2613 from rkdarst/cull_idle_state_hint
cull-idle: Include a hint on how to add custom culling logic
2019-07-16 10:29:28 -07:00
Nico Rikken
88bff9d03d chore: include proposed docstring fix 2019-07-16 19:25:36 +02:00
Carol Willing
3ca0f32ad3 Merge pull request #2645 from jcrist/update-hadoop-links
Update links for Hadoop-related subprojects
2019-07-16 10:23:09 -07:00
Nico Rikken
6a2876a9fa chore: satisfy Black 2019-07-16 19:23:06 +02:00
Jim Crist
fad6900779 Update a few links [ci skip]
These projects recently moved under the JupyterHub organization,
updated the links accordingly.
2019-07-16 12:06:19 -05:00
Nico Rikken
d8d58b2ebd chore: undo escape() functions 2019-07-16 18:52:31 +02:00
Nico Rikken
859dc34ea6 chore: rename to json_escaped_name and unittests 2019-07-16 18:45:48 +02:00
Nico Rikken
8a37d2daec chore: cleanup comments 2019-07-16 17:13:19 +02:00
Nico Rikken
41db9fe116 chore: cleanup debugging code 2019-07-16 16:47:06 +02:00
Nico Rikken
8dce5a87bc revert try ginfing spawn url 2019-07-16 16:46:00 +02:00
Min RK
266e82755a Merge pull request #2632 from bartolone/master
corrected docker network create instructions in dockerfiles README
2019-07-16 16:22:31 +02:00
Nico Rikken
b237ab9e7b feat: try fixing the spawn url 2019-07-16 14:39:19 +02:00
Nico Rikken
7c78e6c326 chore: try non-escaping user
Now the user was double-escaped, resulting in escaped % signs
2019-07-16 14:28:28 +02:00
Nico Rikken
f1ed6c95f0 chore: reverse url changes 2019-07-16 14:04:51 +02:00
Min RK
2f0ce2a431 Merge pull request #2631 from danlester/master
Fixed docs and testing code to use refactored SimpleLocalProcessSpawner
2019-07-16 13:47:32 +02:00
Min RK
adf3779d02 Merge pull request #2626 from lumbric/patch-1
Update doc: do not suggest depricated config key
2019-07-16 13:46:30 +02:00
Nico Rikken
73309b5741 feat: adopt unicode_escaped_name property 2019-07-16 13:33:49 +02:00
Min RK
2320d59bd1 Merge pull request #2637 from GeorgianaElena/master
Fix total_users prometheus metric
2019-07-16 13:30:27 +02:00
Nico Rikken
1915ecd0c2 feat: try unicoding in user model 2019-07-16 13:07:18 +02:00
Nico Rikken
d050242d0f chore: try splitting value coding 2019-07-16 12:55:26 +02:00
Nico Rikken
3d6d60b64e fix: passthrough in template 2019-07-16 12:34:07 +02:00
Nico Rikken
fc90be8424 fix: user user.name instead of user 2019-07-16 12:17:32 +02:00
Nico Rikken
1555abb2bf feat: unicode escaping method 2019-07-16 11:43:49 +02:00
Nico Rikken
8c8968c2b0 chore: correct handler
Probably this has introduced more errors
2019-07-16 11:06:13 +02:00
Nico Rikken
69d0a47734 chore: try conversion in template
Custom property in users.py didn't work, so try it in the templated file.
2019-07-16 11:04:35 +02:00
Nico Rikken
5ae1fdf621 chore: try custom property 2019-07-16 10:53:14 +02:00
Nico Rikken
c24f6b0a6a chore: add logging code 2019-07-16 10:39:29 +02:00
Nico Rikken
11e32588d7 chore: use most likely fix for custom username property 2019-07-16 10:17:26 +02:00
Nico Rikken
34e44f2eed feat: user function in page render function 2019-07-16 10:01:11 +02:00
Nico Rikken
c0464b2e47 feat: unicode_escape feature 2019-07-16 09:41:11 +02:00
Nico Rikken
d686ae1ae7 json_encode for Tornado framework 2019-07-13 10:49:06 +02:00
Nico Rikken
0dc3593661 Escape user variable to frontend 2019-07-13 10:25:32 +02:00
Nico Rikken
dc40cfe80e encodeURIComponent() instead of escape() 2019-07-13 09:35:41 +02:00
Nico Rikken
d541c17974 Escape usernames in the frontend
To cope with special characters like backslash, to address issue
https://github.com/jupyterhub/jupyterhub/issues/2128
2019-07-13 08:55:33 +02:00
GeorgianaElena
09cc8569b3 Set total_users at startup 2019-07-10 17:19:43 +03:00
Yuvi Panda
3089d441b4 Merge pull request #2629 from GeorgianaElena/master
Fix running_servers prometheus metric
2019-07-10 04:42:14 -07:00
GeorgianaElena
19806899f2 Set running_servers at startup 2019-07-10 11:16:34 +03:00
Yuvi Panda
553e31235e Merge pull request #2628 from jtpio/test-config
Update the config used for testing
2019-07-09 05:44:38 -07:00
Jake Bartolone
55323ec206 corrected docker network create instructions in dockerfiles README 2019-07-05 12:54:09 -05:00
Dan Lester
49a5f3a654 Fixed docs and testing code to use refactored SimpleLocalProcessSpawner 2019-07-05 10:53:47 +01:00
GeorgianaElena
97c27774b1 fixed running_servers count 2019-07-04 13:23:32 +03:00
Jeremy Tuloup
de11909a04 Update config used for testing 2019-07-04 11:56:34 +02:00
lumbric
2f15d5128e Update doc: do not suggest depricated config key
According to changelog JupyterHub.bind_url has been added in 0.9.0.
2019-07-03 12:05:41 +02:00
Tim Head
276ef26161 Merge pull request #2625 from remram44/patch-1
Add missing words
2019-07-02 07:18:26 +02:00
Remi Rampin
d5d315df08 Add missing words
Copied from https://jupyterhub.readthedocs.io/en/latest/reference/services.html
2019-07-01 20:40:02 -04:00
Tim Head
f7f82b8214 add activity_resolution config (#2605)
add activity_resolution config
2019-06-19 08:14:09 +02:00
Min RK
ddece49abb Merge pull request #2588 from cmd-ntrf/services_hubauth_ssl
Define default values for HubAuth ssl traitlets
2019-06-17 11:15:59 +02:00
Min RK
02192ee2d5 Merge pull request #2609 from kinow/use-tornado-addslash
Replace existing redirect code by Tornado's addslash decorator
2019-06-17 11:14:47 +02:00
Richard Darst
a6b7e303df cull-idle: Include a hint on how to add custom culling logic
- cull_idle_servers.py gets the full server state, so is capable of
  doing any kind of arbitrary logic on the profile in order to be more
  flexible in culling.
- This patch does not change anything, but gives an embedded
  (commented out) example of how you can easily add custom logic to
  the script.
- This was added as a tempate/demo for #2598.
2019-06-16 20:13:27 +03:00
Bruno P. Kinoshita
5e5a976ea6 Replace existing redirect code by Tornado's addslash decorator 2019-06-12 15:27:23 +12:00
Min RK
c20c07ec87 Merge pull request #2570 from consideRatio/announcements-css
Make announcements visible without custom HTML
2019-06-07 12:54:45 +02:00
Min RK
bac34e394b Merge pull request #2577 from InfuseAI/remove-stop-my-server-after-server-stopped
Hide Stop My Server red button after server stopped.
2019-06-07 11:53:06 +02:00
Min RK
2ce223c811 Merge pull request #2560 from adelcast/dev/adelcast/shutdown
Jupyterhub: use previous exit strategy for Windows
2019-06-07 11:49:34 +02:00
Min RK
e107c84162 Merge pull request #2590 from sbrunk/openapi-compliance
Change API description to be a valid OpenAPI spec
2019-06-07 11:47:48 +02:00
Min RK
1cea503292 add activity_resolution config
limits last_activity update interval to 30 seconds by default to avoid a db commit on every authenticated request
2019-06-07 11:44:57 +02:00
yuvipanda
e9bc25cce0 Run all tests for jupyter_server regardless of failure 2019-06-04 14:42:49 +02:00
yuvipanda
8f7e25f9a1 Don't make pip uninstall wait for human input 2019-06-04 14:24:30 +02:00
yuvipanda
399def182b Actually run jupyter_server test on Travis 2019-06-04 13:57:26 +02:00
yuvipanda
f830b2a417 Try to test notebook package is still uninstalled 2019-06-04 13:45:57 +02:00
yuvipanda
cab1bca6fb Use jupyter_server if notebook package isn't available 2019-06-04 13:42:52 +02:00
yuvipanda
5eb7a14a33 [WIP] Add support for Jupyter Server 2019-06-04 13:30:28 +02:00
Will Starms
19da170435 Correct empty string redirect to default 2019-05-31 17:49:24 -05:00
Sören Brunk
30cfdcaa83 Change API description to a valid OpenAPI spec
* Add missing responses (doesn't include all possible responses yet)
* Refactor invalid multi in body parameters into a single parameter
* Change form type into valid formData
* Fix use of required fields
* Apply a few other minor fixes
2019-05-28 18:04:17 +02:00
Félix-Antoine Fortin
e9c78422b5 Define default values for HubAuth ssl traitlets
The default values are taken from environment variables defined by Spawner.get_env.
2019-05-27 14:12:39 -04:00
Tim Head
844817297e Merge pull request #2584 from minrk/check-error
re-raise exceptions in launch_instance_async
2019-05-24 17:17:56 +02:00
Min RK
b624116be7 re-raise exceptions in launch_instance_async
avoids asyncio tracebacks in e.g. `jupyterhub --version`
2019-05-24 13:29:34 +02:00
Aaron Huang
38cf95523f Update script 2019-05-21 17:12:01 +08:00
Yuvi Panda
d6d8590acb Merge pull request #2565 from iblis17/patch-1
Update link of `changelog`
2019-05-21 00:37:45 -07:00
Erik Sundell
da460064ae Make announcements visible without custom HTML
Fixes https://github.com/jupyterhub/jupyterhub/issues/2566 to some
degree by making the announcement stand out using twitter-bootstrap
classes `alert` and `alert-warning`. Perhaps we could theme twitter
bootstrap or this alert specifically with jupyter related colors as well
though?
2019-05-16 18:31:10 +02:00
Erik Sundell
8a6de3006c Merge pull request #2564 from julienchastang/typo
typo
2019-05-15 08:11:29 +02:00
Iblis Lin
9e35ba5bef Update link of changelog 2019-05-15 11:29:35 +08:00
Julien Chastang
c83777ccdc typo 2019-05-14 16:54:08 -06:00
Alejandro Del Castillo
aaad55e076 Jupyterhub: use previous exit strategy for Windows
Windows doesn't have support for signal handling so it can't use the
signal handling capabilities of asyncio. Use the previous atexit
strategy on the Windows case instead.

Signed-off-by: Alejandro Del Castillo <alejandro.delcastillo@ni.com>
2019-05-13 10:07:50 -05:00
Min RK
c1e359bd38 Merge pull request #2546 from remyleone/dict_literal
Dict rewritten as literal
2019-05-13 10:54:15 +02:00
Min RK
53f5dbd902 Merge pull request #2558 from NikeNano/spawn_options
Update to simplify the language related to spawner options
2019-05-10 11:39:56 +02:00
NikeNano
9e7b0c0bfd update to simplyfi the language related to spawner options 2019-05-10 09:52:17 +02:00
Tim Head
0aca778a9e Merge pull request #2548 from IamViditAgarwal/add_elucidata_use_case
Adding the use case of the Elucidata: How Jupyter Notebook is used in…
2019-05-06 14:05:32 +02:00
viditagarwal
83af28c137 Adding the use case of the Elucidata: How Jupyter Notebook is used inside the Elucidata with Jupyterhub 2019-05-06 16:49:41 +05:30
Rémy Léone
bfbf2c0521 Dict rewritten as literal 2019-05-03 16:41:43 +02:00
Min RK
09edf38a35 back to dev 2019-05-03 16:16:19 +02:00
Min RK
e4d4e059bd Merge pull request #2545 from minrk/changelog-1.0
releasing 1.0
2019-05-03 16:12:51 +02:00
Min RK
2967383654 release 1.0.0 2019-05-03 13:50:45 +02:00
Min RK
85f5ae1a37 Merge pull request #2544 from minrk/autodoc-link-targets
[autodoc] move config sample to annotation
2019-05-03 13:49:31 +02:00
Min RK
ecafe4add9 [autodoc] move config sample to annotation
preserves link targets, which mangling the directive header does not
2019-05-03 13:00:25 +02:00
Min RK
9462511aa5 Merge pull request #2543 from minrk/pin-mysql-connector
pin mysql-connector-python on travis
2019-05-03 10:55:34 +02:00
Min RK
31736eea9a pin mysql-connector-python on travis
avoids bug in latest connector decoding: https://bugs.mysql.com/bug.php?id=94944
2019-05-03 10:33:28 +02:00
Min RK
f97ef7eaac Merge pull request #2534 from distortedsignal/refactor-logout-handler
Refactor Logout Handler
2019-05-03 10:11:43 +02:00
Min RK
2065099338 Merge pull request #2524 from minrk/fix-db-redact
test postgres with url-encoded password
2019-05-03 09:48:57 +02:00
Carol Willing
d4df579fa6 Merge pull request #2538 from labarba/patch-1
Update gallery-jhub-deployments.md
2019-05-02 12:14:58 -04:00
Lorena A. Barba
4378603e83 Update gallery-jhub-deployments.md 2019-04-26 07:32:35 -04:00
Min RK
40db4edc6d remove todo
order should be preserved between multiple steps
2019-04-25 13:51:27 +02:00
Min RK
ccf13979e9 Merge pull request #2536 from jcrist/add-jhub-hadoop-links
Add a few links for JupyterHub on Hadoop
2019-04-25 10:23:01 +02:00
Jim Crist
76f134c393 Add a few links for JupyterHub on Hadoop [skip ci]
- JupyterHub on Hadoop Guide: https://github.com/jcrist/jupyterhub-on-hadoop
- YarnSpawner: https://github.com/jcrist/yarnspawner
- KerberosAuthenticator: https://github.com/jcrist/kerberosauthenticator
2019-04-24 14:40:50 -05:00
Tom Kelley
77d4c1f23d Changes after CR Comments
Big thanks to Erik, Tim, and Min for the great comments!

Change names to be more clear, add function doc comments,
change scoping on some functions, add handle_logout to let
people take custom logout actions, extract
render_logout_page from get method, add TODO.
2019-04-23 09:59:56 -07:00
Min RK
5856f46e1d Merge pull request #2519 from dfeich/asyncio_signal_cleanup
asyncio signal handling and loop cleanup by task cancelling
2019-04-23 15:13:08 +02:00
Min RK
edfd1eb6cf Merge pull request #2526 from minrk/debug-entrypoints
demote entrypoint-loading warning to debug-level
2019-04-23 15:12:21 +02:00
Tom Kelley
1ae6678360 Refactor Logout Handler
AS A developer of a Logout handler
I WANT to be able to call a function to kill spawners and
do other backend logout stuff and a separate function to
forward the user along the logout chain.

I believe this PR adds (moderately private) methods to the
Logout Handler to do just that.
2019-04-22 12:14:55 -07:00
Min RK
7794eea3fb demote entrypoint-loading warning to debug-level 2019-04-16 15:30:04 +02:00
Derek Feichtinger
f51e6a1ca0 move event_loop closing to shutdown_cancel_tasks 2019-04-16 13:04:11 +02:00
Min RK
ab00a19be1 test postgres with url-encoded username+password 2019-04-16 12:57:49 +02:00
Min RK
7742bfdda5 Merge pull request #2514 from minrk/user-redirect-test
fix flaky test_user_redirect
2019-04-16 12:52:24 +02:00
Erik Sundell
f3878d8216 Merge pull request #2518 from leportella/add-new-jhub-fluxogram
Add new introduction to jhub on docs
2019-04-15 21:13:25 +02:00
Tim Head
d17cb637fe Merge pull request #2520 from parente/vul-reporting
Add vulnerability reporting info to docs
2019-04-15 16:38:58 +02:00
Peter Parente
5b63efe63c Add a newline for the linter 2019-04-15 07:52:55 -04:00
Peter Parente
54816b0a7c Add vulnerability reporting info
https://discourse.jupyter.org/t/responsible-vulnerability-reporting/655
2019-04-14 22:10:58 -04:00
Leticia Portella
41fc73db42 Add new introduction to jhub on docs 2019-04-13 20:55:36 +01:00
Derek Feichtinger
984d6be542 asyncio signal handling and loop cleanup by task cancelling
Also:
- No longer exits with 143 (128+15) on SIGTERM, but with 0
- Allows SIGUSR1 in addition to SIGINFO for dumping status
2019-04-13 20:17:53 +02:00
Min RK
d7d8459edb 1.0.0b2 2019-04-09 10:45:31 +02:00
Min RK
39a7116d16 npm run fmt
with latest prettier
2019-04-09 10:45:31 +02:00
Min RK
d27c970cc4 rev js dependencies 2019-04-09 10:45:31 +02:00
Min RK
cf56dbb97b latest changes in changelog 2019-04-09 10:36:33 +02:00
Min RK
a4ccfe4e11 Merge pull request #2511 from ryogesh/do-not-show-db-password
Redact DB password before logging connection string
2019-04-09 10:19:48 +02:00
Min RK
f1871bbe24 Merge pull request #2510 from minrk/fix-delete-named
ensure spawner for named servers is fully deleted
2019-04-09 10:17:07 +02:00
bdmon
1cc9153a91 Redact DB password before logging connection string 2019-04-09 09:26:54 +02:00
Tim Head
4258254c39 Merge pull request #2509 from minrk/sec-doc
Add security-reporting to docs
2019-04-05 17:33:44 +02:00
Min RK
f3aee9bd16 ensure spawner for named servers is fully deleted
if spawner wasn't running, the wrapper could have been left in the user.spawners dict
2019-04-05 16:50:55 +02:00
Min RK
5cb8ccf8b2 Merge pull request #2494 from minrk/retry-better
include retry link after failed spawn
2019-04-05 15:29:40 +02:00
Tim Head
1d63e417ca Merge pull request #2508 from minrk/discourse-link
add discourse link to communication doc
2019-04-05 12:06:02 +02:00
Min RK
ee0020e8fa add security-reporting to docs 2019-04-05 11:51:02 +02:00
Min RK
2d83575a24 add discourse link to communication docs 2019-04-05 11:46:44 +02:00
Min RK
33c168530e Merge pull request #2496 from minrk/all-users-admin
ensure default server exists in the db at user creation
2019-04-05 10:29:20 +02:00
Min RK
5d4d34b24d Merge pull request #2498 from minrk/oauthlib-3
allow oauthlib 3
2019-04-05 10:25:59 +02:00
Min RK
49cc794937 include exception in template vars
for custom templates
2019-04-05 10:25:40 +02:00
Min RK
7f9e77ce5b Allow Spawners to customize spawn-failed message
by raising an exception with a `jupyterhub_message` attribute.
This will be a string displayed as escaped HTML (HTML is not allowed).
2019-04-05 10:22:47 +02:00
Min RK
6fa3b429db include retry link after failed spawn 2019-04-01 17:05:58 +02:00
Min RK
e89836c035 Merge pull request #2495 from minrk/service-oauth-state-typo
typo raising error on missing oauth state
2019-04-01 17:05:44 +02:00
Min RK
784b5cb6f0 ensure default server exists in the db at user creation
avoids issues in e.g. all_spawners being empty
2019-04-01 17:05:23 +02:00
Min RK
daaa763c3b allow oauthlib 3
requires updating our is_absolute_uri check
2019-04-01 17:04:59 +02:00
Min RK
2b18c64081 Merge pull request #2497 from minrk/mysql-connector-python
[travis] trade mysql-connector for mysql-connector-python
2019-04-01 17:04:30 +02:00
Min RK
785addc245 mysql-connector-python in test_db 2019-04-01 16:47:46 +02:00
Min RK
b4758db017 specify native auth plugin for mysql testing
sha2 plugin isn't available on travis
2019-04-01 16:31:36 +02:00
Min RK
10fbfee157 travis: install mysql-connector-python
instead of mysql-connector, which is deprecated
2019-04-01 15:06:43 +02:00
Min RK
c58a251dbd typo raising error on missing oauth state
need to specify a status code
2019-04-01 14:53:35 +02:00
Min RK
27be5e4847 Changelog for 0.9.6
replace 0.9.5 which has only a partial fix

issue is now confirmed to affect all browsers
2019-04-01 12:30:16 +02:00
Min RK
be97a0c95b Further login redirect validation 2019-04-01 12:29:29 +02:00
Min RK
689a312756 Merge pull request #2490 from mathematicalmichael/patch-1
Fix 1.0 date in changelog
2019-03-29 17:08:49 +01:00
Michael Pilosov
1484869ee3 Update changelog.md
fix date
2019-03-29 08:16:55 -06:00
Min RK
74a457f6b5 guard against using get_page with full urls
since that was hard to debug
2019-03-28 17:02:41 +01:00
Min RK
137a044f96 fix flaky test_user_redirect
when re-fetching the same url, use `requests.get`, not `get_page`
2019-03-28 17:01:00 +01:00
Min RK
a090632a48 Merge pull request #2488 from minrk/post_push
Docker hook fixes
2019-03-28 16:02:50 +01:00
Min RK
451a16c57e changelog for 0.9.5 2019-03-28 13:34:22 +01:00
Min RK
6e14e86a1a protect against some browsers' buggy handling of backslash as slash 2019-03-28 13:33:23 +01:00
Min RK
a142f543ba [docker] tag stable releases with :latest 2019-03-28 13:06:18 +01:00
Min RK
0bb3996c30 [docker] fix unbound variable in post_push hook for stable releases 2019-03-28 13:05:05 +01:00
442 changed files with 64090 additions and 13306 deletions

View File

@@ -1,21 +0,0 @@
# Python CircleCI 2.0 configuration file
# Updating CircleCI configuration from v1 to v2
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2
jobs:
build:
machine: true
steps:
- checkout
- run:
name: build images
command: |
docker build -t jupyterhub/jupyterhub .
docker build -t jupyterhub/jupyterhub-onbuild onbuild
docker build -t jupyterhub/jupyterhub:alpine -f dockerfiles/Dockerfile.alpine .
docker build -t jupyterhub/singleuser singleuser
- run:
name: smoke test jupyterhub
command: |
docker run --rm -it jupyterhub/jupyterhub jupyterhub --help

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

@@ -3,14 +3,9 @@
# E: style errors # E: style errors
# W: style warnings # W: style warnings
# C: complexity # C: complexity
# F401: module imported but unused # D: docstring warnings (unused pydocstyle extension)
# F403: import *
# F811: redefinition of unused `name` from line `N`
# F841: local variable assigned but never used # F841: local variable assigned but never used
# E402: module level import not at top of file ignore = E, C, W, D, F841
# I100: Import statements are in the wrong order
# I101: Imported names are in the wrong order. Should be
ignore = E, C, W, F401, F403, F811, F841, E402, I100, I101, D400
builtins = c, get_config builtins = c, get_config
exclude = exclude =
.cache, .cache,

View File

@@ -1,37 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
---
Hi! Thanks for using JupyterHub.
If you are reporting an issue with JupyterHub, please use the [GitHub issue](https://github.com/jupyterhub/jupyterhub/issues) search feature to check if your issue has been asked already. If it has, please add your comments to the existing issue.
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.
- Running `jupyter troubleshoot` from the command line, if possible, and posting
its output would also be helpful.
- Running in `--debug` mode can also be helpful for troubleshooting.

View File

@@ -1,7 +0,0 @@
---
name: Installation and configuration issues
about: Installation and configuration assistance
---
If you are having issues with installation or configuration, you may ask for help on the JupyterHub gitter channel or file an issue here.

57
.github/dependabot.yaml vendored Normal file
View File

@@ -0,0 +1,57 @@
# dependabot.yaml reference: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
#
# Notes:
# - Status and logs from dependabot are provided at
# https://github.com/jupyterhub/jupyterhub/network/updates.
#
version: 2
updates:
# Maintain dependencies in our GitHub Workflows
- package-ecosystem: github-actions
directory: /
labels: [ci]
schedule:
interval: monthly
time: "05:00"
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
schedule:
interval: monthly

View File

@@ -0,0 +1,54 @@
name: Update Registry overviews
env:
OWNER: ${{ github.repository_owner }}
on:
push:
branches:
- main
paths:
- ".github/workflows/registry-overviews.yml"
- "README.md"
- "onbuild/README.md"
- "demo-image/README.md"
- "singleuser/README.md"
workflow_dispatch:
jobs:
update-overview:
runs-on: ubuntu-latest
name: update-overview (${{matrix.image}})
if: github.repository_owner == 'jupyterhub'
steps:
- name: Checkout Repo ⚡️
uses: actions/checkout@v4
- name: Push README to Registry 🐳
uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8 # v1
env:
DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKER_PASS: ${{ secrets.DOCKERHUB_TOKEN }}
with:
destination_container_repo: ${{ env.OWNER }}/${{ matrix.image }}
provider: dockerhub
short_description: ${{ matrix.description }}
readme_file: ${{ matrix.readme_file }}
strategy:
matrix:
include:
- image: jupyterhub
description: "JupyterHub: multi-user Jupyter notebook server"
readme_file: README.md
- image: jupyterhub-onbuild
description: onbuild version of JupyterHub images
readme_file: onbuild/README.md
- image: jupyterhub-demo
description: Demo JupyterHub Docker image with a quick overview of what JupyterHub is and how it works
readme_file: demo-image/README.md
- image: singleuser
description: "single-user docker images for use with JupyterHub and DockerSpawner see also: jupyter/docker-stacks"
readme_file: singleuser/README.md

231
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,231 @@
# 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
#
# Test build release artifacts (PyPI package, Docker images) and publish them on
# pushed git tags.
#
name: Release
on:
pull_request:
paths-ignore:
- "docs/**"
- "**.md"
- "**.rst"
- ".github/workflows/*"
- "!.github/workflows/release.yml"
push:
paths-ignore:
- "docs/**"
- "**.md"
- "**.rst"
- ".github/workflows/*"
- "!.github/workflows/release.yml"
branches-ignore:
- "dependabot/**"
- "pre-commit-ci-update-config"
tags:
- "**"
workflow_dispatch:
jobs:
build-release:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
- uses: actions/setup-node@v4
with:
node-version: "20"
- name: install build requirements
run: |
npm install -g yarn
pip install --upgrade pip
pip install build
pip freeze
- name: build release
run: |
python -m build --sdist --wheel .
ls -l dist
- name: verify sdist
run: |
./ci/check_sdist.py dist/jupyterhub-*.tar.gz
- name: verify data-files are installed where they are found
run: |
pip install dist/*.whl
./ci/check_installed_data.py
- name: verify sdist can be installed without npm/yarn
run: |
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
- uses: actions/upload-artifact@v4
with:
name: jupyterhub-${{ github.sha }}
path: "dist/*"
if-no-files-found: error
- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags/')
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
pip install twine
twine upload --skip-existing dist/*
publish-docker:
runs-on: ubuntu-22.04
timeout-minutes: 30
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
echo "REGISTRY=quay.io/" >> $GITHUB_ENV
else
echo "REGISTRY=localhost:5000/" >> $GITHUB_ENV
fi
- uses: actions/checkout@v4
# 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@v3
- name: Set up Docker Buildx (for multi-arch builds)
uses: docker/setup-buildx-action@v3
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 [Robot Account](https://quay.io/organization/jupyterhub?tab=robots) in the JupyterHub
# . Quay.io org
# 2. Giving it enough permissions to push to the jupyterhub and singleuser images
# 3. Putting the robot account's username and password in GitHub actions environment
if: env.REGISTRY != 'localhost:5000/'
run: |
docker login -u "${{ secrets.QUAY_USERNAME }}" -p "${{ secrets.QUAY_PASSWORD }}" "${{ env.REGISTRY }}"
docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" -p "${{ secrets.DOCKERHUB_TOKEN }}" docker.io
# 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@v3
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
prefix: >-
${{ env.REGISTRY }}jupyterhub/jupyterhub:
jupyterhub/jupyterhub:
defaultTag: "${{ env.REGISTRY }}jupyterhub/jupyterhub:noref"
branchRegex: ^\w[\w-.]*$
- name: Build and push jupyterhub
uses: docker/build-push-action@v6
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@v3
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
prefix: >-
${{ env.REGISTRY }}jupyterhub/jupyterhub-onbuild:
jupyterhub/jupyterhub-onbuild:
defaultTag: "${{ env.REGISTRY }}jupyterhub/jupyterhub-onbuild:noref"
branchRegex: ^\w[\w-.]*$
- name: Build and push jupyterhub-onbuild
uses: docker/build-push-action@v6
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@v3
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
prefix: >-
${{ env.REGISTRY }}jupyterhub/jupyterhub-demo:
jupyterhub/jupyterhub-demo:
defaultTag: "${{ env.REGISTRY }}jupyterhub/jupyterhub-demo:noref"
branchRegex: ^\w[\w-.]*$
- name: Build and push jupyterhub-demo
uses: docker/build-push-action@v6
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@v3
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
prefix: >-
${{ env.REGISTRY }}jupyterhub/singleuser:
jupyterhub/singleuser:
defaultTag: "${{ env.REGISTRY }}jupyterhub/singleuser:noref"
branchRegex: ^\w[\w-.]*$
- name: Build and push jupyterhub/singleuser
uses: docker/build-push-action@v6
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)) }}

31
.github/workflows/support-bot.yml vendored Normal file
View File

@@ -0,0 +1,31 @@
# https://github.com/dessant/support-requests
name: "Support Requests"
on:
issues:
types: [labeled, unlabeled, reopened]
permissions:
issues: write
jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/support-requests@v4
with:
github-token: ${{ github.token }}
support-label: "support"
issue-comment: |
Hi there @{issue-author} :wave:!
I closed this issue because it was labelled as a support question.
Please help us organize discussion by posting this on the http://discourse.jupyter.org/ forum.
Our goal is to sustain a positive experience for both users and developers. We use GitHub issues for specific discussions related to changing a repository's content, and let the forum be where we can more generally help and inspire each other.
Thank you for being an active member of our community! :heart:
close-issue: true
lock-issue: false
issue-lock-reason: "off-topic"

117
.github/workflows/test-docs.yml vendored Normal file
View File

@@ -0,0 +1,117 @@
# 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
#
# This workflow validates the REST API definition and runs the pytest tests in
# the docs/ folder. This workflow does not build the documentation. That is
# instead tested via ReadTheDocs (https://readthedocs.org/projects/jupyterhub/).
#
name: Test docs
# The tests defined in docs/ are currently influenced by changes to _version.py
# and scopes.py.
on:
pull_request:
paths:
- "docs/**"
- "jupyterhub/_version.py"
- "jupyterhub/scopes.py"
- ".github/workflows/test-docs.yml"
push:
paths:
- "docs/**"
- "jupyterhub/_version.py"
- "jupyterhub/scopes.py"
- ".github/workflows/test-docs.yml"
branches-ignore:
- "dependabot/**"
- "pre-commit-ci-update-config"
tags:
- "**"
workflow_dispatch:
env:
# UTF-8 content may be interpreted as ascii and causes errors without this.
LANG: C.UTF-8
PYTEST_ADDOPTS: "--verbose --color=yes"
jobs:
validate-rest-api-definition:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
- name: Validate REST API definition
run: |
npx @redocly/cli lint
test-docs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
# make rediraffecheckdiff requires git history to compare current
# commit with the main branch and previous releases.
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
cache-dependency-path: |
requirements.txt
docs/requirements.txt
- name: Install requirements
run: |
pip install -e . -r docs/requirements.txt pytest
- name: pytest docs/
run: |
pytest docs/
# readthedocs doesn't halt on warnings,
# so raise any warnings here
- name: build docs
run: |
cd docs
make html
# Output broken and permanently redirected links in a readable format
- name: check links
uses: manics/action-sphinx-linkcheck-summary@main
with:
docs-dir: docs
build-dir: docs/_build
# make rediraffecheckdiff compares files for different changesets
# these diff targets aren't always available
# - compare with base ref (usually 'main', always on 'origin') for pull requests
# - only compare with tags when running against jupyterhub/jupyterhub
# to avoid errors on forks, which often lack tags
- name: check redirects for this PR
if: github.event_name == 'pull_request'
run: |
cd docs
export REDIRAFFE_BRANCH=origin/${{ github.base_ref }}
make rediraffecheckdiff
# this should check currently published 'stable' links for redirects
- name: check redirects since last release
if: github.repository == 'jupyterhub/jupyterhub'
run: |
cd docs
export REDIRAFFE_BRANCH=$(git describe --tags --abbrev=0)
make rediraffecheckdiff
# longer-term redirect check (fixed version) for older links
- name: check redirects since 3.0.0
if: github.repository == 'jupyterhub/jupyterhub'
run: |
cd docs
export REDIRAFFE_BRANCH=3.0.0
make rediraffecheckdiff

48
.github/workflows/test-jsx.yml vendored Normal file
View File

@@ -0,0 +1,48 @@
# 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
#
name: Test jsx (admin-react.js)
on:
pull_request:
paths:
- "jsx/**"
- ".github/workflows/test-jsx.yml"
push:
paths:
- "jsx/**"
- ".github/workflows/test-jsx.yml"
branches-ignore:
- "dependabot/**"
- "pre-commit-ci-update-config"
tags:
- "**"
workflow_dispatch:
permissions:
contents: read
jobs:
# 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
# tests also has tests that this job is meant to run with `npm test`
# according to the documentation in jsx/README.md.
test-jsx-admin-react:
runs-on: ubuntu-22.04
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- name: install jsx
run: |
cd jsx
npm ci
- name: test
run: |
cd jsx
npm test

282
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,282 @@
# 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
#
name: Test
on:
pull_request:
paths-ignore:
- "docs/**"
- "**.md"
- "**.rst"
- ".github/workflows/*"
- "!.github/workflows/test.yml"
push:
paths-ignore:
- "docs/**"
- "**.md"
- "**.rst"
- ".github/workflows/*"
- "!.github/workflows/test.yml"
branches-ignore:
- "dependabot/**"
- "pre-commit-ci-update-config"
tags:
- "**"
workflow_dispatch:
env:
# UTF-8 content may be interpreted as ascii and causes errors without this.
LANG: C.UTF-8
SQLALCHEMY_WARN_20: "1"
permissions:
contents: read
jobs:
# Run "pytest jupyterhub/tests" in various configurations
pytest:
runs-on: ubuntu-22.04
timeout-minutes: 15
strategy:
# Keep running even if one variation of the job fail
fail-fast: false
matrix:
# We run this job multiple times with different parameterization
# specified below, these parameters have no meaning on their own and
# gain meaning on how job steps use them.
#
# subdomain:
# Tests everything when JupyterHub is configured to add routes for
# users with dedicated subdomains like user1.jupyter.example.com
# rather than jupyter.example.com/user/user1.
#
# db: [mysql/postgres]
# Tests everything when JupyterHub works against a dedicated mysql or
# postgresql server.
#
# legacy_notebook:
# Tests everything when the user instances are started with
# the legacy notebook server instead of jupyter_server.
#
# ssl:
# Tests everything using internal SSL connections instead of
# unencrypted HTTP
#
# main_dependencies:
# Tests everything when we use the latest available dependencies
# from: traitlets.
#
# NOTE: Since only the value of these parameters are presented in the
# GitHub UI when the workflow run, we avoid using true/false as
# values by instead duplicating the name to signal true.
# Python versions available at:
# https://github.com/actions/python-versions/blob/HEAD/versions-manifest.json
include:
- python: "3.8"
oldest_dependencies: oldest_dependencies
legacy_notebook: legacy_notebook
- python: "3.8"
jupyter_server: "1.*"
subset: singleuser
- python: "3.9"
db: mysql
- python: "3.10"
db: postgres
- python: "3.12"
subdomain: subdomain
serverextension: serverextension
- python: "3.11"
ssl: ssl
serverextension: serverextension
- python: "3.11"
jupyverse: jupyverse
subset: singleuser
- python: "3.11"
subdomain: subdomain
noextension: noextension
subset: singleuser
- python: "3.11"
ssl: ssl
noextension: noextension
subset: singleuser
- python: "3.11"
browser: browser
- python: "3.11"
subdomain: subdomain
browser: browser
- python: "3.12"
main_dependencies: main_dependencies
steps:
# NOTE: In GitHub workflows, environment variables are set by writing
# assignment statements to a file. They will be set in the following
# steps as if would used `export MY_ENV=my-value`.
- name: Configure environment variables
run: |
if [ "${{ matrix.subdomain }}" != "" ]; then
echo "JUPYTERHUB_TEST_SUBDOMAIN_HOST=http://localhost.jovyan.org:8000" >> $GITHUB_ENV
fi
if [ "${{ matrix.db }}" == "mysql" ]; then
echo "MYSQL_HOST=127.0.0.1" >> $GITHUB_ENV
echo "JUPYTERHUB_TEST_DB_URL=mysql+mysqldb://root@127.0.0.1:3306/jupyterhub" >> $GITHUB_ENV
fi
if [ "${{ matrix.ssl }}" == "ssl" ]; then
echo "SSL_ENABLED=1" >> $GITHUB_ENV
fi
if [ "${{ matrix.db }}" == "postgres" ]; then
echo "PGHOST=127.0.0.1" >> $GITHUB_ENV
echo "PGUSER=test_user" >> $GITHUB_ENV
echo "PGPASSWORD=hub[test/:?" >> $GITHUB_ENV
echo "JUPYTERHUB_TEST_DB_URL=postgresql://test_user:hub%5Btest%2F%3A%3F@127.0.0.1:5432/jupyterhub" >> $GITHUB_ENV
fi
if [ "${{ matrix.serverextension }}" != "" ]; then
echo "JUPYTERHUB_SINGLEUSER_EXTENSION=1" >> $GITHUB_ENV
elif [ "${{ matrix.noextension }}" != "" ]; then
echo "JUPYTERHUB_SINGLEUSER_EXTENSION=0" >> $GITHUB_ENV
fi
if [ "${{ matrix.jupyverse }}" != "" ]; then
echo "JUPYTERHUB_SINGLEUSER_APP=jupyverse" >> $GITHUB_ENV
fi
- uses: actions/checkout@v4
# NOTE: actions/setup-node@v4 make use of a cache within the GitHub base
# environment and setup in a fraction of a second.
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install Javascript dependencies
run: |
npm install
npm install -g configurable-http-proxy yarn
npm list
# NOTE: actions/setup-python@v5 make use of a cache within the GitHub base
# environment and setup in a fraction of a second.
- name: Install Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python }}"
cache: pip
cache-dependency-path: |
pyproject.toml
requirements.txt
ci/oldest-dependencies/requirements.old
- name: Install Python dependencies
run: |
pip install --upgrade pip
if [ "${{ matrix.oldest_dependencies }}" != "" ]; then
# frozen env with oldest dependencies
# make sure our `>=` pins really do express our minimum supported versions
pip install -r ci/oldest-dependencies/requirements.old -e .
else
pip install --pre -e ".[test]"
fi
if [ "${{ matrix.main_dependencies }}" != "" ]; then
# Tests are broken:
# https://github.com/jupyterhub/jupyterhub/issues/4418
# pip install git+https://github.com/ipython/traitlets#egg=traitlets --force
pip install --upgrade --pre sqlalchemy
fi
if [ "${{ matrix.legacy_notebook }}" != "" ]; then
pip uninstall jupyter_server --yes
pip install 'notebook<7'
fi
if [ "${{ matrix.jupyter_server }}" != "" ]; then
pip install "jupyter_server==${{ matrix.jupyter_server }}"
fi
if [ "${{ matrix.jupyverse }}" != "" ]; then
pip install "jupyverse[jupyterlab,auth-jupyterhub]"
pip install -e .
fi
if [ "${{ matrix.db }}" == "mysql" ]; then
pip install mysqlclient
fi
if [ "${{ matrix.db }}" == "postgres" ]; then
pip install psycopg2-binary
fi
if [ "${{ matrix.serverextension }}" != "" ]; then
pip install 'jupyter-server>=2'
fi
pip freeze
# NOTE: If you need to debug this DB setup step, consider the following.
#
# 1. mysql/postgressql are database servers we start as docker containers,
# and we use clients named mysql/psql.
#
# 2. When we start a database server we need to pass environment variables
# explicitly as part of the `docker run` command. These environment
# variables are named differently from the similarly named environment
# variables used by the clients.
#
# - mysql server ref: https://hub.docker.com/_/mysql/
# - mysql client ref: https://dev.mysql.com/doc/refman/5.7/en/environment-variables.html
# - postgres server ref: https://hub.docker.com/_/postgres/
# - psql client ref: https://www.postgresql.org/docs/9.5/libpq-envars.html
#
# 3. When we connect, they should use 127.0.0.1 rather than the
# default way of connecting which leads to errors like below both for
# mysql and postgresql unless we set MYSQL_HOST/PGHOST to 127.0.0.1.
#
# - ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
#
- name: Start a database server (${{ matrix.db }})
if: ${{ matrix.db }}
run: |
if [ "${{ matrix.db }}" == "mysql" ]; then
if [[ -z "$(which mysql)" ]]; then
sudo apt-get update
sudo apt-get install -y mysql-client
fi
DB=mysql bash ci/docker-db.sh
DB=mysql bash ci/init-db.sh
fi
if [ "${{ matrix.db }}" == "postgres" ]; then
if [[ -z "$(which psql)" ]]; then
sudo apt-get update
sudo apt-get install -y postgresql-client
fi
DB=postgres bash ci/docker-db.sh
DB=postgres bash ci/init-db.sh
fi
- name: Configure browser tests
if: matrix.browser
run: echo "PYTEST_ADDOPTS=$PYTEST_ADDOPTS -m browser" >> "${GITHUB_ENV}"
- name: Ensure browsers are installed for playwright
if: matrix.browser
run: python -m playwright install --with-deps
- name: Run pytest
run: |
pytest -k "${{ matrix.subset }}" --maxfail=2 --cov=jupyterhub jupyterhub/tests
- uses: codecov/codecov-action@v4
docker-build:
runs-on: ubuntu-22.04
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- 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

18
.gitignore vendored
View File

@@ -8,21 +8,37 @@ dist
docs/_build docs/_build
docs/build docs/build
docs/source/_static/rest-api docs/source/_static/rest-api
docs/source/rbac/scope-table.md
docs/source/reference/metrics.md
.ipynb_checkpoints .ipynb_checkpoints
.virtual_documents
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
/jupyterhub_config.py /jupyterhub_config.py
jupyterhub_cookie_secret jupyterhub_cookie_secret
jupyterhub.sqlite jupyterhub.sqlite
package-lock.json jupyterhub.sqlite*
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*
*.egg-info *.egg-info
MANIFEST MANIFEST
.coverage .coverage
.coverage.* .coverage.*
htmlcov htmlcov
.idea/ .idea/
.vscode/
.pytest_cache .pytest_cache
pip-wheel-metadata pip-wheel-metadata
docs/source/reference/metrics.rst
oldest-requirements.txt
jupyterhub-proxy.pid
examples/server-api/service-token
*.hot-update*

View File

@@ -1,20 +1,58 @@
# pre-commit is a tool to perform a predefined set of tasks manually and/or
# automatically before git commits are made.
#
# Config reference: https://pre-commit.com/#pre-commit-configyaml---top-level
#
# Common tasks
#
# - Run on all files: pre-commit run --all-files
# - Register git hooks: pre-commit install --install-hooks
#
ci:
# pre-commit.ci will open PRs updating our hooks once a month
autoupdate_schedule: monthly
repos: repos:
- repo: https://github.com/asottile/reorder_python_imports # autoformat and lint Python code
rev: v1.3.5 - repo: https://github.com/astral-sh/ruff-pre-commit
hooks: rev: v0.6.3
- id: reorder-python-imports hooks:
language_version: python3.6 - id: ruff
- repo: https://github.com/ambv/black types_or:
rev: 18.9b0 - python
hooks: - jupyter
- id: black args: ["--fix", "--show-fixes"]
- repo: https://github.com/pre-commit/pre-commit-hooks - id: ruff-format
rev: v2.1.0 types_or:
hooks: - python
- id: end-of-file-fixer - jupyter
- id: check-json
- id: check-yaml # Autoformat: markdown, yaml, javascript (see the file .prettierignore)
- id: check-case-conflict - repo: https://github.com/pre-commit/mirrors-prettier
- id: check-executables-have-shebangs rev: v4.0.0-alpha.8
- id: requirements-txt-fixer hooks:
- id: flake8 - id: prettier
exclude: .*/templates/.*
# autoformat HTML templates
- repo: https://github.com/djlint/djLint
rev: v1.35.2
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
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: end-of-file-fixer
exclude: share/jupyterhub/static/js/admin-react.js
- id: requirements-txt-fixer
- id: check-case-conflict
- id: check-executables-have-shebangs

4
.prettierignore Normal file
View File

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

26
.readthedocs.yaml Normal file
View File

@@ -0,0 +1,26 @@
# Configuration on how ReadTheDocs (RTD) builds our documentation
# ref: https://readthedocs.org/projects/jupyterhub/
# ref: https://docs.readthedocs.io/en/stable/config-file/v2.html
#
version: 2
sphinx:
configuration: docs/source/conf.py
build:
os: ubuntu-22.04
tools:
nodejs: "20"
python: "3.11"
python:
install:
- path: .
- requirements: docs/requirements.txt
formats:
# Adding htmlzip enables a Downloads section in the rendered website's RTD
# menu where the html build can be downloaded. This doesn't require any
# additional configuration in docs/source/conf.py.
#
- htmlzip

View File

@@ -1,94 +0,0 @@
language: python
sudo: false
cache:
- pip
python:
- 3.6
- 3.5
- nightly
env:
global:
- ASYNC_TEST_TIMEOUT=15
- MYSQL_HOST=127.0.0.1
- MYSQL_TCP_PORT=13306
services:
- postgres
- docker
# installing dependencies
before_install:
- set -e
- nvm install 6; nvm use 6
- npm install
- npm install -g configurable-http-proxy
- |
# setup database
if [[ $JUPYTERHUB_TEST_DB_URL == mysql* ]]; then
unset MYSQL_UNIX_PORT
DB=mysql bash ci/docker-db.sh
DB=mysql bash ci/init-db.sh
pip install 'mysql-connector<2.2'
elif [[ $JUPYTERHUB_TEST_DB_URL == postgresql* ]]; then
DB=postgres bash ci/init-db.sh
pip install psycopg2-binary
fi
install:
- pip install --upgrade pip
- pip install --upgrade --pre -r dev-requirements.txt .
- pip freeze
# running tests
script:
- |
# run tests
if [[ -z "$TEST" ]]; then
pytest -v --maxfail=2 --cov=jupyterhub jupyterhub/tests
fi
- |
# run autoformat
if [[ "$TEST" == "lint" ]]; then
pre-commit run --all-files
fi
- |
# build docs
if [[ "$TEST" == "docs" ]]; then
pushd docs
pip install --upgrade -r requirements.txt
pip install --upgrade alabaster_jupyterhub
make html
popd
fi
after_success:
- codecov
after_failure:
- |
# point to auto-lint-fix
if [[ "$TEST" == "lint" ]]; then
echo "You can install pre-commit hooks to automatically run formatting"
echo "on each commit with:"
echo " pre-commit install"
echo "or you can run by hand on staged files with"
echo " pre-commit run"
echo "or after-the-fact on already committed files with"
echo " pre-commit run --all-files"
fi
matrix:
fast_finish: true
include:
- python: 3.6
env: TEST=lint
- python: 3.6
env: TEST=docs
- python: 3.6
env: JUPYTERHUB_TEST_SUBDOMAIN_HOST=http://localhost.jovyan.org:8000
- python: 3.6
env:
- JUPYTERHUB_TEST_DB_URL=mysql+mysqlconnector://root@127.0.0.1:$MYSQL_TCP_PORT/jupyterhub
- python: 3.6
env:
- JUPYTERHUB_TEST_DB_URL=postgresql://postgres@127.0.0.1/jupyterhub
- python: 3.7
dist: xenial
allow_failures:
- python: nightly

View File

@@ -1,26 +0,0 @@
# Release checklist
- [ ] Upgrade Docs prior to Release
- [ ] Change log
- [ ] New features documented
- [ ] Update the contributor list - thank you page
- [ ] Upgrade and test Reference Deployments
- [ ] Release software
- [ ] Make sure 0 issues in milestone
- [ ] Follow release process steps
- [ ] Send builds to PyPI (Warehouse) and Conda Forge
- [ ] Blog post and/or release note
- [ ] Notify users of release
- [ ] Email Jupyter and Jupyter In Education mailing lists
- [ ] Tweet (optional)
- [ ] Increment the version number for the next release
- [ ] Update roadmap

View File

@@ -1 +1 @@
Please refer to [Project Jupyter's Code of Conduct](https://github.com/jupyter/governance/blob/master/conduct/code_of_conduct.md). Please refer to [Project Jupyter's Code of Conduct](https://github.com/jupyter/governance/blob/HEAD/conduct/code_of_conduct.md).

View File

@@ -1,102 +1,14 @@
# Contributing to JupyterHub # Contributing to JupyterHub
Welcome! As a [Jupyter](https://jupyter.org) project, Welcome! As a [Jupyter](https://jupyter.org) project,
you can follow the [Jupyter contributor guide](https://jupyter.readthedocs.io/en/latest/contributor/content-contributor.html). you can follow the [Jupyter contributor guide](https://jupyter.readthedocs.io/en/latest/contributing/content-contributor.html).
Make sure to also follow [Project Jupyter's Code of Conduct](https://github.com/jupyter/governance/blob/master/conduct/code_of_conduct.md) Make sure to also follow [Project Jupyter's Code of Conduct](https://github.com/jupyter/governance/blob/HEAD/conduct/code_of_conduct.md)
for a friendly and welcoming collaborative environment. for a friendly and welcoming collaborative environment.
## Setting up a development environment Please see our documentation on
JupyterHub requires Python >= 3.5 and nodejs. - [Setting up a development install](https://jupyterhub.readthedocs.io/en/latest/contributing/setup.html)
- [Testing JupyterHub and linting code](https://jupyterhub.readthedocs.io/en/latest/contributing/tests.html)
As a Python project, a development install of JupyterHub follows standard practices for the basics (steps 1-2). If you need some help, feel free to ask on [Gitter](https://gitter.im/jupyterhub/jupyterhub) or [Discourse](https://discourse.jupyter.org/).
1. clone the repo
```bash
git clone https://github.com/jupyterhub/jupyterhub
```
2. do a development install with pip
```bash
cd jupyterhub
python3 -m pip install --editable .
```
3. install the development requirements,
which include things like testing tools
```bash
python3 -m pip install -r dev-requirements.txt
```
4. install configurable-http-proxy with npm:
```bash
npm install -g configurable-http-proxy
```
5. set up pre-commit hooks for automatic code formatting, etc.
```bash
pre-commit install
```
You can also invoke the pre-commit hook manually at any time with
```bash
pre-commit run
```
## Contributing
JupyterHub has adopted automatic code formatting so you shouldn't
need to worry too much about your code style.
As long as your code is valid,
the pre-commit hook should take care of how it should look.
You can invoke the pre-commit hook by hand at any time with:
```bash
pre-commit run
```
which should run any autoformatting on your code
and tell you about any errors it couldn't fix automatically.
You may also install [black integration](https://github.com/ambv/black#editor-integration)
into your text editor to format code automatically.
If you have already committed files before setting up the pre-commit
hook with `pre-commit install`, you can fix everything up using
`pre-commit run --all-files`. You need to make the fixing commit
yourself after that.
## Testing
It's a good idea to write tests to exercise any new features,
or that trigger any bugs that you have fixed to catch regressions.
You can run the tests with:
```bash
pytest -v
```
in the repo directory. If you want to just run certain tests,
check out the [pytest docs](https://pytest.readthedocs.io/en/latest/usage.html)
for how pytest can be called.
For instance, to test only spawner-related things in the REST API:
```bash
pytest -v -k spawn jupyterhub/tests/test_api.py
```
The tests live in `jupyterhub/tests` and are organized roughly into:
1. `test_api.py` tests the REST API
2. `test_pages.py` tests loading the HTML pages
and other collections of tests for different components.
When writing a new test, there should usually be a test of
similar functionality already written and related tests should
be added nearby.
When in doubt, feel free to ask.
TODO: describe some details about fixtures, etc.

View File

@@ -24,7 +24,7 @@ software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 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 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
@@ -46,8 +46,8 @@ Jupyter uses a shared copyright model. Each contributor maintains copyright
over their contributions to Jupyter. But, it is important to note that these over their contributions to Jupyter. But, it is important to note that these
contributions are typically only changes to the repositories. Thus, the Jupyter 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 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 institution. Instead, it is the collective copyright of the entire Jupyter
Development Team. If individual contributors want to maintain a record of what Development Team. If individual contributors want to maintain a record of what
changes/contributions they have specific copyright on, they should indicate changes/contributions they have specific copyright on, they should indicate
their copyright in the commit message of the change, when they commit the their copyright in the commit message of the change, when they commit the
change to one of the Jupyter repositories. change to one of the Jupyter repositories.

View File

@@ -6,7 +6,7 @@
# #
# Option 1: # Option 1:
# #
# FROM jupyterhub/jupyterhub:latest # FROM quay.io/jupyterhub/jupyterhub:latest
# #
# And put your configuration file jupyterhub_config.py in /srv/jupyterhub/jupyterhub_config.py. # And put your configuration file jupyterhub_config.py in /srv/jupyterhub/jupyterhub_config.py.
# #
@@ -14,47 +14,133 @@
# #
# Or you can create your jupyterhub config and database on the host machine, and mount it with: # 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 # docker run -v $PWD:/srv/jupyterhub -t quay.io/jupyterhub/jupyterhub
# #
# NOTE # NOTE
# If you base on jupyterhub/jupyterhub-onbuild # If you base on quay.io/jupyterhub/jupyterhub-onbuild
# your jupyterhub_config.py will be added automatically # your jupyterhub_config.py will be added automatically
# from your docker directory. # from your docker directory.
FROM ubuntu:18.04 ######################################################################
LABEL maintainer="Jupyter Project <jupyter@googlegroups.com>" # 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/
# install nodejs, utf8 locale, set CDN because default httpredir is unreliable ARG BASE_IMAGE=ubuntu:22.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y update && \
apt-get -y upgrade && \
apt-get -y install wget git bzip2 && \
apt-get purge && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
ENV LANG C.UTF-8
# install Python + NodeJS with conda
RUN wget -q https://repo.continuum.io/miniconda/Miniconda3-4.5.11-Linux-x86_64.sh -O /tmp/miniconda.sh && \
echo 'e1045ee415162f944b6aebfe560b8fee */tmp/miniconda.sh' | md5sum -c - && \
bash /tmp/miniconda.sh -f -b -p /opt/conda && \
/opt/conda/bin/conda install --yes -c conda-forge \
python=3.6 sqlalchemy tornado jinja2 traitlets requests pip pycurl \
nodejs configurable-http-proxy && \
/opt/conda/bin/pip install --upgrade pip && \
rm /tmp/miniconda.sh
ENV PATH=/opt/conda/bin:$PATH
ADD . /src/jupyterhub ######################################################################
# 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 \
git \
gnupg \
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)
ARG NODE_MAJOR=20
RUN mkdir -p /etc/apt/keyrings \
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
&& apt-get update \
&& apt-get install -yqq --no-install-recommends \
nodejs
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
# verify installed files
RUN --mount=type=cache,target=${PIP_CACHE_DIR} \
python3 -m pip install ./dist/*.whl \
&& cd ci \
&& python3 check_installed_data.py
######################################################################
# 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 WORKDIR /src/jupyterhub
RUN pip install . && \ COPY --from=jupyterhub-builder /src/jupyterhub/dist/*.whl /src/jupyterhub/dist/
rm -rf $PWD ~/.cache ~/.npm 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
RUN mkdir -p /srv/jupyterhub/
WORKDIR /srv/jupyterhub/
EXPOSE 8000 EXPOSE 8000
LABEL maintainer="Jupyter Project <jupyter@googlegroups.com>"
LABEL org.jupyter.service="jupyterhub" 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"] CMD ["jupyterhub"]

View File

@@ -1,24 +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 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
# 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
@@ -28,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

109
README.md
View File

@@ -6,27 +6,27 @@
**[License](#license)** | **[License](#license)** |
**[Help and Resources](#help-and-resources)** **[Help and Resources](#help-and-resources)**
---
# [JupyterHub](https://github.com/jupyterhub/jupyterhub) # [JupyterHub](https://github.com/jupyterhub/jupyterhub)
[![Latest PyPI version](https://img.shields.io/pypi/v/jupyterhub?logo=pypi)](https://pypi.python.org/pypi/jupyterhub)
[![PyPI](https://img.shields.io/pypi/v/jupyterhub.svg)](https://pypi.python.org/pypi/jupyterhub) [![Latest conda-forge version](https://img.shields.io/conda/vn/conda-forge/jupyterhub?logo=conda-forge)](https://anaconda.org/conda-forge/jupyterhub)
[![Documentation Status](https://readthedocs.org/projects/jupyterhub/badge/?version=latest)](https://jupyterhub.readthedocs.org/en/latest/?badge=latest) [![Documentation build status](https://img.shields.io/readthedocs/jupyterhub?logo=read-the-docs)](https://jupyterhub.readthedocs.org/en/latest/)
[![Build Status](https://travis-ci.org/jupyterhub/jupyterhub.svg?branch=master)](https://travis-ci.org/jupyterhub/jupyterhub) [![GitHub Workflow Status - Test](https://img.shields.io/github/workflow/status/jupyterhub/jupyterhub/Test?logo=github&label=tests)](https://github.com/jupyterhub/jupyterhub/actions)
[![Circle CI](https://circleci.com/gh/jupyterhub/jupyterhub.svg?style=shield&circle-token=b5b65862eb2617b9a8d39e79340b0a6b816da8cc)](https://circleci.com/gh/jupyterhub/jupyterhub) [![Test coverage of code](https://codecov.io/gh/jupyterhub/jupyterhub/branch/main/graph/badge.svg)](https://codecov.io/gh/jupyterhub/jupyterhub)
[![codecov.io](https://codecov.io/github/jupyterhub/jupyterhub/coverage.svg?branch=master)](https://codecov.io/github/jupyterhub/jupyterhub?branch=master) [![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.svg)](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.svg)](https://discourse.jupyter.org/c/jupyterhub) [![Gitter](https://img.shields.io/badge/social_chat-gitter-blue?logo=gitter)](https://gitter.im/jupyterhub/jupyterhub)
[![Gitter](https://img.shields.io/badge/social_chat-gitter-blue.svg)](https://gitter.im/jupyterhub/jupyterhub)
With [JupyterHub](https://jupyterhub.readthedocs.io) you can create a With [JupyterHub](https://jupyterhub.readthedocs.io) you can create a
**multi-user Hub** which spawns, manages, and proxies multiple instances of the **multi-user Hub** that spawns, manages, and proxies multiple instances of the
single-user [Jupyter notebook](https://jupyter-notebook.readthedocs.io) single-user [Jupyter notebook](https://jupyter-notebook.readthedocs.io)
server. server.
[Project Jupyter](https://jupyter.org) created JupyterHub to support many [Project Jupyter](https://jupyter.org) created JupyterHub to support many
users. The Hub can offer notebook servers to a class of students, a corporate users. The Hub can offer notebook servers to a class of students, a corporate
data science workgroup, a scientific research project, or a high performance data science workgroup, a scientific research project, or a high-performance
computing group. computing group.
## Technical overview ## Technical overview
@@ -40,38 +40,32 @@ Three main actors make up JupyterHub:
Basic principles for operation are: Basic principles for operation are:
- Hub launches a proxy. - Hub launches a proxy.
- Proxy forwards all requests to Hub by default. - The Proxy forwards all requests to Hub by default.
- Hub handles login, and spawns single-user servers on demand. - Hub handles login and spawns single-user servers on demand.
- Hub configures proxy to forward url prefixes to the single-user notebook - Hub configures proxy to forward URL prefixes to the single-user notebook
servers. servers.
JupyterHub also provides a JupyterHub also provides a
[REST API](http://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter/jupyterhub/master/docs/rest-api.yml#/default) [REST API][]
for administration of the Hub and its users. for administration of the Hub and its users.
## Installation [rest api]: https://jupyterhub.readthedocs.io/en/latest/reference/rest-api.html
## Installation
### Check prerequisites ### Check prerequisites
- A Linux/Unix based system - A Linux/Unix based system
- [Python](https://www.python.org/downloads/) 3.5 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.
* If you are using **`pip`**, install a recent version of - If you are using **`pip`**, install a recent version (at least 12.0) of
[nodejs/npm](https://docs.npmjs.com/getting-started/installing-node). [nodejs/npm](https://docs.npmjs.com/getting-started/installing-node).
For example, install it on Linux (Debian/Ubuntu) using:
```
sudo apt-get install npm nodejs-legacy
```
The `nodejs-legacy` package installs the `node` executable and is currently
required for npm to work on Debian/Ubuntu.
- If using the default PAM Authenticator, a [pluggable authentication module (PAM)](https://en.wikipedia.org/wiki/Pluggable_authentication_module).
- TLS certificate and key for HTTPS communication - TLS certificate and key for HTTPS communication
- Domain name - Domain name
@@ -85,12 +79,11 @@ To install JupyterHub along with its dependencies including nodejs/npm:
conda install -c conda-forge jupyterhub conda install -c conda-forge jupyterhub
``` ```
If you plan to run notebook servers locally, install the Jupyter notebook If you plan to run notebook servers locally, install JupyterLab or Jupyter notebook:
or JupyterLab:
```bash ```bash
conda install notebook
conda install jupyterlab conda install jupyterlab
conda install notebook
``` ```
#### Using `pip` #### Using `pip`
@@ -102,10 +95,10 @@ npm install -g configurable-http-proxy
python3 -m pip install jupyterhub python3 -m pip install jupyterhub
``` ```
If you plan to run notebook servers locally, you will need to install the If you plan to run notebook servers locally, you will need to install
[Jupyter notebook](https://jupyter.readthedocs.io/en/latest/install.html) [JupyterLab or Jupyter notebook](https://jupyter.readthedocs.io/en/latest/install.html):
package:
python3 -m pip install --upgrade jupyterlab
python3 -m pip install --upgrade notebook python3 -m pip install --upgrade notebook
### Run the Hub server ### Run the Hub server
@@ -114,18 +107,17 @@ To start the Hub server, run the command:
jupyterhub jupyterhub
Visit `https://localhost:8000` in your browser, and sign in with your unix Visit `http://localhost:8000` in your browser, and sign in with your system username and password.
PAM credentials.
*Note*: To allow multiple users to sign into 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 [wiki](https://github.com/jupyterhub/jupyterhub/wiki/Using-sudo-to-run-JupyterHub-without-root-privileges)
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.
## Configuration ## Configuration
The [Getting Started](https://jupyterhub.readthedocs.io/en/latest/getting-started/index.html) section of the The [Getting Started](https://jupyterhub.readthedocs.io/en/latest/tutorial/index.html#getting-started) section of the
documentation explains the common steps in setting up JupyterHub. documentation explains the common steps in setting up JupyterHub.
The [**JupyterHub tutorial**](https://github.com/jupyterhub/jupyterhub-tutorial) The [**JupyterHub tutorial**](https://github.com/jupyterhub/jupyterhub-tutorial)
@@ -139,18 +131,18 @@ To generate a default config file with settings and descriptions:
### Start the Hub ### Start the Hub
To start the Hub on a specific url and port ``10.0.1.2:443`` with **https**: To start the Hub on a specific url and port `10.0.1.2:443` with **https**:
jupyterhub --ip 10.0.1.2 --port 443 --ssl-key my_ssl.key --ssl-cert my_ssl.cert jupyterhub --ip 10.0.1.2 --port 443 --ssl-key my_ssl.key --ssl-cert my_ssl.cert
### Authenticators ### Authenticators
| Authenticator | Description | | Authenticator | Description |
| --------------------------------------------------------------------------- | ------------------------------------------------- | | ---------------------------------------------------------------------------- | ------------------------------------------------- |
| PAMAuthenticator | Default, built-in authenticator | | PAMAuthenticator | Default, built-in authenticator |
| [OAuthenticator](https://github.com/jupyterhub/oauthenticator) | OAuth + JupyterHub Authenticator = OAuthenticator | | [OAuthenticator](https://github.com/jupyterhub/oauthenticator) | OAuth + JupyterHub Authenticator = OAuthenticator |
| [ldapauthenticator](https://github.com/jupyterhub/ldapauthenticator) | Simple LDAP Authenticator Plugin for JupyterHub | | [ldapauthenticator](https://github.com/jupyterhub/ldapauthenticator) | Simple LDAP Authenticator Plugin for JupyterHub |
| [kdcAuthenticator](https://github.com/bloomberg/jupyterhub-kdcauthenticator)| Kerberos Authenticator Plugin for JupyterHub | | [kerberosauthenticator](https://github.com/jupyterhub/kerberosauthenticator) | Kerberos Authenticator Plugin for JupyterHub |
### Spawners ### Spawners
@@ -162,14 +154,15 @@ To start the Hub on a specific url and port ``10.0.1.2:443`` with **https**:
| [sudospawner](https://github.com/jupyterhub/sudospawner) | Spawn single-user servers without being root | | [sudospawner](https://github.com/jupyterhub/sudospawner) | Spawn single-user servers without being root |
| [systemdspawner](https://github.com/jupyterhub/systemdspawner) | Spawn single-user notebook servers using systemd | | [systemdspawner](https://github.com/jupyterhub/systemdspawner) | Spawn single-user notebook servers using systemd |
| [batchspawner](https://github.com/jupyterhub/batchspawner) | Designed for clusters using batch scheduling software | | [batchspawner](https://github.com/jupyterhub/batchspawner) | Designed for clusters using batch scheduling software |
| [yarnspawner](https://github.com/jupyterhub/yarnspawner) | Spawn single-user notebook servers distributed on a Hadoop cluster |
| [wrapspawner](https://github.com/jupyterhub/wrapspawner) | WrapSpawner and ProfilesSpawner enabling runtime configuration of spawners | | [wrapspawner](https://github.com/jupyterhub/wrapspawner) | WrapSpawner and ProfilesSpawner enabling runtime configuration of spawners |
## 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
@@ -177,7 +170,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`.
@@ -187,7 +180,7 @@ this a good choice for **testing JupyterHub on your desktop or laptop**.
If you want to run docker on a computer that has a public IP then you should 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 by using a ssl enabled proxy. configuration or by using an ssl enabled proxy.
[Mounting volumes](https://docs.docker.com/engine/admin/volumes/volumes/) will [Mounting volumes](https://docs.docker.com/engine/admin/volumes/volumes/) will
allow you to **store data outside the docker image (host system) so it will be persistent**, even when you start allow you to **store data outside the docker image (host system) so it will be persistent**, even when you start
@@ -200,7 +193,7 @@ These accounts will be used for authentication in JupyterHub's default configura
## Contributing ## Contributing
If you would like to contribute to the project, please read our If you would like to contribute to the project, please read our
[contributor documentation](http://jupyter.readthedocs.io/en/latest/contributor/content-contributor.html) [contributor documentation](https://jupyter.readthedocs.io/en/latest/contributing/content-contributor.html)
and the [`CONTRIBUTING.md`](CONTRIBUTING.md). The `CONTRIBUTING.md` file and the [`CONTRIBUTING.md`](CONTRIBUTING.md). The `CONTRIBUTING.md` file
explains how to set up a development installation, how to run the test suite, explains how to set up a development installation, how to run the test suite,
and how to contribute to documentation. and how to contribute to documentation.
@@ -227,20 +220,20 @@ 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. All code is licensed under the terms of the [revised BSD license](./COPYING.md).
## Help and resources ## Help and resources
We encourage you to ask questions on the [Jupyter mailing list](https://groups.google.com/forum/#!forum/jupyter). We encourage you to ask questions and share ideas on the [Jupyter community forum](https://discourse.jupyter.org/).
To participate in development discussions or get help, talk with us on You can also talk with us on our JupyterHub [Gitter](https://gitter.im/jupyterhub/jupyterhub) channel.
our JupyterHub [Gitter](https://gitter.im/jupyterhub/jupyterhub) channel.
- [Reporting Issues](https://github.com/jupyterhub/jupyterhub/issues) - [Reporting Issues](https://github.com/jupyterhub/jupyterhub/issues)
- [JupyterHub tutorial](https://github.com/jupyterhub/jupyterhub-tutorial) - [JupyterHub tutorial](https://github.com/jupyterhub/jupyterhub-tutorial)
- [Documentation for JupyterHub](https://jupyterhub.readthedocs.io/en/latest/) | [PDF (latest)](https://media.readthedocs.org/pdf/jupyterhub/latest/jupyterhub.pdf) | [PDF (stable)](https://media.readthedocs.org/pdf/jupyterhub/stable/jupyterhub.pdf) - [Documentation for JupyterHub](https://jupyterhub.readthedocs.io/en/latest/)
- [Documentation for JupyterHub's REST API](http://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter/jupyterhub/master/docs/rest-api.yml#/default) - [Documentation for JupyterHub's REST API][rest api]
- [Documentation for Project Jupyter](http://jupyter.readthedocs.io/en/latest/index.html) | [PDF](https://media.readthedocs.org/pdf/jupyter/latest/jupyter.pdf) - [Documentation for Project Jupyter](http://jupyter.readthedocs.io/en/latest/index.html)
- [Project Jupyter website](https://jupyter.org) - [Project Jupyter website](https://jupyter.org)
- [Project Jupyter community](https://jupyter.org/community)
JupyterHub follows the Jupyter [Community Guides](https://jupyter.readthedocs.io/en/latest/community/content-community.html). JupyterHub follows the Jupyter [Community Guides](https://jupyter.readthedocs.io/en/latest/community/content-community.html).

55
RELEASE.md Normal file
View File

@@ -0,0 +1,55 @@
# How to make a release
`jupyterhub` is a package available on [PyPI][] and [conda-forge][].
These are instructions on how to make a release.
## Pre-requisites
- Push rights to [jupyterhub/jupyterhub][]
- Push rights to [conda-forge/jupyterhub-feedstock][]
## Steps to make a release
1. Create a PR updating `docs/source/changelog.md` with [github-activity][] and
continue only when its merged.
```shell
pip install github-activity
github-activity --heading-level=3 jupyterhub/jupyterhub
```
1. Checkout main and make sure it is up to date.
```shell
git checkout main
git fetch origin main
git reset --hard origin/main
```
1. Update the version, make commits, and push a git tag with `tbump`.
```shell
pip install tbump
tbump --dry-run ${VERSION}
tbump ${VERSION}
```
Following this, the [CI system][] will build and publish a release.
1. Reset the version back to dev, e.g. `2.1.0.dev` after releasing `2.0.0`
```shell
tbump --no-tag ${NEXT_VERSION}.dev
```
1. Following the release to PyPI, an automated PR should arrive to
[conda-forge/jupyterhub-feedstock][] with instructions.
[pypi]: https://pypi.org/project/jupyterhub/
[conda-forge]: https://anaconda.org/conda-forge/jupyterhub
[jupyterhub/jupyterhub]: https://github.com/jupyterhub/jupyterhub
[conda-forge/jupyterhub-feedstock]: https://github.com/conda-forge/jupyterhub-feedstock
[github-activity]: https://github.com/executablebooks/github-activity
[ci system]: https://github.com/jupyterhub/jupyterhub/actions/workflows/release.yml

5
SECURITY.md Normal file
View File

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

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
@@ -29,5 +30,5 @@ dependencies = package_json['dependencies']
for dep in dependencies: for dep in dependencies:
src = join(node_modules, dep) src = join(node_modules, dep)
dest = join(components, dep) dest = join(components, dep)
print("%s -> %s" % (src, dest)) print(f"{src} -> {dest}")
shutil.copytree(src, dest) shutil.copytree(src, dest)

36
ci/check_installed_data.py Executable file
View File

@@ -0,0 +1,36 @@
#!/usr/bin/env python
# Check that installed package contains everything we expect
from pathlib import Path
import jupyterhub
from jupyterhub._data import DATA_FILES_PATH
print("Checking jupyterhub._data", end=" ")
print(f"DATA_FILES_PATH={DATA_FILES_PATH}", end=" ")
DATA_FILES_PATH = Path(DATA_FILES_PATH)
assert DATA_FILES_PATH.is_dir(), DATA_FILES_PATH
for subpath in (
"templates/spawn.html",
"static/css/style.min.css",
"static/components/jquery/dist/jquery.js",
"static/js/admin-react.js",
):
path = DATA_FILES_PATH / subpath
assert path.is_file(), path
print("OK")
print("Checking package_data", end=" ")
jupyterhub_path = Path(jupyterhub.__file__).parent.resolve()
for subpath in (
"alembic.ini",
"alembic/versions/833da8570507_rbac.py",
"event-schemas/server-actions/v1.yaml",
"singleuser/templates/page.html",
):
path = jupyterhub_path / subpath
assert path.is_file(), path
print("OK")

27
ci/check_sdist.py Executable file
View File

@@ -0,0 +1,27 @@
#!/usr/bin/env python
# Check that sdist contains everything we expect
import sys
import tarfile
expected_files = [
"docs/requirements.txt",
"jsx/package.json",
"package.json",
"README.md",
]
assert len(sys.argv) == 2, "Expected one file"
print(f"Checking {sys.argv[1]}")
tar = tarfile.open(name=sys.argv[1], mode="r:gz")
try:
# Remove leading jupyterhub-VERSION/
filelist = {f.partition('/')[2] for f in tar.getnames()}
finally:
tar.close()
for e in expected_files:
assert e in filelist, f"{e} not found"
print("OK")

View File

@@ -1,50 +1,60 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# source this file to setup postgres and mysql # The goal of this script is to start a database server as a docker container.
# for local testing (as similar as possible to docker) #
# Required environment variables:
# - DB: The database server to start, either "postgres" or "mysql".
#
# - PGUSER/PGPASSWORD: For the creation of a postgresql user with associated
# password.
set -e set -eu
export MYSQL_HOST=127.0.0.1 # Stop and remove any existing database container
export MYSQL_TCP_PORT=${MYSQL_TCP_PORT:-13306} DOCKER_CONTAINER="hub-test-$DB"
export PGHOST=127.0.0.1 docker rm -f "$DOCKER_CONTAINER" 2>/dev/null || true
NAME="hub-test-$DB"
DOCKER_RUN="docker run -d --name $NAME"
docker rm -f "$NAME" 2>/dev/null || true # Prepare environment variables to startup and await readiness of either a mysql
# or postgresql server.
if [[ "$DB" == "mysql" ]]; then
# Environment variables can influence both the mysql server in the docker
# container and the mysql client.
#
# ref server: https://hub.docker.com/_/mysql/
# ref client: https://dev.mysql.com/doc/refman/5.7/en/setting-environment-variables.html
#
DOCKER_RUN_ARGS="-p 3306:3306 --env MYSQL_ALLOW_EMPTY_PASSWORD=1 mysql:8.0"
READINESS_CHECK="mysql --user root --execute \q"
elif [[ "$DB" == "postgres" ]]; then
# Environment variables can influence both the postgresql server in the
# docker container and the postgresql client (psql).
#
# ref server: https://hub.docker.com/_/postgres/
# ref client: https://www.postgresql.org/docs/9.5/libpq-envars.html
#
# POSTGRES_USER / POSTGRES_PASSWORD will create a user on startup of the
# postgres server, but PGUSER and PGPASSWORD are the environment variables
# used by the postgresql client psql, so we configure the user based on how
# we want to connect.
#
DOCKER_RUN_ARGS="-p 5432:5432 --env "POSTGRES_USER=${PGUSER}" --env "POSTGRES_PASSWORD=${PGPASSWORD}" postgres:15.1"
READINESS_CHECK="psql --command \q"
else
echo '$DB must be mysql or postgres'
exit 1
fi
case "$DB" in # Start the database server
"mysql") docker run --detach --name "$DOCKER_CONTAINER" $DOCKER_RUN_ARGS
RUN_ARGS="-e MYSQL_ALLOW_EMPTY_PASSWORD=1 -p $MYSQL_TCP_PORT:3306 mysql:5.7"
CHECK="mysql --host $MYSQL_HOST --port $MYSQL_TCP_PORT --user root -e \q"
;;
"postgres")
RUN_ARGS="-p 5432:5432 postgres:9.5"
CHECK="psql --user postgres -c \q"
;;
*)
echo '$DB must be mysql or postgres'
exit 1
esac
$DOCKER_RUN $RUN_ARGS
# Wait for the database server to start
echo -n "waiting for $DB " echo -n "waiting for $DB "
for i in {1..60}; do for i in {1..60}; do
if $CHECK; then if $READINESS_CHECK; then
echo 'done' echo 'done'
break break
else else
echo -n '.' echo -n '.'
sleep 1 sleep 1
fi fi
done done
$CHECK $READINESS_CHECK
echo -e "
Set these environment variables:
export MYSQL_HOST=127.0.0.1
export MYSQL_TCP_PORT=$MYSQL_TCP_PORT
export PGHOST=127.0.0.1
"

View File

@@ -1,27 +1,27 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# initialize jupyterhub databases for testing # The goal of this script is to initialize a running database server with clean
# databases for use during tests.
#
# Required environment variables:
# - DB: The database server to start, either "postgres" or "mysql".
set -e set -eu
MYSQL="mysql --user root --host $MYSQL_HOST --port $MYSQL_TCP_PORT -e " # Prepare env vars SQL_CLIENT and EXTRA_CREATE_DATABASE_ARGS
PSQL="psql --user postgres -c " if [[ "$DB" == "mysql" ]]; then
SQL_CLIENT="mysql --user root --execute "
case "$DB" in EXTRA_CREATE_DATABASE_ARGS='CHARACTER SET utf8 COLLATE utf8_general_ci'
"mysql") elif [[ "$DB" == "postgres" ]]; then
EXTRA_CREATE='CHARACTER SET utf8 COLLATE utf8_general_ci' SQL_CLIENT="psql --command "
SQL="$MYSQL" else
;; echo '$DB must be mysql or postgres'
"postgres") exit 1
SQL="$PSQL" fi
;;
*)
echo '$DB must be mysql or postgres'
exit 1
esac
# 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
set -x set -x
for SUFFIX in '' _upgrade_110 _upgrade_122 _upgrade_130 _upgrade_150 _upgrade_211 _upgrade_311; do
for SUFFIX in '' _upgrade_072 _upgrade_081 _upgrade_094; do $SQL_CLIENT "DROP DATABASE jupyterhub${SUFFIX};" 2>/dev/null || true
$SQL "DROP DATABASE jupyterhub${SUFFIX};" 2>/dev/null || true $SQL_CLIENT "CREATE DATABASE jupyterhub${SUFFIX} ${EXTRA_CREATE_DATABASE_ARGS:-};"
$SQL "CREATE DATABASE jupyterhub${SUFFIX} ${EXTRA_CREATE};"
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

16
demo-image/Dockerfile Normal file
View File

@@ -0,0 +1,16 @@
# 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=quay.io/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

26
demo-image/README.md Normal file
View File

@@ -0,0 +1,26 @@
## 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

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

View File

@@ -1,17 +0,0 @@
-r requirements.txt
# temporary pin of attrs for jsonschema 0.3.0a1
# seems to be a pip bug
attrs>=17.4.0
beautifulsoup4
codecov
coverage
cryptography
html5lib # needed for beautifulsoup
mock
notebook
pre-commit
pytest-asyncio
pytest-cov
pytest>=3.3
requests-mock
virtualenv

View File

@@ -1,9 +0,0 @@
FROM python:3.6.3-alpine3.6
ARG JUPYTERHUB_VERSION=0.8.1
RUN pip3 install --no-cache jupyterhub==${JUPYTERHUB_VERSION}
ENV LANG=en_US.UTF-8
USER nobody
CMD ["jupyterhub"]

View File

@@ -1,20 +0,0 @@
## What is Dockerfile.alpine
Dockerfile.alpine contains base image for jupyterhub. It does not work independently, but only as part of a full jupyterhub cluster
## How to use it?
1. A running configurable-http-proxy, whose API is accessible.
2. A jupyterhub_config file.
3. Authentication and other libraries required by the specific jupyterhub_config file.
## Steps to test it outside a cluster
* start configurable-http-proxy in another container
* specify CONFIGPROXY_AUTH_TOKEN env in both containers
* put both containers on the same network (e.g. docker create network jupyterhub; docker run ... --net jupyterhub)
* tell jupyterhub where CHP is (e.g. c.ConfigurableHTTPProxy.api_url = 'http://chp:8001')
* tell jupyterhub not to start the proxy itself (c.ConfigurableHTTPProxy.should_start = False)
* Use dummy authenticator for ease of testing. Update following in jupyterhub_config file
- c.JupyterHub.authenticator_class = 'dummyauthenticator.DummyAuthenticator'
- c.DummyAuthenticator.password = "your strong password"

14
dockerfiles/test.py Normal file
View File

@@ -0,0 +1,14 @@
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

@@ -1,206 +1,62 @@
# Makefile for Sphinx documentation # Makefile for Sphinx documentation generated by sphinx-quickstart
# # ----------------------------------------------------------------------------
# You can set these variables from the command line. # You can set these variables from the command line, and also
SPHINXOPTS = "-W" # from the environment for the first two.
SPHINXBUILD = sphinx-build SPHINXOPTS ?= --color -W --keep-going
PAPER = SPHINXBUILD ?= sphinx-build
BUILDDIR = build SOURCEDIR = source
BUILDDIR = _build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext
# Put it first so that "make" without argument is like "make help".
help: help:
@echo "Please use \`make <target>' where <target> is one of" @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " applehelp to make an Apple Help Book"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " coverage to run coverage check of the documentation (if enabled)"
@echo " spelling to run spell check on documentation"
clean: .PHONY: help Makefile metrics scopes
rm -rf $(BUILDDIR)/*
node_modules: package.json # Catch-all target: route all unknown targets to Sphinx using the new
npm install && touch node_modules # "make mode" option.
#
# Several sphinx-build commands can be used through this, for example:
#
# - make clean
# - make linkcheck
# - make spelling
#
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)
rest-api: source/_static/rest-api/index.html
source/_static/rest-api/index.html: rest-api.yml node_modules # Manually added targets - related to code generation
npm run rest-api # ----------------------------------------------------------------------------
html: rest-api # For local development:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html # - builds the html
# - NOTE: If the pre-requisites for the html target is updated, also update the
# Read The Docs section in docs/source/conf.py.
#
html: metrics scopes
$(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."
dirhtml: metrics: source/reference/metrics.md
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml source/reference/metrics.md:
@echo python3 generate-metrics.py
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml: scopes: source/rbac/scope-table.md
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml source/rbac/scope-table.md:
@echo python3 source/rbac/generate-scope-table.py
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json: # Manually added targets - related to development
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json # ----------------------------------------------------------------------------
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp: # For local development:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp # - requires sphinx-autobuild, see
@echo # https://sphinxcontrib-spelling.readthedocs.io/en/latest/
@echo "Build finished; now you can run HTML Help Workshop with the" \ # - builds and rebuilds html on changes to source, but does not re-generate
".hhp project file in $(BUILDDIR)/htmlhelp." # metrics/scopes files
# - starts a livereload enabled webserver and opens up a browser
qthelp: devenv: html
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp sphinx-autobuild -b html --open-browser "$(SOURCEDIR)" "$(BUILDDIR)/html"
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/JupyterHub.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/JupyterHub.qhc"
applehelp:
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
@echo
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
@echo "N.B. You won't be able to view it unless you put it in" \
"~/Library/Documentation/Help or install it in your application" \
"bundle."
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/JupyterHub"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/JupyterHub"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
spelling:
$(SPHINXBUILD) -b spelling $(ALLSPHINXOPTS) $(BUILDDIR)/spelling
@echo
@echo "Spell check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/spelling/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
coverage:
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
@echo "Testing of coverage in the sources finished, look at the " \
"results in $(BUILDDIR)/coverage/python.txt."
xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."

View File

@@ -1,25 +0,0 @@
# ReadTheDocs uses the `environment.yaml` so make sure to update that as well
# if you change the dependencies of JupyterHub in the various `requirements.txt`
name: jhub_docs
channels:
- conda-forge
dependencies:
- nodejs
- python=3.6
- alembic
- jinja2
- pamela
- requests
- sqlalchemy>=1
- tornado>=5.0
- traitlets>=4.1
- sphinx>=1.7
- pip:
- entrypoints
- oauthlib>=2.0
- recommonmark==0.5.0
- async_generator
- prometheus_client
- attrs>=17.4.0
- sphinx-copybutton
- alabaster_jupyterhub

53
docs/generate-metrics.py Normal file
View File

@@ -0,0 +1,53 @@
import os
from pytablewriter import MarkdownTableWriter
import jupyterhub.metrics
HERE = os.path.abspath(os.path.dirname(__file__))
class Generator:
@classmethod
def create_writer(cls, table_name, headers, values):
writer = MarkdownTableWriter()
writer.table_name = table_name
writer.headers = headers
writer.value_matrix = values
writer.margin = 1
return writer
def _parse_metrics(self):
table_rows = []
for name in dir(jupyterhub.metrics):
obj = getattr(jupyterhub.metrics, name)
if obj.__class__.__module__.startswith('prometheus_client.'):
for metric in obj.describe():
table_rows.append([metric.type, metric.name, metric.documentation])
return table_rows
def prometheus_metrics(self):
generated_directory = f"{HERE}/source/reference"
if not os.path.exists(generated_directory):
os.makedirs(generated_directory)
filename = f"{generated_directory}/metrics.md"
table_name = ""
headers = ["Type", "Name", "Description"]
values = self._parse_metrics()
writer = self.create_writer(table_name, headers, values)
with open(filename, 'w') as f:
f.write("# List of Prometheus Metrics\n\n")
f.write(writer.dumps())
f.write("\n")
print(f"Generated {filename}")
def main():
doc_generator = Generator()
doc_generator.prometheus_metrics()
if __name__ == "__main__":
main()

View File

@@ -1,263 +1,49 @@
@ECHO OFF @ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=--color -W --keep-going
)
if "%SPHINXBUILD%" == "" ( if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build set SPHINXBUILD=sphinx-build
) )
set BUILDDIR=build set SOURCEDIR=source
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source set BUILDDIR=_build
set I18NSPHINXOPTS=%SPHINXOPTS% source
if NOT "%PAPER%" == "" (
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
)
if "%1" == "" goto help if "%1" == "" goto help
if "%1" == "devenv" goto devenv
if "%1" == "help" ( goto default
:help
echo.Please use `make ^<target^>` where ^<target^> is one of
echo. html to make standalone HTML files
echo. dirhtml to make HTML files named index.html in directories
echo. singlehtml to make a single large HTML file
echo. pickle to make pickle files
echo. json to make JSON files
echo. htmlhelp to make HTML files and a HTML help project
echo. qthelp to make HTML files and a qthelp project
echo. devhelp to make HTML files and a Devhelp project
echo. epub to make an epub
echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
echo. text to make text files
echo. man to make manual pages
echo. texinfo to make Texinfo files
echo. gettext to make PO message catalogs
echo. changes to make an overview over all changed/added/deprecated items
echo. xml to make Docutils-native XML files
echo. pseudoxml to make pseudoxml-XML files for display purposes
echo. linkcheck to check all external links for integrity
echo. doctest to run all doctests embedded in the documentation if enabled
echo. coverage to run coverage check of the documentation if enabled
goto end
)
if "%1" == "clean" (
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
del /q /s %BUILDDIR%\*
goto end
)
REM Check if sphinx-build is available and fallback to Python version if any :default
%SPHINXBUILD% 1>NUL 2>NUL %SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 goto sphinx_python
goto sphinx_ok
:sphinx_python
set SPHINXBUILD=python -m sphinx.__init__
%SPHINXBUILD% 2> nul
if errorlevel 9009 ( if errorlevel 9009 (
echo. echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx echo.The 'sphinx-build' command was not found. Open and read README.md!
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1 exit /b 1
) )
%SPHINXBUILD% -M %1 "%SOURCEDIR%" "%BUILDDIR%" %SPHINXOPTS%
:sphinx_ok goto end
if "%1" == "html" ( :help
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html %SPHINXBUILD% -M help "%SOURCEDIR%" "%BUILDDIR%" %SPHINXOPTS%
if errorlevel 1 exit /b 1 goto end
:devenv
sphinx-autobuild >NUL 2>NUL
if errorlevel 9009 (
echo. echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/html. echo.The 'sphinx-autobuild' command was not found. Open and read README.md!
goto end exit /b 1
) )
sphinx-autobuild -b html --open-browser "%SOURCEDIR%" "%BUILDDIR%/html"
goto end
if "%1" == "dirhtml" (
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
goto end
)
if "%1" == "singlehtml" (
%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
goto end
)
if "%1" == "pickle" (
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the pickle files.
goto end
)
if "%1" == "json" (
%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the JSON files.
goto end
)
if "%1" == "htmlhelp" (
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run HTML Help Workshop with the ^
.hhp project file in %BUILDDIR%/htmlhelp.
goto end
)
if "%1" == "qthelp" (
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in %BUILDDIR%/qthelp, like this:
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\JupyterHub.qhcp
echo.To view the help file:
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\JupyterHub.ghc
goto end
)
if "%1" == "devhelp" (
%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished.
goto end
)
if "%1" == "epub" (
%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The epub file is in %BUILDDIR%/epub.
goto end
)
if "%1" == "latex" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
if errorlevel 1 exit /b 1
echo.
echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "latexpdf" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
cd %BUILDDIR%/latex
make all-pdf
cd %~dp0
echo.
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "latexpdfja" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
cd %BUILDDIR%/latex
make all-pdf-ja
cd %~dp0
echo.
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "text" (
%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The text files are in %BUILDDIR%/text.
goto end
)
if "%1" == "man" (
%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The manual pages are in %BUILDDIR%/man.
goto end
)
if "%1" == "texinfo" (
%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
goto end
)
if "%1" == "gettext" (
%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
goto end
)
if "%1" == "changes" (
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
if errorlevel 1 exit /b 1
echo.
echo.The overview file is in %BUILDDIR%/changes.
goto end
)
if "%1" == "linkcheck" (
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
if errorlevel 1 exit /b 1
echo.
echo.Link check complete; look for any errors in the above output ^
or in %BUILDDIR%/linkcheck/output.txt.
goto end
)
if "%1" == "doctest" (
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
if errorlevel 1 exit /b 1
echo.
echo.Testing of doctests in the sources finished, look at the ^
results in %BUILDDIR%/doctest/output.txt.
goto end
)
if "%1" == "coverage" (
%SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage
if errorlevel 1 exit /b 1
echo.
echo.Testing of coverage in the sources finished, look at the ^
results in %BUILDDIR%/coverage/python.txt.
goto end
)
if "%1" == "xml" (
%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The XML files are in %BUILDDIR%/xml.
goto end
)
if "%1" == "pseudoxml" (
%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
goto end
)
:end :end
popd

View File

@@ -1,14 +0,0 @@
{
"name": "jupyterhub-docs-build",
"version": "0.8.0",
"description": "build JupyterHub swagger docs",
"scripts": {
"rest-api": "bootprint openapi ./rest-api.yml source/_static/rest-api"
},
"author": "",
"license": "BSD-3-Clause",
"devDependencies": {
"bootprint": "^1.0.0",
"bootprint-openapi": "^1.0.0"
}
}

View File

@@ -1,7 +1,14 @@
# ReadTheDocs uses the `environment.yaml` so make sure to update that as well # docs also require jupyterhub itself to be installed
# if you change this file # don't depend on it here, as that often results in a duplicate
-r ../requirements.txt # installation of jupyterhub that's already installed
alabaster_jupyterhub autodoc-traits
recommonmark==0.5.0 jupyterhub-sphinx-theme
myst-parser>=0.19
pre-commit
pytablewriter>=0.56
ruamel.yaml
sphinx>=4
sphinx-copybutton sphinx-copybutton
sphinx>=1.7 sphinx-jsonschema
sphinxext-opengraph
sphinxext-rediraffe

View File

@@ -1,818 +0,0 @@
# see me at: http://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter/jupyterhub/master/docs/rest-api.yml#/default
swagger: '2.0'
info:
title: JupyterHub
description: The REST API for JupyterHub
version: 0.9.0dev
license:
name: BSD-3-Clause
schemes:
- [http, https]
securityDefinitions:
token:
type: apiKey
name: Authorization
in: header
security:
- token: []
basePath: /hub/api
produces:
- application/json
consumes:
- application/json
paths:
/:
get:
summary: Get JupyterHub version
description: |
This endpoint is not authenticated for the purpose of clients and user
to identify the JupyterHub version before setting up authentication.
responses:
'200':
description: The JupyterHub version
schema:
type: object
properties:
version:
type: string
description: The version of JupyterHub itself
/info:
get:
summary: Get detailed info about JupyterHub
description: |
Detailed JupyterHub information, including Python version,
JupyterHub's version and executable path,
and which Authenticator and Spawner are active.
responses:
'200':
description: Detailed JupyterHub info
schema:
type: object
properties:
version:
type: string
description: The version of JupyterHub itself
python:
type: string
description: The Python version, as returned by sys.version
sys_executable:
type: string
description: The path to sys.executable running JupyterHub
authenticator:
type: object
properties:
class:
type: string
description: The Python class currently active for JupyterHub Authentication
version:
type: string
description: The version of the currently active Authenticator
spawner:
type: object
properties:
class:
type: string
description: The Python class currently active for spawning single-user notebook servers
version:
type: string
description: The version of the currently active Spawner
/users:
get:
summary: List users
responses:
'200':
description: The Hub's user list
schema:
type: array
items:
$ref: '#/definitions/User'
post:
summary: Create multiple users
parameters:
- name: body
in: body
required: true
schema:
type: object
properties:
usernames:
type: array
description: list of usernames to create on the Hub
items:
type: string
admin:
description: whether the created users should be admins
type: boolean
responses:
'201':
description: The users have been created
schema:
type: array
description: The created users
items:
$ref: '#/definitions/User'
/users/{name}:
get:
summary: Get a user by name
parameters:
- name: name
description: username
in: path
required: true
type: string
responses:
'200':
description: The User model
schema:
$ref: '#/definitions/User'
post:
summary: Create a single user
parameters:
- name: name
description: username
in: path
required: true
type: string
responses:
'201':
description: The user has been created
schema:
$ref: '#/definitions/User'
patch:
summary: Modify a user
description: Change a user's name or admin status
parameters:
- name: name
description: username
in: path
required: true
type: string
- name: body
in: body
required: true
description: Updated user info. At least one key to be updated (name or admin) is required.
schema:
type: object
properties:
name:
type: string
description: the new name (optional, if another key is updated i.e. admin)
admin:
type: boolean
description: update admin (optional, if another key is updated i.e. name)
responses:
'200':
description: The updated user info
schema:
$ref: '#/definitions/User'
delete:
summary: Delete a user
parameters:
- name: name
description: username
in: path
required: true
type: string
responses:
'204':
description: The user has been deleted
/users/{name}/activity:
post:
summary:
Notify Hub of activity for a given user.
description:
Notify the Hub of activity by the user,
e.g. accessing a service or (more likely)
actively using a server.
parameters:
- name: name
description: username
in: path
required: true
type: string
- body:
in: body
schema:
type: object
properties:
last_activity:
type: string
format: date-time
description: |
Timestamp of last-seen activity for this user.
Only needed if this is not activity associated
with using a given server.
required: false
servers:
description: |
Register activity for specific servers by name.
The keys of this dict are the names of servers.
The default server has an empty name ('').
required: false
type: object
properties:
'<server name>':
description: |
Activity for a single server.
type: object
properties:
last_activity:
required: true
type: string
format: date-time
description: |
Timestamp of last-seen activity on this server.
example:
last_activity: '2019-02-06T12:54:14Z'
servers:
'':
last_activity: '2019-02-06T12:54:14Z'
gpu:
last_activity: '2019-02-06T12:54:14Z'
/users/{name}/server:
post:
summary: Start a user's single-user notebook server
parameters:
- name: name
description: username
in: path
required: true
type: string
- options:
description: |
Spawn options can be passed as a JSON body
when spawning via the API instead of spawn form.
The structure of the options
will depend on the Spawner's configuration.
in: body
required: false
type: object
responses:
'201':
description: The user's notebook server has started
'202':
description: The user's notebook server has not yet started, but has been requested
delete:
summary: Stop a user's server
parameters:
- name: name
description: username
in: path
required: true
type: string
responses:
'204':
description: The user's notebook server has stopped
'202':
description: The user's notebook server has not yet stopped as it is taking a while to stop
/users/{name}/servers/{server_name}:
post:
summary: Start a user's single-user named-server notebook server
parameters:
- name: name
description: username
in: path
required: true
type: string
- name: server_name
description: name given to a named-server
in: path
required: true
type: string
- options:
description: |
Spawn options can be passed as a JSON body
when spawning via the API instead of spawn form.
The structure of the options
will depend on the Spawner's configuration.
in: body
required: false
type: object
responses:
'201':
description: The user's notebook named-server has started
'202':
description: The user's notebook named-server has not yet started, but has been requested
delete:
summary: Stop a user's named-server
parameters:
- name: name
description: username
in: path
required: true
type: string
- name: server_name
description: name given to a named-server
in: path
required: true
type: string
- name: remove
description: |
Whether to fully remove the server, rather than just stop it.
Removing a server deletes things like the state of the stopped server.
in: body
required: false
type: boolean
responses:
'204':
description: The user's notebook named-server has stopped
'202':
description: The user's notebook named-server has not yet stopped as it is taking a while to stop
/users/{name}/tokens:
get:
summary: List tokens for the user
responses:
'200':
description: The list of tokens
schema:
type: array
items:
$ref: '#/definitions/Token'
post:
summary: Create a new token for the user
parameters:
- name: expires_in
type: number
required: false
in: body
description: lifetime (in seconds) after which the requested token will expire.
- name: note
type: string
required: false
in: body
description: A note attached to the token for future bookkeeping
responses:
'201':
description: The newly created token
schema:
$ref: '#/definitions/Token'
/users/{name}/tokens/{token_id}:
get:
summary: Get the model for a token by id
responses:
'200':
description: The info for the new token
schema:
$ref: '#/definitions/Token'
delete:
summary: Delete (revoke) a token by id
responses:
'204':
description: The token has been deleted
/user:
summary: Return authenticated user's model
description:
parameters:
responses:
'200':
description: The authenticated user's model is returned.
/groups:
get:
summary: List groups
responses:
'200':
description: The list of groups
schema:
type: array
items:
$ref: '#/definitions/Group'
/groups/{name}:
get:
summary: Get a group by name
parameters:
- name: name
description: group name
in: path
required: true
type: string
responses:
'200':
description: The group model
schema:
$ref: '#/definitions/Group'
post:
summary: Create a group
parameters:
- name: name
description: group name
in: path
required: true
type: string
responses:
'201':
description: The group has been created
schema:
$ref: '#/definitions/Group'
delete:
summary: Delete a group
parameters:
- name: name
description: group name
in: path
required: true
type: string
responses:
'204':
description: The group has been deleted
/groups/{name}/users:
post:
summary: Add users to a group
parameters:
- name: name
description: group name
in: path
required: true
type: string
- name: body
in: body
required: true
description: The users to add to the group
schema:
type: object
properties:
users:
type: array
description: List of usernames to add to the group
items:
type: string
responses:
'200':
description: The users have been added to the group
schema:
$ref: '#/definitions/Group'
delete:
summary: Remove users from a group
parameters:
- name: name
description: group name
in: path
required: true
type: string
- name: body
in: body
required: true
description: The users to remove from the group
schema:
type: object
properties:
users:
type: array
description: List of usernames to remove from the group
items:
type: string
responses:
'200':
description: The users have been removed from the group
/services:
get:
summary: List services
responses:
'200':
description: The service list
schema:
type: array
items:
$ref: '#/definitions/Service'
/services/{name}:
get:
summary: Get a service by name
parameters:
- name: name
description: service name
in: path
required: true
type: string
responses:
'200':
description: The Service model
schema:
$ref: '#/definitions/Service'
/proxy:
get:
summary: Get the proxy's routing table
description: A convenience alias for getting the routing table directly from the proxy
responses:
'200':
description: Routing table
schema:
type: object
description: configurable-http-proxy routing table (see configurable-http-proxy docs for details)
post:
summary: Force the Hub to sync with the proxy
responses:
'200':
description: Success
patch:
summary: Notify the Hub about a new proxy
description: Notifies the Hub of a new proxy to use.
parameters:
- name: body
in: body
required: true
description: Any values that have changed for the new proxy. All keys are optional.
schema:
type: object
properties:
ip:
type: string
description: IP address of the new proxy
port:
type: string
description: Port of the new proxy
protocol:
type: string
description: Protocol of new proxy, if changed
auth_token:
type: string
description: CONFIGPROXY_AUTH_TOKEN for the new proxy
responses:
'200':
description: Success
/authorizations/token:
post:
summary: Request a new API token
description: |
Request a new API token to use with the JupyterHub REST API.
If not already authenticated, username and password can be sent
in the JSON request body.
Logging in via this method is only available when the active Authenticator
accepts passwords (e.g. not OAuth).
parameters:
- name: username
in: body
required: false
type: string
- name: password
in: body
required: false
type: string
responses:
'200':
description: The new API token
schema:
type: object
properties:
token:
type: string
description: The new API token.
'403':
description: The user can not be authenticated.
/authorizations/token/{token}:
get:
summary: Identify a user or service from an API token
parameters:
- name: token
in: path
required: true
type: string
responses:
'200':
description: The user or service identified by the API token
'404':
description: A user or service is not found.
/authorizations/cookie/{cookie_name}/{cookie_value}:
get:
summary: Identify a user from a cookie
description: Used by single-user notebook servers to hand off cookie authentication to the Hub
parameters:
- name: cookie_name
in: path
required: true
type: string
- name: cookie_value
in: path
required: true
type: string
responses:
'200':
description: The user identified by the cookie
schema:
$ref: '#/definitions/User'
'404':
description: A user is not found.
/oauth2/authorize:
get:
summary: 'OAuth 2.0 authorize endpoint'
description: |
Redirect users to this URL to begin the OAuth process.
It is not an API endpoint.
parameters:
- name: client_id
description: The client id
in: query
required: true
type: string
- name: response_type
description: The response type (always 'code')
in: query
required: true
type: string
- name: state
description: A state string
in: query
required: false
type: string
- name: redirect_uri
description: The redirect url
in: query
required: true
type: string
/oauth2/token:
post:
summary: Request an OAuth2 token
description: |
Request an OAuth2 token from an authorization code.
This request completes the OAuth process.
consumes:
- application/x-www-form-urlencoded
parameters:
- name: client_id
description: The client id
in: form
required: true
type: string
- name: client_secret
description: The client secret
in: form
required: true
type: string
- name: grant_type
description: The grant type (always 'authorization_code')
in: form
required: true
type: string
- name: code
description: The code provided by the authorization redirect
in: form
required: true
type: string
- name: redirect_uri
description: The redirect url
in: form
required: true
type: string
responses:
'200':
description: JSON response including the token
schema:
type: object
properties:
access_token:
type: string
description: The new API token for the user
token_type:
type: string
description: Will always be 'Bearer'
/shutdown:
post:
summary: Shutdown the Hub
parameters:
- name: proxy
in: body
type: boolean
description: Whether the proxy should be shutdown as well (default from Hub config)
- name: servers
in: body
type: boolean
description: Whether users' notebook servers should be shutdown as well (default from Hub config)
definitions:
User:
type: object
properties:
name:
type: string
description: The user's name
admin:
type: boolean
description: Whether the user is an admin
groups:
type: array
description: The names of groups where this user is a member
items:
type: string
server:
type: string
description: The user's notebook server's base URL, if running; null if not.
pending:
type: string
enum: ["spawn", "stop", null]
description: The currently pending action, if any
last_activity:
type: string
format: date-time
description: Timestamp of last-seen activity from the user
servers:
type: object
description: The active servers for this user.
items:
schema:
$ref: '#/definitions/Server'
Server:
type: object
properties:
name:
type: string
description: The server's name. The user's default server has an empty name ('')
ready:
type: boolean
description: |
Whether the server is ready for traffic.
Will always be false when any transition is pending.
pending:
type: string
enum: ["spawn", "stop", null]
description: |
The currently pending action, if any.
A server is not ready if an action is pending.
url:
type: string
description: |
The URL where the server can be accessed
(typically /user/:name/:server.name/).
progress_url:
type: string
description: |
The URL for an event-stream to retrieve events during a spawn.
started:
type: string
format: date-time
description: UTC timestamp when the server was last started.
last_activity:
type: string
format: date-time
description: UTC timestamp last-seen activity on this server.
state:
type: object
description: Arbitrary internal state from this server's spawner. Only available on the hub's users list or get-user-by-name method, and only if a hub admin. None otherwise.
Group:
type: object
properties:
name:
type: string
description: The group's name
users:
type: array
description: The names of users who are members of this group
items:
type: string
Service:
type: object
properties:
name:
type: string
description: The service's name
admin:
type: boolean
description: Whether the service is an admin
url:
type: string
description: The internal url where the service is running
prefix:
type: string
description: The proxied URL prefix to the service's url
pid:
type: number
description: The PID of the service process (if managed)
command:
type: array
description: The command used to start the service (if managed)
items:
type: string
info:
type: object
description: |
Additional information a deployment can attach to a service.
JupyterHub does not use this field.
Token:
type: object
properties:
token:
type: string
description: The token itself. Only present in responses to requests for a new token.
id:
type: string
description: The id of the API token. Used for modifying or deleting the token.
user:
type: string
description: The user that owns a token (undefined if owned by a service)
service:
type: string
description: The service that owns the token (undefined of owned by a user)
note:
type: string
description: A note about the token, typically describing what it was created for.
created:
type: string
format: date-time
description: Timestamp when this token was created
expires_at:
type: string
format: date-time
description: Timestamp when this token expires. Null if there is no expiry.
last_activity:
type: string
format: date-time
description: |
Timestamp of last-seen activity using this token.
Can be null if token has never been used.

View File

@@ -1,106 +1,10 @@
div#helm-chart-schema h2, /* Added to avoid logo being too squeezed */
div#helm-chart-schema h3, .navbar-brand {
div#helm-chart-schema h4, height: 4rem !important;
div#helm-chart-schema h5,
div#helm-chart-schema h6 {
font-family: courier new;
} }
h3, h3 ~ * { /* hide redundant funky-formatted swagger-ui version */
margin-left: 3% !important;
}
h4, h4 ~ * { .swagger-ui .info .title small {
margin-left: 6% !important; display: none !important;
}
h5, h5 ~ * {
margin-left: 9% !important;
}
h6, h6 ~ * {
margin-left: 12% !important;
}
h7, h7 ~ * {
margin-left: 15% !important;
}
img.logo {
width:100%
}
.right-next {
float: right;
max-width: 45%;
overflow: auto;
text-overflow: ellipsis;
white-space: nowrap;
}
.right-next::after{
content: ' »';
}
.left-prev {
float: left;
max-width: 45%;
overflow: auto;
text-overflow: ellipsis;
white-space: nowrap;
}
.left-prev::before{
content: '« ';
}
.prev-next-bottom {
margin-top: 3em;
}
.prev-next-top {
margin-bottom: 1em;
}
/* Sidebar TOC and headers */
div.sphinxsidebarwrapper div {
margin-bottom: .8em;
}
div.sphinxsidebar h3 {
font-size: 1.3em;
padding-top: 0px;
font-weight: 800;
margin-left: 0px !important;
}
div.sphinxsidebar p.caption {
font-size: 1.2em;
margin-bottom: 0px;
margin-left: 0px !important;
font-weight: 900;
color: #767676;
}
div.sphinxsidebar ul {
font-size: .8em;
margin-top: 0px;
padding-left: 3%;
margin-left: 0px !important;
}
div.relations ul {
font-size: 1em;
margin-left: 0px !important;
}
div#searchbox form {
margin-left: 0px !important;
}
/* body elements */
.toctree-wrapper span.caption-text {
color: #767676;
font-style: italic;
font-weight: 300;
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -1,16 +0,0 @@
{# Custom template for navigation.html
alabaster theme does not provide blocks for titles to
be overridden so this custom theme handles title and
toctree for sidebar
#}
<h3>{{ _('Table of Contents') }}</h3>
{{ toctree(includehidden=theme_sidebar_includehidden, collapse=theme_sidebar_collapse) }}
{% if theme_extra_nav_links %}
<hr />
<ul>
{% for text, uri in theme_extra_nav_links.items() %}
<li class="toctree-l1"><a href="{{ uri }}">{{ text }}</a></li>
{% endfor %}
</ul>
{% endif %}

View File

@@ -1,30 +1,2 @@
{% extends '!page.html' %} {%- set _meta = meta | default({}) %}
{%- extends _meta.page_template | default('!page.html') %}
{# Custom template for page.html
Alabaster theme does not provide blocks for prev/next at bottom of each page.
This is _in addition_ to the prev/next in the sidebar. The "Prev/Next" text
or symbols are handled by CSS classes in _static/custom.css
#}
{% macro prev_next(prev, next, prev_title='', next_title='') %}
{%- if prev %}
<a class='left-prev' href="{{ prev.link|e }}" title="{{ _('previous chapter')}}">{{ prev_title or prev.title }}</a>
{%- endif %}
{%- if next %}
<a class='right-next' href="{{ next.link|e }}" title="{{ _('next chapter')}}">{{ next_title or next.title }}</a>
{%- endif %}
<div style='clear:both;'></div>
{% endmacro %}
{% block body %}
<div class='prev-next-top'>
{{ prev_next(prev, next, 'Previous', 'Next') }}
</div>
{{super()}}
<div class='prev-next-bottom'>
{{ prev_next(prev, next) }}
</div>
{% endblock %}

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

@@ -1,17 +0,0 @@
{# Custom template for relations.html
alabaster theme does not provide previous/next page by default
#}
<div class="relations">
<h3>Navigation</h3>
<ul>
<li><a href="{{ pathto(master_doc) }}">Documentation Home</a><ul>
{%- if prev %}
<li><a href="{{ prev.link|e }}" title="Previous">Previous topic</a></li>
{%- endif %}
{%- if next %}
<li><a href="{{ next.link|e }}" title="Next">Next topic</a></li>
{%- endif %}
</ul>
</ul>
</div>

View File

@@ -1,159 +0,0 @@
.. _admin/upgrading:
====================
Upgrading JupyterHub
====================
JupyterHub offers easy upgrade pathways between minor versions. This
document describes how to do these upgrades.
If you are using :ref:`a JupyterHub distribution <index/distributions>`, you
should consult the distribution's documentation on how to upgrade. This
document is if you have set up your own JupyterHub without using a
distribution.
It is long because is pretty detailed! Most likely, upgrading
JupyterHub is painless, quick and with minimal user interruption.
Read the Changelog
==================
The `changelog <changelog.html>`_ contains information on what has
changed with the new JupyterHub release, and any deprecation warnings.
Read these notes to familiarize yourself with the coming changes. There
might be new releases of authenticators & spawners you are using, so
read the changelogs for those too!
Notify your users
=================
If you are using the default configuration where ``configurable-http-proxy``
is managed by JupyterHub, your users will see service disruption during
the upgrade process. You should notify them, and pick a time to do the
upgrade where they will be least disrupted.
If you are using a different proxy, or running ``configurable-http-proxy``
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
nor sign in.
Backup database & config
========================
Before doing an upgrade, it is critical to back up:
#. Your JupyterHub database (sqlite by default, or MySQL / Postgres
if you used those). If you are using sqlite (the default), you
should backup the ``jupyterhub.sqlite`` file.
#. Your ``jupyterhub_config.py`` file.
#. Your user's home directories. This is unlikely to be affected directly by
a JupyterHub upgrade, but we recommend a backup since user data is very
critical.
Shutdown JupyterHub
===================
Shutdown the JupyterHub process. This would vary depending on how you
have set up JupyterHub to run. Most likely, it is using a process
supervisor of some sort (``systemd`` or ``supervisord`` or even ``docker``).
Use the supervisor specific command to stop the JupyterHub process.
Upgrade JupyterHub packages
===========================
There are two environments where the ``jupyterhub`` package is installed:
#. The *hub environment*, which is where the JupyterHub server process
runs. This is started with the ``jupyterhub`` command, and is what
people generally think of as JupyterHub.
#. The *notebook user environments*. This is where the user notebook
servers are launched from, and is probably custom to your own
installation. This could be just one environment (different from the
hub environment) that is shared by all users, one environment
per user, or same environment as the hub environment. The hub
launched the ``jupyterhub-singleuser`` command in this environment,
which in turn starts the notebook server.
You need to make sure the version of the ``jupyterhub`` package matches
in both these environments. If you installed ``jupyterhub`` with pip,
you can upgrade it with:
.. code-block:: bash
python3 -m pip install --upgrade jupyterhub==<version>
Where ``<version>`` is the version of JupyterHub you are upgrading to.
If you used ``conda`` to install ``jupyterhub``, you should upgrade it
with:
.. code-block:: bash
conda install -c conda-forge jupyterhub==<version>
Where ``<version>`` is the version of JupyterHub you are upgrading to.
You should also check for new releases of the authenticator & spawner you
are using. You might wish to upgrade those packages too along with JupyterHub,
or upgrade them separately.
Upgrade JupyterHub database
===========================
Once new packages are installed, you need to upgrade the JupyterHub
database. From the hub environment, in the same directory as your
``jupyterhub_config.py`` file, you should run:
.. code-block:: bash
jupyterhub upgrade-db
This should find the location of your database, and run necessary upgrades
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 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?
-------------------------------------
Losing the Hub database is often not a big deal. Information that
resides only in the Hub database includes:
- active login tokens (user cookies, service tokens)
- users added via JupyterHub UI, instead of config files
- info about running servers
If the following conditions are true, you should be fine clearing the
Hub database and starting over:
- users specified in config file, or login using an external
authentication provider (Google, GitHub, LDAP, etc)
- user servers are stopped during upgrade
- don't mind causing users to login again after upgrade
Start JupyterHub
================
Once the database upgrade is completed, start the ``jupyterhub``
process again.
#. Log-in and start the server to make sure things work as
expected.
#. Check the logs for any errors or deprecation warnings. You
might have to update your ``jupyterhub_config.py`` file to
deal with any deprecated options.
Congratulations, your JupyterHub has been upgraded!

View File

@@ -1,15 +0,0 @@
=========================
Application configuration
=========================
Module: :mod:`jupyterhub.app`
=============================
.. automodule:: jupyterhub.app
.. currentmodule:: jupyterhub.app
:class:`JupyterHub`
-------------------
.. autoconfigurable:: JupyterHub

View File

@@ -1,32 +0,0 @@
==============
Authenticators
==============
Module: :mod:`jupyterhub.auth`
==============================
.. automodule:: jupyterhub.auth
.. currentmodule:: jupyterhub.auth
:class:`Authenticator`
----------------------
.. autoconfigurable:: Authenticator
:members:
:class:`LocalAuthenticator`
---------------------------
.. autoconfigurable:: LocalAuthenticator
:members:
:class:`PAMAuthenticator`
-------------------------
.. autoconfigurable:: PAMAuthenticator
:class:`DummyAuthenticator`
---------------------------
.. autoconfigurable:: DummyAuthenticator

View File

@@ -1,38 +0,0 @@
.. _api-index:
##################
The JupyterHub API
##################
:Release: |release|
:Date: |today|
JupyterHub also provides a REST API for administration of the Hub and users.
The documentation on `Using JupyterHub's REST API <../reference/rest.html>`_ provides
information on:
- what you can do with the API
- creating an API token
- adding API tokens to the config files
- making an API request programmatically using the requests library
- learning more about JupyterHub's API
The same JupyterHub API spec, as found here, is available in an interactive form
`here (on swagger's petstore) <http://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyterhub/jupyterhub/master/docs/rest-api.yml#!/default>`__.
The `OpenAPI Initiative`_ (fka Swagger™) is a project used to describe
and document RESTful APIs.
JupyterHub API Reference:
.. toctree::
app
auth
spawner
proxy
user
service
services.auth
.. _OpenAPI Initiative: https://www.openapis.org/

View File

@@ -1,22 +0,0 @@
=======
Proxies
=======
Module: :mod:`jupyterhub.proxy`
===============================
.. automodule:: jupyterhub.proxy
.. currentmodule:: jupyterhub.proxy
:class:`Proxy`
--------------
.. autoconfigurable:: Proxy
:members:
:class:`ConfigurableHTTPProxy`
------------------------------
.. autoconfigurable:: ConfigurableHTTPProxy
:members: debug, auth_token, check_running_interval, api_url, command

View File

@@ -1,16 +0,0 @@
========
Services
========
Module: :mod:`jupyterhub.services.service`
==========================================
.. automodule:: jupyterhub.services.service
.. currentmodule:: jupyterhub.services.service
:class:`Service`
----------------
.. autoconfigurable:: Service
:members: name, admin, url, api_token, managed, kind, command, cwd, environment, user, oauth_client_id, server, prefix, proxy_spec

View File

@@ -1,40 +0,0 @@
=======================
Services Authentication
=======================
Module: :mod:`jupyterhub.services.auth`
=======================================
.. automodule:: jupyterhub.services.auth
.. currentmodule:: jupyterhub.services.auth
:class:`HubAuth`
----------------
.. autoconfigurable:: HubAuth
:members:
:class:`HubOAuth`
-----------------
.. autoconfigurable:: HubOAuth
:members:
:class:`HubAuthenticated`
-------------------------
.. autoclass:: HubAuthenticated
:members:
:class:`HubOAuthenticated`
--------------------------
.. autoclass:: HubOAuthenticated
:class:`HubOAuthCallbackHandler`
--------------------------------
.. autoclass:: HubOAuthCallbackHandler

View File

@@ -1,21 +0,0 @@
========
Spawners
========
Module: :mod:`jupyterhub.spawner`
=================================
.. automodule:: jupyterhub.spawner
.. currentmodule:: jupyterhub.spawner
:class:`Spawner`
----------------
.. autoconfigurable:: Spawner
:members: options_from_form, poll, start, stop, get_args, get_env, get_state, template_namespace, format_string, create_certs, move_certs
:class:`LocalProcessSpawner`
----------------------------
.. autoconfigurable:: LocalProcessSpawner

View File

@@ -1,36 +0,0 @@
=====
Users
=====
Module: :mod:`jupyterhub.user`
==============================
.. automodule:: jupyterhub.user
.. currentmodule:: jupyterhub.user
:class:`UserDict`
-----------------
.. autoclass:: UserDict
:members:
:class:`User`
-------------
.. autoclass:: User
:members: escaped_name
.. attribute:: name
The user's name
.. attribute:: server
The user's Server data object if running, None otherwise.
Has ``ip``, ``port`` attributes.
.. attribute:: spawner
The user's :class:`~.Spawner` instance.

View File

@@ -1,586 +0,0 @@
# Changelog
For detailed changes from the prior release, click on the version number, and
its link will bring up a GitHub listing of changes. Use `git log` on the
command line for details.
## [Unreleased]
## 1.0
### [1.0.0] 2018-03-XX
JupyterHub 1.0 is a major milestone for JupyterHub.
Huge thanks to the many people who have contributed to this release,
whether it was through discussion, testing, documentation, or development.
#### Major new features
- Support TLS encryption and authentication of all internal communication.
Spawners must implement `.move_certs` method to make certificates available
to the notebook server if it is not local to the Hub.
- There is now full UI support for managing named servers.
With named servers, each jupyterhub user may have access to more than one named server. For example, a professor may access a server named `research` and another named `teaching`.
![named servers on the home page](./images/named-servers-home.png)
- Authenticators can now expire and refresh authentication data by implementing
`Authenticator.refresh_user(user)`.
This allows things like OAuth data and access tokens to be refreshed.
When used together with `Authenticator.refresh_pre_spawn = True`,
auth refresh can be forced prior to Spawn,
allowing the Authenticator to *require* that authentication data is fresh
immediately before the user's server is launched.
```eval_rst
.. seealso::
- :meth:`.Authenticator.refresh_user`
- :meth:`.Spawner.create_certs`
- :meth:`.Spawner.move_certs`
```
#### New features
- allow custom spawners, authenticators, and proxies to register themselves via 'entry points', enabling more convenient configuration such as:
```python
c.JupyterHub.authenticator_class = 'github'
c.JupyterHub.spawner_class = 'docker'
c.JupyterHub.proxy_class = 'traefik_etcd'
```
- Spawners are passed the tornado Handler object that requested their spawn (as `self.handler`),
so they can do things like make decisions based on query arguments in the request.
- SimpleSpawner and DummyAuthenticator, which are useful for testing, have been merged into JupyterHub itself:
```python
# For testing purposes only. Should not be used in production.
c.JupyterHub.authenticator_class = 'dummy'
c.JupyterHub.spawner_class = 'simple'
```
These classes are **not** appropriate for production use. Only testing.
- Add health check endpoint at `/hub/health`
- Several prometheus metrics have been added (thanks to [Outreachy](https://www.outreachy.org/) applicants!)
- A new API for registering user activity.
To prepare for the addition of [alternate proxy implementations](https://github.com/jupyterhub/traefik-proxy),
responsibility for tracking activity is taken away from the proxy
and moved to the notebook server (which already has activity tracking features).
Activity is now tracked by pushing it to the Hub from user servers instead of polling the
proxy API.
- Dynamic `options_form` callables may now return an empty string
which will result in no options form being rendered.
- `Spawner.user_options` is persisted to the database to be re-used,
so that a server spawned once via the form can be re-spawned via the API
with the same options.
- Added `c.PAMAuthenticator.pam_normalize_username` option for round-tripping
usernames through PAM to retrieve the normalized form.
- Added `c.JupyterHub.named_server_limit_per_user` configuration to limit
the number of named servers each user can have.
The default is 0, for no limit.
- API requests to HubAuthenticated services (e.g. single-user servers)
may pass a token in the `Authorization` header,
matching authentication with the Hub API itself.
- Added `Authenticator.is_admin(handler, authentication)` method
and `Authenticator.admin_groups` configuration for automatically
determining that a member of a group should be considered an admin.
- New `c.Authenticator.post_auth_hook` configuration
that can be any callable of the form `async def hook(authenticator, handler, authentication=None):`.
This hook may transform the return value of `Authenticator.authenticate()`
and return a new authentication dictionary,
e.g. specifying admin privileges, group membership,
or custom white/blacklisting logic.
This hook is called *after* existing normalization and whitelist checking.
- `Spawner.options_from_form` may now be async
- Added `JupyterHub.shutdown_on_logout` option to trigger shutdown of a user's
servers when they log out.
#### Changes
- Authentication methods such as `check_whitelist` should now take an additional
`authentication` argument
that will be a dictionary (default: None) of authentication data,
as returned by `Authenticator.authenticate()`:
```python
def check_whitelist(self, username, authentication=None):
...
```
`authentication` should have a default value of None
for backward-compatibility with jupyterhub < 1.0.
- Prometheus metrics page is now authenticated.
Any authenticated user may see the prometheus metrics.
To disable prometheus authentication,
set `JupyterHub.authenticate_prometheus = False`.
- Visits to `/user/:name` no longer trigger an implicit launch of the user's server.
Instead, a page is shown indicating that the server is not running
with a link to request the spawn.
- API requests to `/user/:name` for a not-running server will have status 503 instead of 404.
- OAuth includes a confirmation page when attempting to visit another user's server,
so that users can choose to cancel authentication with the single-user server.
Confirmation is still skipped when accessing your own server.
#### Fixed
- Various fixes to improve Windows compatibility
(default Authenticator and Spawner still do not support Windows, but other Spawners may)
- Fixed compatibility with Oracle db
- Fewer redirects following a visit to the default `/` url
- Error when progress is requested before progress is ready
- Error when API requests are made to a not-running server without authentication
#### Development changes
There have been several changes to the development process that shouldn't
generally affect users of JupyterHub, but may affect contributors.
In general, see `CONTRIBUTING.md` for contribution info or ask if you have questions.
- JupyterHub has adopted `black` as a code autoformatter and `pre-commit`
as a tool for automatically running code formatting on commit.
This is meant to make it *easier* to contribute to JupyterHub,
so let us know if it's having the opposite effect.
- JupyterHub has switched its test suite to using `pytest-asyncio` from `pytest-tornado`.
- OAuth is now implemented internally using `oauthlib` instead of `python-oauth2`. This should have no effect on behavior.
## 0.9
### [0.9.4] 2018-09-24
JupyterHub 0.9.4 is a small bugfix release.
- Fixes an issue that required all running user servers to be restarted
when performing an upgrade from 0.8 to 0.9.
- Fixes content-type for API endpoints back to `application/json`.
It was `text/html` in 0.9.0-0.9.3.
### [0.9.3] 2018-09-12
JupyterHub 0.9.3 contains small bugfixes and improvements
- Fix token page and model handling of `expires_at`.
This field was missing from the REST API model for tokens
and could cause the token page to not render
- Add keep-alive to progress event stream to avoid proxies dropping
the connection due to inactivity
- Documentation and example improvements
- Disable quit button when using notebook 5.6
- Prototype new feature (may change prior to 1.0):
pass requesting Handler to Spawners during start,
accessible as `self.handler`
### [0.9.2] 2018-08-10
JupyterHub 0.9.2 contains small bugfixes and improvements.
- Documentation and example improvements
- Add `Spawner.consecutive_failure_limit` config for aborting the Hub if too many spawns fail in a row.
- Fix for handling SIGTERM when run with asyncio (tornado 5)
- Windows compatibility fixes
### [0.9.1] 2018-07-04
JupyterHub 0.9.1 contains a number of small bugfixes on top of 0.9.
- Use a PID file for the proxy to decrease the likelihood that a leftover proxy process will prevent JupyterHub from restarting
- `c.LocalProcessSpawner.shell_cmd` is now configurable
- API requests to stopped servers (requests to the hub for `/user/:name/api/...`) fail with 404 rather than triggering a restart of the server
- Compatibility fix for notebook 5.6.0 which will introduce further
security checks for local connections
- Managed services always use localhost to talk to the Hub if the Hub listening on all interfaces
- When using a URL prefix, the Hub route will be `JupyterHub.base_url` instead of unconditionally `/`
- additional fixes and improvements
### [0.9.0] 2018-06-15
JupyterHub 0.9 is a major upgrade of JupyterHub.
There are several changes to the database schema,
so make sure to backup your database and run:
jupyterhub upgrade-db
after upgrading jupyterhub.
The biggest change for 0.9 is the switch to asyncio coroutines everywhere
instead of tornado coroutines. Custom Spawners and Authenticators are still
free to use tornado coroutines for async methods, as they will continue to
work. As part of this upgrade, JupyterHub 0.9 drops support for Python < 3.5
and tornado < 5.0.
#### Changed
- Require Python >= 3.5
- Require tornado >= 5.0
- Use asyncio coroutines throughout
- Set status 409 for conflicting actions instead of 400,
e.g. creating users or groups that already exist.
- timestamps in REST API continue to be UTC, but now include 'Z' suffix
to identify them as such.
- REST API User model always includes `servers` dict,
not just when named servers are enabled.
- `server` info is no longer available to oauth identification endpoints,
only user info and group membership.
- `User.last_activity` may be None if a user has not been seen,
rather than starting with the user creation time
which is now separately stored as `User.created`.
- static resources are now found in `$PREFIX/share/jupyterhub` instead of `share/jupyter/hub` for improved consistency.
- Deprecate `.extra_log_file` config. Use pipe redirection instead:
jupyterhub &>> /var/log/jupyterhub.log
- Add `JupyterHub.bind_url` config for setting the full bind URL of the proxy.
Sets ip, port, base_url all at once.
- Add `JupyterHub.hub_bind_url` for setting the full host+port of the Hub.
`hub_bind_url` supports unix domain sockets, e.g.
`unix+http://%2Fsrv%2Fjupyterhub.sock`
- Deprecate `JupyterHub.hub_connect_port` config in favor of `JupyterHub.hub_connect_url`. `hub_connect_ip` is not deprecated
and can still be used in the common case where only the ip address of the hub differs from the bind ip.
#### Added
- Spawners can define a `.progress` method which should be an async generator.
The generator should yield events of the form:
```python
{
"message": "some-state-message",
"progress": 50,
}
```
These messages will be shown with a progress bar on the spawn-pending page.
The `async_generator` package can be used to make async generators
compatible with Python 3.5.
- track activity of individual API tokens
- new REST API for managing API tokens at `/hub/api/user/tokens[/token-id]`
- allow viewing/revoking tokens via token page
- User creation time is available in the REST API as `User.created`
- Server start time is stored as `Server.started`
- `Spawner.start` may return a URL for connecting to a notebook instead of `(ip, port)`. This enables Spawners to launch servers that setup their own HTTPS.
- Optimize database performance by disabling sqlalchemy expire_on_commit by default.
- Add `python -m jupyterhub.dbutil shell` entrypoint for quickly
launching an IPython session connected to your JupyterHub database.
- Include `User.auth_state` in user model on single-user REST endpoints for admins only.
- Include `Server.state` in server model on REST endpoints for admins only.
- Add `Authenticator.blacklist` for blacklisting users instead of whitelisting.
- Pass `c.JupyterHub.tornado_settings['cookie_options']` down to Spawners
so that cookie options (e.g. `expires_days`) can be set globally for the whole application.
- SIGINFO (`ctrl-t`) handler showing the current status of all running threads,
coroutines, and CPU/memory/FD consumption.
- Add async `Spawner.get_options_form` alternative to `.options_form`, so it can be a coroutine.
- Add `JupyterHub.redirect_to_server` config to govern whether
users should be sent to their server on login or the JuptyerHub home page.
- html page templates can be more easily customized and extended.
- Allow registering external OAuth clients for using the Hub as an OAuth provider.
- Add basic prometheus metrics at `/hub/metrics` endpoint.
- Add session-id cookie, enabling immediate revocation of login tokens.
- Authenticators may specify that users are admins by specifying the `admin` key when return the user model as a dict.
- Added "Start All" button to admin page for launching all user servers at once.
- Services have an `info` field which is a dictionary.
This is accessible via the REST API.
- `JupyterHub.extra_handlers` allows defining additional tornado RequestHandlers attached to the Hub.
- API tokens may now expire.
Expiry is available in the REST model as `expires_at`,
and settable when creating API tokens by specifying `expires_in`.
#### Fixed
- Remove green from theme to improve accessibility
- Fix error when proxy deletion fails due to route already being deleted
- clear `?redirects` from URL on successful launch
- disable send2trash by default, which is rarely desirable for jupyterhub
- Put PAM calls in a thread so they don't block the main application
in cases where PAM is slow (e.g. LDAP).
- Remove implicit spawn from login handler,
instead relying on subsequent request for `/user/:name` to trigger spawn.
- Fixed several inconsistencies for initial redirects,
depending on whether server is running or not and whether the user is logged in or not.
- Admin requests for `/user/:name` (when admin-access is enabled) launch the right server if it's not running instead of redirecting to their own.
- Major performance improvement starting up JupyterHub with many users,
especially when most are inactive.
- Various fixes in race conditions and performance improvements with the default proxy.
- Fixes for CORS headers
- Stop setting `.form-control` on spawner form inputs unconditionally.
- Better recovery from database errors and database connection issues
without having to restart the Hub.
- Fix handling of `~` character in usernames.
- Fix jupyterhub startup when `getpass.getuser()` would fail,
e.g. due to missing entry in passwd file in containers.
## 0.8
### [0.8.1] 2017-11-07
JupyterHub 0.8.1 is a collection of bugfixes and small improvements on 0.8.
#### Added
- Run tornado with AsyncIO by default
- Add `jupyterhub --upgrade-db` flag for automatically upgrading the database as part of startup.
This is useful for cases where manually running `jupyterhub upgrade-db`
as a separate step is unwieldy.
- Avoid creating backups of the database when no changes are to be made by
`jupyterhub upgrade-db`.
#### Fixed
- Add some further validation to usernames - `/` is not allowed in usernames.
- Fix empty logout page when using auto_login
- Fix autofill of username field in default login form.
- Fix listing of users on the admin page who have not yet started their server.
- Fix ever-growing traceback when re-raising Exceptions from spawn failures.
- Remove use of deprecated `bower` for javascript client dependencies.
### [0.8.0] 2017-10-03
JupyterHub 0.8 is a big release!
Perhaps the biggest change is the use of OAuth to negotiate authentication
between the Hub and single-user services.
Due to this change, it is important that the single-user server
and Hub are both running the same version of JupyterHub.
If you are using containers (e.g. via DockerSpawner or KubeSpawner),
this means upgrading jupyterhub in your user images at the same time as the Hub.
In most cases, a
pip install jupyterhub==version
in your Dockerfile is sufficient.
#### Added
- JupyterHub now defined a `Proxy` API for custom
proxy implementations other than the default.
The defaults are unchanged,
but configuration of the proxy is now done on the `ConfigurableHTTPProxy` class instead of the top-level JupyterHub.
TODO: docs for writing a custom proxy.
- Single-user servers and services
(anything that uses HubAuth)
can now accept token-authenticated requests via the Authentication header.
- Authenticators can now store state in the Hub's database.
To do so, the `authenticate` method should return a dict of the form
```python
{
'username': 'name',
'state': {}
}
```
This data will be encrypted and requires `JUPYTERHUB_CRYPT_KEY` environment variable to be set
and the `Authenticator.enable_auth_state` flag to be True.
If these are not set, auth_state returned by the Authenticator will not be stored.
- There is preliminary support for multiple (named) servers per user in the REST API.
Named servers can be created via API requests, but there is currently no UI for managing them.
- Add `LocalProcessSpawner.popen_kwargs` and `LocalProcessSpawner.shell_cmd`
for customizing how user server processes are launched.
- Add `Authenticator.auto_login` flag for skipping the "Login with..." page explicitly.
- Add `JupyterHub.hub_connect_ip` configuration
for the ip that should be used when connecting to the Hub.
This is promoting (and deprecating) `DockerSpawner.hub_ip_connect`
for use by all Spawners.
- Add `Spawner.pre_spawn_hook(spawner)` hook for customizing
pre-spawn events.
- Add `JupyterHub.active_server_limit` and `JupyterHub.concurrent_spawn_limit`
for limiting the total number of running user servers and the number of pending spawns, respectively.
#### Changed
- more arguments to spawners are now passed via environment variables (`.get_env()`)
rather than CLI arguments (`.get_args()`)
- internally generated tokens no longer get extra hash rounds,
significantly speeding up authentication.
The hash rounds were deemed unnecessary because the tokens were already
generated with high entropy.
- `JUPYTERHUB_API_TOKEN` env is available at all times,
rather than being removed during single-user start.
The token is now accessible to kernel processes,
enabling user kernels to make authenticated API requests to Hub-authenticated services.
- Cookie secrets should be 32B hex instead of large base64 secrets.
- pycurl is used by default, if available.
#### Fixed
So many things fixed!
- Collisions are checked when users are renamed
- Fix bug where OAuth authenticators could not logout users
due to being redirected right back through the login process.
- If there are errors loading your config files,
JupyterHub will refuse to start with an informative error.
Previously, the bad config would be ignored and JupyterHub would launch with default configuration.
- Raise 403 error on unauthorized user rather than redirect to login,
which could cause redirect loop.
- Set `httponly` on cookies because it's prudent.
- Improve support for MySQL as the database backend
- Many race conditions and performance problems under heavy load have been fixed.
- Fix alembic tagging of database schema versions.
#### Removed
- End support for Python 3.3
## 0.7
### [0.7.2] - 2017-01-09
#### Added
- Support service environment variables and defaults in `jupyterhub-singleuser`
for easier deployment of notebook servers as a Service.
- Add `--group` parameter for deploying `jupyterhub-singleuser` as a Service with group authentication.
- Include URL parameters when redirecting through `/user-redirect/`
### Fixed
- Fix group authentication for HubAuthenticated services
### [0.7.1] - 2017-01-02
#### Added
- `Spawner.will_resume` for signaling that a single-user server is paused instead of stopped.
This is needed for cases like `DockerSpawner.remove_containers = False`,
where the first API token is re-used for subsequent spawns.
- Warning on startup about single-character usernames,
caused by common `set('string')` typo in config.
#### Fixed
- Removed spurious warning about empty `next_url`, which is AOK.
### [0.7.0] - 2016-12-2
#### Added
- Implement Services API [\#705](https://github.com/jupyterhub/jupyterhub/pull/705)
- Add `/api/` and `/api/info` endpoints [\#675](https://github.com/jupyterhub/jupyterhub/pull/675)
- Add documentation for JupyterLab, pySpark configuration, troubleshooting,
and more.
- Add logging of error if adding users already in database. [\#689](https://github.com/jupyterhub/jupyterhub/pull/689)
- Add HubAuth class for authenticating with JupyterHub. This class can
be used by any application, even outside tornado.
- Add user groups.
- Add `/hub/user-redirect/...` URL for redirecting users to a file on their own server.
#### Changed
- Always install with setuptools but not eggs (effectively require
`pip install .`) [\#722](https://github.com/jupyterhub/jupyterhub/pull/722)
- Updated formatting of changelog. [\#711](https://github.com/jupyterhub/jupyterhub/pull/711)
- Single-user server is provided by JupyterHub package, so single-user servers depend on JupyterHub now.
#### Fixed
- Fix docker repository location [\#719](https://github.com/jupyterhub/jupyterhub/pull/719)
- Fix swagger spec conformance and timestamp type in API spec
- Various redirect-loop-causing bugs have been fixed.
#### Removed
- Deprecate `--no-ssl` command line option. It has no meaning and warns if
used. [\#789](https://github.com/jupyterhub/jupyterhub/pull/789)
- Deprecate `%U` username substitution in favor of `{username}`. [\#748](https://github.com/jupyterhub/jupyterhub/pull/748)
- Removed deprecated SwarmSpawner link. [\#699](https://github.com/jupyterhub/jupyterhub/pull/699)
## 0.6
### [0.6.1] - 2016-05-04
Bugfixes on 0.6:
- statsd is an optional dependency, only needed if in use
- Notice more quickly when servers have crashed
- Better error pages for proxy errors
- Add Stop All button to admin panel for stopping all servers at once
### [0.6.0] - 2016-04-25
- JupyterHub has moved to a new `jupyterhub` namespace on GitHub and Docker. What was `juptyer/jupyterhub` is now `jupyterhub/jupyterhub`, etc.
- `jupyterhub/jupyterhub` image on DockerHub no longer loads the jupyterhub_config.py in an ONBUILD step. A new `jupyterhub/jupyterhub-onbuild` image does this
- Add statsd support, via `c.JupyterHub.statsd_{host,port,prefix}`
- Update to traitlets 4.1 `@default`, `@observe` APIs for traits
- Allow disabling PAM sessions via `c.PAMAuthenticator.open_sessions = False`. This may be needed on SELinux-enabled systems, where our PAM session logic often does not work properly
- Add `Spawner.environment` configurable, for defining extra environment variables to load for single-user servers
- JupyterHub API tokens can be pregenerated and loaded via `JupyterHub.api_tokens`, a dict of `token: username`.
- JupyterHub API tokens can be requested via the REST API, with a POST request to `/api/authorizations/token`.
This can only be used if the Authenticator has a username and password.
- Various fixes for user URLs and redirects
## [0.5] - 2016-03-07
- Single-user server must be run with Jupyter Notebook ≥ 4.0
- Require `--no-ssl` confirmation to allow the Hub to be run without SSL (e.g. behind SSL termination in nginx)
- Add lengths to text fields for MySQL support
- Add `Spawner.disable_user_config` for preventing user-owned configuration from modifying single-user servers.
- Fixes for MySQL support.
- Add ability to run each user's server on its own subdomain. Requires wildcard DNS and wildcard SSL to be feasible. Enable subdomains by setting `JupyterHub.subdomain_host = 'https://jupyterhub.domain.tld[:port]'`.
- Use `127.0.0.1` for local communication instead of `localhost`, avoiding issues with DNS on some systems.
- Fix race that could add users to proxy prematurely if spawning is slow.
## 0.4
### [0.4.1] - 2016-02-03
Fix removal of `/login` page in 0.4.0, breaking some OAuth providers.
### [0.4.0] - 2016-02-01
- Add `Spawner.user_options_form` for specifying an HTML form to present to users,
allowing users to influence the spawning of their own servers.
- Add `Authenticator.pre_spawn_start` and `Authenticator.post_spawn_stop` hooks,
so that Authenticators can do setup or teardown (e.g. passing credentials to Spawner,
mounting data sources, etc.).
These methods are typically used with custom Authenticator+Spawner pairs.
- 0.4 will be the last JupyterHub release where single-user servers running IPython 3 is supported instead of Notebook ≥ 4.0.
## [0.3] - 2015-11-04
- No longer make the user starting the Hub an admin
- start PAM sessions on login
- hooks for Authenticators to fire before spawners start and after they stop,
allowing deeper interaction between Spawner/Authenticator pairs.
- login redirect fixes
## [0.2] - 2015-07-12
- Based on standalone traitlets instead of IPython.utils.traitlets
- multiple users in admin panel
- Fixes for usernames that require escaping
## 0.1 - 2015-03-07
First preview release
[Unreleased]: https://github.com/jupyterhub/jupyterhub/compare/1.0.0...HEAD
[1.0.0]: https://github.com/jupyterhub/jupyterhub/compare/0.9.4...HEAD
[0.9.4]: https://github.com/jupyterhub/jupyterhub/compare/0.9.3...0.9.4
[0.9.3]: https://github.com/jupyterhub/jupyterhub/compare/0.9.2...0.9.3
[0.9.2]: https://github.com/jupyterhub/jupyterhub/compare/0.9.1...0.9.2
[0.9.1]: https://github.com/jupyterhub/jupyterhub/compare/0.9.0...0.9.1
[0.9.0]: https://github.com/jupyterhub/jupyterhub/compare/0.8.1...0.9.0
[0.8.1]: https://github.com/jupyterhub/jupyterhub/compare/0.8.0...0.8.1
[0.8.0]: https://github.com/jupyterhub/jupyterhub/compare/0.7.2...0.8.0
[0.7.2]: https://github.com/jupyterhub/jupyterhub/compare/0.7.1...0.7.2
[0.7.1]: https://github.com/jupyterhub/jupyterhub/compare/0.7.0...0.7.1
[0.7.0]: https://github.com/jupyterhub/jupyterhub/compare/0.6.1...0.7.0
[0.6.1]: https://github.com/jupyterhub/jupyterhub/compare/0.6.0...0.6.1
[0.6.0]: https://github.com/jupyterhub/jupyterhub/compare/0.5.0...0.6.0
[0.5]: https://github.com/jupyterhub/jupyterhub/compare/0.4.1...0.5.0
[0.4.1]: https://github.com/jupyterhub/jupyterhub/compare/0.4.0...0.4.1
[0.4.0]: https://github.com/jupyterhub/jupyterhub/compare/0.3.0...0.4.0
[0.3]: https://github.com/jupyterhub/jupyterhub/compare/0.2.0...0.3.0
[0.2]: https://github.com/jupyterhub/jupyterhub/compare/0.1.0...0.2.0

View File

@@ -1,213 +1,353 @@
# -*- coding: utf-8 -*- # Configuration file for Sphinx to build our documentation to HTML.
# #
# Configuration reference: https://www.sphinx-doc.org/en/master/usage/configuration.html
#
import contextlib
import datetime
import io
import os import os
import shlex import re
import sys import subprocess
from pathlib import Path
from urllib.request import urlretrieve
# Set paths from docutils import nodes
sys.path.insert(0, os.path.abspath('.')) from ruamel.yaml import YAML
from sphinx.directives.other import SphinxDirective
# -- General configuration ------------------------------------------------ from sphinx.util import logging
# Minimal Sphinx version
needs_sphinx = '1.4'
# Sphinx extension modules
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.napoleon',
'autodoc_traits',
'sphinx_copybutton',
]
templates_path = ['_templates']
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'JupyterHub'
copyright = u'2016, Project Jupyter team'
author = u'Project Jupyter team'
# Autopopulate version
from os.path import dirname
docs = dirname(dirname(__file__))
root = dirname(docs)
sys.path.insert(0, root)
sys.path.insert(0, os.path.join(docs, 'sphinxext'))
import jupyterhub import jupyterhub
from jupyterhub.app import JupyterHub
# The short X.Y version. logger = logging.getLogger(__name__)
version = '%i.%i' % jupyterhub.version_info[:2] # -- Project information -----------------------------------------------------
# The full version, including alpha/beta/rc tags. # ref: https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
release = jupyterhub.__version__ #
project = "JupyterHub"
author = "Project Jupyter Contributors"
copyright = f"{datetime.date.today().year}, {author}"
language = None
exclude_patterns = []
pygments_style = 'sphinx'
todo_include_todos = False
# Set the default role so we can use `foo` instead of ``foo`` # -- General Sphinx configuration --------------------------------------------
default_role = 'literal' # ref: https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
#
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx.ext.napoleon",
"autodoc_traits",
"sphinx_copybutton",
"sphinx-jsonschema",
"sphinxext.opengraph",
"sphinxext.rediraffe",
"jupyterhub_sphinx_theme",
"myst_parser",
]
root_doc = "index"
source_suffix = [".md"]
# default_role let's use use `foo` instead of ``foo`` in rST
default_role = "literal"
# -- Source ------------------------------------------------------------- docs = Path(__file__).parent.parent.absolute()
docs_source = docs / "source"
rest_api_yaml = docs_source / "_static" / "rest-api.yml"
import recommonmark
from recommonmark.transform import AutoStructify # -- MyST configuration ------------------------------------------------------
# ref: https://myst-parser.readthedocs.io/en/latest/configuration.html
#
myst_heading_anchors = 2
myst_enable_extensions = [
# available extensions: https://myst-parser.readthedocs.io/en/latest/syntax/optional.html
"attrs_inline",
"colon_fence",
"deflist",
"fieldlist",
"substitution",
]
myst_substitutions = {
# date example: Dev 07, 2022
"date": datetime.date.today().strftime("%b %d, %Y").title(),
"node_min": "12",
"python_min": "3.8",
"version": jupyterhub.__version__,
}
# -- Custom directives to generate documentation -----------------------------
# ref: https://myst-parser.readthedocs.io/en/latest/syntax/roles-and-directives.html
#
# We define custom directives to help us generate documentation using Python on
# demand when referenced from our documentation files.
#
# Create a temp instance of JupyterHub for use by two separate directive classes
# to get the output from using the "--generate-config" and "--help-all" CLI
# flags respectively.
#
jupyterhub_app = JupyterHub()
class ConfigDirective(SphinxDirective):
"""Generate the configuration file output for use in the documentation."""
has_content = False
required_arguments = 0
optional_arguments = 0
final_argument_whitespace = False
option_spec = {}
def run(self):
# The generated configuration file for this version
generated_config = jupyterhub_app.generate_config_file()
# post-process output
home_dir = os.environ["HOME"]
generated_config = generated_config.replace(home_dir, "$HOME", 1)
par = nodes.literal_block(text=generated_config)
return [par]
class HelpAllDirective(SphinxDirective):
"""Print the output of jupyterhub help --all for use in the documentation."""
has_content = False
required_arguments = 0
optional_arguments = 0
final_argument_whitespace = False
option_spec = {}
def run(self):
# The output of the help command for this version
buffer = io.StringIO()
with contextlib.redirect_stdout(buffer):
jupyterhub_app.print_help("--help-all")
all_help = buffer.getvalue()
# post-process output
home_dir = os.environ["HOME"]
all_help = all_help.replace(home_dir, "$HOME", 1)
par = nodes.literal_block(text=all_help)
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.add_config_value('recommonmark_config', {'enable_eval_rst': True}, True) app.connect("build-finished", stage_redoc_js)
app.add_stylesheet('custom.css') app.add_css_file("custom.css")
app.add_transform(AutoStructify) app.add_directive("jupyterhub-generate-config", ConfigDirective)
app.add_directive("jupyterhub-help-all", HelpAllDirective)
app.add_directive("jupyterhub-rest-api-links", RestAPILinksDirective)
source_parsers = {'.md': 'recommonmark.parser.CommonMarkParser'} # -- Read The Docs -----------------------------------------------------------
#
source_suffix = ['.rst', '.md'] # Since RTD runs sphinx-build directly without running "make html", we run the
# source_encoding = 'utf-8-sig' # pre-requisite steps for "make html" from here if needed.
#
# -- Options for HTML output ---------------------------------------------- if os.environ.get("READTHEDOCS"):
subprocess.check_call(["make", "metrics", "scopes"], cwd=str(docs))
# The theme to use for HTML and HTML Help pages.
import alabaster_jupyterhub
html_theme = 'alabaster_jupyterhub'
html_theme_path = [alabaster_jupyterhub.get_html_theme_path()]
html_logo = '_static/images/logo/logo.png'
html_favicon = '_static/images/logo/favicon.ico'
# Paths that contain custom static files (such as style sheets)
html_static_path = ['_static']
html_theme_options = {
'show_related': True,
'description': 'Documentation for JupyterHub',
'github_user': 'jupyterhub',
'github_repo': 'jupyterhub',
'github_banner': False,
'github_button': True,
'github_type': 'star',
'show_powered_by': False,
'extra_nav_links': {
'GitHub Repo': 'http://github.com/jupyterhub/jupyterhub',
'Issue Tracker': 'http://github.com/jupyterhub/jupyterhub/issues',
},
}
html_sidebars = {
'**': [
'about.html',
'searchbox.html',
'navigation.html',
'relations.html',
'sourcelink.html',
]
}
htmlhelp_basename = 'JupyterHubdoc'
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
# 'papersize': 'letterpaper',
# 'pointsize': '10pt',
# 'preamble': '',
# 'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(
master_doc,
'JupyterHub.tex',
u'JupyterHub Documentation',
u'Project Jupyter team',
'manual',
)
]
# latex_logo = None
# latex_use_parts = False
# latex_show_pagerefs = False
# latex_show_urls = False
# latex_appendices = []
# latex_domain_indices = True
# -- manual page output ------------------------------------------------- # -- Spell checking ----------------------------------------------------------
# ref: https://sphinxcontrib-spelling.readthedocs.io/en/latest/customize.html#configuration-options
# One entry per manual page. List of tuples #
# (source start file, name, description, authors, manual section). # The "sphinxcontrib.spelling" extension is optionally enabled if its available.
man_pages = [(master_doc, 'jupyterhub', u'JupyterHub Documentation', [author], 1)] #
# man_show_urls = False
# -- Texinfo output -----------------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(
master_doc,
'JupyterHub',
u'JupyterHub Documentation',
author,
'JupyterHub',
'One line description of project.',
'Miscellaneous',
)
]
# texinfo_appendices = []
# texinfo_domain_indices = True
# texinfo_show_urls = 'footnote'
# texinfo_no_detailmenu = False
# -- Epub output --------------------------------------------------------
# Bibliographic Dublin Core info.
epub_title = project
epub_author = author
epub_publisher = author
epub_copyright = copyright
# A list of files that should not be packed into the epub file.
epub_exclude_files = ['search.html']
# -- Intersphinx ----------------------------------------------------------
intersphinx_mapping = {'https://docs.python.org/3/': None}
# -- Read The Docs --------------------------------------------------------
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
if not on_rtd:
html_theme = 'alabaster'
else:
# readthedocs.org uses their theme by default, so no need to specify it
# build rest-api, since RTD doesn't run make
from subprocess import check_call as sh
sh(['make', 'rest-api'], cwd=docs)
# -- Spell checking -------------------------------------------------------
try: try:
import sphinxcontrib.spelling import sphinxcontrib.spelling # noqa
except ImportError: except ImportError:
pass pass
else: else:
extensions.append("sphinxcontrib.spelling") extensions.append("sphinxcontrib.spelling")
spelling_word_list_filename = "spelling_wordlist.txt"
spelling_word_list_filename = 'spelling_wordlist.txt'
# -- Options for HTML output -------------------------------------------------
# ref: https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
#
html_logo = "_static/images/logo/logo.png"
html_favicon = "_static/images/logo/favicon.ico"
html_static_path = ["_static"]
html_theme = "jupyterhub_sphinx_theme"
html_theme_options = {
"icon_links": [
{
"name": "GitHub",
"url": "https://github.com/jupyterhub/jupyterhub",
"icon": "fa-brands fa-github",
},
],
"use_edit_page_button": True,
"navbar_align": "left",
}
html_context = {
"github_user": "jupyterhub",
"github_repo": "jupyterhub",
"github_version": "main",
"doc_path": "docs/source",
}
# -- Options for linkcheck builder -------------------------------------------
# ref: https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-the-linkcheck-builder
#
linkcheck_ignore = [
r"(.*)github\.com(.*)#", # javascript based anchors
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
"https://github.com/jupyterhub/jupyterhub/pull/", # too many PRs 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://linux.die.net/.*", # linux.die.net seems to block requests from CI with 403 sometimes
# don't check links to unpublished advisories
r"https://github.com/jupyterhub/jupyterhub/security/advisories/.*",
]
linkcheck_anchors_ignore = [
"/#!",
"/#%21",
]
# -- Intersphinx -------------------------------------------------------------
# ref: https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#configuration
#
intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None),
"tornado": ("https://www.tornadoweb.org/en/stable/", None),
"jupyter-server": ("https://jupyter-server.readthedocs.io/en/stable/", None),
"nbgitpuller": ("https://nbgitpuller.readthedocs.io/en/latest", None),
}
# -- Options for the opengraph extension -------------------------------------
# ref: https://github.com/wpilibsuite/sphinxext-opengraph#options
#
# ogp_site_url is set automatically by RTD
ogp_image = "_static/logo.png"
ogp_use_first_image = True
# -- Options for the rediraffe extension -------------------------------------
# ref: https://github.com/wpilibsuite/sphinxext-rediraffe#readme
#
# This extension helps us relocate content without breaking links. If a
# document is moved internally, a redirect link should be configured as below to
# help us not break links.
#
# The workflow for adding redirects can be as follows:
# 1. Change "rediraffe_branch" below to point to the commit/ branch you
# want to base off the changes.
# 2. Option 1: run "make rediraffecheckdiff"
# a. Analyze the output of this command.
# b. Manually add the redirect entries to the "redirects.txt" file.
# Option 2: run "make rediraffewritediff"
# a. rediraffe will then automatically add the obvious redirects to redirects.txt.
# b. Analyze the output of the command for broken links.
# c. Check the "redirects.txt" file for any files that were moved/ renamed but are not listed.
# d. Manually add the redirects that have been mised by the automatic builder to "redirects.txt".
# Option 3: Do not use the commands above and, instead, do everything manually - by taking
# note of the files you have moved or renamed and adding them to the "redirects.txt" file.
#
# If you are basing changes off another branch/ commit, always change back
# rediraffe_branch to main before pushing your changes upstream.
#
rediraffe_branch = os.environ.get("REDIRAFFE_BRANCH", "main")
rediraffe_redirects = "redirects.txt"
# allow 80% match for autogenerated redirects
rediraffe_auto_redirect_perc = 80
# rediraffe_redirects = {
# "old-file": "new-folder/new-file-name",
# }

View File

@@ -0,0 +1,29 @@
(contributing:community)=
# Community communication channels
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)
We use [Discourse](https://discourse.jupyter.org) for online discussions and support questions.
You can ask questions here if you are a first-time contributor to the JupyterHub project.
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.
## Gitter
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.
## Github Issues
[Github issues](https://docs.github.com/en/issues/tracking-your-work-with-issues/about-issues) are used for most long-form project discussions, bug reports and feature requests.
- Issues related to a specific authenticator or spawner should be opened in the appropriate repository for the authenticator or spawner.
- 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.
```{note}
Our community is distributed across the world in various timezones, so please be patient if you do not get a response immediately!
```

View File

@@ -1,25 +0,0 @@
.. _contributing/community:
================================
Community communication channels
================================
We use `Gitter <https://gitter.im>`_ for online, real-time text chat. The
primary channel for JupyterHub is `jupyterhub/jupyterhub <https://gitter.im/jupyterhub/jupyterhub>`_.
Remember that our community is distributed across the world in various
timezones, so be patient if you do not get an answer immediately!
GitHub issues are used for most long-form project discussions, bug reports
and feature requests. Issues related to a specific authenticator or
spawner should be directed to the appropriate repository for the
authenticator or spawner. If you are using a specific JupyterHub
distribution (such as `Zero to JupyterHub on Kubernetes <http://github.com/jupyterhub/zero-to-jupyterhub-k8s>`_
or `The Littlest JupyterHub <http://github.com/jupyterhub/the-littlest-jupyterhub/>`_),
you should open issues directly in their repository. If you can not
find a repository to open your issue in, do not worry! Create it in the `main
JupyterHub repository <https://github.com/jupyterhub/jupyterhub/>`_ and our
community will help you figure it out.
A `mailing list <https://groups.google.com/forum/#!forum/jupyter>`_ for all
of Project Jupyter exists, along with one for `teaching with Jupyter
<https://groups.google.com/forum/#!forum/jupyter-education>`_.

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
@@ -120,3 +122,4 @@ contribution on JupyterHub:
- yuvipanda - yuvipanda
- zoltan-fedor - zoltan-fedor
- zonca - zonca
- Neeraj Natu

View File

@@ -0,0 +1,76 @@
(contributing:docs)=
# Contributing Documentation
Documentation is often more important than code. This page helps
you get set up on how to contribute to JupyterHub's documentation.
## Building documentation locally
We use [sphinx](https://www.sphinx-doc.org) to build our documentation. It takes
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.
1. Make sure you have successfully completed {ref}`contributing:setup`.
2. Install the packages required to build the docs.
```bash
python3 -m pip install -r docs/requirements.txt
```
3. Build the html version of the docs. This is the most commonly used
output format, so verifying it renders correctly is usually good
enough.
```bash
cd docs
make html
```
This step will display any syntax or formatting errors in the documentation,
along with the filename / line number in which they occurred. Fix them,
and re-run the `make html` command to re-render the documentation.
4. View the rendered documentation by opening `_build/html/index.html` in
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)=
## Documentation conventions
This section lists various conventions we use in our documentation. This is a
living document that grows over time, so feel free to add to it / change it!
Our entire documentation does not yet fully conform to these conventions yet,
so help in making it so would be appreciated!
### `pip` invocation
There are many ways to invoke a `pip` command, we recommend the following
approach:
```bash
python3 -m pip
```
This invokes pip explicitly using the python3 binary that you are
currently using. This is the **recommended way** to invoke pip
in our documentation, since it is least likely to cause problems
with python3 and pip being from different environments.
For more information on how to invoke `pip` commands, see
[the pip documentation](https://pip.pypa.io/en/stable/).

View File

@@ -1,78 +0,0 @@
.. _contributing/docs:
==========================
Contributing Documentation
==========================
Documentation is often more important than code. This page helps
you get set up on how to contribute documentation to JupyterHub.
Building documentation locally
==============================
We use `sphinx <http://sphinx-doc.org>`_ to build our documentation. It takes
our documentation source files (written in `markdown
<https://daringfireball.net/projects/markdown/>`_ or `reStructuredText
<http://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.
#. Make sure you have successfuly completed :ref:`contributing/setup`.
#. Install the packages required to build the docs.
.. code-block:: bash
python3 -m pip install -r docs/requirements.txt
#. Build the html version of the docs. This is the most commonly used
output format, so verifying it renders as you should is usually good
enough.
.. code-block:: bash
cd docs
make html
This step will display any syntax or formatting errors in the documentation,
along with the filename / line number in which they occurred. Fix them,
and re-run the ``make html`` command to re-render the documentation.
#. View the rendered documentation by opening ``build/html/index.html`` in
a web browser.
.. tip::
On macOS, you can open a file from the terminal with ``open <path-to-file>``.
On Linux, you can do the same with ``xdg-open <path-to-file>``.
.. _contributing/docs/conventions:
Documentation conventions
=========================
This section lists various conventions we use in our documentation. This is a
living document that grows over time, so feel free to add to it / change it!
Our entire documentation does not yet fully conform to these conventions yet,
so help in making it so would be appreciated!
``pip`` invocation
------------------
There are many ways to invoke a ``pip`` command, we recommend the following
approach:
.. code-block:: bash
python3 -m pip
This invokes pip explicitly using the python3 binary that you are
currently using. This is the **recommended way** to invoke pip
in our documentation, since it is least likely to cause problems
with python3 and pip being from different environments.
For more information on how to invoke ``pip`` commands, see
`the pip documentation <https://pip.pypa.io/en/stable/>`_.

View File

@@ -0,0 +1,24 @@
(contributing)=
# Contributing
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 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)
([reporting guidelines](https://github.com/jupyter/governance/blob/HEAD/conduct/reporting_online.md)), which help keep our community welcoming to as many people as possible.
This section covers information about our community, as well as ways that you can connect and get involved.
```{toctree}
:maxdepth: 2
contributor-list
community
setup
docs
tests
roadmap
security
```

View File

@@ -1,13 +1,15 @@
(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
shared understanding of the project's vision and direction amongst shared understanding of the project's vision and direction amongst
the community of users, contributors, and maintainers. the community of users, contributors, and maintainers.
The goal is to communicate priorities and upcoming release plans. The goal is to communicate priorities and upcoming release plans.
It is not a aimed at limiting contributions to what is listed here. It is not aimed at limiting contributions to what is listed here.
## Using the roadmap ## Using the roadmap
### Sharing Feedback on the Roadmap ### Sharing Feedback on the Roadmap
All of the community is encouraged to provide feedback as well as share new All of the community is encouraged to provide feedback as well as share new
@@ -22,17 +24,17 @@ maintainers will help identify what a good next step is for the issue.
When submitting an issue, think about what "next step" category best describes When submitting an issue, think about what "next step" category best describes
your issue: your issue:
* **now**, concrete/actionable step that is ready for someone to start work on. - **now**, concrete/actionable step that is ready for someone to start work on.
These might be items that have a link to an issue or more abstract like These might be items that have a link to an issue or more abstract like
"decrease typos and dead links in the documentation" "decrease typos and dead links in the documentation"
* **soon**, less concrete/actionable step that is going to happen soon, - **soon**, less concrete/actionable step that is going to happen soon,
discussions around the topic are coming close to an end at which point it can discussions around the topic are coming close to an end at which point it can
move into the "now" category move into the "now" category
* **later**, abstract ideas or tasks, need a lot of discussion or - **later**, abstract ideas or tasks, need a lot of discussion or
experimentation to shape the idea so that it can be executed. Can also experimentation to shape the idea so that it can be executed. Can also
contain concrete/actionable steps that have been postponed on purpose contain concrete/actionable steps that have been postponed on purpose
(these are steps that could be in "now" but the decision was taken to work on (these are steps that could be in "now" but the decision was taken to work on
them later) them later)
### Reviewing and Updating the Roadmap ### Reviewing and Updating the Roadmap
@@ -47,8 +49,8 @@ For those please create a
The roadmap should give the reader an idea of what is happening next, what needs The roadmap should give the reader an idea of what is happening next, what needs
input and discussion before it can happen and what has been postponed. input and discussion before it can happen and what has been postponed.
## The roadmap proper ## The roadmap proper
### Project vision ### Project vision
JupyterHub is a dependable tool used by humans that reduces the complexity of JupyterHub is a dependable tool used by humans that reduces the complexity of
@@ -58,20 +60,19 @@ creating the environment in which a piece of software can be executed.
These "Now" items are considered active areas of focus for the project: These "Now" items are considered active areas of focus for the project:
* HubShare - a sharing service for use with JupyterHub. - HubShare - a sharing service for use with JupyterHub.
* Users should be able to: - Users should be able to:
- Push a project to other users. - Push a project to other users.
- Get a checkout of a project from other users. - Get a checkout of a project from other users.
- Push updates to a published project. - Push updates to a published project.
- Pull updates from a published project. - Pull updates from a published project.
- Manage conflicts/merges by simply picking a version (our/theirs) - Manage conflicts/merges by simply picking a version (our/theirs)
- Get a checkout of a project from the internet. These steps are completely different from saving notebooks/files. - Get a checkout of a project from the internet. These steps are completely different from saving notebooks/files.
- Have directories that are managed by git completely separately from our stuff. - Have directories that are managed by git completely separately from our stuff.
- Look at pushed content that they have access to without an explicit pull. - Look at pushed content that they have access to without an explicit pull.
- Define and manage teams of users. - Define and manage teams of users.
- Adding/removing a user to/from a team gives/removes them access to all projects that team has access to. - Adding/removing a user to/from a team gives/removes them access to all projects that team has access to.
- Build other services, such as static HTML publishing and dashboarding on top of these things. - Build other services, such as static HTML publishing and dashboarding on top of these things.
### Soon ### Soon
@@ -79,12 +80,10 @@ These "Soon" items are under discussion. Once an item reaches the point of an
actionable plan, the item will be moved to the "Now" section. Typically, actionable plan, the item will be moved to the "Now" section. Typically,
these will be moved at a future review of the roadmap. these will be moved at a future review of the roadmap.
* resource monitoring and management: - resource monitoring and management:
- (prometheus?) API for resource monitoring - (prometheus?) API for resource monitoring
- tracking activity on single-user servers instead of the proxy - tracking activity on single-user servers instead of the proxy
- notes and activity tracking per API token - notes and activity tracking per API token
- UI for managing named servers
### Later ### Later
@@ -93,6 +92,6 @@ time there is no active plan for an item. The project would like to find the
resources and time to discuss these ideas. resources and time to discuss these ideas.
- real-time collaboration - real-time collaboration
- Enter into real-time collaboration mode for a project that starts a shared execution context. - Enter into real-time collaboration mode for a project that starts a shared execution context.
- Once the single-user notebook package supports realtime collaboration, - Once the single-user notebook package supports realtime collaboration,
implement sharing mechanism integrated into the Hub. implement sharing mechanism integrated into the Hub.

View File

@@ -0,0 +1,11 @@
(contributing:security)=
# Reporting security issues 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](explanation:security)
or a failure in implementation,
please report it to <mailto:security@ipython.org>.
If you prefer to encrypt your security reports,
you can use {download}`this PGP public key </ipython_security.asc>`.

View File

@@ -0,0 +1,242 @@
(contributing:setup)=
# Setting up a development install
## System requirements
JupyterHub can only run on macOS or Linux operating systems. If you are
using Windows, we recommend using [VirtualBox](https://virtualbox.org)
or a similar system to run [Ubuntu Linux](https://ubuntu.com) for
development.
### Install Python
JupyterHub is written in the [Python](https://python.org) programming language and
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
[Miniforge](https://github.com/conda-forge/miniforge#download).
### Install nodejs
[NodeJS {{node_min}}+](https://nodejs.org/en/) is required for building some JavaScript components.
`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.
You can do so with `conda install nodejs`.
Many in the Jupyter community use [`nvm`](https://github.com/nvm-sh/nvm) to
managing node dependencies.
### Install git
JupyterHub uses [Git](https://git-scm.com) & [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
JupyterHub. We also recommend getting a free account on GitHub.com.
## Setting up a development install
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.
:::{note}
This guide does not attempt to dictate _how_ development
environments should be isolated since that is a personal preference and can
be achieved in many ways, for example, `tox`, `conda`, `docker`, etc. See this
[forum thread](https://discourse.jupyter.org/t/thoughts-on-using-tox/3497) for
a more detailed discussion.
:::
1. Clone the [JupyterHub git repository](https://github.com/jupyterhub/jupyterhub)
to your computer.
```bash
git clone https://github.com/jupyterhub/jupyterhub
cd jupyterhub
```
2. Make sure the `python` you installed and the `npm` you installed
are available to you on the command line.
```bash
python -V
```
This should return a version number greater than or equal to {{python_min}}.
```bash
npm -v
```
This should return a version number greater than or equal to 5.0.
3. Install `configurable-http-proxy` (required to run and test the default JupyterHub configuration):
```bash
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`.
`sudo` may be required to perform a system-wide install.
If you do not have access to sudo, you may instead run the following commands:
```bash
npm install configurable-http-proxy
export PATH=$PATH:$(pwd)/node_modules/.bin
```
The second line needs to be run every time you open a new terminal.
If you are using conda you can instead run:
```bash
conda install configurable-http-proxy
```
4. Install an editable version of JupyterHub and its requirements for
development and testing. This lets you edit JupyterHub code in a text editor
& restart the JupyterHub process to see your code changes immediately.
```bash
python3 -m pip install --editable ".[test]"
```
5. You are now ready to start JupyterHub!
```bash
jupyterhub
```
6. You can access JupyterHub from your browser at
`http://localhost:8000` now.
Happy developing!
## Using DummyAuthenticator & SimpleLocalProcessSpawner
To simplify testing of JupyterHub, it is helpful to use
{class}`~jupyterhub.auth.DummyAuthenticator` instead of the default JupyterHub
authenticator and SimpleLocalProcessSpawner instead of the default spawner.
There is a sample configuration file that does this in
`testing/jupyterhub_config.py`. To launch JupyterHub with this
configuration:
```bash
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)
& [spawner](LocalProcessSpawner)
require your system to have user accounts for each user you want to log in to
JupyterHub as.
DummyAuthenticator allows you to log in with any username & password,
while SimpleLocalProcessSpawner allows you to start servers without having to
create a Unix user for each JupyterHub user. Together, these make it
much easier to test JupyterHub.
Tip: If you are working on parts of JupyterHub that are common to all
authenticators & spawners, we recommend using both DummyAuthenticator &
SimpleLocalProcessSpawner. If you are working on just authenticator-related
parts, use only SimpleLocalProcessSpawner. Similarly, if you are working on
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
This section lists common ways setting up your development environment may
fail, and how to fix them. Please add to the list if you encounter yet
another way it can fail!
### `lessc` not found
If the `python3 -m pip install --editable .` command fails and complains about
`lessc` being unavailable, you may need to explicitly install some
additional JavaScript dependencies:
```bash
npm install
```
This will fetch client-side JavaScript dependencies necessary to compile
CSS.
You may also need to manually update JavaScript and CSS after some
development updates, with:
```bash
python3 setup.py js # fetch updated client-side js
python3 setup.py css # recompile CSS from LESS sources
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

@@ -1,177 +0,0 @@
.. _contributing/setup:
================================
Setting up a development install
================================
System requirements
===================
JupyterHub can only run on MacOS or Linux operating systems. If you are
using Windows, we recommend using `VirtualBox <https://virtualbox.org>`_
or a similar system to run `Ubuntu Linux <https://ubuntu.com>`_ for
development.
Install Python
--------------
JupyterHub is written in the `Python <https://python.org>`_ programming language, and
requires you have at least version 3.5 installed locally. If you havent
installed Python before, the recommended way to install it is to use
`miniconda <https://conda.io/miniconda.html>`_. Remember to get the Python 3 version,
and **not** the Python 2 version!
Install nodejs
--------------
``configurable-http-proxy``, the default proxy implementation for
JupyterHub, is written in Javascript to run on `NodeJS
<https://nodejs.org/en/>`_. 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``.
Install git
-----------
JupyterHub uses `git <https://git-scm.com>`_ & `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
JupyterHub. We also recommend getting a free account on GitHub.com.
Setting up a development install
================================
When developing JupyterHub, you need to make changes to the code & see
their effects quickly. You need to do a developer install to make that
happen.
1. Clone the `JupyterHub git repository <https://github.com/jupyterhub/jupyterhub>`_
to your computer.
.. code:: bash
git clone https://github.com/jupyterhub/jupyterhub
cd jupyterhub
2. Make sure the ``python`` you installed and the ``npm`` you installed
are available to you on the command line.
.. code:: bash
python -V
This should return a version number greater than or equal to 3.5.
.. code:: bash
npm -v
This should return a version number greater than or equal to 5.0.
3. Install ``configurable-http-proxy``. This is required to run
JupyterHub.
.. code:: bash
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 do not
have access to sudo, you may instead run the following commands:
.. code:: bash
npm install configurable-http-proxy
export PATH=$PATH:$(pwd)/node_modules/.bin
The second line needs to be run every time you open a new terminal.
4. Install the python packages required for JupyterHub development.
.. code:: bash
python3 -m pip install -r dev-requirements.txt
python3 -m pip install -r requirements.txt
5. Install the development version of JupyterHub. This lets you edit
JupyterHub code in a text editor & restart the JupyterHub process to
see your code changes immediately.
.. code:: bash
python3 -m pip install --editable .
6. You are now ready to start JupyterHub!
.. code:: bash
jupyterhub
7. You can access JupyterHub from your browser at
``http://localhost:8000`` now.
Happy developing!
Using DummyAuthenticator & SimpleSpawner
========================================
To simplify testing of JupyterHub, its helpful to use
:class:`~jupyterhub.auth.DummyAuthenticator` instead of the default JupyterHub
authenticator and `SimpleSpawner <https://github.com/jupyterhub/simplespawner>`_
instead of the default spawner.
There is a sample configuration file that does this in
``testing/jupyterhub_config.py``. To launch jupyterhub with this
configuration:
.. code:: bash
pip install jupyterhub-simplespawner
jupyterhub -f testing/jupyterhub_config.py
The default JupyterHub `authenticator
<https://jupyterhub.readthedocs.io/en/stable/reference/authenticators.html#the-default-pam-authenticator>`_
& `spawner
<https://jupyterhub.readthedocs.io/en/stable/api/spawner.html#localprocessspawner>`_
require your system to have user accounts for each user you want to log in to
JupyterHub as.
DummyAuthenticator allows you to log in with any username & password,
while SimpleSpawner allows you to start servers without having to
create a unix user for each JupyterHub user. Together, these make it
much easier to test JupyterHub.
Tip: If you are working on parts of JupyterHub that are common to all
authenticators & spawners, we recommend using both DummyAuthenticator &
SimpleSpawner. If you are working on just authenticator related parts,
use only SimpleSpawner. Similarly, if you are working on just spawner
related parts, use only DummyAuthenticator.
Troubleshooting
===============
This section lists common ways setting up your development environment may
fail, and how to fix them. Please add to the list if you encounter yet
another way it can fail!
``lessc`` not found
-------------------
If the ``python3 -m pip install --editable .`` command fails and complains about
``lessc`` being unavailable, you may need to explicitly install some
additional JavaScript dependencies:
.. code:: bash
npm install
This will fetch client-side JavaScript dependencies necessary to compile
CSS.
You may also need to manually update JavaScript and CSS after some
development updates, with:
.. code:: bash
python3 setup.py js # fetch updated client-side js
python3 setup.py css # recompile CSS from LESS sources

View File

@@ -0,0 +1,157 @@
(contributing-tests)=
# Testing JupyterHub and linting code
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
precisely what we expect our code to do.
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.
## Running the tests
1. 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 dev environment is properly set up for tests to run.
2. You can run all tests in JupyterHub
```bash
pytest -v jupyterhub/tests
```
This should display progress as it runs all the tests, printing
information about any test failures as they occur.
If you wish to confirm test coverage the run tests with the `--cov` flag:
```bash
pytest -v --cov=jupyterhub jupyterhub/tests
```
3. You can also run tests in just a specific file:
```bash
pytest -v jupyterhub/tests/<test-file-name>
```
4. To run a specific test only, you can do:
```bash
pytest -v jupyterhub/tests/<test-file-name>::<test-name>
```
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
```
For more details, refer to the [pytest usage documentation](https://pytest.readthedocs.io/en/latest/usage.html).
## Test organisation
The tests live in `jupyterhub/tests` and are organized roughly into:
1. `test_api.py` tests the REST API
2. `test_pages.py` tests loading the HTML pages
and other collections of tests for different components.
When writing a new test, there should usually be a test of
similar functionality already written and related tests should
be added nearby.
The fixtures live in `jupyterhub/tests/conftest.py`. There are
fixtures that can be used for JupyterHub components, such as:
- `app`: an instance of JupyterHub with mocked parts
- `auth_state_enabled`: enables persisting auth_state (like authentication tokens)
- `db`: a sqlite in-memory DB session
- `` io_loop` ``: a Tornado event loop
- `event_loop`: a new asyncio event loop
- `user`: creates a new temporary user
- `admin_user`: creates a new temporary admin user
- single user servers
\- `cleanup_after`: allows cleanup of single user servers between tests
- mocked service
\- `MockServiceSpawner`: a spawner that mocks services for testing with a short poll interval
\- `` mockservice` ``: mocked service with no external service url
\- `mockservice_url`: mocked service with a url to test external services
And fixtures to add functionality or spawning behavior:
- `admin_access`: grants admin access
- `` no_patience` ``: sets slow-spawning timeouts to zero
- `slow_spawn`: enables the SlowSpawner (a spawner that takes a few seconds to start)
- `never_spawn`: enables the NeverSpawner (a spawner that will never start)
- `bad_spawn`: enables the BadSpawner (a spawner that fails immediately)
- `slow_bad_spawn`: enables the SlowBadSpawner (a spawner that fails after a short delay)
Refer to the [pytest fixtures documentation](https://pytest.readthedocs.io/en/latest/fixture.html) to learn how to use fixtures that exists already and to create new ones.
### The Pytest-Asyncio Plugin
When testing the various JupyterHub components and their various implementations, it sometimes becomes necessary to have a running instance of JupyterHub to test against.
The [`app`](https://github.com/jupyterhub/jupyterhub/blob/270b61992143b29af8c2fab90c4ed32f2f6fe209/jupyterhub/tests/conftest.py#L60) fixture mocks a JupyterHub application for use in testing by:
- enabling ssl if internal certificates are available
- creating an instance of [MockHub](https://github.com/jupyterhub/jupyterhub/blob/270b61992143b29af8c2fab90c4ed32f2f6fe209/jupyterhub/tests/mocking.py#L221) using any provided configurations as arguments
- initializing the mocked instance
- starting the mocked instance
- finally, a registered finalizer function performs a cleanup and stops the mocked instance
The JupyterHub test suite uses the [pytest-asyncio plugin](https://pytest-asyncio.readthedocs.io/en/latest/) that handles [event-loop](https://docs.python.org/3/library/asyncio-eventloop.html) integration in [Tornado](https://www.tornadoweb.org/en/stable/) applications. This allows for the use of top-level awaits when calling async functions or [fixtures](https://docs.pytest.org/en/6.2.x/fixture.html#what-fixtures-are) during testing. All test functions and fixtures labelled as `async` will run on the same event loop.
```{note}
With the introduction of [top-level awaits](https://piccolo-orm.com/blog/top-level-await-in-python/), the use of the `io_loop` fixture of the [pytest-tornado plugin](https://www.tornadoweb.org/en/stable/ioloop.html) is no longer necessary. It was initially used to call coroutines. With the upgrades made to `pytest-asyncio`, this usage is now deprecated. It is now, only utilized within the JupyterHub test suite to ensure complete cleanup of resources used during testing such as open file descriptors. This is demonstrated in this [pull request](https://github.com/jupyterhub/jupyterhub/pull/4332).
More information is provided below.
```
One of the general goals of the [JupyterHub Pytest Plugin project](https://github.com/jupyterhub/pytest-jupyterhub) is to ensure the MockHub cleanup fully closes and stops all utilized resources during testing so the use of the `io_loop` fixture for teardown is not necessary. This was highlighted in this [issue](https://github.com/jupyterhub/pytest-jupyterhub/issues/30)
For more information on asyncio and event-loops, here are some resources:
- **Read**: [Introduction to the Python event loop](https://www.pythontutorial.net/python-concurrency/python-event-loop)
- **Read**: [Overview of Async IO in Python 3.7](https://stackabuse.com/overview-of-async-io-in-python-3-7)
- **Watch**: [Asyncio: Understanding Async / Await in Python](https://www.youtube.com/watch?v=bs9tlDFWWdQ)
- **Watch**: [Learn Python's AsyncIO #2 - The Event Loop](https://www.youtube.com/watch?v=E7Yn5biBZ58)
## Troubleshooting Test Failures
### 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.
## Code formatting and linting
JupyterHub automatically enforces code formatting. This means that pull requests
with changes breaking this formatting will receive a commit from pre-commit.ci
automatically.
To automatically format code locally, you can install pre-commit and register a
_git hook_ to automatically check with pre-commit before you make a commit if
the formatting is okay.
```bash
pip install pre-commit
pre-commit install --install-hooks
```
To run pre-commit manually you would do:
```bash
# check for changes to code not yet committed
pre-commit run
# check for changes also in already committed code
pre-commit run --all-files
```
You may also install [black integration](https://github.com/psf/black#editor-integration)
into your text editor to format code automatically.

View File

@@ -1,78 +0,0 @@
.. _contributing/tests:
==================
Testing JupyterHub
==================
Unit test help validate that JupyterHub works the way we think it does,
and continues to do so when changes occur. They also help communicate
precisely what we expect our code to do.
JupyterHub uses `pytest <https://pytest.org>`_ for all our tests. You
can find them under ``jupyterhub/tests`` directory in the git repository.
Running the tests
==================
#. Make sure you have completed :ref:`contributing/setup`. You should be able
to start ``jupyterhub`` from the commandline & access it from your
web browser. This ensures that the dev environment is properly set
up for tests to run.
#. You can run all tests in JupyterHub
.. code-block:: bash
pytest --async-test-timeout 15 -v jupyterhub/tests
This should display progress as it runs all the tests, printing
information about any test failures as they occur.
The ``--async-test-timeout`` parameter is used by `pytest-tornado
<https://github.com/eugeniy/pytest-tornado#markers>`_ to set the
asynchronous test timeout to 15 seconds rather than the default 5,
since some of our tests take longer than 5s to execute.
#. You can also run tests in just a specific file:
.. code-block:: bash
pytest --async-test-timeout 15 -v jupyterhub/tests/<test-file-name>
#. To run a specific test only, you can do:
.. code-block:: bash
pytest --async-test-timeout 15 -v jupyterhub/tests/<test-file-name>::<test-name>
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:
.. code-block:: bash
pytest -v jupyterhub/tests/test_api.py::test_shutdown
Troubleshooting Test Failures
=============================
All the tests are failing
-------------------------
Make sure you have completed all the steps in :ref:`contributing/setup` sucessfully, and
can launch ``jupyterhub`` from the terminal.
Tests are timing out
--------------------
The ``--async-test-timeout`` parameter to ``pytest`` is used by
`pytest-tornado <https://github.com/eugeniy/pytest-tornado#markers>`_ to set
the asynchronous test timeout to a higher value than the default of 5s,
since some of our tests take longer than 5s to execute. If the tests
are still timing out, try increasing that value even more. You can
also set an environment variable ``ASYNC_TEST_TIMEOUT`` instead of
passing ``--async-test-timeout`` to each invocation of pytest.

View File

@@ -0,0 +1,310 @@
(explanation:capacity-planning)=
# Capacity planning
General capacity planning advice for JupyterHub is hard to give,
because it depends almost entirely on what your users are doing,
and what JupyterHub users do varies _wildly_ in terms of resource consumption.
**There is no single answer to "I have X users, what resources do I need?" or "How many users can I support with this machine?"**
Here are three _typical_ Jupyter use patterns that require vastly different resources:
- **Learning**: negligible resources because computation is mostly idle,
e.g. students learning programming for the first time
- **Production code**: very intense, sustained load, e.g. training machine learning models
- **Bursting**: _mostly_ idle, but needs a lot of resources for short periods of time
(interactive research often looks like this)
But just because there's no single answer doesn't mean we can't help.
So we have gathered here some useful information to help you make your decisions
about what resources you need based on how your users work,
including the relative invariants in terms of resources that JupyterHub itself needs.
## JupyterHub infrastructure
JupyterHub consists of a few components that are always running.
These take up very little resources,
especially relative to the resources consumed by users when you have more than a few.
As an example, an instance of mybinder.org (running JupyterHub 1.5.0),
running with typically ~100-150 users has:
| Component | CPU (mean/peak) | Memory (mean/peak) |
| --------- | --------------- | ------------------ |
| Hub | 4% / 13% | (230 MB / 260 MB) |
| Proxy | 6% / 13% | (47 MB / 65 MB) |
So it would be pretty generous to allocate ~25% of one CPU core
and ~500MB of RAM to overall JupyterHub infrastructure.
The rest is going to be up to your users.
Per-user overhead from JupyterHub is typically negligible
up to at least a few hundred concurrent active users.
```{figure} /images/mybinder-hub-components-cpu-memory.png
JupyterHub component resource usage for mybinder.org.
```
## Factors to consider
### Static vs elastic resources
A big factor in planning resources is:
**how much does it cost to change your mind?**
If you are using a single shared machine with local storage,
migrating to a new one because it turns out your users don't fit might be very costly.
You will have to get a new machine, set it up, and maybe even migrate user data.
On the other hand, if you are using ephemeral resources,
such as node pools in Kubernetes,
changing resource types costs close to nothing
because nodes can automatically be added or removed as needed.
Take that cost into account when you are picking how much memory or cpu to allocate to users.
Static resources (like [the-littlest-jupyterhub][]) provide for more **stable, predictable costs**,
but elastic resources (like [zero-to-jupyterhub][]) tend to provide **lower overall costs**
(especially when deployed with monitoring allowing cost optimizations over time),
but which are **less predictable**.
[the-littlest-jupyterhub]: https://the-littlest-jupyterhub.readthedocs.io
[zero-to-jupyterhub]: https://z2jh.jupyter.org
(limits-requests)=
### Limit vs Request for resources
Many scheduling tools like Kubernetes have two separate ways of allocating resources to users.
A **Request** or **Reservation** describes how much resources are _set aside_ for each user.
Often, this doesn't have any practical effect other than deciding when a given machine is considered 'full'.
If you are using expandable resources like an autoscaling Kubernetes cluster,
a new node must be launched and added to the pool if you 'request' more resources than fit on currently running nodes (a cluster **scale-up event**).
If you are running on a single VM, this describes how many users you can run at the same time, full stop.
A **Limit**, on the other hand, enforces a limit to how much resources any given user can consume.
For more information on what happens when users try to exceed their limits, see [](oversubscription).
In the strictest, safest case, you can have these two numbers be the same.
That means that each user is _limited_ to fit within the resources allocated to it.
This avoids **[oversubscription](oversubscription)** of resources (allowing use of more than you have available),
at the expense (in a literal, this-costs-money sense) of reserving lots of usually-idle capacity.
However, you often find that a small fraction of users use more resources than others.
In this case you may give users limits that _go beyond the amount of resources requested_.
This is called **oversubscribing** the resources available to users.
Having a gap between the request and the limit means you can fit a number of _typical_ users on a node (based on the request),
but still limit how much a runaway user can gobble up for themselves.
(oversubscription)=
### Oversubscribed CPU is okay, running out of memory is bad
An important consideration when assigning resources to users is: **What happens when users need more than I've given them?**
A good summary to keep in mind:
> When tasks don't get enough CPU, things are slow.
> When they don't get enough memory, things are broken.
This means it's **very important that users have enough memory**,
but much less important that they always have exclusive access to all the CPU they can use.
This relates to [Limits and Requests](limits-requests),
because these are the consequences of your limits and/or requests not matching what users actually try to use.
A table of mismatched resource allocation situations and their consequences:
| issue | consequence |
| -------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| Requests too high | Unnecessarily high cost and/or low capacity. |
| CPU limit too low | Poor performance experienced by users |
| CPU oversubscribed (too-low request + too-high limit) | Poor performance across the system; may crash, if severe |
| Memory limit too low | Servers killed by Out-of-Memory Killer (OOM); lost work for users |
| Memory oversubscribed (too-low request + too-high limit) | System memory exhaustion - all kinds of hangs and crashes and weird errors. Very bad. |
Note that the 'oversubscribed' problem case is where the request is lower than _typical_ usage,
meaning that the total reserved resources isn't enough for the total _actual_ consumption.
This doesn't mean that _all_ your users exceed the request,
just that the _limit_ gives enough room for the _average_ user to exceed the request.
All of these considerations are important _per node_.
Larger nodes means more users per node, and therefore more users to average over.
It also means more chances for multiple outliers on the same node.
### Example case for oversubscribing memory
Take for example, this system and sampling of user behavior:
- System memory = 8G
- memory request = 1G, limit = 3G
- typical 'heavy' user: 2G
- typical 'light' user: 0.5G
This will assign 8 users to those 8G of RAM (remember: only requests are used for deciding when a machine is 'full').
As long as the total of 8 users _actual_ usage is under 8G, everything is fine.
But the _limit_ allows a total of 24G to be used,
which would be a mess if everyone used their full limit.
But _not_ everyone uses the full limit, which is the point!
This pattern is fine if 1/8 of your users are 'heavy' because _typical_ usage will be ~0.7G,
and your total usage will be ~5G (`1 × 2 + 7 × 0.5 = 5.5`).
But if _50%_ of your users are 'heavy' you have a problem because that means your users will be trying to use 10G (`4 × 2 + 4 × 0.5 = 10`),
which you don't have.
You can make guesses at these numbers, but the only _real_ way to get them is to measure (see [](measuring)).
### CPU:memory ratio
Most of the time, you'll find that only one resource is the limiting factor for your users.
Most often it's memory, but for certain tasks, it could be CPU (or even GPUs).
Many cloud deployments have just one or a few fixed ratios of cpu to memory
(e.g. 'general purpose', 'high memory', and 'high cpu').
Setting your secondary resource allocation according to this ratio
after selecting the more important limit results in a balanced resource allocation.
For instance, some of Google Cloud's ratios are:
| node type | GB RAM / CPU core |
| ----------- | ----------------- |
| n2-highmem | 8 |
| n2-standard | 4 |
| n2-highcpu | 1 |
(idleness)=
### Idleness
Jupyter being an interactive tool means people tend to spend a lot more time reading and thinking than actually running resource-intensive code.
This significantly affects how much _cpu_ resources a typical active user needs,
but often does not significantly affect the _memory_.
Ways to think about this:
- More idle users means unused CPU.
This generally means setting your CPU _limit_ higher than your CPU _request_.
- What do your users do when they _are_ running code?
Is it typically single-threaded local computation in a notebook?
If so, there's little reason to set a limit higher than 1 CPU core.
- Do typical computations take a long time, or just a few seconds?
Longer typical computations means it's more likely for users to be trying to use the CPU at the same moment,
suggesting a higher _request_.
- Even with idle users, parallel computation adds up quickly - one user fully loading 4 cores and 3 using almost nothing still averages to more than a full CPU core per user.
- Long-running intense computations suggest higher requests.
Again, using mybinder.org as an example—we run around 100 users on 8-core nodes,
and still see fairly _low_ overall CPU usage on each user node.
The limit here is actually Kubernetes' pods per node, not memory _or_ CPU.
This is likely a extreme case, as many Binder users come from clicking links on webpages
without any actual intention of running code.
```{figure} /images/mybinder-load5.png
mybinder.org node CPU usage is low with 50-150 users sharing just 8 cores
```
### Concurrent users and culling idle servers
Related to [][idleness], all of these resource consumptions and limits are calculated based on **concurrently active users**,
not total users.
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.
JupyterHub costs scale very little based on the number of _total_ users,
up to a point.
There are two important definitions for **active user**:
- Are they _actually_ there (i.e. a human interacting with Jupyter, or running code that might be )
- Is their server running (this is where resource reservations and limits are actually applied)
Connecting those two definitions (how long are servers running if their humans aren't using them) is an important area of deployment configuration, usually implemented via the [JupyterHub idle culler service][idle-culler].
[idle-culler]: https://github.com/jupyterhub/jupyterhub-idle-culler
There are a lot of considerations when it comes to culling idle users that will depend:
- How much does it save me to shut down user servers? (e.g. keeping an elastic cluster small, or keeping a fixed-size deployment available to active users)
- How much does it cost my users to have their servers shut down? (e.g. lost work if shutdown prematurely)
- How easy do I want it to be for users to keep their servers running? (e.g. Do they want to run unattended simulations overnight? Do you want them to?)
Like many other things in this guide, there are many correct answers leading to different configuration choices.
For more detail on culling configuration and considerations, consult the [JupyterHub idle culler documentation][idle-culler].
## More tips
### Start strict and generous, then measure
A good tip, in general, is to give your users as much resources as you can afford that you think they _might_ use.
Then, use resource usage metrics like prometheus to analyze what your users _actually_ need,
and tune accordingly.
Remember: **Limits affect your user experience and stability. Requests mostly affect your costs**.
For example, a sensible starting point (lacking any other information) might be:
```yaml
request:
cpu: 0.5
mem: 2G
limit:
cpu: 1
mem: 2G
```
(more memory if significant computations are likely - machine learning models, data analysis, etc.)
Some actions
- If you see out-of-memory killer events, increase the limit (or talk to your users!)
- If you see typical memory well below your limit, reduce the request (but not the limit)
- If _nobody_ uses that much memory, reduce your limit
- If CPU is your limiting scheduling factor and your CPUs are mostly idle,
reduce the cpu request (maybe even to 0!).
- If CPU usage continues to be low, increase the limit to 2 or 4 to allow bursts of parallel execution.
(measuring)=
### Measuring user resource consumption
It is _highly_ recommended to deploy monitoring services such as [Prometheus][]
and [Grafana][] to get a view of your users' resource usage.
This is the only way to truly know what your users need.
JupyterHub has some experimental [grafana dashboards][] you can use as a starting point,
to keep an eye on your resource usage.
Here are some sample charts from (again from mybinder.org),
showing >90% of users using less than 10% CPU and 200MB,
but a few outliers near the limit of 1 CPU and 2GB of RAM.
This is the kind of information you can use to tune your requests and limits.
![Snapshot from JupyterHub's Grafana dashboards on mybinder.org](/images/mybinder-user-resources.png)
[prometheus]: https://prometheus.io
[grafana]: https://grafana.com
[grafana dashboards]: https://github.com/jupyterhub/grafana-dashboards
### Measuring costs
Measuring costs may be as important as measuring your users activity.
If you are using a cloud provider, you can often use cost thresholds and quotas to instruct them to notify you if your costs are too high,
e.g. "Have AWS send me an email if I hit X spending trajectory on week 3 of the month."
You can then use this information to tune your resources based on what you can afford.
You can mix this information with user resource consumption to figure out if you have a problem,
e.g. "my users really do need X resources, but I can only afford to give them 80% of X."
This information may prove useful when asking your budget-approving folks for more funds.
### Additional resources
There are lots of other resources for cost and capacity planning that may be specific to JupyterHub and/or your cloud provider.
Here are some useful links to other resources
- [Zero to JupyterHub](https://z2jh.jupyter.org) documentation on
- [projecting costs](https://z2jh.jupyter.org/en/latest/administrator/cost.html)
- [configuring user resources](https://z2jh.jupyter.org/en/latest/jupyterhub/customizing/user-resources.html)
- Cloud platform cost calculators:
- [Google Cloud](https://cloud.google.com/products/calculator/)
- [Amazon AWS](https://calculator.aws)
- [Microsoft Azure](https://azure.microsoft.com/en-us/pricing/calculator/)

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](https://github.com/jupyterhub/jupyterhub/wiki/Authenticators).
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

@@ -0,0 +1,183 @@
(explanation:hub-database)=
# The Hub's Database
JupyterHub uses a database to store information about users, services, and other data needed for operating the Hub.
This is the **state** of the Hub.
## Why does JupyterHub have a database?
JupyterHub is a **stateful** application (more on that 'state' later).
Updating JupyterHub's configuration or upgrading the version of JupyterHub requires restarting the JupyterHub process to apply the changes.
We want to minimize the disruption caused by restarting the Hub process, so it can be a mundane, frequent, routine activity.
Storing state information outside the process for later retrieval is necessary for this, and one of the main thing databases are for.
A lot of the operations in JupyterHub are also **relationships**, which is exactly what SQL databases are great at.
For example:
- Given an API token, what user is making the request?
- Which users don't have running servers?
- Which servers belong to user X?
- Which users have not been active in the last 24 hours?
Finally, a database allows us to have more information stored without needing it all loaded in memory,
e.g. supporting a large number (several thousands) of inactive users.
## What's in the database?
The short answer of what's in the JupyterHub database is "everything."
JupyterHub's **state** lives in the database.
That is, everything JupyterHub needs to be aware of to function that _doesn't_ come from the configuration files, such as
- users, roles, role assignments
- state, urls of running servers
- Hashed API tokens
- Short-lived state related to OAuth flow
- Timestamps for when users, tokens, and servers were last used
### What's _not_ in the database
Not _quite_ all of JupyterHub's state is in the database.
This mostly involves transient state, such as the 'pending' transitions of Spawners (starting, stopping, etc.).
Anything not in the database must be reconstructed on Hub restart, and the only sources of information to do that are the database and JupyterHub configuration file(s).
## How does JupyterHub use the database?
JupyterHub makes some _unusual_ choices in how it connects to the database.
These choices represent trade-offs favoring single-process simplicity and performance at the expense of horizontal scalability (multiple Hub instances).
We often say that the Hub 'owns' the database.
This ownership means that we assume the Hub is the only process that will talk to the database.
This assumption enables us to make several caching optimizations that dramatically improve JupyterHub's performance (i.e. data written recently to the database can be read from memory instead of fetched again from the database) that would not work if multiple processes could be interacting with the database at the same time.
Database operations are also synchronous, so while JupyterHub is waiting on a database operation, it cannot respond to other requests.
This allows us to avoid complex locking mechanisms, because transaction races can only occur during an `await`, so we only need to make sure we've completed any given transaction before the next `await` in a given request.
:::{note}
We are slowly working to remove these assumptions, and moving to a more traditional db session per-request pattern.
This will enable multiple Hub instances and enable scaling JupyterHub, but will significantly reduce the number of active users a single Hub instance can serve.
:::
### Database performance in a typical request
Most authenticated requests to JupyterHub involve a few database transactions:
1. look up the authenticated user (e.g. look up token by hash, then resolve owner and permissions)
2. record activity
3. perform any relevant changes involved in processing the request (e.g. create the records for a running server when starting one)
This means that the database is involved in almost every request, but only in quite small, simple queries, e.g.:
- lookup one token by hash
- lookup one user by name
- list tokens or servers for one user (typically 1-10)
- etc.
### The database as a limiting factor
As a result of the above transactions in most requests, database performance is the _leading_ factor in JupyterHub's baseline requests-per-second performance, but that cost does not scale significantly with the number of users, active or otherwise.
However, the database is _rarely_ a limiting factor in JupyterHub performance in a practical sense, because the main thing JupyterHub does is start, stop, and monitor whole servers, which take far more time than any small database transaction, no matter how many records you have or how slow your database is (within reason).
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).
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](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.
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).
:::{note}
It's important to note when discussing performance and limiting factors and that all of this only applies to requests to `/hub/...`.
The Hub and its database are not involved in most requests to single-user servers (`/user/...`), which is by design, and largely motivated by the fact that the Hub itself doesn't _need_ to be fast because its operations are infrequent and large.
:::
## Database backends
JupyterHub supports a variety of database backends via [SQLAlchemy][].
The default is sqlite, which works great for many cases, but you should be able to use many backends supported by SQLAlchemy.
Usually, this will mean PostgreSQL or MySQL, both of which are officially supported and well tested with JupyterHub, but others may work as well.
See [SQLAlchemy's docs][sqlalchemy-dialect] for how to connect to different database backends.
Doing so generally involves:
1. installing a Python package that provides a client implementation, and
2. setting [](JupyterHub.db_url) to connect to your database with the specified implementation
[sqlalchemy-dialect]: https://docs.sqlalchemy.org/en/20/dialects/
[sqlalchemy]: https://www.sqlalchemy.org
### Default backend: SQLite
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).
It works very well for testing, small deployments, and workshops.
For production systems, SQLite has some disadvantages when used with JupyterHub:
- `upgrade-db` may not always work, and you may need to start with a fresh database
- `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)
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).
### 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).
## Notes and Tips
### SQLite
The SQLite database should not be used on NFS. SQLite uses reader/writer locks
to control access to the database. This locking mechanism might not work
correctly if the database file is kept on an NFS filesystem. This is because
`fcntl()` file locking is broken on many NFS implementations. Therefore, you
should avoid putting SQLite database files on NFS since it will not handle well
multiple processes which might try to access the file at the same time.
### PostgreSQL
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.
There is additional configuration required for MySQL that is not needed for PostgreSQL.
For example, to connect to a PostgreSQL database with psycopg2:
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`
3. configure [](JupyterHub.db_url):
```python
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
### MySQL / MariaDB
- You should probably use the `pymysql` or `mysqlclient` sqlalchemy provider, or another backend [recommended by sqlalchemy](https://docs.sqlalchemy.org/en/20/dialects/mysql.html#dialect-mysql)
- You also need to set `pool_recycle` to some value (typically 60 - 300, JupyterHub will default to 60)
which depends on your MySQL setup. This is necessary since MySQL kills
connections serverside if they've been idle for a while, and the connection
from the hub will be idle for longer than most connections. This behavior
will lead to frustrating 'the connection has gone away' errors from
sqlalchemy if `pool_recycle` is not set.
- If you use `utf8mb4` collation with MySQL earlier than 5.7.7 or MariaDB
earlier than 10.2.1 you may get an `1709, Index column size too large` error.
To fix this you need to set `innodb_large_prefix` to enabled and
`innodb_file_format` to `Barracuda` to allow for the index sizes jupyterhub
uses. `row_format` will be set to `DYNAMIC` as long as those options are set
correctly. Later versions of MariaDB and MySQL should set these values by
default, as well as have a default `DYNAMIC` `row_format` and pose no trouble
to users.
For example, to connect to a mysql database with mysqlclient:
1. install mysqlclient: `pip install mysqlclient`
2. configure [](JupyterHub.db_url):
```python
c.JupyterHub.db_url = "mysql+mysqldb://myuser:mypassword@my-sql-server:3306/my-db-name"
```

View File

@@ -0,0 +1,17 @@
(explanation)=
# Explanation
_Explanation_ documentation provide big-picture descriptions of how JupyterHub works. This section is meant to build your understanding of particular topics.
```{toctree}
:maxdepth: 1
concepts
capacity-planning
database
websecurity
oauth
singleuser
../rbac/index
```

View File

@@ -0,0 +1,375 @@
(explanation:hub-oauth)=
# JupyterHub and OAuth
JupyterHub uses [OAuth 2](https://oauth.net/2/) as an internal mechanism for authenticating users.
As such, JupyterHub itself always functions as an OAuth **provider**.
You can find out more about what that means [below](oauth-terms).
Additionally, JupyterHub is _often_ deployed with [OAuthenticator](https://oauthenticator.readthedocs.io),
where an external identity provider, such as GitHub or KeyCloak, is used to authenticate users.
When this is the case, there are _two_ nested OAuth flows:
an _internal_ OAuth flow where JupyterHub is the **provider**,
and an _external_ OAuth flow, where JupyterHub is the **client**.
This means that when you are using JupyterHub, there is always _at least one_ and often two layers of OAuth involved in a user logging in and accessing their server.
The following points are noteworthy:
- Single-user servers _never_ need to communicate with or be aware of the upstream provider configured in your Authenticator.
As far as the servers are concerned, only JupyterHub is an OAuth provider,
and how users authenticate with the Hub itself is irrelevant.
- When interacting with a single-user server,
there are ~always two tokens:
first, a token issued to the server itself to communicate with the Hub API,
and second, a per-user token in the browser to represent the completed login process and authorized permissions.
More on this [later](two-tokens).
(oauth-terms)=
## Key OAuth terms
Here are some key definitions to keep in mind when we are talking about OAuth.
You can also read more in detail [here](https://www.oauth.com/oauth2-servers/definitions/).
- **provider**: The entity responsible for managing identity and authorization;
always a web server.
JupyterHub is _always_ an OAuth provider for JupyterHub's components.
When OAuthenticator is used, an external service, such as GitHub or KeyCloak, is also an OAuth provider.
- **client**: An entity that requests OAuth **tokens** on a user's behalf;
generally a web server of some kind.
OAuth **clients** are services that _delegate_ authentication and/or authorization
to an OAuth **provider**.
JupyterHub _services_ or single-user _servers_ are OAuth **clients** of the JupyterHub **provider**.
When OAuthenticator is used, JupyterHub is itself _also_ an OAuth **client** for the external OAuth **provider**, e.g. GitHub.
- **browser**: A user's web browser, which makes requests and stores things like cookies.
- **token**: The secret value used to represent a user's authorization. This is the final product of the OAuth process.
- **code**: A short-lived temporary secret that the **client** exchanges
for a **token** at the conclusion of OAuth,
in what's generally called the "OAuth callback handler."
## One oauth flow
OAuth **flow** is what we call the sequence of HTTP requests involved in authenticating a user and issuing a token, ultimately used for authorizing access to a service or single-user server.
A single OAuth flow typically goes like this:
### OAuth request and redirect
1. A **browser** makes an HTTP request to an OAuth **client**.
2. There are no credentials, so the client _redirects_ the browser to an "authorize" page on the OAuth **provider** with some extra information:
- the OAuth **client ID** of the client itself.
- the **redirect URI** to be redirected back to after completion.
- the **scopes** requested, which the user should be presented with to confirm.
This is the "X would like to be able to Y on your behalf. Allow this?" page you see on all the "Login with ..." pages around the Internet.
3. During this authorize step,
the browser must be _authenticated_ with the provider.
This is often already stored in a cookie,
but if not the provider webapp must begin its _own_ authentication process before serving the authorization page.
This _may_ even begin another OAuth flow!
4. After the user tells the provider that they want to proceed with the authorization,
the provider records this authorization in a short-lived record called an **OAuth code**.
5. Finally, the oauth provider redirects the browser _back_ to the oauth client's "redirect URI"
(or "OAuth callback URI"),
with the OAuth code in a URL parameter.
That marks the end of the requests made between the **browser** and the **provider**.
### State after redirect
At this point:
- The browser is authenticated with the _provider_.
- The user's authorized permissions are recorded in an _OAuth code_.
- The _provider_ knows that the permissions requested by the OAuth client have been granted, but the client doesn't know this yet.
- All the requests so far have been made directly by the browser.
No requests have originated from the client or provider.
### OAuth Client Handles Callback Request
At this stage, we get to finish the OAuth process.
Let's dig into what the OAuth client does when it handles
the OAuth callback request.
- The OAuth client receives the _code_ and makes an API request to the _provider_ to exchange the code for a real _token_.
This is the first direct request between the OAuth _client_ and the _provider_.
- Once the token is retrieved, the client _usually_
makes a second API request to the _provider_
to retrieve information about the owner of the token (the user).
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.
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),
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.
This could be the token itself, or any other appropriate representation of successful authentication.
- Now that credentials have been established,
the browser can be redirected to the _original_ URL where it started,
to try the request again.
If the client wasn't able to keep track of the original URL all this time
(not always easy!),
you might end up back at a default landing page instead of where you started the login process. This is frustrating!
😮‍💨 _phew_.
So that's _one_ OAuth process.
## Full sequence of OAuth in JupyterHub
Let's go through the above OAuth process in JupyterHub,
with specific examples of each HTTP request and what information it contains.
For bonus points, we are using the double-OAuth example of JupyterHub configured with GitHubOAuthenticator.
To disambiguate, we will call the OAuth process where JupyterHub is the **provider** "internal OAuth,"
and the one with JupyterHub as a **client** "external OAuth."
Our starting point:
- a user's single-user server is running. Let's call them `danez`
- Jupyterhub is running with GitHub as an OAuth provider (this means two full instances of OAuth),
- Danez has a fresh browser session with no cookies yet.
First request:
- browser->single-user server running JupyterLab or Jupyter Classic
- `GET /user/danez/notebooks/mynotebook.ipynb`
- no credentials, so single-user server (as an OAuth **client**) starts internal OAuth process with JupyterHub (the **provider**)
- response: 302 redirect -> `/hub/api/oauth2/authorize`
with:
- client-id=`jupyterhub-user-danez`
- redirect-uri=`/user/danez/oauth_callback` (we'll come back later!)
Second request, following redirect:
- browser->JupyterHub
- `GET /hub/api/oauth2/authorize`
- no credentials, so JupyterHub starts external OAuth process _with GitHub_
- response: 302 redirect -> `https://github.com/login/oauth/authorize`
with:
- client-id=`jupyterhub-client-uuid`
- redirect-uri=`/hub/oauth_callback` (we'll come back later!)
_pause_ This is where JupyterHub configuration comes into play.
Recall, in this case JupyterHub is using:
```python
c.JupyterHub.authenticator_class = 'github'
```
That means authenticating a request to the Hub itself starts
a _second_, external OAuth process with GitHub as a provider.
This external OAuth process is optional, though.
If you were using the default username+password PAMAuthenticator,
this redirect would have been to `/hub/login` instead, to present the user
with a login form.
Third request, following redirect:
- browser->GitHub
- `GET https://github.com/login/oauth/authorize`
Here, GitHub prompts for login and asks for confirmation of authorization
(more redirects if you aren't logged in to GitHub yet, but ultimately back to this `/authorize` URL).
After successful authorization
(either by looking up a pre-existing authorization,
or recording it via form submission)
GitHub issues an **OAuth code** and redirects to `/hub/oauth_callback?code=github-code`
Next request:
- browser->JupyterHub
- `GET /hub/oauth_callback?code=github-code`
Inside the callback handler, JupyterHub makes two API requests:
The first:
- JupyterHub->GitHub
- `POST https://github.com/login/oauth/access_token`
- request made with OAuth **code** from URL parameter
- response includes an access **token**
The second:
- JupyterHub->GitHub
- `GET https://api.github.com/user`
- request made with access **token** in the `Authorization` header
- response is the user model, including username, email, etc.
Now the external OAuth callback request completes with:
- set cookie on `/hub/` path, recording jupyterhub authentication so we don't need to do external OAuth with GitHub again for a while
- redirect -> `/hub/api/oauth2/authorize`
🎉 At this point, we have completed our first OAuth flow! 🎉
Now, we get our first repeated request:
- browser->jupyterhub
- `GET /hub/api/oauth2/authorize`
- this time with credentials,
so jupyterhub either
1. serves the internal authorization confirmation page, or
2. automatically accepts authorization (shortcut taken when a user is visiting their own server)
- redirect -> `/user/danez/oauth_callback?code=jupyterhub-code`
Here, we start the same OAuth callback process as before, but at Danez's single-user server for the _internal_ OAuth.
- browser->single-user server
- `GET /user/danez/oauth_callback`
(in handler)
Inside the internal OAuth callback handler,
Danez's server makes two API requests to JupyterHub:
The first:
- single-user server->JupyterHub
- `POST /hub/api/oauth2/token`
- request made with oauth code from url parameter
- response includes an API token
The second:
- single-user server->JupyterHub
- `GET /hub/api/user`
- request made with token in the `Authorization` header
- response is the user model, including username, groups, etc.
Finally completing `GET /user/danez/oauth_callback`:
- response sets cookie, storing encrypted access token
- _finally_ redirects back to the original `/user/danez/notebooks/mynotebook.ipynb`
Final request:
- browser -> single-user server
- `GET /user/danez/notebooks/mynotebook.ipynb`
- encrypted jupyterhub token in cookie
To authenticate this request, the single token stored in the encrypted cookie is passed to the Hub for verification:
- single-user server -> Hub
- `GET /hub/api/user`
- browser's token in Authorization header
- response: user model with name, groups, etc.
If the user model matches who should be allowed (e.g. Danez),
then the request is allowed.
See [Scopes in JupyterHub](jupyterhub-scopes) for how JupyterHub uses scopes to determine authorized access to servers and services.
_the end_
## Token caches and expiry
Because tokens represent information from an external source,
they can become 'stale,'
or the information they represent may no longer be accurate.
For example: a user's GitHub account may no longer be authorized to use JupyterHub,
that should ultimately propagate to revoking access and force logging in again.
To handle this, OAuth tokens and the various places they are stored can _expire_,
which should have the same effect as no credentials,
and trigger the authorization process again.
In JupyterHub's internal OAuth, we have these layers of information that can go stale:
- The OAuth client has a **cache** of Hub responses for tokens,
so it doesn't need to make API requests to the Hub for every request it receives.
This cache has an expiry of five minutes by default,
and is governed by the configuration `HubAuth.cache_max_age` in the single-user server.
- The internal OAuth token is stored in a cookie, which has its own expiry (default: 14 days),
governed by `JupyterHub.cookie_max_age_days`.
- The internal OAuth token itself can also expire,
which is by default the same as the cookie expiry,
since it makes sense for the token itself and the place it is stored to expire at the same time.
This is governed by `JupyterHub.cookie_max_age_days` first,
or can overridden by `JupyterHub.oauth_token_expires_in`.
That's all for _internal_ auth storage,
but the information from the _external_ authentication provider
(could be PAM or GitHub OAuth, etc.) can also expire.
Authenticator configuration governs when JupyterHub needs to ask again,
triggering the external login process anew before letting a user proceed.
- `jupyterhub-hub-login` cookie stores that a browser is authenticated with the Hub.
This expires according to `JupyterHub.cookie_max_age_days` configuration,
with a default of 14 days.
The `jupyterhub-hub-login` cookie is encrypted with `JupyterHub.cookie_secret`
configuration.
- {meth}`.Authenticator.refresh_user` is a method to refresh a user's auth info.
By default, it does nothing, but it can return an updated user model if a user's information has changed,
or force a full login process again if needed.
- {attr}`.Authenticator.auth_refresh_age` configuration governs how often
`refresh_user()` will be called to check if a user must login again (default: 300 seconds).
- {attr}`.Authenticator.refresh_pre_spawn` configuration governs whether
`refresh_user()` should be called prior to spawning a server,
to force fresh auth info when a server is launched (default: False).
This can be useful when Authenticators pass access tokens to spawner environments, to ensure they aren't getting a stale token that's about to expire.
**So what happens when these things expire or get stale?**
- If the HubAuth **token response cache** expires,
when a request is made with a token,
the Hub is asked for the latest information about the token.
This usually has no visible effect, since it is just refreshing a cache.
If it turns out that the token itself has expired or been revoked,
the request will be denied.
- If the token has expired, but is still in the cookie:
when the token response cache expires,
the next time the server asks the hub about the token,
no user will be identified and the internal OAuth process begins again.
- If the token _cookie_ expires, the next browser request will be made with no credentials,
and the internal OAuth process will begin again.
This will usually have the form of a transparent redirect browsers won't notice.
However, if this occurs on an API request in a long-lived page visit
such as a JupyterLab session, the API request may fail and require
a page refresh to get renewed credentials.
- If the _JupyterHub_ cookie expires, the next time the browser makes a request to the Hub,
the Hub's authorization process must begin again (e.g. login with GitHub).
Hub cookie expiry on its own **does not** mean that a user can no longer access their single-user server!
- If credentials from the upstream provider (e.g. GitHub) become stale or outdated,
these will not be refreshed until/unless `refresh_user` is called
_and_ `refresh_user()` on the given Authenticator is implemented to perform such a check.
At this point, few Authenticators implement `refresh_user` to support this feature.
If your Authenticator does not or cannot implement `refresh_user`,
the only way to force a check is to reset the `JupyterHub.cookie_secret` encryption key,
which invalidates the `jupyterhub-hub-login` cookie for all users.
### Logging out
Logging out of JupyterHub means clearing and revoking many of these credentials:
- The `jupyterhub-hub-login` cookie is revoked, meaning the next request to the Hub itself will require a new login.
- The token stored in the `jupyterhub-user-username` cookie for the single-user server
will be revoked, based on its associaton with `jupyterhub-session-id`, but the _cookie itself cannot be cleared at this point_
- The shared `jupyterhub-session-id` is cleared, which ensures that the HubAuth **token response cache** will not be used,
and the next request with the expired token will ask the Hub, which will inform the single-user server that the token has expired
## Extra bits
(two-tokens)=
### A tale of two tokens
**TODO**: discuss API token issued to server at startup ($JUPYTERHUB_API_TOKEN)
and OAuth-issued token in the cookie,
and some details of how JupyterLab currently deals with that.
They are different, and JupyterLab should be making requests using the token from the cookie,
not the token from the server,
but that is not currently the case.
### Redirect loops
In general, an authenticated web endpoint has this behavior,
based on the authentication/authorization state of the browser:
- If authorized, allow the request to happen
- If authenticated (I know who you are) but not authorized (you are not allowed), fail with a 403 permission denied error
- If not authenticated, start a redirect process to establish authorization,
which should end in a redirect back to the original URL to try again.
**This is why problems in authentication result in redirect loops!**
If the second request fails to detect the authentication that should have been established during the redirect,
it will start the authentication redirect process over again,
and keep redirecting in a loop until the browser balks.

View File

@@ -0,0 +1,109 @@
(explanation:singleuser)=
# The JupyterHub single-user server
When a user logs into JupyterHub, they get a 'server', which we usually call the **single-user server**, because it's a server that's meant for a single JupyterHub user.
Each JupyterHub user gets a different one (or more than one!).
A single-user server is a process running somewhere that is:
1. accessible over http[s],
2. authenticated via JupyterHub using OAuth 2.0,
3. started by a [Spawner](spawners), and
4. 'owned' by a single JupyterHub user
## The single-user server command
The Spawner's default single-user server startup command, `jupyterhub-singleuser`, launches `jupyter-server`, the same program used when you run `jupyter lab` on your laptop.
(_It can also launch the legacy `jupyter-notebook` server_).
That's why JupyterHub looks familiar to folks who are already using Jupyter at home or elsewhere.
It's the same!
`jupyterhub-singleuser` _customizes_ that program to change (approximately) one thing: **authenticate requests with JupyterHub**.
(singleuser-auth)=
## Single-user server authentication
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)).
This is primarily implemented in the {class}`~.HubOAuth` class.
This code resides in `jupyterhub.singleuser` subpackage of JupyterHub.
The main task of this code is to:
1. resolve a JupyterHub token to a JupyterHub user (authenticate)
2. check permissions (`access:servers`) for the token to make sure the request should be allowed (authorize)
3. if not authorized, begin the OAuth process with a redirect to the Hub
4. after login, store OAuth tokens in a cookie only used by this single-user server
5. implement logout to clear the cookie
Most of this is implemented in the {class}`~.HubOAuth` class. `jupyterhub.singleuser` is responsible for _adapting_ the base Jupyter Server to use HubOAuth for these tasks.
### JupyterHub authentication extension
By default, `jupyter-server` uses its own cookie to authenticate.
If that cookie is not present, the server redirects you a login page and asks you to enter a password or token.
Jupyter Server 2.0 introduces two new _APIs_ for customizing authentication: the [IdentityProvider](inv:jupyter-server#jupyter_server.auth.IdentityProvider) and the [Authorizer](inv:jupyter-server#jupyter_server.auth.Authorizer).
More information can be found in the [Jupyter Server documentation](https://jupyter-server.readthedocs.io).
JupyterHub implements these APIs in `jupyterhub.singleuser.extension`.
The IdentityProvider is responsible for _authenticating_ requests.
In JupyterHub, that means extracting OAuth tokens from the request and resolving them to a JupyterHub user.
The Authorizer is a _separate_ API for _authorizing_ actions on particular resources.
Because the JupyterHub IdentityProvider only allows _authenticating_ users who already have the necessary `access:servers` permission to access the server, the default Authorizer only contains a redundant check for this same permission, and ignores the resource inputs.
However, specifying a _custom_ Authorizer allows for granular permissions, such as read-only access to subsets of a shared server.
### JupyterHub authentication via subclass
Prior to Jupyter Server 2 (i.e. Jupyter Server 1.x or the legacy `jupyter-notebook` server), JupyterHub authentication is applied via _subclass_.
Originally a subclass of `NotebookApp`,
this approach works with both `jupyter-server` and `jupyter-notebook`.
Instead of using the extension mechanisms above,
the server application is _subclassed_. This worked well in the `jupyter-notebook` days,
but doesn't fit well with Jupyter Server's extension-based architecture.
### Selecting jupyterhub-singleuser implementation
Using the JupyterHub singleuser-server extension is the default behavior of JupyterHub 4 and Jupyter Server 2, otherwise the subclass approach is taken.
You can opt-out of the extension by setting the environment variable `JUPYTERHUB_SINGLEUSER_EXTENSION=0`:
```python
c.Spawner.environment.update(
{
"JUPYTERHUB_SINGLEUSER_EXTENSION": "0",
}
)
```
The subclass approach will also be taken if you've opted to use the classic notebook server with:
```
JUPYTERHUB_SINGLEUSER_APP=notebook
```
which was introduced in JupyterHub 2.
## Other customizations
`jupyterhub-singleuser` makes other small customizations to how the single-user server behaves:
1. logs activity on the single-user server, used in [idle-culling](https://github.com/jupyterhub/jupyterhub-idle-culler).
2. disables some features that don't make sense in JupyterHub (trash, retrying ports)
3. loading options such as URLs and SSL configuration from the environment
4. customize logging for consistency with JupyterHub logs
## Running a single-user server that's not `jupyterhub-singleuser`
By default, `jupyterhub-singleuser` is the same `jupyter-server` used by JupyterLab, Jupyter notebook (>= 7), etc.
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
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-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.

View File

@@ -0,0 +1,274 @@
(explanation:security)=
# Security Overview
The **Security Overview** section helps you learn about:
- the design of JupyterHub with respect to web security
- the semi-trusted user
- the available mitigations to protect untrusted users from each other
- the value of periodic security audits
This overview also helps you obtain a deeper understanding of how JupyterHub
works.
## Semi-trusted and untrusted users
JupyterHub is designed to be a _simple multi-user server for modestly sized
groups_ of **semi-trusted** users. While the design reflects serving
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
administrator, since much care is required to secure a Hub, with extra caution on
protecting users from each other.
One aspect of JupyterHub's _design simplicity_ for **semi-trusted** users is that
the Hub and single-user servers are placed in a _single domain_, behind a
[_proxy_][configurable-http-proxy]. If the Hub is serving untrusted
users, many of the web's cross-site protections are not applied between
single-user servers and the Hub, or between single-user servers and each
other, since browsers see the whole thing (proxy, Hub, and single user
servers) as a single website (i.e. single domain).
## Protect users from each other
To protect users from each other, a user must **never** be able to write arbitrary
HTML and serve it to another user on the Hub's domain. This is prevented by JupyterHub's
authentication setup because only the owner of a given single-user notebook server is
allowed to view user-authored pages served by the given single-user notebook
server.
To protect all users from each other, JupyterHub administrators must
ensure that:
- A user **does not have permission** to modify their single-user notebook server,
including:
- the installation of new packages in the Python environment that runs
their single-user server;
- the creation of new files in any `PATH` directory that precedes the
directory containing `jupyterhub-singleuser` (if the `PATH` is used
to resolve the single-user executable instead of using an absolute path);
- the modification of environment variables (e.g. PATH, PYTHONPATH) for
their single-user server;
- the modification of the configuration of the notebook server
(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
**must never** display user-authored HTML that is neither _sanitized_ nor _sandboxed_
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
The several approaches to mitigating security issues with configuration
options provided by JupyterHub include:
(subdomains)=
### Enable user subdomains
JupyterHub provides the ability to run single-user servers on their own
domains. This means the cross-origin protections between servers has the
desired effect, and user servers and the Hub are protected from each other.
**Subdomains are the only way to reliably isolate user servers from each other.**
To enable subdomains, set:
```python
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/2013-04-09-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
If subdomains are unavailable or undesirable, JupyterHub provides a
configuration option `Spawner.disable_user_config = True`, which can be set to prevent
the user-owned configuration files from being loaded. After implementing this
option, `PATH`s and package installation are the other things that the
admin must enforce.
### Prevent spawners from evaluating shell configuration files
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.
### Isolate packages in a read-only environment
The user must not have permission to install packages into the environment where the singleuser-server runs.
On a shared system, package isolation is most easily handled by running the single-user server in
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 is only required for the
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
pose additional risk to the web application's security.
### Encrypt internal connections with SSL/TLS
By default, all communications within JupyterHub—between the proxy, hub, and single
-user notebooks—are performed unencrypted. Setting the `internal_ssl` flag in
`jupyterhub_config.py` secures the aforementioned routes. Turning this
feature on does require that the enabled `Spawner` can use the certificates
generated by the `Hub` (the default `LocalProcessSpawner` can, for instance).
It is also important to note that this encryption **does not** cover the
`zmq tcp` sockets between the Notebook client and kernel yet. While users cannot
submit arbitrary commands to another user's kernel, they can bind to these
sockets and listen. When serving untrusted users, this eavesdropping can be
mitigated by setting `KernelManager.transport` to `ipc`. This applies standard
Unix permissions to the communication sockets thereby restricting
communication to the socket owner. The `internal_ssl` option will eventually
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
We recommend that you do periodic reviews of your deployment's security. It's
good practice to keep [JupyterHub](https://readthedocs.org/projects/jupyterhub/), [configurable-http-proxy][], and [nodejs
versions](https://github.com/nodejs/Release) up to date.
A handy website for testing your deployment is
[Qualsys' SSL analyzer tool](https://www.ssllabs.com/ssltest/analyze.html).
[configurable-http-proxy]: https://github.com/jupyterhub/configurable-http-proxy
## Vulnerability reporting
If you believe you have found a security vulnerability in JupyterHub, or any
Jupyter project, please report it to
[security@ipython.org](mailto:security@ipython.org). If you prefer to encrypt
your security reports, you can use [this PGP public
key](https://jupyter.org/assets/ipython_security.asc).

78
docs/source/faq/faq.md Normal file
View File

@@ -0,0 +1,78 @@
(faq)=
# Frequently asked questions
## How do I share links to notebooks?
Sharing links to notebooks is a common activity,
and can look different depending on what you mean by 'share.'
Your first instinct might be to copy the URL you see in the browser,
e.g. `jupyterhub.example/user/yourname/notebooks/coolthing.ipynb`,
but this usually won't work, depending on the permissions of the person you share the link with.
Unfortunately, 'share' means at least a few things to people in a JupyterHub context.
We'll cover 3 common cases here, when they are applicable, and what assumptions they make:
1. sharing links that will open the same file on the visitor's own server
2. sharing links that will bring the visitor to _your_ server (e.g. for real-time collaboration, or RTC)
3. publishing notebooks and sharing links that will download the notebook into the user's server
### link to the same file on the visitor's server
This is for the case where you have JupyterHub on a shared (or sufficiently similar) filesystem, where you want to share a link that will cause users to login and start their _own_ server, to view or edit the file.
**Assumption:** the same path on someone else's server is valid and points to the same file
This is useful in e.g. classes where you know students have certain files in certain locations, or collaborations where you know you have a shared filesystem where everyone has access to the same files.
A link should look like `https://jupyterhub.example/hub/user-redirect/lab/tree/foo.ipynb`.
You can hand-craft these URLs from the URL you are looking at, where you see `/user/name/lab/tree/foo.ipynb` use `/hub/user-redirect/lab/tree/foo.ipynb` (replace `/user/name/` with `/hub/user-redirect/`).
Or you can use JupyterLab's "copy shareable link" in the context menu in the file browser:
![copy shareable link in JupyterLab](../images/shareable_link.webp)
which will produce a correct URL with `/hub/user-redirect/` in it.
### link to the file on your server
This is for the case where you want to both be using _your_ server, e.g. for real-time collaboration (RTC).
**Assumption:** the user has (or should have) access to your server.
**Assumption:** your server is running _or_ the user has permission to start it.
By default, JupyterHub users don't have access to each other's servers, but JupyterHub 2.0 administrators can grant users limited access permissions to each other's servers.
If the visitor doesn't have access to the server, these links will result in a 403 Permission Denied error.
In many cases, for this situation you can copy the link in your URL bar (`/user/yourname/lab`), or you can add `/tree/path/to/specific/notebook.ipynb` to open a specific file.
The [jupyterlab-link-share] JupyterLab extension generates these links, and even can _grant_ other users access to your server.
[jupyterlab-link-share]: https://github.com/jupyterlab-contrib/jupyterlab-link-share
:::{warning}
Note that the way the extension _grants_ access is handing over credentials to allow the other user to **_BECOME YOU_**.
This is usually not appropriate in JupyterHub.
:::
### link to a published copy
Another way to 'share' notebooks is to publish copies, e.g. pushing the notebook to a git repository and sharing a download link.
This way is especially useful for course materials,
where no assumptions are necessary about the user's environment,
except for having one package installed.
**Assumption:** The [nbgitpuller](inv:nbgitpuller#index) server extension is installed
Unlike the other two methods, nbgitpuller doesn't provide an extension to copy a shareable link for the document you're currently looking at,
but it does provide a [link generator](inv:nbgitpuller#link),
which uses the `user-redirect` approach above.
When visiting an nbgitpuller link:
- The visitor will be directed to their own server
- Your repo will be cloned (or updated if it's already been cloned)
- and then the file opened when it's ready
[nbgitpuller]: https://nbgitpuller.readthedocs.io
[nbgitpuller-link]: https://nbgitpuller.readthedocs.io/en/latest/link.html

11
docs/source/faq/index.md Normal file
View File

@@ -0,0 +1,11 @@
# FAQs
Find answers to some of the most frequently-asked questions around JupyterHub and how it works.
```{toctree}
:maxdepth: 2
faq
institutional-faq
troubleshooting
```

View File

@@ -0,0 +1,269 @@
(faq:institutional)=
# Institutional FAQ
This page contains common questions from users of JupyterHub,
broken down by their roles within organizations.
## For all
### Is it appropriate for adoption within a larger institutional context?
Yes! JupyterHub has been used at-scale for large pools of users, as well
as complex and high-performance computing.
For example,
- UC Berkeley uses
JupyterHub for its Data Science Education Program courses (serving over
3,000 students).
- The Pangeo project uses JupyterHub to provide access
to scalable cloud computing with Dask.
JupyterHub is stable and customizable
to the use-cases of large organizations.
### I keep hearing about Jupyter Notebook, JupyterLab, and now JupyterHub. Whats the difference?
Here is a quick breakdown of these three tools:
- **The Jupyter Notebook** is a document specification (the `.ipynb`) file that interweaves
narrative text with code cells and their outputs. It is also a graphical interface
that allows users to edit these documents. There are also several other graphical interfaces
that allow users to edit the `.ipynb` format (nteract, Jupyter Lab, Google Colab, Kaggle, etc).
- **JupyterLab** is a flexible and extendible user interface for interactive computing. It
has several extensions that are tailored for using Jupyter Notebooks, as well as extensions
for other parts of the data science stack.
- **JupyterHub** is an application that manages interactive computing sessions for **multiple users**.
It also connects users with infrastructure they wish to access. It can provide
remote access to Jupyter Notebooks and JupyterLab for many people.
## For management
### Briefly, what problem does JupyterHub solve for us?
JupyterHub provides a shared platform for data science and collaboration.
It allows users to utilize familiar data science workflows (such as the scientific Python stack,
the R tidyverse, and Jupyter Notebooks) on institutional infrastructure. It also gives administrators
some control over access to resources, security, environments, and authentication.
### Is JupyterHub mature? Why should we trust it?
Yes - the core JupyterHub application recently
reached 1.0 status, and is considered stable and performant for most institutions.
JupyterHub has also been deployed (along with other tools) to work on
scalable infrastructure, large datasets, and high-performance computing.
### Who else uses JupyterHub?
JupyterHub is used at a variety of institutions in academia,
industry, and government research labs. It is most-commonly used by two kinds of groups:
- Small teams (e.g., data science teams, research labs, or collaborative projects) to provide a
shared resource for interactive computing, collaboration, and analytics.
- Large teams (e.g., a department, a large class, or a large group of remote users) to provide
access to organizational hardware, data, and analytics environments at scale.
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,
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,
Minnesota Supercomputing Institute, ALCF, CERN, Lawrence Livermore National Laboratory, HUNT
- **Online communities**: Pangeo, Quantopian, mybinder.org, MathHub, Open Humans
- **Computing infrastructure providers**: NERSC, San Diego Supercomputing Center, Compute Canada
- **Companies**: Capital One, SANDVIK code, Globus
See the [Gallery of JupyterHub deployments](gallery-of-deployments) for
a more complete list of JupyterHub deployments at institutions.
### How does JupyterHub compare with hosted products, like Google Colaboratory, RStudio.cloud, or Anaconda Enterprise?
JupyterHub puts you in control of your data, infrastructure, and coding environment.
In addition, it is vendor neutral, which reduces lock-in to a particular vendor or service.
JupyterHub provides access to interactive computing environments in the cloud (similar to each of these services).
Compared with the tools above, it is more flexible, more customizable, free, and
gives administrators more control over their setup and hardware.
Because JupyterHub is an open-source, community-driven tool, it can be extended and
modified to fit an institution's needs. It plays nicely with the open source data science
stack, and can serve a variety of computing environments, user interfaces, and
computational hardware. It can also be deployed anywhere - on enterprise cloud infrastructure, on
High-Performance-Computing machines, on local hardware, or even on a single laptop, which
is not possible with most other tools for shared interactive computing.
## For IT
### How would I set up JupyterHub on institutional hardware?
That depends on what kind of hardware you've got. JupyterHub is flexible enough to be deployed
on a variety of hardware, including in-room hardware, on-prem clusters, cloud infrastructure,
etc.
The most common way to set up a JupyterHub is to use a JupyterHub distribution, these are pre-configured
and opinionated ways to set up a JupyterHub on particular kinds of infrastructure. The two distributions
that we currently suggest are:
- [Zero to JupyterHub for Kubernetes](https://z2jh.jupyter.org) is a scalable JupyterHub deployment and
guide that runs on Kubernetes. Better for larger or dynamic user groups (50-10,000) or more complex
compute/data needs.
- [The Littlest JupyterHub](https://tljh.jupyter.org) is a lightweight JupyterHub that runs on a single
machine (in the cloud or under your desk). Better for smaller user groups (4-80) or more
lightweight computational resources.
### Does JupyterHub run well in the cloud?
**Yes** - most deployments of JupyterHub are run via cloud infrastructure and on a variety of cloud providers.
Depending on the distribution of JupyterHub that you'd like to use, you can also connect your JupyterHub
deployment with a number of other cloud-native services so that users have access to other resources from
their interactive computing sessions.
For example, if you use the [Zero to JupyterHub for Kubernetes](https://z2jh.jupyter.org) distribution,
you'll be able to utilize container-based workflows of other technologies such as the [dask-kubernetes](https://kubernetes.dask.org/en/latest/)
project for distributed computing.
The Z2JH Helm Chart also has some functionality built in for auto-scaling your cluster up and down
as more resources are needed - allowing you to utilize the benefits of a flexible cloud-based deployment.
### Is JupyterHub secure?
The short answer: yes.
JupyterHub as a standalone application has been battle-tested at an institutional
level for several years, and makes a number of "default" security decisions that are reasonable for most
users.
- For security considerations in the base JupyterHub application,
[see the JupyterHub security page](explanation:security).
- For security considerations when deploying JupyterHub on Kubernetes, see the
[JupyterHub on Kubernetes security page](https://z2jh.jupyter.org/en/latest/security.html).
The longer answer: it depends on your deployment. Because JupyterHub is very flexible, it can be used
in a variety of deployment setups. This often entails connecting your JupyterHub to **other** infrastructure
(such as a [Dask Gateway service](https://gateway.dask.org/)). There are many security decisions to be made
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
[Jupyter Community Forum](https://discourse.jupyter.org/c/jupyterhub). This community of practice has many
individuals with experience running secure JupyterHub deployments and will be very glad to help you out.
### Does JupyterHub provide computing or data infrastructure?
**No** - JupyterHub manages user sessions and can _control_ computing infrastructure, but it does not provide these
things itself. You are expected to run JupyterHub on your own infrastructure (local or in the cloud). Moreover,
JupyterHub has no internal concept of "data", but is designed to be able to communicate with data repositories
(again, either locally or remotely) for use within interactive computing sessions.
### How do I manage users?
JupyterHub offers a few options for managing your users. Upon setting up a JupyterHub, you can choose what
kind of **authentication** you'd like to use. For example, you can have users sign up with an institutional
email address, or choose a username / password when they first log-in, or offload authentication onto
another service such as an organization's OAuth.
The users of a JupyterHub are stored locally, and can be modified manually by an administrator of the JupyterHub.
Moreover, the _active_ users on a JupyterHub can be found on the administrator's page. This page
gives you the abiltiy to stop or restart kernels, inspect user filesystems, and even take over user
sessions to assist them with debugging.
### How do I manage software environments?
A key benefit of JupyterHub is the ability for an administrator to define the environment(s) that users
have access to. There are many ways to do this, depending on what kind of infrastructure you're using for
your JupyterHub.
For example, **The Littlest JupyterHub** runs on a single VM. In this case, the administrator defines
an environment by installing packages to a shared folder that exists on the path of all users. The
**JupyterHub for Kubernetes** deployment uses Docker images to define environments. You can create your
own list of Docker images that users can select from, and can also control things like the amount of
RAM available to users, or the types of machines that their sessions will use in the cloud.
### How does JupyterHub manage computational resources?
For interactive computing sessions, JupyterHub controls computational resources via a **spawner**.
Spawners define how a new user session is created, and are customized for particular kinds of
infrastructure. For example, the KubeSpawner knows how to control a Kubernetes deployment
to create new pods when users log in.
For more sophisticated computational resources (like distributed computing), JupyterHub can
connect with other infrastructure tools (like Dask or Spark). This allows users to control
scalable or high-performance resources from within their JupyterHub sessions. The logic of
how those resources are controlled is taken care of by the non-JupyterHub application.
### Can JupyterHub be used with my high-performance computing resources?
Yes - JupyterHub can provide access to many kinds of computing infrastructure.
Especially when combined with other open-source schedulers such as Dask, you can manage fairly
complex computing infrastructures from the interactive sessions of a JupyterHub. For example
[see the Dask HPC page](https://docs.dask.org/en/latest/setup/hpc.html).
### How much resources do user sessions take?
This is highly configurable by the administrator. If you wish for your users to have simple
data analytics environments for prototyping and light data exploring, you can restrict their
memory and CPU based on the resources that you have available. If you'd like your JupyterHub
to serve as a gateway to high-performance computing or data resources, you may increase the
resources available on user machines, or connect them with computing infrastructures elsewhere.
### Can I customize the look and feel of a JupyterHub?
JupyterHub provides some customization of the graphics displayed to users. The most common
modification is to add custom branding to the JupyterHub login page, loading pages, and
various elements that persist across all pages (such as headers).
## For Technical Leads
### Will JupyterHub “just work” with our team's interactive computing setup?
Depending on the complexity of your setup, you'll have different experiences with "out of the box"
distributions of JupyterHub. If all of the resources you need will fit on a single VM, then
[The Littlest JupyterHub](https://tljh.jupyter.org) should get you up-and-running within
a half day or so. For more complex setups, such as scalable Kubernetes clusters or access
to high-performance computing and data, it will require more time and expertise with
the technologies your JupyterHub will use (e.g., dev-ops knowledge with cloud computing).
In general, the base JupyterHub deployment is not the bottleneck for setup, it is connecting
your JupyterHub with the various services and tools that you wish to provide to your users.
### How well does JupyterHub scale? What are JupyterHub's limitations?
JupyterHub works well at both a small scale (e.g., a single VM or machine) as well as a
high scale (e.g., a scalable Kubernetes cluster). It can be used for teams as small as 2, and
for user bases as large as 10,000. The scalability of JupyterHub largely depends on the
infrastructure on which it is deployed. JupyterHub has been designed to be lightweight and
flexible, so you can tailor your JupyterHub deployment to your needs.
### Is JupyterHub resilient? What happens when a machine goes down?
For JupyterHubs that are deployed in a containerized environment (e.g., Kubernetes), it is
possible to configure the JupyterHub to be fairly resistant to failures in the system.
For example, if JupyterHub fails, then user sessions will not be affected (though new
users will not be able to log in). When a JupyterHub process is restarted, it should
seamlessly connect with the user database and the system will return to normal.
Again, the details of your JupyterHub deployment (e.g., whether it's deployed on a scalable cluster)
will affect the resiliency of the deployment.
### What interfaces does JupyterHub support?
Out of the box, JupyterHub supports a variety of popular data science interfaces for user sessions,
such as JupyterLab, Jupyter Notebooks, and RStudio. Any interface that can be served
via a web address can be served with a JupyterHub (with the right setup).
### Does JupyterHub make it easier for our team to collaborate?
JupyterHub provides a standardized environment and access to shared resources for your teams.
This greatly reduces the cost associated with sharing analyses and content with other team
members, and makes it easier to collaborate and build off of one another's ideas. Combined with
access to high-performance computing and data, JupyterHub provides a common resource to
amplify your team's ability to prototype their analyses, scale them to larger data, and then
share their results with one another.
JupyterHub also provides a computational framework to share computational narratives between
different levels of an organization. For example, data scientists can share Jupyter Notebooks
rendered as [Voilà dashboards](https://voila.readthedocs.io/en/stable/) with those who are not
familiar with programming, or create publicly-available interactive analyses to allow others to
interact with your work.
### Can I use JupyterHub with R/RStudio or other languages and environments?
Yes, Jupyter is a polyglot project, and there are over 40 community-provided kernels for a variety
of languages (the most common being Python, Julia, and R). You can also use a JupyterHub to provide
access to other interfaces, such as RStudio, that provide their own access to a language kernel.

View File

@@ -0,0 +1,401 @@
(faq:troubleshooting)=
# Troubleshooting
When troubleshooting, you may see unexpected behaviors or receive an error
message. This section provides links for identifying the cause of the
problem and how to resolve it.
## Behavior
### JupyterHub proxy fails to start
If you have tried to start the JupyterHub proxy and it fails to start:
- check if the JupyterHub IP configuration setting is
`c.JupyterHub.ip = '*'`; if it is, try `c.JupyterHub.ip = ''`
- Try starting with `jupyterhub --ip=0.0.0.0`
**Note**: If this occurs on Ubuntu/Debian, check that you are using a
recent version of [Node](https://nodejs.org). Some versions of Ubuntu/Debian come with a very old version
of Node and it is necessary to update Node.
### sudospawner fails to run
If the sudospawner script is not found in the path, sudospawner will not run.
To avoid this, specify sudospawner's absolute path. For example, start
jupyterhub with:
jupyterhub --SudoSpawner.sudospawner_path='/absolute/path/to/sudospawner'
or add:
c.SudoSpawner.sudospawner_path = '/absolute/path/to/sudospawner'
to the config file, `jupyterhub_config.py`.
### What is the default behavior when none of the lists (admin, allowed, allowed groups) are set?
When nothing is given for these lists, there will be no admins, and all users
who can authenticate on the system (i.e. all the Unix users on the server with
a password) will be allowed to start a server. The allowed username set lets you limit
this to a particular set of users, and admin_users lets you specify who
among them may use the admin interface (not necessary, unless you need to do
things like inspect other users' servers or modify the user list at runtime).
### JupyterHub Docker container is not accessible at localhost
Even though the command to start your Docker container exposes port 8000
(`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,
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
tell Jupyterhub to start at `0.0.0.0` which is visible to everyone. Try this
command:
`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?
I started JupyterHub + nbgrader on the same host without containers. When I try to restart JupyterHub + nbgrader with this configuration, errors appear that the service accounts cannot start because the ports are being used.
How can I kill the processes that are using these ports?
Run the following command:
sudo kill -9 $(sudo lsof -t -i:<service_port>)
Where `<service_port>` is the port used by the nbgrader course service. This configuration is specified in `jupyterhub_config.py`.
### Why am I getting a Spawn failed error message?
After successfully logging in to JupyterHub with a compatible authenticator, I get a 'Spawn failed' error message in the browser. The JupyterHub logs have `jupyterhub KeyError: "getpwnam(): name not found: <my_user_name>`.
This issue occurs when the authenticator requires a local system user to exist. In these cases, you need to use a spawner
that does not require an existing system user account, such as `DockerSpawner` or `KubeSpawner`.
### How can I run JupyterHub with sudo but use my current environment variables and virtualenv location?
When launching JupyterHub with `sudo jupyterhub` I get import errors and my environment variables don't work.
When launching services with `sudo ...` the shell won't have the same environment variables or `PATH`s in place. The most direct way to solve this issue is to use the full path to your python environment and add environment variables. For example:
```bash
sudo MY_ENV=abc123 \
/home/foo/venv/bin/python3 \
/srv/jupyterhub/jupyterhub
```
## Errors
### Error 500 after spawning my single-user server
You receive a 500 error while accessing the URL `/user/<your_name>/...`.
This is often seen when your single-user server cannot verify your user cookie
with the Hub.
There are two likely reasons for this:
1. The single-user server cannot connect to the Hub's API (networking
configuration problems)
2. The single-user server cannot _authenticate_ its requests (invalid token)
#### Symptoms
The main symptom is a failure to load _any_ page served by the single-user
server, met with a 500 error. This is typically the first page at `/user/<your_name>`
after logging in or clicking "Start my server". When a single-user notebook server
receives a request, the notebook server makes an API request to the Hub to
check if the cookie corresponds to the right user. This request is logged.
If everything is working, the response logged will be similar to this:
```
200 GET /hub/api/authorizations/cookie/jupyterhub-token-name/[secret] (@10.0.1.4) 6.10ms
```
You should see a similar 200 message, as above, in the Hub log when you first
visit your single-user notebook server. If you don't see this message in the log, it
may mean that your single-user notebook server is not connecting to your Hub.
If you see 403 (forbidden) like this, it is likely a token problem:
```
403 GET /hub/api/authorizations/cookie/jupyterhub-token-name/[secret] (@10.0.1.4) 4.14ms
```
Check the logs of the single-user notebook server, which may have more detailed
information on the cause.
#### Causes and resolutions
##### No authorization request
If you make an API request and it is not received by the server, you likely
have a network configuration issue. Often, this happens when the Hub is only
listening on 127.0.0.1 (default) and the single-user servers are not on the
same 'machine' (can be physically remote, or in a docker container or VM). The
fix for this case is to make sure that `c.JupyterHub.hub_ip` is an address
that all single-user servers can connect to, e.g.:
```python
c.JupyterHub.hub_ip = '10.0.0.1'
```
##### 403 GET /hub/api/authorizations/cookie
If you receive a 403 error, the API token for the single-user server is likely
invalid. Commonly, the 403 error is caused by resetting the JupyterHub
database (either removing jupyterhub.sqlite or some other action) while
leaving single-user servers running. This happens most frequently when using
DockerSpawner because Docker's default behavior is to stop/start containers
that reset the JupyterHub database, rather than destroying and recreating
the container every time. This means that the same API token is used by the
server for its whole life until the container is rebuilt.
The fix for this Docker case is to remove any Docker containers seeing this
issue (typically all containers created before a certain point in time):
docker rm -f jupyter-name
After this, when you start your server via JupyterHub, it will build a
new container. If this was the underlying cause of the issue, you should see
your server again.
##### Proxy settings (403 GET)
When your whole JupyterHub sits behind an organization proxy (_not_ a reverse proxy like NGINX as part of your setup and _not_ the configurable-http-proxy) the environment variables `HTTP_PROXY`, `HTTPS_PROXY`, `http_proxy`, and `https_proxy` might be set. This confuses the JupyterHub single-user servers: When connecting to the Hub for authorization they connect via the proxy instead of directly connecting to the Hub on localhost. The proxy might deny the request (403 GET). This results in the single-user server thinking it has the wrong auth token. To circumvent this you should add `<hub_url>,<hub_ip>,localhost,127.0.0.1` to the environment variables `NO_PROXY` and `no_proxy`.
### Launching Jupyter Notebooks to run as an externally managed JupyterHub service with the `jupyterhub-singleuser` command returns a `JUPYTERHUB_API_TOKEN` error
{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.
- **Grading Assignments**: provide access to shared Jupyter Notebooks that may be used for management tasks such as grading assignments.
- **Private Dashboards**: share dashboards with certain group members.
If possible, try to run the Jupyter Notebook as an externally managed service with one of the provided [jupyter/docker-stacks](https://github.com/jupyter/docker-stacks).
Standard JupyterHub installations include a [jupyterhub-singleuser](https://github.com/jupyterhub/jupyterhub/blob/9fdab027daa32c9017845572ad9d5ba1722dbc53/setup.py#L116) command which is built from the `jupyterhub.singleuser:main` method. The `jupyterhub-singleuser` command is the default command when JupyterHub launches single-user Jupyter Notebooks. One of the goals of this command is to make sure the version of JupyterHub installed within the Jupyter Notebook coincides with the version of the JupyterHub server itself.
If you launch a Jupyter Notebook with the `jupyterhub-singleuser` command directly from the command line, the Jupyter Notebook won't have access to the `JUPYTERHUB_API_TOKEN` and will return:
```
JUPYTERHUB_API_TOKEN env is required to run jupyterhub-singleuser.
Did you launch it manually?
```
If you plan on testing `jupyterhub-singleuser` independently from JupyterHub, then you can set the API token environment variable. For example, if you were to run the single-user Jupyter Notebook on the host, then:
export JUPYTERHUB_API_TOKEN=my_secret_token
jupyterhub-singleuser
With a docker container, pass in the environment variable with the run command:
docker run -d \
-p 8888:8888 \
-e JUPYTERHUB_API_TOKEN=my_secret_token \
jupyter/datascience-notebook:latest
[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...?
### Use a chained SSL certificate
Some certificate providers, i.e. Entrust, may provide you with a chained
certificate that contains multiple files. If you are using a chained
certificate you will need to concatenate the individual files by appending the
chained cert and root cert to your host cert:
cat your_host.crt chain.crt root.crt > your_host-chained.crt
You would then set in your `jupyterhub_config.py` file the `ssl_key` and
`ssl_cert` as follows:
c.JupyterHub.ssl_cert = your_host-chained.crt
c.JupyterHub.ssl_key = your_host.key
#### Example
Your certificate provider gives you the following files: `example_host.crt`,
`Entrust_L1Kroot.txt`, and `Entrust_Root.txt`.
Concatenate the files appending the chain cert and root cert to your host cert:
cat example_host.crt Entrust_L1Kroot.txt Entrust_Root.txt > example_host-chained.crt
You would then use the `example_host-chained.crt` as the value for
JupyterHub's `ssl_cert`. You may pass this value as a command line option
when starting JupyterHub or more conveniently set the `ssl_cert` variable in
JupyterHub's configuration file, `jupyterhub_config.py`. In `jupyterhub_config.py`,
set:
c.JupyterHub.ssl_cert = /path/to/example_host-chained.crt
c.JupyterHub.ssl_key = /path/to/example_host.key
where `ssl_cert` is example-chained.crt and ssl_key to your private key.
Then restart JupyterHub.
See also {ref}`ssl-encryption`.
### Install JupyterHub without a network connection
Both conda and pip can be used without a network connection. You can make your
own repository (directory) of conda packages and/or wheels, and then install
from there instead of the internet.
For instance, you can install JupyterHub with pip and configurable-http-proxy
with npmbox:
python3 -m pip wheel jupyterhub
npmbox configurable-http-proxy
### I want access to the whole filesystem and still default users to their home directory
Setting the following in `jupyterhub_config.py` will configure access to
the entire filesystem and set the default to the user's home directory.
c.Spawner.notebook_dir = '/'
c.Spawner.default_url = '/home/%U' # %U will be replaced with the username
### How do I use JupyterLab's pre-release version with JupyterHub?
While JupyterLab is still under active development, we have had users
ask about how to try out JupyterLab with JupyterHub.
You need to install and enable the JupyterLab extension system-wide,
then you can change the default URL to `/lab`.
For instance:
python3 -m pip install jupyterlab
jupyter serverextension enable --py jupyterlab --sys-prefix
The important thing is that JupyterLab is installed and enabled in the
single-user notebook server environment. For system users, this means
system-wide, as indicated above. For Docker containers, it means inside
the single-user docker image, etc.
In `jupyterhub_config.py`, configure the Spawner to tell the single-user
notebook servers to default to JupyterLab:
c.Spawner.default_url = '/lab'
### How do I set up JupyterHub for a workshop (when users are not known ahead of time)?
1. Set up JupyterHub using OAuthenticator for GitHub authentication
2. Configure the admin list to have workshop leaders listed with administrator privileges.
Users will need a GitHub account to log in and be authenticated by the Hub.
### How do I set up rotating daily logs?
You can do this with [logrotate](https://linux.die.net/man/8/logrotate),
or pipe to `logger` to use Syslog instead of directly to a file.
For example, with this logrotate config file:
```
/var/log/jupyterhub.log {
copytruncate
daily
}
```
and run this daily by putting a script in `/etc/cron.daily/`:
```bash
logrotate /path/to/above-config
```
Or use syslog:
jupyterhub | logger -t jupyterhub
### Toree integration with HDFS rack awareness script
The Apache Toree kernel will have an issue when running with JupyterHub if the standard HDFS rack awareness script is used. This will materialize in the logs as a repeated WARN:
```bash
16/11/29 16:24:20 WARN ScriptBasedMapping: Exception running /etc/hadoop/conf/topology_script.py some.ip.address
ExitCodeException exitCode=1: File "/etc/hadoop/conf/topology_script.py", line 63
print rack
^
SyntaxError: Missing parentheses in call to 'print'
at `org.apache.hadoop.util.Shell.runCommand(Shell.java:576)`
```
In order to resolve this issue, there are two potential options.
1. Update HDFS core-site.xml, so the parameter "net.topology.script.file.name" points to a custom
script (e.g. /etc/hadoop/conf/custom_topology_script.py). Copy the original script and change the first line point
to a python two installation (e.g. /usr/bin/python).
2. In spark-env.sh add a Python 2 installation to your path (e.g. export PATH=/opt/anaconda2/bin:$PATH).
### Where do I find Docker images and Dockerfiles related to JupyterHub?
Docker images can be found at the [JupyterHub organization on Quay.io](https://quay.io/organization/jupyterhub).
The Docker image [jupyterhub/singleuser](https://quay.io/repository/jupyterhub/singleuser)
provides an example single-user notebook server for use with DockerSpawner.
Additional single-user notebook server images can be found at the [Jupyter
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).
### How can I view the logs for JupyterHub or the user's Notebook servers when using the DockerSpawner?
Use `docker logs <container>` where `<container>` is the container name defined within `docker-compose.yml`. For example, to view the logs of the JupyterHub container use:
docker logs hub
By default, the user's notebook server is named `jupyter-<username>` where `username` is the user's username within JupyterHub's database.
So if you wanted to see the logs for user `foo` you would use:
docker logs jupyter-foo
You can also tail logs to view them in real-time using the `-f` option:
docker logs -f hub
## Troubleshooting commands
The following commands provide additional detail about installed packages,
versions, and system information that may be helpful when troubleshooting
a JupyterHub deployment. The commands are:
- System and deployment information
```bash
jupyter troubleshoot
```
- Kernel information
```bash
jupyter kernelspec list
```
- Debug logs when running JupyterHub
```bash
jupyterhub --debug
```

View File

@@ -1,176 +0,0 @@
# A Gallery of JupyterHub Deployments
**A JupyterHub Community Resource**
We've compiled this list of JupyterHub deployments to help the community
see the breadth and growth of JupyterHub's use in education, research, and
high performance computing.
Please submit pull requests to update information or to add new institutions or uses.
## Academic Institutions, Research Labs, and Supercomputer Centers
### University of California Berkeley
- [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](http://data8.org/)
- [GitHub organization](https://github.com/data-8)
- [NERSC](http://www.nersc.gov/)
- [Press release on Jupyter and Cori](http://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](http://research-it.berkeley.edu)
- [JupyterHub server supports campus research computation](http://research-it.berkeley.edu/blog/17/01/24/free-fully-loaded-jupyterhub-server-supports-campus-research-computation)
### University of California Davis
- [Spinning up multiple Jupyter Notebooks on AWS for a tutorial](https://github.com/mblmicdiv/course2017/blob/master/exercises/sourmash-setup.md)
Although not technically a JupyterHub deployment, this tutorial setup
may be helpful to others in the Jupyter community.
Thank you C. Titus Brown for sharing this with the Software Carpentry
mailing list.
```
* I started a big Amazon machine;
* I installed Docker and built a custom image containing my software of
interest;
* I ran multiple containers, one connected to port 8000, one on 8001,
etc. and gave each student a different port;
* students could connect in and use the Terminal program in Jupyter to
execute commands, and could upload/download files via the Jupyter
console interface;
* in theory I could have used notebooks too, but for this I didnt have
need.
I am aware that JupyterHub can probably do all of this including manage
the containers, but Im still a bit shy of diving into that; this was
fairly straightforward, gave me disposable containers that were isolated
for each individual student, and worked almost flawlessly. Should be
easy to do with RStudio too.
```
### Cal Poly San Luis Obispo
- [jupyterhub-deploy-teaching](https://github.com/jupyterhub/jupyterhub-deploy-teaching) based on work by Brian Granger for Cal Poly's Data Science 301 Course
### Clemson University
- Advanced Computing
- [Palmetto cluster and JupyterHub](http://citi.sites.clemson.edu/2016/08/18/JupyterHub-for-Palmetto-Cluster.html)
### University of Colorado Boulder
- (CU Research Computing) CURC
- [JupyterHub User Guide](https://www.rc.colorado.edu/support/user-guide/jupyterhub.html)
- Slurm job dispatched on Crestone compute cluster
- log troubleshooting
- Profiles in IPython Clusters tab
- [Parallel Processing with JupyterHub tutorial](https://www.rc.colorado.edu/support/examples-and-tutorials/parallel-processing-with-jupyterhub.html)
- [Parallel Programming with JupyterHub document](https://www.rc.colorado.edu/book/export/html/833)
- Earth Lab at CU
- [Tutorial on Parallel R on JupyterHub](https://earthdatascience.org/tutorials/parallel-r-on-jupyterhub/)
### HTCondor
- [HTCondor Python Bindings Tutorial from HTCondor Week 2017 includes information on their JupyterHub tutorials](https://research.cs.wisc.edu/htcondor/HTCondorWeek2017/presentations/TueBockelman_Python.pdf)
### University of Illinois
- https://datascience.business.illinois.edu
### IllustrisTNG Simulation Project
- [JupyterHub/Lab-based analysis platform, part of the TNG public data release](http://www.tng-project.org/data/)
### MIT and Lincoln Labs
- https://supercloud.mit.edu/
### Michigan State University
- [Setting up JupyterHub](https://mediaspace.msu.edu/media/Setting+Up+Your+JupyterHub+Password/1_hgv13aag/11980471)
### University of Minnesota
- [JupyterHub Inside HPC](https://insidehpc.com/tag/jupyterhub/)
### University of Missouri
- https://dsa.missouri.edu/faq/
### Paderborn University
- [Data Science (DICE) group](https://dice.cs.uni-paderborn.de/)
- [nbgraderutils](https://github.com/dice-group/nbgraderutils): Use JupyterHub + nbgrader + iJava kernel for online Java exercises. Used in lecture Statistical Natural Language Processing.
### University of Rochester CIRC
- [JupyterHub Userguide](https://info.circ.rochester.edu/Web_Applications/JupyterHub.html) - Slurm, beehive
### University of California San Diego
- San Diego Supercomputer Center - Andrea Zonca
- [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)
- [Deploy JupyterHub on a VM for a Workshop](https://zonca.github.io/2016/04/jupyterhub-sdsc-cloud.html)
- [Customize your Python environment in Jupyterhub](https://zonca.github.io/2017/02/customize-python-environment-jupyterhub.html)
- [Jupyterhub deployment on multiple nodes with Docker Swarm](https://zonca.github.io/2016/05/jupyterhub-docker-swarm.html)
- [Sample deployment of Jupyterhub in HPC on SDSC Comet](https://zonca.github.io/2017/02/sample-deployment-jupyterhub-hpc.html)
- Educational Technology Services - Paul Jamason
- [jupyterhub.ucsd.edu](https://jupyterhub.ucsd.edu)
### TACC University of Texas
### Texas A&M
- Kristen Thyng - Oceanography
- [Teaching with JupyterHub and nbgrader](http://kristenthyng.com/blog/2016/09/07/jupyterhub+nbgrader/)
## Service Providers
### AWS
- [running-jupyter-notebook-and-jupyterhub-on-amazon-emr](https://aws.amazon.com/blogs/big-data/running-jupyter-notebook-and-jupyterhub-on-amazon-emr/)
### Google Cloud Platform
- [Using Tensorflow and JupyterHub in Classrooms](https://cloud.google.com/solutions/using-tensorflow-jupyterhub-classrooms)
- [using-tensorflow-and-jupyterhub blog post](https://opensource.googleblog.com/2016/10/using-tensorflow-and-jupyterhub.html)
### Everware
[Everware](https://github.com/everware) Reproducible and reusable science powered by jupyterhub and docker. Like nbviewer, but executable. CERN, Geneva [website](http://everware.xyz/)
### Microsoft Azure
- https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-data-science-linux-dsvm-intro
### Rackspace Carina
- https://getcarina.com/blog/learning-how-to-whale/
- http://carolynvanslyck.com/talk/carina/jupyterhub/#/
## Miscellaneous
- https://medium.com/@ybarraud/setting-up-jupyterhub-with-sudospawner-and-anaconda-844628c0dbee#.rm3yt87e1
- https://groups.google.com/forum/#!topic/jupyter/nkPSEeMr8c0 Mailing list UT deployment
- JupyterHub setup on Centos https://gist.github.com/johnrc/604971f7d41ebf12370bf5729bf3e0a4
- Deploy JupyterHub to Docker Swarm https://jupyterhub.surge.sh/#/welcome
- http://www.laketide.com/building-your-lab-part-3/
- http://estrellita.hatenablog.com/entry/2015/07/31/083202
- http://www.walkingrandomly.com/?p=5734
- https://wrdrd.com/docs/consulting/education-technology
- https://bitbucket.org/jackhale/fenics-jupyter
- [LinuxCluster blog](https://linuxcluster.wordpress.com/category/application/jupyterhub/)
- [Network Technology](https://arnesund.com/tag/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/)

View File

@@ -1,119 +0,0 @@
# Authentication and User Basics
The default Authenticator uses [PAM][] to authenticate system users with
their username and password. With the default Authenticator, any user
with an account and password on the system will be allowed to login.
## Create a whitelist of users
You can restrict which users are allowed to login with a whitelist,
`Authenticator.whitelist`:
```python
c.Authenticator.whitelist = {'mal', 'zoe', 'inara', 'kaylee'}
```
Users in the whitelist are added to the Hub database when the Hub is
started.
## Configure admins (`admin_users`)
Admin users of JupyterHub, `admin_users`, can add and remove users from
the user `whitelist`. `admin_users` can take actions on other users'
behalf, such as stopping and restarting their servers.
A set of initial admin users, `admin_users` can configured be as follows:
```python
c.Authenticator.admin_users = {'mal', 'zoe'}
```
Users in the admin list are automatically added to the user `whitelist`,
if they are not already present.
Each authenticator may have different ways of determining whether a user is an
administrator. By default JupyterHub use the PAMAuthenticator which provide the
`admin_groups` option and can determine administrator status base on a user
groups. For example we can let any users in the `wheel` group be admin:
```python
c.PAMAuthenticator.admin_groups = {'wheel'}
```
## Give admin access to other users' notebook servers (`admin_access`)
Since the default `JupyterHub.admin_access` setting is False, the admins
do not have permission to log in to the single user notebook servers
owned by *other users*. If `JupyterHub.admin_access` is set to True,
then admins have permission to log in *as other users* on their
respective machines, for debugging. **As a courtesy, you should make
sure your users know if admin_access is enabled.**
## Add or remove users from the Hub
Users can be added to and removed from the Hub via either the admin
panel or the REST API. When a user is **added**, the user will be
automatically added to the whitelist and database. Restarting the Hub
will not require manually updating the whitelist in your config file,
as the users will be loaded from the database.
After starting the Hub once, it is not sufficient to **remove** a user
from the whitelist in your config file. You must also remove the user
from the Hub's database, either by deleting the user from JupyterHub's
admin page, or you can clear the `jupyterhub.sqlite` database and start
fresh.
## Use LocalAuthenticator to create system users
The `LocalAuthenticator` is a special kind of authenticator that has
the ability to manage users on the local system. When you try to add a
new user to the Hub, a `LocalAuthenticator` will check if the user
already exists. If you set the configuration value, `create_system_users`,
to `True` in the configuration file, the `LocalAuthenticator` has
the privileges to add users to the system. The setting in the config
file is:
```python
c.LocalAuthenticator.create_system_users = True
```
Adding a user to the Hub that doesn't already exist on the system will
result in the Hub creating that user via the system `adduser` command
line tool. This option is typically used on hosted deployments of
JupyterHub, to avoid the need to manually create all your users before
launching the service. This approach is not recommended when running
JupyterHub in situations where JupyterHub users map directly onto the
system's UNIX users.
## Use OAuthenticator to support OAuth with popular service providers
JupyterHub's [OAuthenticator][] currently supports the following
popular services:
- Auth0
- Bitbucket
- CILogon
- GitHub
- GitLab
- Globus
- Google
- MediaWiki
- Okpy
- OpenShift
A generic implementation, which you can use for OAuth authentication
with any provider, is also available.
## Use DummyAuthenticator for testing
The :class:`~jupyterhub.auth.DummyAuthenticator` is a simple authenticator that
allows for any username/password unless if a global password has been set. If
set, it will allow for any username as long as the correct password is provided.
To set a global password, add this to the config file:
```python
c.DummyAuthenticator.password = "some_password"
```
[PAM]: https://en.wikipedia.org/wiki/Pluggable_authentication_module
[OAuthenticator]: https://github.com/jupyterhub/oauthenticator

View File

@@ -1,12 +0,0 @@
Getting Started
===============
.. toctree::
:maxdepth: 2
config-basics
networking-basics
security-basics
authenticators-users-basics
spawners-basics
services-basics

View File

@@ -1,186 +0,0 @@
Security settings
=================
.. important::
You should not run JupyterHub without SSL encryption on a public network.
Security is the most important aspect of configuring Jupyter. Three
configuration settings are the main aspects of security configuration:
1. :ref:`SSL encryption <ssl-encryption>` (to enable HTTPS)
2. :ref:`Cookie secret <cookie-secret>` (a key for encrypting browser cookies)
3. Proxy :ref:`authentication token <authentication-token>` (used for the Hub and
other services to authenticate to the Proxy)
The Hub hashes all secrets (e.g., auth tokens) before storing them in its
database. A loss of control over read-access to the database should have
minimal impact on your deployment; if your database has been compromised, it
is still a good idea to revoke existing tokens.
.. _ssl-encryption:
Enabling SSL encryption
-----------------------
Since JupyterHub includes authentication and allows arbitrary code execution,
you should not run it without SSL (HTTPS).
Using an SSL certificate
~~~~~~~~~~~~~~~~~~~~~~~~
This will require you to obtain an official, trusted SSL certificate or create a
self-signed certificate. Once you have obtained and installed a key and
certificate you need to specify their locations in the ``jupyterhub_config.py``
configuration file as follows:
.. code-block:: python
c.JupyterHub.ssl_key = '/path/to/my.key'
c.JupyterHub.ssl_cert = '/path/to/my.cert'
Some cert files also contain the key, in which case only the cert is needed. It
is important that these files be put in a secure location on your server, where
they are not readable by regular users.
If you are using a **chain certificate**, see also chained certificate for SSL
in the JupyterHub `Troubleshooting FAQ <../troubleshooting.html>`_.
Using letsencrypt
~~~~~~~~~~~~~~~~~
It is also possible to use `letsencrypt <https://letsencrypt.org/>`_ to obtain
a free, trusted SSL certificate. If you run letsencrypt using the default
options, the needed configuration is (replace ``mydomain.tld`` by your fully
qualified domain name):
.. code-block:: python
c.JupyterHub.ssl_key = '/etc/letsencrypt/live/{mydomain.tld}/privkey.pem'
c.JupyterHub.ssl_cert = '/etc/letsencrypt/live/{mydomain.tld}/fullchain.pem'
If the fully qualified domain name (FQDN) is ``example.com``, the following
would be the needed configuration:
.. code-block:: python
c.JupyterHub.ssl_key = '/etc/letsencrypt/live/example.com/privkey.pem'
c.JupyterHub.ssl_cert = '/etc/letsencrypt/live/example.com/fullchain.pem'
If SSL termination happens outside of the Hub
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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/>`_,
it is reasonable to run the hub without SSL.
To achieve this, simply omit the configuration settings
``c.JupyterHub.ssl_key`` and ``c.JupyterHub.ssl_cert``
(setting them to ``None`` does not have the same effect, and is an error).
.. _cookie-secret:
Cookie secret
-------------
The cookie secret is an encryption key, used to encrypt the browser cookies
which are used for authentication. Three common methods are described for
generating and configuring the cookie secret.
Generating and storing as a cookie secret file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The cookie secret should be 32 random bytes, encoded as hex, and is typically
stored in a ``jupyterhub_cookie_secret`` file. An example command to generate the
``jupyterhub_cookie_secret`` file is:
.. code-block:: bash
openssl rand -hex 32 > /srv/jupyterhub/jupyterhub_cookie_secret
In most deployments of JupyterHub, you should point this to a secure location on
the file system, such as ``/srv/jupyterhub/jupyterhub_cookie_secret``.
The location of the ``jupyterhub_cookie_secret`` file can be specified in the
``jupyterhub_config.py`` file as follows:
.. code-block:: python
c.JupyterHub.cookie_secret_file = '/srv/jupyterhub/jupyterhub_cookie_secret'
If the cookie secret file doesn't exist when the Hub starts, a new cookie
secret is generated and stored in the file. The file must not be readable by
``group`` or ``other`` or the server won't start. The recommended permissions
for the cookie secret file are ``600`` (owner-only rw).
Generating and storing as an environment variable
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you would like to avoid the need for files, the value can be loaded in the
Hub process from the ``JPY_COOKIE_SECRET`` environment variable, which is a
hex-encoded string. You can set it this way:
.. code-block:: bash
export JPY_COOKIE_SECRET=$(openssl rand -hex 32)
For security reasons, this environment variable should only be visible to the
Hub. If you set it dynamically as above, all users will be logged out each time
the Hub starts.
Generating and storing as a binary string
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can also set the cookie secret in the configuration file
itself, ``jupyterhub_config.py``, as a binary string:
.. code-block:: python
c.JupyterHub.cookie_secret = bytes.fromhex('64 CHAR HEX STRING')
.. important::
If the cookie secret value changes for the Hub, all single-user notebook
servers must also be restarted.
.. _authentication-token:
Proxy authentication token
--------------------------
The Hub authenticates its requests to the Proxy using a secret token that
the Hub and Proxy agree upon. The value of this string should be a random
string (for example, generated by ``openssl rand -hex 32``).
Generating and storing token in the configuration file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Or you can set the value in the configuration file, ``jupyterhub_config.py``:
.. code-block:: python
c.JupyterHub.proxy_auth_token = '0bc02bede919e99a26de1e2a7a5aadfaf6228de836ec39a05a6c6942831d8fe5'
Generating and storing as an environment variable
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can pass this value of the proxy authentication token to the Hub and Proxy
using the ``CONFIGPROXY_AUTH_TOKEN`` environment variable:
.. code-block:: bash
export CONFIGPROXY_AUTH_TOKEN=$(openssl rand -hex 32)
This environment variable needs to be visible to the Hub and Proxy.
Default if token is not set
~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you don't set the Proxy authentication token, the Hub will generate a random
key itself, which means that any time you restart the Hub you **must also
restart the Proxy**. If the proxy is a subprocess of the Hub, this should happen
automatically (this is the default configuration).

View File

@@ -1,121 +0,0 @@
# External services
When working with JupyterHub, a **Service** is defined as a process
that interacts with the Hub's REST API. A Service may perform a specific
or action or task. For example, shutting down individuals' single user
notebook servers that have been is a good example of a task that could
be automated by a Service. Let's look at how the [cull_idle_servers][]
script can be used as a Service.
## Real-world example to cull idle servers
JupyterHub has a REST API that can be used by external services. This
document will:
- explain some basic information about API tokens
- clarify that API tokens can be used to authenticate to
single-user servers as of [version 0.8.0](../changelog)
- show how the [cull_idle_servers][] script can be:
- used in a Hub-managed service
- run as a standalone script
Both examples for `cull_idle_servers` will communicate tasks to the
Hub via the REST API.
## API Token basics
### Create an API token
To run such an external service, an API token must be created and
provided to the service.
As of [version 0.6.0](../changelog), the preferred way of doing
this is to first generate an API token:
```bash
openssl rand -hex 32
```
In [version 0.8.0](../changelog), a TOKEN request page for
generating an API token is available from the JupyterHub user interface:
![Request API TOKEN page](../images/token-request.png)
![API TOKEN success page](../images/token-request-success.png)
### Pass environment variable with token to the Hub
In the case of `cull_idle_servers`, it is passed as the environment
variable called `JUPYTERHUB_API_TOKEN`.
### Use API tokens for services and tasks that require external access
While API tokens are often associated with a specific user, API tokens
can be used by services that require external access for activities
that may not correspond to a specific human, e.g. adding users during
setup for a tutorial or workshop. Add a service and its API token to the
JupyterHub configuration file, `jupyterhub_config.py`:
```python
c.JupyterHub.services = [
{'name': 'adding-users', 'api_token': 'super-secret-token'},
]
```
### Restart JupyterHub
Upon restarting JupyterHub, you should see a message like below in the
logs:
```
Adding API token for <username>
```
## Authenticating to single-user servers using API token
In JupyterHub 0.7, there is no mechanism for token authentication to
single-user servers, and only cookies can be used for authentication.
0.8 supports using JupyterHub API tokens to authenticate to single-user
servers.
## Configure `cull-idle` to run as a Hub-Managed Service
In `jupyterhub_config.py`, add the following dictionary for the
`cull-idle` Service to the `c.JupyterHub.services` list:
```python
c.JupyterHub.services = [
{
'name': 'cull-idle',
'admin': True,
'command': [sys.executable, 'cull_idle_servers.py', '--timeout=3600'],
}
]
```
where:
- `'admin': True` indicates that the Service has 'admin' permissions, and
- `'command'` indicates that the Service will be launched as a
subprocess, managed by the Hub.
## Run `cull-idle` manually as a standalone script
Now you can run your script, i.e. `cull_idle_servers`, by providing it
the API token and it will authenticate through the REST API to
interact with it.
This will run `cull-idle` manually. `cull-idle` can be run as a standalone
script anywhere with access to the Hub, and will periodically check for idle
servers and shut them down via the Hub's REST API. In order to shutdown the
servers, the token given to cull-idle must have admin privileges.
Generate an API token and store it in the `JUPYTERHUB_API_TOKEN` environment
variable. Run `cull_idle_servers.py` manually.
```bash
export JUPYTERHUB_API_TOKEN='token'
python3 cull_idle_servers.py [--timeout=900] [--url=http://127.0.0.1:8081/hub/api]
```
[cull_idle_servers]: https://github.com/jupyterhub/jupyterhub/blob/master/examples/cull-idle/cull_idle_servers.py

View File

@@ -0,0 +1,128 @@
(howto:api-only)=
# Deploying JupyterHub in "API only mode"
As a service for deploying and managing Jupyter servers for users, JupyterHub
exposes this functionality _primarily_ via a [REST API](rest).
For convenience, JupyterHub also ships with a _basic_ web UI built using that REST API.
The basic web UI enables users to click a button to quickly start and stop their servers,
and it lets admins perform some basic user and server management tasks.
The REST API has always provided additional functionality beyond what is available in the basic web UI.
Similarly, we avoid implementing UI functionality that is also not available via the API.
With JupyterHub 2.0, the basic web UI will **always** be composed using the REST API.
In other words, no UI pages should rely on information not available via the REST API.
Previously, some admin UI functionality could only be achieved via admin pages,
such as paginated requests.
## Limited UI customization via templates
The JupyterHub UI is customizable via extensible HTML [templates](templates),
but this has some limited scope to what can be customized.
Adding some content and messages to existing pages is well supported,
but changing the page flow and what pages are available are beyond the scope of what is customizable.
## Rich UI customization with REST API based apps
Increasingly, JupyterHub is used purely as an API for managing Jupyter servers
for other Jupyter-based applications that might want to present a different user experience.
If you want a fully customized user experience,
you can now disable the Hub UI and use your own pages together with the JupyterHub REST API
to build your own web application to serve your users,
relying on the Hub only as an API for managing users and servers.
One example of such an application is [BinderHub][], which powers https://mybinder.org,
and motivates many of these changes.
BinderHub is distinct from a traditional JupyterHub deployment
because it uses temporary users created for each launch.
Instead of presenting a login page,
users are presented with a form to specify what environment they would like to launch:
![Binder launch form](../images/binderhub-form.png)
When a launch is requested:
1. an image is built, if necessary
2. a temporary user is created,
3. a server is launched for that user, and
4. when running, users are redirected to an already running server with an auth token in the URL
5. after the session is over, the user is deleted
This means that a lot of JupyterHub's UI flow doesn't make sense:
- there is no way for users to login
- the human user doesn't map onto a JupyterHub `User` in a meaningful way
- when a server isn't running, there isn't a 'restart your server' action available because the user has been deleted
- users do not have any access to any Hub functionality, so presenting pages for those features would be confusing
BinderHub is one of the motivating use cases for JupyterHub supporting being used _only_ via its API.
We'll use BinderHub here as an example of various configuration options.
[binderhub]: https://binderhub.readthedocs.io
## Disabling Hub UI
`c.JupyterHub.hub_routespec` is a configuration option to specify which URL prefix should be routed to the Hub.
The default is `/` which means that the Hub will receive all requests not already specified to be routed somewhere else.
There are three values that are most logical for `hub_routespec`:
- `/` - this is the default, and used in most deployments.
It is also the only option prior to JupyterHub 1.4.
- `/hub/` - this serves only Hub pages, both UI and API
- `/hub/api` - this serves _only the Hub API_, so all Hub UI is disabled,
aside from the OAuth confirmation page, if used.
If you choose a hub routespec other than `/`,
the main JupyterHub feature you will lose is the automatic handling of requests for `/user/:username`
when the requested server is not running.
JupyterHub's handling of this request shows this page,
telling you that the server is not running,
with a button to launch it again:
![screenshot of hub page for server not running](../images/server-not-running.png)
If you set `hub_routespec` to something other than `/`,
it is likely that you also want to register another destination for `/` to handle requests to not-running servers.
If you don't, you will see a default 404 page from the proxy:
![screenshot of CHP default 404](../images/chp-404.png)
For mybinder.org, the default "start my server" page doesn't make sense,
because when a server is gone, there is no restart action.
Instead, we provide hints about how to get back to a link to start a _new_ server:
![screenshot of mybinder.org 404](../images/binder-404.png)
To achieve this, mybinder.org registers a route for `/` that goes to a custom endpoint
that runs nginx and only serves this static HTML error page.
This is set with
```python
c.Proxy.extra_routes = {
"/": "http://custom-404-entpoint/",
}
```
You may want to use an alternate behavior, such as redirecting to a landing page,
or taking some other action based on the requested page.
If you use `c.JupyterHub.hub_routespec = "/hub/"`,
then all the Hub pages will be available,
and only this default-page-404 issue will come up.
If you use `c.JupyterHub.hub_routespec = "/hub/api/"`,
then only the Hub _API_ will be available,
and all UI will be up to you.
mybinder.org takes this last option,
because none of the Hub UI pages really make sense.
Binder users don't have any reason to know or care that JupyterHub happens
to be an implementation detail of how their environment is managed.
Seeing Hub error pages and messages in that situation is more likely to be confusing than helpful.
:::{versionadded} 1.4
`c.JupyterHub.hub_routespec` and `c.Proxy.extra_routes` are new in JupyterHub 1.4.
:::

View File

@@ -1,20 +1,21 @@
(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
deployment with the following assumptions: deployment with the following assumptions:
* Running JupyterHub on a single cloud server - Running JupyterHub on a single cloud server
* Using SSL on the standard HTTPS port 443 - Using SSL on the standard HTTPS port 443
* Using GitHub OAuth (using oauthenticator) for login - Using GitHub OAuth (using [OAuthenticator](https://oauthenticator.readthedocs.io/en/latest)) for login
* Using the default spawner (to configure other spawners, uncomment and edit - Using the default spawner (to configure other spawners, uncomment and edit
`spawner_class` as well as follow the instructions for your desired spawner) `spawner_class` as well as follow the instructions for your desired spawner)
* Users exist locally on the server - Users exist locally on the server
* Users' notebooks to be served from `~/assignments` to allow users to browse - Users' notebooks to be served from `~/assignments` to allow users to browse
for notebooks within other users' home directories for notebooks within other users' home directories
* You want the landing page for each user to be a `Welcome.ipynb` notebook in - You want the landing page for each user to be a `Welcome.ipynb` notebook in
their assignments directory. their assignments directory
* All runtime files are put into `/srv/jupyterhub` and log files in `/var/log`. - All runtime files are put into `/srv/jupyterhub` and log files in `/var/log`
The `jupyterhub_config.py` file would have these settings: The `jupyterhub_config.py` file would have these settings:
@@ -52,7 +53,7 @@ c.GitHubOAuthenticator.oauth_callback_url = os.environ['OAUTH_CALLBACK_URL']
c.LocalAuthenticator.create_system_users = True c.LocalAuthenticator.create_system_users = True
# specify users and admin # specify users and admin
c.Authenticator.whitelist = {'rgbkrk', 'minrk', 'jhamrick'} c.Authenticator.allowed_users = {'rgbkrk', 'minrk', 'jhamrick'}
c.Authenticator.admin_users = {'jhamrick', 'rgbkrk'} c.Authenticator.admin_users = {'jhamrick', 'rgbkrk'}
# uses the default spawner # uses the default spawner
@@ -70,7 +71,7 @@ c.Spawner.args = ['--NotebookApp.default_url=/notebooks/Welcome.ipynb']
``` ```
Using the GitHub Authenticator requires a few additional Using the GitHub Authenticator requires a few additional
environment variable to be set prior to launching JupyterHub: environment variables to be set prior to launching JupyterHub:
```bash ```bash
export GITHUB_CLIENT_ID=github_id export GITHUB_CLIENT_ID=github_id
@@ -80,3 +81,5 @@ export CONFIGPROXY_AUTH_TOKEN=super-secret
# append log output to log file /var/log/jupyterhub.log # append log output to log file /var/log/jupyterhub.log
jupyterhub -f /etc/jupyterhub/jupyterhub_config.py &>> /var/log/jupyterhub.log jupyterhub -f /etc/jupyterhub/jupyterhub_config.py &>> /var/log/jupyterhub.log
``` ```
Visit the [Github OAuthenticator reference](https://oauthenticator.readthedocs.io/en/latest/api/gen/oauthenticator.github.html) to see the full list of options for configuring Github OAuth with 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
@@ -6,21 +8,23 @@ SSL port `443`. This could be useful if the JupyterHub server machine is also
hosting other domains or content on `443`. The goal in this example is to hosting other domains or content on `443`. The goal in this example is to
satisfy the following: satisfy the following:
* JupyterHub is running on a server, accessed *only* via `HUB.DOMAIN.TLD:443` - JupyterHub is running on a server, accessed _only_ via `HUB.DOMAIN.TLD:443`
* On the same machine, `NO_HUB.DOMAIN.TLD` strictly serves different content, - On the same machine, `NO_HUB.DOMAIN.TLD` strictly serves different content,
also on port `443` also on port `443`
* `nginx` or `apache` is used as the public access point (which means that - `nginx` or `apache` is used as the public access point (which means that
only nginx/apache will bind to `443`) only nginx/apache will bind to `443`)
* After testing, the server in question should be able to score at least an A on the - After testing, the server in question should be able to score at least an A on the
Qualys SSL Labs [SSL Server Test](https://www.ssllabs.com/ssltest/) Qualys SSL Labs [SSL Server Test](https://www.ssllabs.com/ssltest/)
Let's start out with needed JupyterHub configuration in `jupyterhub_config.py`: Let's start out with the needed JupyterHub configuration in `jupyterhub_config.py`:
```python ```python
# Force the proxy to only listen to connections to 127.0.0.1 # Force the proxy to only listen to connections to 127.0.0.1 (on port 8000)
c.JupyterHub.ip = '127.0.0.1' c.JupyterHub.bind_url = 'http://127.0.0.1:8000'
``` ```
(For Jupyterhub < 0.9 use `c.JupyterHub.ip = '127.0.0.1'`.)
For high-quality SSL configuration, we also generate Diffie-Helman parameters. For high-quality SSL configuration, we also generate Diffie-Helman parameters.
This can take a few minutes: This can take a few minutes:
@@ -28,15 +32,15 @@ This can take a few minutes:
openssl dhparam -out /etc/ssl/certs/dhparam.pem 4096 openssl dhparam -out /etc/ssl/certs/dhparam.pem 4096
``` ```
## nginx ## Nginx
This **`nginx` config file** is fairly standard fare except for the two This **`nginx` config file** is fairly standard fare except for the two
`location` blocks within the main section for HUB.DOMAIN.tld. `location` blocks within the main section for HUB.DOMAIN.tld.
To create a new site for jupyterhub in your nginx config, make a new file To create a new site for jupyterhub in your Nginx config, make a new file
in `sites.enabled`, e.g. `/etc/nginx/sites.enabled/jupyterhub.conf`: in `sites.enabled`, e.g. `/etc/nginx/sites.enabled/jupyterhub.conf`:
```bash ```bash
# top-level http config for websocket headers # Top-level HTTP config for WebSocket headers
# If Upgrade is defined, Connection = upgrade # If Upgrade is defined, Connection = upgrade
# If Upgrade is empty, Connection = close # If Upgrade is empty, Connection = close
map $http_upgrade $connection_upgrade { map $http_upgrade $connection_upgrade {
@@ -49,7 +53,7 @@ server {
listen 80; listen 80;
server_name HUB.DOMAIN.TLD; server_name HUB.DOMAIN.TLD;
# Tell all requests to port 80 to be 302 redirected to HTTPS # Redirect the request to HTTPS
return 302 https://$host$request_uri; return 302 https://$host$request_uri;
} }
@@ -73,16 +77,20 @@ server {
ssl_stapling_verify on; ssl_stapling_verify on;
add_header Strict-Transport-Security max-age=15768000; add_header Strict-Transport-Security max-age=15768000;
# Managing literal requests to the JupyterHub front end # Managing literal requests to the JupyterHub frontend
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
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade; proxy_set_header Connection $connection_upgrade;
proxy_set_header X-Scheme $scheme;
proxy_buffering off;
} }
# Managing requests to verify letsencrypt host # Managing requests to verify letsencrypt host
@@ -95,10 +103,10 @@ server {
If `nginx` is not running on port 443, substitute `$http_host` for `$host` on If `nginx` is not running on port 443, substitute `$http_host` for `$host` on
the lines setting the `Host` header. the lines setting the `Host` header.
`nginx` will now be the front facing element of JupyterHub on `443` which means `nginx` will now be the front-facing element of JupyterHub on `443` which means
it is also free to bind other servers, like `NO_HUB.DOMAIN.TLD` to the same port it is also free to bind other servers, like `NO_HUB.DOMAIN.TLD` to the same port
on the same machine and network interface. In fact, one can simply use the same on the same machine and network interface. In fact, one can simply use the same
server blocks as above for `NO_HUB` and simply add line for the root directory server blocks as above for `NO_HUB` and simply add a line for the root directory
of the site as well as the applicable location call: of the site as well as the applicable location call:
```bash ```bash
@@ -106,7 +114,7 @@ server {
listen 80; listen 80;
server_name NO_HUB.DOMAIN.TLD; server_name NO_HUB.DOMAIN.TLD;
# Tell all requests to port 80 to be 302 redirected to HTTPS # Redirect the request to HTTPS
return 302 https://$host$request_uri; return 302 https://$host$request_uri;
} }
@@ -137,25 +145,40 @@ Now restart `nginx`, restart the JupyterHub, and enjoy accessing
`https://HUB.DOMAIN.TLD` while serving other content securely on `https://HUB.DOMAIN.TLD` while serving other content securely on
`https://NO_HUB.DOMAIN.TLD`. `https://NO_HUB.DOMAIN.TLD`.
### SELinux permissions for Nginx
On distributions with SELinux enabled (e.g. Fedora), one may encounter permission errors
when the Nginx service is started.
We need to allow Nginx to perform network relay and connect to the JupyterHub port. The
following commands do that:
```bash
semanage port -a -t http_port_t -p tcp 8000
setsebool -P httpd_can_network_relay 1
setsebool -P httpd_can_network_connect 1
```
Replace 8000 with the port the JupyterHub server is running from.
## Apache ## Apache
As with nginx above, you can use [Apache](https://httpd.apache.org) as the reverse proxy. As with Nginx above, you can use [Apache](https://httpd.apache.org) as the reverse proxy.
First, we will need to enable the apache modules that we are going to need: First, we will need to enable the Apache modules that we are going to need:
```bash ```bash
a2enmod ssl rewrite proxy proxy_http proxy_wstunnel a2enmod ssl rewrite proxy headers proxy_http proxy_wstunnel
``` ```
Our Apache configuration is equivalent to the nginx configuration above: Our Apache configuration is equivalent to the Nginx configuration above:
- Redirect HTTP to HTTPS - Redirect HTTP to HTTPS
- Good SSL Configuration - Good SSL Configuration
- Support for websockets on any proxied URL - Support for WebSocket on any proxied URL
- JupyterHub is running locally at http://127.0.0.1:8000 - JupyterHub is running locally at http://127.0.0.1:8000
```bash ```bash
# redirect HTTP to HTTPS # Redirect HTTP to HTTPS
Listen 80 Listen 80
<VirtualHost HUB.DOMAIN.TLD:80> <VirtualHost HUB.DOMAIN.TLD:80>
ServerName HUB.DOMAIN.TLD ServerName HUB.DOMAIN.TLD
@@ -167,15 +190,26 @@ Listen 443
ServerName HUB.DOMAIN.TLD ServerName HUB.DOMAIN.TLD
# configure SSL # Enable HTTP/2, if available
Protocols h2 http/1.1
# HTTP Strict Transport Security (mod_headers is required) (63072000 seconds)
Header always set Strict-Transport-Security "max-age=63072000"
# Configure SSL
SSLEngine on SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/HUB.DOMAIN.TLD/fullchain.pem SSLCertificateFile /etc/letsencrypt/live/HUB.DOMAIN.TLD/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/HUB.DOMAIN.TLD/privkey.pem SSLCertificateKeyFile /etc/letsencrypt/live/HUB.DOMAIN.TLD/privkey.pem
SSLProtocol All -SSLv2 -SSLv3
SSLOpenSSLConfCmd DHParameters /etc/ssl/certs/dhparam.pem SSLOpenSSLConfCmd DHParameters /etc/ssl/certs/dhparam.pem
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
# Use RewriteEngine to handle websocket connection upgrades # Intermediate configuration from SSL-config.mozilla.org (2022-03-03)
# Please note, that this configuration might be outdated - please update it accordingly using https://ssl-config.mozilla.org/
SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
SSLHonorCipherOrder off
SSLSessionTickets off
# Use RewriteEngine to handle WebSocket connection upgrades
RewriteEngine On RewriteEngine On
RewriteCond %{HTTP:Connection} Upgrade [NC] RewriteCond %{HTTP:Connection} Upgrade [NC]
RewriteCond %{HTTP:Upgrade} websocket [NC] RewriteCond %{HTTP:Upgrade} websocket [NC]
@@ -187,26 +221,29 @@ Listen 443
# proxy to JupyterHub # proxy to JupyterHub
ProxyPass http://127.0.0.1:8000/ ProxyPass http://127.0.0.1:8000/
ProxyPassReverse http://127.0.0.1:8000/ ProxyPassReverse http://127.0.0.1:8000/
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
</Location> </Location>
</VirtualHost> </VirtualHost>
``` ```
In case of the need to run JupyterHub under /jhub/ or another location please use the below configurations:
In case of the need to run the jupyterhub under /jhub/ or other location please use the below configurations:
- JupyterHub running locally at http://127.0.0.1:8000/jhub/ or other location - JupyterHub running locally at http://127.0.0.1:8000/jhub/ or other location
httpd.conf amendments: httpd.conf amendments:
```bash ```bash
RewriteRule /jhub/(.*) ws://127.0.0.1:8000/jhub/$1 [P,L] RewriteRule /jhub/(.*) ws://127.0.0.1:8000/jhub/$1 [P,L]
RewriteRule /jhub/(.*) http://127.0.0.1:8000/jhub/$1 [P,L] RewriteRule /jhub/(.*) http://127.0.0.1:8000/jhub/$1 [P,L]
ProxyPass /jhub/ http://127.0.0.1:8000/jhub/ ProxyPass /jhub/ http://127.0.0.1:8000/jhub/
ProxyPassReverse /jhub/ http://127.0.0.1:8000/jhub/ ProxyPassReverse /jhub/ http://127.0.0.1:8000/jhub/
``` ```
jupyterhub_config.py amendments: jupyterhub_config.py amendments:
```bash
--The public facing URL of the whole JupyterHub application. ```python
--This is the address on which the proxy will bind. Sets protocol, ip, base_url # The public facing URL of the whole JupyterHub application.
c.JupyterHub.bind_url = 'http://127.0.0.1:8000/jhub/' # This is the address on which the proxy will bind. Sets protocol, IP, base_url
``` c.JupyterHub.bind_url = 'http://127.0.0.1:8000/jhub/'
```

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
@@ -6,14 +8,14 @@ Only do this if you are very sure you must.
## Overview ## Overview
There are many Authenticators and Spawners available for JupyterHub. Some, such There are many [Authenticators](authenticators) and [Spawners](spawners) available for JupyterHub. Some, such
as DockerSpawner or OAuthenticator, do not need any elevated permissions. This as [DockerSpawner](https://github.com/jupyterhub/dockerspawner) or [OAuthenticator](https://github.com/jupyterhub/oauthenticator), do not need any elevated permissions. This
document describes how to get the full default behavior of JupyterHub while document describes how to get the full default behavior of JupyterHub while
running notebook servers as real system users on a shared system without running notebook servers as real system users on a shared system, without
running the Hub itself as root. running the Hub itself as root.
Since JupyterHub needs to spawn processes as other users, the simplest way Since JupyterHub needs to spawn processes as other users, the simplest way
is to run it as root, spawning user servers with [setuid](http://linux.die.net/man/2/setuid). is to run it as root, spawning user servers with [setuid](https://linux.die.net/man/2/setuid).
But this isn't especially safe, because you have a process running on the But this isn't especially safe, because you have a process running on the
public web as root. public web as root.
@@ -53,11 +55,10 @@ To do this we add to `/etc/sudoers` (use `visudo` for safe editing of sudoers):
- give `rhea` permission to run `JUPYTER_CMD` on behalf of `JUPYTER_USERS` - give `rhea` permission to run `JUPYTER_CMD` on behalf of `JUPYTER_USERS`
without entering a password without entering a password
For example: For example:
```bash ```bash
# comma-separated whitelist of users that can spawn single-user servers # comma-separated list of users that can spawn single-user servers
# this should include all of your Hub users # this should include all of your Hub users
Runas_Alias JUPYTER_USERS = rhea, zoe, wash Runas_Alias JUPYTER_USERS = rhea, zoe, wash
@@ -70,7 +71,8 @@ Cmnd_Alias JUPYTER_CMD = /usr/local/bin/sudospawner
rhea ALL=(JUPYTER_USERS) NOPASSWD:JUPYTER_CMD rhea ALL=(JUPYTER_USERS) NOPASSWD:JUPYTER_CMD
``` ```
It might be useful to modify `secure_path` to add commands in path. 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)
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`:
@@ -91,7 +93,7 @@ $ adduser -G jupyterhub newuser
Test that the new user doesn't need to enter a password to run the sudospawner Test that the new user doesn't need to enter a password to run the sudospawner
command. command.
This should prompt for your password to switch to rhea, but *not* prompt for This should prompt for your password to switch to `rhea`, but _not_ prompt for
any password for the second switch. It should show some help output about any password for the second switch. It should show some help output about
logging options: logging options:
@@ -114,12 +116,17 @@ sudo: a password is required
## Enable PAM for non-root ## Enable PAM for non-root
By default, [PAM authentication](http://en.wikipedia.org/wiki/Pluggable_authentication_module) By default, [PAM authentication](https://en.wikipedia.org/wiki/Pluggable_authentication_module)
is used by JupyterHub. To use PAM, the process may need to be able to read is used by JupyterHub. To use PAM, the process may need to be able to read
the shadow password database. the shadow password database.
### Shadow group (Linux) ### Shadow group (Linux)
**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
from JupyterHub. As a workaround we recommend use an
[alternative authentication method](https://github.com/jupyterhub/jupyterhub/wiki/Authenticators).
```bash ```bash
$ ls -l /etc/shadow $ ls -l /etc/shadow
-rw-r----- 1 root shadow 2197 Jul 21 13:41 shadow -rw-r----- 1 root shadow 2197 Jul 21 13:41 shadow
@@ -146,24 +153,26 @@ We want our new user to be able to read the shadow passwords, so add it to the s
$ sudo usermod -a -G shadow rhea $ sudo usermod -a -G shadow rhea
``` ```
If you want jupyterhub to serve pages on a restricted port (such as port 80 for http), If you want jupyterhub to serve pages on a restricted port (such as port 80 for HTTP),
then you will need to give `node` permission to do so: then you will need to give `node` permission to do so:
```bash ```bash
sudo setcap 'cap_net_bind_service=+ep' /usr/bin/node sudo setcap 'cap_net_bind_service=+ep' /usr/bin/node
``` ```
However, you may want to further understand the consequences of this. However, you may want to further understand the consequences of this.
([Further reading](https://man7.org/linux/man-pages/man7/capabilities.7.html))
You may also be interested in limiting the amount of CPU any process can use You may also be interested in limiting the amount of CPU any process can use
on your server. `cpulimit` is a useful tool that is available for many Linux on your server. `cpulimit` is a useful tool that is available for many Linux
distributions' packaging system. This can be used to keep any user's process distributions' packaging system. This can be used to keep any user's process
from using too much CPU cycles. You can configure it accoring to [these from using too much CPU cycles. You can configure it accoring to [these
instructions](http://ubuntuforums.org/showthread.php?t=992706). instructions](https://ubuntuforums.org/showthread.php?t=992706).
### Shadow group (FreeBSD) ### Shadow group (FreeBSD)
**NOTE:** This has not been tested and may not work as expected. **NOTE:** This has not been tested on FreeBSD and may not work as expected on
the FreeBSD platform. _Do not use in production without verifying that it works properly!_
```bash ```bash
$ ls -l /etc/spwd.db /etc/master.passwd $ ls -l /etc/spwd.db /etc/master.passwd
@@ -222,8 +231,8 @@ And try logging in.
## Troubleshooting: SELinux ## Troubleshooting: SELinux
If you still get a generic `Permission denied` `PermissionError`, it's possible SELinux is blocking you. If you still get a generic `Permission denied` `PermissionError`, it's possible SELinux is blocking you.
Here's how you can make a module to allow this. Here's how you can make a module to resolve this.
First, put this in a file named `sudo_exec_selinux.te`: First, put this in a file named `sudo_exec_selinux.te`:
```bash ```bash
module sudo_exec_selinux 1.1; module sudo_exec_selinux 1.1;
@@ -249,6 +258,6 @@ $ semodule -i sudo_exec_selinux.pp
## Troubleshooting: PAM session errors ## Troubleshooting: PAM session errors
If the PAM authentication doesn't work and you see errors for If the PAM authentication doesn't work and you see errors for
`login:session-auth`, or similar, considering updating to a more recent version `login:session-auth`, or similar, consider updating to a more recent version
of jupyterhub and disabling the opening of PAM sessions with of jupyterhub and disabling the opening of PAM sessions with
`c.PAMAuthenticator.open_sessions=False`. `c.PAMAuthenticator.open_sessions=False`.

View File

@@ -0,0 +1,265 @@
(howto:config:user-env)=
# Configuring user environments
To deploy JupyterHub means you are providing Jupyter notebook environments for
multiple users. Often, this includes a desire to configure the user
environment in a custom way.
Since the `jupyterhub-singleuser` server extends the standard Jupyter notebook
server, most configuration and documentation that applies to Jupyter Notebook
applies to the single-user environments. Configuration of user environments
typically does not occur through JupyterHub itself, but rather through system-wide
configuration of Jupyter, which is inherited by `jupyterhub-singleuser`.
**Tip:** When searching for configuration tips for JupyterHub user environments, you might want to remove JupyterHub from your search because there are a lot more people out there configuring Jupyter than JupyterHub and the configuration is the same.
This section will focus on user environments, which includes the following:
- [Installing packages](#installing-packages)
- [Configuring Jupyter and IPython](#configuring-jupyter-and-ipython)
- [Installing kernelspecs](#installing-kernelspecs)
- [Using containers vs. multi-user hosts](#multi-user-hosts-vs-containers)
## Installing packages
To make packages available to users, you will typically install packages system-wide or in a shared environment.
This installation location should always be in the same environment where
`jupyterhub-singleuser` itself is installed in, and must be _readable and
executable_ by your users. If you want your users to be able to install additional
packages, the installation location must also be _writable_ by your users.
If you are using a standard Python installation on your system, use the following command:
```bash
sudo python3 -m pip install numpy
```
to install the numpy package in the default Python 3 environment on your system
(typically `/usr/local`).
You may also use conda to install packages. If you do, you should make sure
that the conda environment has appropriate permissions for users to be able to
run Python code in the env. The env must be _readable and executable_ by all
users. Additionally it must be _writeable_ if you want users to install
additional packages.
## Configuring Jupyter and IPython
[Jupyter](https://jupyter-notebook.readthedocs.io/en/stable/configuring/config_overview.html)
and [IPython](https://ipython.readthedocs.io/en/stable/development/config.html)
have their own configuration systems.
As a JupyterHub administrator, you will typically want to install and configure environments for all JupyterHub users. For example, let's say you wish for each student in a class to have the same user environment configuration.
Jupyter and IPython support **"system-wide"** locations for configuration, which is the logical place to put global configuration that you want to affect all users. It's generally more efficient to configure user environments "system-wide", and it's a good practice to avoid creating files in the users' home directories.
The typical locations for these config files are:
- **system-wide** in `/etc/{jupyter|ipython}`
- **env-wide** (environment wide) in `{sys.prefix}/etc/{jupyter|ipython}`.
### Jupyter environment configuration priority
When Jupyter runs in an environment (conda or virtualenv), it prefers to load configuration from the environment over each user's own configuration (e.g. in `~/.jupyter`).
This may cause issues if you use a _shared_ conda environment or virtualenv for users, because e.g. jupyterlab may try to write information like workspaces or settings to the environment instead of the user's own directory.
This could fail with something like `Permission denied: $PREFIX/etc/jupyter/lab`.
To avoid this issue, set `JUPYTER_PREFER_ENV_PATH=0` in the user environment:
```python
c.Spawner.environment.update(
{
"JUPYTER_PREFER_ENV_PATH": "0",
}
)
```
which tells Jupyter to prefer _user_ configuration paths (e.g. in `~/.jupyter`) to configuration set in the environment.
### Example: Enable an extension system-wide
For example, to enable the `cython` IPython extension for all of your users, create the file `/etc/ipython/ipython_config.py`:
```python
c.InteractiveShellApp.extensions.append("cython")
```
### Example: Enable a Jupyter notebook configuration setting for all users
:::{note}
These examples configure the Jupyter ServerApp, which is used by JupyterLab, the default in JupyterHub 2.0.
If you are using the classing Jupyter Notebook server,
the same things should work,
with the following substitutions:
- Search for `jupyter_server_config`, and replace with `jupyter_notebook_config`
- Search for `NotebookApp`, and replace with `ServerApp`
:::
To enable Jupyter notebook's internal idle-shutdown behavior (requires notebook ≥ 5.4), set the following in the `/etc/jupyter/jupyter_server_config.py` file:
```python
# shutdown the server after no activity for an hour
c.ServerApp.shutdown_no_activity_timeout = 60 * 60
# shutdown kernels after no activity for 20 minutes
c.MappingKernelManager.cull_idle_timeout = 20 * 60
# check for idle kernels every two minutes
c.MappingKernelManager.cull_interval = 2 * 60
```
## Installing kernelspecs
You may have multiple Jupyter kernels installed and want to make sure that they are available to all of your users. This means installing kernelspecs either system-wide (e.g. in /usr/local/) or in the `sys.prefix` of JupyterHub
itself.
Jupyter kernelspec installation is system-wide by default, but some kernels
may default to installing kernelspecs in your home directory. These will need
to be moved system-wide to ensure that they are accessible.
To see where your kernelspecs are, you can use the following command:
```bash
jupyter kernelspec list
```
### Example: Installing kernels system-wide
Let's assume that I have a Python 2 and Python 3 environment that I want to make sure are available, I can install their specs **system-wide** (in /usr/local) using the following command:
```bash
/path/to/python3 -m ipykernel install --prefix=/usr/local
/path/to/python2 -m ipykernel install --prefix=/usr/local
```
## Multi-user hosts vs. Containers
There are two broad categories of user environments that depend on what
Spawner you choose:
- Multi-user hosts (shared system)
- Container-based
How you configure user environments for each category can differ a bit
depending on what Spawner you are using.
The first category is a **shared system (multi-user host)** where
each user has a JupyterHub account, a home directory as well as being
a real system user. In this example, shared configuration and installation
must be in a 'system-wide' location, such as `/etc/`, or `/usr/local`
or a custom prefix such as `/opt/conda`.
When JupyterHub uses **container-based** Spawners (e.g. KubeSpawner or
DockerSpawner), the 'system-wide' environment is really the container image used for users.
In both cases, you want to _avoid putting configuration in user home
directories_ because users can change those configuration settings. Also, home directories typically persist once they are created, thereby making it difficult for admins to update later.
## Named servers
By default, in a JupyterHub deployment, each user has one server only.
JupyterHub can, however, have multiple servers per user.
This is mostly useful in deployments where users can configure the environment in which their server will start (e.g. resource requests on an HPC cluster), so that a given user can have multiple configurations running at the same time, without having to stop and restart their own server.
To allow named servers, include this code snippet in your config file:
```python
c.JupyterHub.allow_named_servers = True
```
Named servers were implemented in the REST API in JupyterHub 0.8,
and JupyterHub 1.0 introduces UI for managing named servers via the user home page:
![named servers on the home page](/images/named-servers-home.png)
as well as the admin page:
![named servers on the admin page](/images/named-servers-admin.png)
Named servers can be accessed, created, started, stopped, and deleted
from these pages. Activity tracking is now per server as well.
To limit the number of **named server** per user by setting a constant value, include this code snippet in your config file:
```python
c.JupyterHub.named_server_limit_per_user = 5
```
Alternatively, to use a callable/awaitable based on the handler object, include this code snippet in your config file:
```python
def named_server_limit_per_user_fn(handler):
user = handler.current_user
if user and user.admin:
return 0
return 5
c.JupyterHub.named_server_limit_per_user = named_server_limit_per_user_fn
```
This can be useful for quota service implementations. The example above limits the number of named servers for non-admin users only.
If `named_server_limit_per_user` is set to `0`, no limit is enforced.
When using named servers, Spawners may need additional configuration to take the `servername` into account. Whilst `KubeSpawner` takes the `servername` into account by default in [`pod_name_template`](https://jupyterhub-kubespawner.readthedocs.io/en/latest/spawner.html#kubespawner.KubeSpawner.pod_name_template), other Spawners may not. Check the documentation for the specific Spawner to see how singleuser servers are named, for example in `DockerSpawner` this involves modifying the [`name_template`](https://jupyterhub-dockerspawner.readthedocs.io/en/latest/api/index.html) setting to include `servername`, eg. `"{prefix}-{username}-{servername}"`.
(classic-notebook-ui)=
## Switching back to the classic notebook
By default, the single-user server launches JupyterLab,
which is based on [Jupyter Server][].
This is the default server when running JupyterHub ≥ 2.0.
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:
```bash
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 notebook]: https://jupyter-notebook.readthedocs.io
:::{versionchanged} 2.0
JupyterLab is now the default single-user UI, if available,
which is based on the [Jupyter Server][],
no longer the legacy [Jupyter Notebook][] server.
JupyterHub prior to 2.0 launched the legacy notebook server (`jupyter notebook`),
and the Jupyter server could be selected by specifying the following:
```python
# jupyterhub_config.py
c.Spawner.cmd = ["jupyter-labhub"]
```
Alternatively, for an otherwise customized Jupyter Server app,
set the environment variable using the following command:
```bash
export JUPYTERHUB_SINGLEUSER_APP='jupyter_server.serverapp.ServerApp'
```
:::

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