Skip to content
Snippets Groups Projects
Commit 05aaa355 authored by Jan Mach's avatar Jan Mach
Browse files

Improved application security by changing the defaultness of auth_dev module.

The auth_dev authentication module was accidentaly enabled by default in configuration file shipped with Mentat packages. It was changed at some point locally during development and the change was accidentally committed. The documentation was missing the warning about disabling it during installation in production deployment. This is fixed now.
parent 260be019
No related branches found
No related tags found
No related merge requests found
...@@ -40,7 +40,7 @@ ENABLED_BLUEPRINTS = [ ...@@ -40,7 +40,7 @@ ENABLED_BLUEPRINTS = [
'vial.blueprints.changelogs', 'vial.blueprints.changelogs',
'hawat.blueprints.auth_env', 'hawat.blueprints.auth_env',
'hawat.blueprints.auth_dev', #'hawat.blueprints.auth_dev',
'hawat.blueprints.auth_pwd', 'hawat.blueprints.auth_pwd',
'hawat.blueprints.home', 'hawat.blueprints.home',
'hawat.blueprints.reports', 'hawat.blueprints.reports',
......
...@@ -618,7 +618,10 @@ ready for deployment out of the box: ...@@ -618,7 +618,10 @@ ready for deployment out of the box:
a2ensite site_mentat.conf a2ensite site_mentat.conf
# !!!!! THIS STEP IS SUPER IMPORTANT !!!!! # !!!!! THIS STEP IS SUPER IMPORTANT !!!!!
# Step 5: Change default SECRET_KEY in /etc/mentat/mentat-hawat.py.conf: # Step 5: In file /etc/mentat/mentat-hawat.py.conf change default SECRET_KEY and
# in production deployment make sure, that ENABLED_BLUEPRINTS key does not
# contain 'hawat.blueprints.auth_dev', or that is is commented out. Otherwise
# you would enable anyone impersonate any other user without password.
# !!!!! THIS STEP IS SUPER IMPORTANT !!!!! # !!!!! THIS STEP IS SUPER IMPORTANT !!!!!
vim /etc/mentat/mentat-hawat.py.conf vim /etc/mentat/mentat-hawat.py.conf
...@@ -634,6 +637,12 @@ ready for deployment out of the box: ...@@ -634,6 +637,12 @@ ready for deployment out of the box:
# (please adjust the attributes, do not simply copy and paste): # (please adjust the attributes, do not simply copy and paste):
mentat-dbmngr.py --command user-add login=superman "fullname=Clark Kent" email=kent@dailyplanet.com "organization=Daily Planet, inc." roles=user,admin mentat-dbmngr.py --command user-add login=superman "fullname=Clark Kent" email=kent@dailyplanet.com "organization=Daily Planet, inc." roles=user,admin
.. warning::
Please make sure you have read step 5 in the recipe above. The :ref:`section-hawat-plugin-auth-dev`
authentication module in particular is a HUGE security risk when enabled in production
installation and accessible from network.
.. warning:: .. warning::
For demonstration purposes Mentat package ships with preconfigured ``htpasswd`` For demonstration purposes Mentat package ships with preconfigured ``htpasswd``
......
...@@ -5,3 +5,32 @@ MAIL_DEFAULT_SENDER = 'mentat@cesnet.cz' ...@@ -5,3 +5,32 @@ MAIL_DEFAULT_SENDER = 'mentat@cesnet.cz'
HAWAT_LOG_DEFAULT_LEVEL = 'debug' HAWAT_LOG_DEFAULT_LEVEL = 'debug'
HAWAT_LOG_FILE = '/var/tmp/mentat-hawat.py.log' HAWAT_LOG_FILE = '/var/tmp/mentat-hawat.py.log'
HAWAT_LOG_FILE_LEVEL = 'debug' HAWAT_LOG_FILE_LEVEL = 'debug'
ENABLED_BLUEPRINTS = [
'vial.blueprints.auth',
'vial.blueprints.auth_api',
'vial.blueprints.design_bs3',
'vial.blueprints.devtools',
'vial.blueprints.changelogs',
'hawat.blueprints.auth_env',
'hawat.blueprints.auth_dev',
'hawat.blueprints.auth_pwd',
'hawat.blueprints.home',
'hawat.blueprints.reports',
'hawat.blueprints.events',
'hawat.blueprints.hosts',
'hawat.blueprints.timeline',
'hawat.blueprints.dnsr',
#'hawat.blueprints.pdnsr',
'hawat.blueprints.geoip',
#'hawat.blueprints.nerd',
'hawat.blueprints.whois',
'hawat.blueprints.performance',
'hawat.blueprints.status',
'hawat.blueprints.dbstatus',
'hawat.blueprints.users',
'hawat.blueprints.groups',
'hawat.blueprints.settings_reporting',
'hawat.blueprints.filters',
'hawat.blueprints.networks',
]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment