Sunil Mohan Adapa 253540fb3d
security: Remove restricted access setting and configuration
Closes: #2276.

Functionality all over the system keeps failing due this approach. The latest is
changing hostname in ejabberd Mnesia database fails (#2276). Further, users
connecting FreedomBox to a monitor can't use a GUI.

Tests:

- Without patches, enable restricted access. Apply patches and setup.py install.
Security app is updated. Restricted access is disabled and
/etc/security/access.d/{50freedombox.conf, 10freedombox-security.conf,
10freedombox-performance.conf} are removed. It is possible to login into
non-admin account via SSH.

- On a fresh install, the configuration files are not found.

- Security page does not show 'restrict console logins' option.

- Updating security app setting works. Message 'Configuration updated.' is
shown.

- First boot succeeds. Restrict console login is not enabled.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-12-05 20:47:13 -05:00

17 lines
557 B
Python

# SPDX-License-Identifier: AGPL-3.0-or-later
"""
Forms for security module
"""
from django import forms
from django.utils.translation import gettext_lazy as _
class SecurityForm(forms.Form):
"""Security configuration form"""
fail2ban_enabled = forms.BooleanField(
label=_('Fail2Ban (recommended)'), required=False,
help_text=_('When this option is enabled, Fail2Ban will limit '
'brute force break-in attempts to the SSH server and '
'other enabled password protected internet-services.'))