From d7ddbf2a32d876649a31632c8c1a20f7853516d2 Mon Sep 17 00:00:00 2001 From: yuvipanda Date: Tue, 3 Jul 2018 16:28:20 -0700 Subject: [PATCH] Disable user creation by default With firstuseauthenticator, users need to be manually created in the admin console before they can log in. This makes for a far more secure default experience. --- tljh/configurer.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tljh/configurer.py b/tljh/configurer.py index 9e8580c..fbed3b3 100644 --- a/tljh/configurer.py +++ b/tljh/configurer.py @@ -16,7 +16,10 @@ import yaml default = { 'auth': { 'type': 'firstuse', - 'dummy': {} + 'dummy': {}, + 'firstuse': { + 'createUsers': False + } }, 'users': { 'allowed': [], @@ -62,6 +65,7 @@ def update_auth(c, config): return elif auth['type'] == 'firstuse': c.JupyterHub.authenticator_class = 'firstuseauthenticator.FirstUseAuthenticator' + c.FirstUseAuthenticator.create_users = auth['firstuse']['createUsers'] def update_userlists(c, config):