0mar
c5c44f6dbe
Replaced auth_state and server_state with scopes
2021-03-26 13:47:01 +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
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
0mar
9832a87ac4
Fixed some tests and unified scope read:user:name
2021-03-09 10:29:52 +01:00
0mar
0eb275e863
Removed regex. Fixed small bugs, changed status of scope module functions
2021-03-04 13:20:15 +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
0mar
970e3a57fa
Cleanup commit
2021-02-25 07:57:07 +01:00
0mar
1c789fcbb5
Removed database calls and made scope filter a callable
2021-02-25 07:30:41 +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
IvanaH8
c0cadc384d
adding roles to tokens
2020-11-19 08:22:52 +01:00
IvanaH8
087c763d41
adding roles to services
2020-10-28 11:16:03 +01:00
IvanaH8
f1ed74bae1
creating roles module
2020-10-19 19:57:55 +02:00
Dan Allan
f13bd59f6f
Expose spawner.user_options in REST API.
2019-10-01 16:13:29 -04:00
Min RK
5e60582ef3
run autoformat
...
apologies to anyone finding this commit via git blame or log
run the autoformatting by
pre-commit run --all-files
2019-02-19 17:00:10 +01:00
Will Starms
bafcf6bd23
Try to create exception str before logging
...
The str() method of an InterfaceError can raise when trying to iterate over an integer, causing the logger to act up.
2018-10-16 14:00:03 -05:00
Min RK
58f005eea2
Fix content-type on API endpoints
...
and includes content-type header checks in tests to catch regressions
2018-09-21 15:12:53 +02:00
Min RK
06f646099f
token expiry fixes
...
typos in token expiry:
- omitted from token model (it's in the spec in docs, but wasn't in the model)
- wrong type when sorting oauth tokens on token page could cause token page to not render
2018-09-11 08:54:12 +02:00
SivaMaplelabs
e042ad0b4a
Fix undefined variable 'datetime' error
2018-09-10 20:04:54 +05:30
Daisuke Taniwaki
5d9122b26c
Avoid setting unexpected headers
2018-06-07 14:53:34 +09:00
Min RK
e3bb09fabe
rollback database session on db errors
...
ensures reconnect will occur when database connection is lost
2018-05-15 13:49:14 +02:00
Min RK
7c6591aefe
add token expiry to token model
2018-05-07 13:02:26 +02:00
Min RK
09a8fd5254
address review in spawn-throttle-retry
...
- update config to single tuple instead of two integers
- call it spawn_throttle_retry_range
- fix setting Retry-After header without disabling error pages
2018-05-04 13:44:32 +02:00
Richard Darst
2344d696ca
API: pass 'server_state' through to admin clients only
...
- This will allow, for example, cull_idle_servers to be more
intelligent when culling servers.
- This is only given to admin API users, because we don't know if all
spawners expect their state to be made available to users.
2018-04-24 16:52:18 +03:00
Min RK
4281babee4
make server-model inclusion opt-in
...
so only certain API endpoints include server info:
- user list
- get named user
The rest exclude running servers
2018-04-24 11:35:51 +02:00
Min RK
e2a2a9903a
spawner.pending is None when nothing is pending
...
rather than False, which is a bit less convenient since we turn it to None in APIs anyway
2018-04-24 11:35:15 +02:00
Min RK
4401cdc16a
Always have .servers
model on users
...
rather than only when named_servers is enabled.
Put new-in-0.9 state there, rather than continuing to add server fields to top-level user model.
2018-04-24 11:35:15 +02:00
Min RK
30280cc6a4
add token.api_id
...
id key used in rest api
2018-04-20 15:34:52 +02:00
Min RK
f7f0b72776
retrieve tokens by id in REST API, not full token in URL
2018-04-20 15:34:52 +02:00
Min RK
6437093a67
add token_model method
...
for returning the model of an API or OAuth token
2018-04-20 15:34:52 +02:00
Min RK
a3ed387455
move get_content_type up one level to BaseHandler
...
so all handlers get it
2018-04-09 10:38:02 +02:00
Min RK
97cdb1a5d8
handle progress_url in user model tests
2018-04-05 11:46:47 +02:00
Min RK
31d3f7a20b
allow isoformat(None)
...
simplifies "if timestamp is None" cases when we are just using it to serialize nullable timestamps to JSON
2018-04-05 11:32:34 +02:00
Min RK
6f8a34127b
consolidate progress url
...
and include it in server models
2018-04-05 11:28:52 +02:00
Min RK
4f78cbbd1b
implement progress on spawn_pending page
...
- add Spawner.progress method. Must be an async generator of JSON-able progress events
- add /api/users/:user/server-progress eventstream endpoint
- use eventstream to fill progress bar on the spawn pending page
2018-04-05 11:22:00 +02:00
Min RK
74365ad05e
starting a server updates last_activity and started for user and spawner
2018-04-03 15:14:47 +02:00
Min RK
9dc24c0995
add user.created, spawner.started
...
- alembic revision
- in user/spawner models
2018-04-03 15:14:47 +02:00
Min RK
fd40e27be4
indicate that REST API timestamps are UTC
...
use iso8601 Z suffix for UTC timestamps
use dateutil to parse dates from proxy, as well
even though CHP uses iso8601 UTC timestamps, we no longer assume CHP, so use more general parsing
in our db we are stuck with naïve datetime objects, so use those internally.
But ensure we put 'Z' on timestamps we ship externally
2018-04-03 15:14:47 +02:00
Min RK
3117ea9d34
handle user.last_activity being None
2018-04-03 15:14:47 +02:00
Tim Head
1ee993c664
Add ability to modify auth_state via the REST API
2018-03-27 10:02:59 +02:00
Tim Head
542c20065f
Reduce the number of endpoints that expose auth_state
2018-03-27 10:02:59 +02:00
Tim Head
39f663d03c
Expose auth_state via user API
2018-03-27 10:02:59 +02:00
Min RK
d5f0137052
revert computing user_model from orm.User
...
always instantiate User wrapper
2018-02-06 15:38:32 +01:00
Min RK
c8b4cab022
support getting user models from orm-only User objects
...
avoids instantiating User wrappers for inactive users in get_all_users
2018-02-06 12:04:14 +01:00
Min RK
06fb94b4ea
Delay instantiation of User and Spawner objects
...
Avoids instantiating too many objects before they are used
- deletes Spawner instances after they stop to avoid lingering instances
- use user_dict cache more often instead of db queries
- check for empty spawners dict to avoid a few Spawner instantiations
2018-02-06 12:04:14 +01:00
Min RK
f6f7081483
adjust headers for CORS
...
- add `authorization` to default Access-Control-Allow-Headers
- allow overriding `Access-Control-Allow-Headers` just like everything else in case default is inappropriate
- ensure case-insensitive comparison for proper header checks
2017-11-16 11:46:40 +01:00
Min RK
5f7ffaf1f6
allow default (empty) server name with named servers
...
remove generated names behavior because it doesn't work
2017-09-17 11:47:17 +02:00