-
Notifications
You must be signed in to change notification settings - Fork 69
/
dev-jupyterhub_config.py
51 lines (39 loc) · 1.69 KB
/
dev-jupyterhub_config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import os
import nativeauthenticator
c.JupyterHub.spawner_class = "simple"
c.JupyterHub.authenticator_class = "native"
c.Authenticator.admin_users = {"admin"}
# Required configuration of templates location
if not isinstance(c.JupyterHub.template_paths, list):
c.JupyterHub.template_paths = []
c.JupyterHub.template_paths.append(
f"{os.path.dirname(nativeauthenticator.__file__)}/templates/"
)
# Below are all the available configuration options for NativeAuthenticator
# -------------------------------------------------------------------------
c.NativeAuthenticator.check_common_password = False
c.NativeAuthenticator.minimum_password_length = 8
c.NativeAuthenticator.allowed_failed_logins = 0
c.NativeAuthenticator.seconds_before_next_try = 600
c.NativeAuthenticator.enable_signup = True
c.NativeAuthenticator.open_signup = False
c.NativeAuthenticator.ask_email_on_signup = True
c.NativeAuthenticator.allow_2fa = True
c.NativeAuthenticator.tos = 'I agree to the <a href="your-url" target="_blank">TOS</a>.'
# c.NativeAuthenticator.recaptcha_key = "your key"
# c.NativeAuthenticator.recaptcha_secret = "your secret"
# c.NativeAuthenticator.allow_self_approval_for = '[^@]+@example\.com$'
# c.NativeAuthenticator.secret_key = "your-arbitrary-key"
# c.NativeAuthenticator.self_approval_email = (
# "from",
# "subject",
# "email body including https://example.com{approval_url}",
# )
# c.NativeAuthenticator.self_approval_server = {
# 'url': 'smtp.gmail.com',
# 'usr': 'myself',
# 'pwd': 'mypassword'
# }
c.NativeAuthenticator.import_from_firstuse = False
c.NativeAuthenticator.firstuse_dbm_path = "/home/user/passwords.dbm"
c.NativeAuthenticator.delete_firstuse_db_after_import = False