| | | |
Offset 997, 469 lines modified | Offset 997, 118 lines modified |
997 | #·· | 997 | #·· |
998 | #··It·should·return·the·new·URL·to·redirect·to,·or·None·to·preserve·current | 998 | #··It·should·return·the·new·URL·to·redirect·to,·or·None·to·preserve·current |
999 | #··behavior. | 999 | #··behavior. |
1000 | #··Default:·None | 1000 | #··Default:·None |
1001 | #·c.JupyterHub.user_redirect_hook·=·None | 1001 | #·c.JupyterHub.user_redirect_hook·=·None |
| |
1002 | #------------------------------------------------------------------------------ | 1002 | #------------------------------------------------------------------------------ |
1003 | #·CryptKeeper(SingletonConfigurable)·configuration | |
1004 | #------------------------------------------------------------------------------ | |
1005 | ##·Encapsulate·encryption·configuration | |
1006 | #·· | |
1007 | #··Use·via·the·encryption_config·singleton·below. | |
| |
1008 | #··Default:·[] | |
1009 | #·c.CryptKeeper.keys·=·[] | |
| |
1010 | ##·The·number·of·threads·to·allocate·for·encryption | |
1011 | #··Default:·12 | |
1012 | #·c.CryptKeeper.n_threads·=·12 | |
| |
1013 | #------------------------------------------------------------------------------ | |
1014 | #·Authenticator(LoggingConfigurable)·configuration | 1003 | #·Proxy(LoggingConfigurable)·configuration |
1015 | #------------------------------------------------------------------------------ | 1004 | #------------------------------------------------------------------------------ |
| 1005 | ##·Base·class·for·configurable·proxies·that·JupyterHub·can·use. |
1016 | ##·Base·class·for·implementing·an·authentication·provider·for·JupyterHub | |
| |
1017 | ##·Set·of·users·that·will·be·granted·admin·rights·on·this·JupyterHub. | |
1018 | #·· | |
1019 | #··Note: | |
1020 | #·· | |
1021 | #······As·of·JupyterHub·2.0, | |
1022 | #······full·admin·rights·should·not·be·required, | |
1023 | #······and·more·precise·permissions·can·be·managed·via·roles. | |
1024 | #·· | |
1025 | #··Caution: | |
1026 | #·· | |
1027 | #······Adding·users·to·`admin_users`·can·only·*grant*·admin·rights, | |
1028 | #······removing·a·username·from·the·admin_users·set·**DOES·NOT**·remove·admin·rights·previously·granted. | |
1029 | #·· | |
1030 | #······For·an·authoritative,·restricted·set·of·admins, | |
1031 | #······assign·explicit·membership·of·the·`admin`·*role*:: | |
1032 | #·· | |
1033 | #··········c.JupyterHub.load_roles·=·[ | |
1034 | #··············{ | |
1035 | #··················"name":·"admin", | |
1036 | #··················"users":·["admin1",·"..."], | |
1037 | #··············} | |
1038 | #··········] | |
1039 | #·· | |
1040 | #··Admin·users·can·take·every·possible·action·on·behalf·of·all·users,·for | |
1041 | #··example: | |
1042 | #·· | |
1043 | #··-·Use·the·admin·panel·to·see·list·of·users·logged·in·-·Add·/·remove·users·in | |
1044 | #··some·authenticators·-·Restart·/·halt·the·hub·-·Start·/·stop·users'·single-user | |
1045 | #··servers·-·Can·access·each·individual·users'·single-user·server | |
1046 | #·· | |
1047 | #··Admin·access·should·be·treated·the·same·way·root·access·is. | |
1048 | #·· | |
1049 | #··Defaults·to·an·empty·set,·in·which·case·no·user·has·admin·access. | |
1050 | #··Default:·set() | |
1051 | #·c.Authenticator.admin_users·=·set() | |
| |
1052 | ##·Allow·every·user·who·can·successfully·authenticate·to·access·JupyterHub. | |
1053 | #·· | |
1054 | #··False·by·default,·which·means·for·most·Authenticators,·_some_·allow-related | |
1055 | #··configuration·is·required·to·allow·users·to·log·in. | |
1056 | #·· | |
1057 | #··Authenticator·subclasses·may·override·the·default·with·e.g.:: | |
1058 | #·· | |
1059 | #······@default("allow_all") | |
1060 | #······def·_default_allow_all(self): | |
1061 | #··········#·if·_any_·auth·config·(depends·on·the·Authenticator) | |
1062 | #··········if·self.allowed_users·or·self.allowed_groups·or·self.allow_existing_users: | |
1063 | #··············return·False | |
1064 | #··········else: | |
1065 | #··············return·True | |
1066 | #·· | |
1067 | #··..·versionadded::·5.0 | |
1068 | #·· | |
1069 | #··..·versionchanged::·5.0 | |
1070 | #······Prior·to·5.0,·`allow_all`·wasn't·defined·on·its·own, | |
1071 | #······and·was·instead·implicitly·True·when·no·allow·config·was·provided, | |
1072 | #······i.e.·`allowed_users`·unspecified·or·empty·on·the·base·Authenticator·class. | |
1073 | #·· | |
1074 | #······To·preserve·pre-5.0·behavior, | |
1075 | #······set·`allow_all·=·True`·if·you·have·no·other·allow·configuration. | |
1076 | #··Default:·False | |
1077 | #·c.Authenticator.allow_all·=·False | |
| |
1078 | ##·Allow·existing·users·to·login. | |
1079 | #·· | |
1080 | #··Defaults·to·True·if·`allowed_users`·is·set·for·historical·reasons,·and·False | |
1081 | #··otherwise. | |
1082 | #·· | |
1083 | #··With·this·enabled,·all·users·present·in·the·JupyterHub·database·are·allowed·to | |
1084 | #··login.·This·has·the·effect·of·any·user·who·has·_previously_·been·allowed·to | |
1085 | #··login·via·any·means·will·continue·to·be·allowed·until·the·user·is·deleted·via | |
1086 | #··the·/hub/admin·page·or·REST·API. | |
1087 | #·· | |
1088 | #··..·warning:: | |
1089 | #·· | |
1090 | #·····Before·enabling·this·you·should·review·the·existing·users·in·the | |
1091 | #·····JupyterHub·admin·panel·at·`/hub/admin`.·You·may·find·users·existing | |
1092 | #·····there·because·they·have·previously·been·declared·in·config·such·as | |
1093 | #·····`allowed_users`·or·allowed·to·sign·in. | |
1094 | #·· | |
1095 | #··..·warning:: | |
1096 | #·· | |
1097 | #·····When·this·is·enabled·and·you·wish·to·remove·access·for·one·or·more | |
1098 | #·····users·previously·allowed,·you·must·make·sure·that·they | |
1099 | #·····are·removed·from·the·jupyterhub·database.·This·can·be·tricky·to·do | |
1100 | #·····if·you·stop·allowing·an·externally·managed·group·of·users·for·example. | |
1101 | #·· | |
1102 | #··With·this·enabled,·JupyterHub·admin·users·can·visit·`/hub/admin`·or·use | |
1103 | #··JupyterHub's·REST·API·to·add·and·remove·users·to·manage·who·can·login. | |
1104 | #·· | |
1105 | #··..·versionadded::·5.0 | |
1106 | #··Default:·False | |
1107 | #·c.Authenticator.allow_existing_users·=·False | |
| |
1108 | ##·Set·of·usernames·that·are·allowed·to·log·in. | |
1109 | #·· | |
1110 | #··Use·this·to·limit·which·authenticated·users·may·login.·Default·behavior:·only | |
1111 | #··users·in·this·set·are·allowed. | |
1112 | #·· | |
1113 | #··If·empty,·does·not·perform·any·restriction,·in·which·case·any·authenticated | |
1114 | #··user·is·allowed. | |
Max diff block lines reached; 47298/53556 bytes (88.32%) of diff not shown.
|