From 23ea578db58401b99231b04c7dd63740e8e9554b Mon Sep 17 00:00:00 2001 From: Jan Kaluza Date: Sep 19 2017 08:54:00 +0000 Subject: Fix #59 - disable default 'noauth' auth_backend and show warning when this backend is used. --- diff --git a/server/odcs/server/auth.py b/server/odcs/server/auth.py index d09af85..ee70b3a 100644 --- a/server/odcs/server/auth.py +++ b/server/odcs/server/auth.py @@ -146,6 +146,7 @@ def init_auth(login_manager, backend): if backend == 'noauth': # Do not enable any authentication backend working with frontend # authentication module in Apache. + log.warn("Authorization is disabled in ODCS configuration.") return if backend == 'kerberos': global load_krb_user_from_request diff --git a/server/odcs/server/config.py b/server/odcs/server/config.py index a53b1d9..cc0dc5f 100644 --- a/server/odcs/server/config.py +++ b/server/odcs/server/config.py @@ -172,7 +172,7 @@ class Config(object): 'desc': "Admin groups and users."}, 'auth_backend': { 'type': str, - 'default': 'noauth', + 'default': '', 'desc': "Select which authentication backend is enabled and work " "with frond-end authentication together."}, 'auth_openidc_userinfo_uri': {