1060 Commits

Author SHA1 Message Date
RaviBolla
644b4ef4e5
config: refactoring of config.py into views and form
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-11-13 12:52:21 -05:00
Sunil Mohan Adapa
e4aa77d9f2
cockpit: Make the application usable
All users can login. Only admin users can see logs and make changes.

LIMITATION: Only certain functions such as service management is possible.
Functions such as networking and user management is read-only. This problem does
not occur for user belonging to the 'sudo' group.

- Move to system section from applications section.

- Rename action script to cockpit instead of cockpit.

- Deal with .socket/.service correctly.

- Implement hooks on domain name changes and update configuration correctly.

- Host the application under /_cockpit instead of /cockpit because it is
  reserved.

- Update description.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-11-06 06:54:52 -05:00
vignanl
44cf56c222
cockpit: New module for server administration
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-11-06 13:22:10 +05:30
Sunil Mohan Adapa
7327a6b803
users: After setup, enable and restart slapd and nslcd
Apply the patch present in Debian packaging:

James Valleroy: When testing new image builds, I found users created through
plinth could not login through console or SSH. The reason is that slapd and
nslcd services were not enabled and not running. I don't know what is causing
this situation, so this is just a workaround.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-11-03 18:33:11 +05:30
Johannes Keyser
2ca5cd8043
ejabberd: Fix LDAP server entry in config file during setup.
Signed-off-by: Johannes Keyser <johanneskeyser@posteo.de>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-10-31 19:52:53 -04:00
Sunil Mohan Adapa
511c957ece
matrixsynapse: Minor PEP8 fixes
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-10-18 17:31:02 +05:30
Sunil Mohan Adapa
05fc508af8
matrixsynapse: Restart server after post install
This does not effect the first install but is necessary when upgrading to newer
Plinth module version.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-10-18 17:30:48 +05:30
Sunil Mohan Adapa
f5158c6186
matrixsynapse: Disable public registration by default
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-10-18 17:30:33 +05:30
Hemanth Kumar Veeranki
025cf4dd2c
matrixsynapse: Enable LDAP integration
Signed-off-by: Hemanth Kumar Veeranki <hemanthveeranki@gmail.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-10-18 17:30:18 +05:30
Sunil Mohan Adapa
ccfe511e4c
users: Minor refactoring
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-10-17 17:39:42 +05:30
Joseph Nuthalpati
396e086727
users: Migrate ldap bash script into actions/users
- Also wrote unit tests in users/tests/test_actions

Signed-off-by: Joseph Nuthalpati <njoseph@thoughtworks.com>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-10-17 09:25:14 +05:30
Sunil Mohan Adapa
00d8e03d90
ttrss: Minor refactoring
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-10-16 17:45:41 +05:30
Joseph Nuthalapati
028a3ad207
tt-rss: Enable API access by default
API access is required to use tt-rss from the official Android app
Closes #1060

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-10-16 14:37:38 +05:30
Sunil Mohan Adapa
5e6e02184e
networks: Make setup script idempotent
Only add a connection for a device if a connection with that name is not already
associated with that device.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Signed-off-by: Joseph Nuthalpati <njoseph@thoughtworks.com>
2017-10-09 11:24:21 +05:30
Sunil Mohan Adapa
6802e20a1d
networks: Activate the newly created connections
When network-manager restarts, it leaves the existing connections intact. When
it start again, it somehow restores that active connection. So, restarting
network-manager is not a solution to activate all newly created connections.
Explicitly activate all connections and don't restart network-manager. Do
connection activation in background so that failed activation does not lead to
failed setup of remaining connections.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Signed-off-by: Joseph Nuthalpati <njoseph@thoughtworks.com>
2017-10-09 11:24:06 +05:30
Sunil Mohan Adapa
56b071858b
users: Restart nscd after setup
The changes made for system login will not be effective until a restart. This
includes SSH login, console login, getent answers, etc.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-10-07 07:08:27 -04:00
Rahul De
a22a01a76f Generic framework for user group per application
- Closes #928
- Adds shell and python APIs adding/removing LDAP groups

Signed-off-by: Rahul De <rahul080327@gmail.com>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2017-10-05 10:43:50 +05:30
James Valleroy
a155119738
networks: Show message when skipping configuration 2017-10-03 20:27:18 -04:00
Sunil Mohan Adapa
249f29cef6
networks: Numeric sort of interfaces instead of lexical sort
This does not change the order of any of the current devices.  Only device
supported currently that has multiple interfaces is APU.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2017-10-03 18:41:01 +05:30
Sunil Mohan Adapa
f1459c066f
networks: Move initial connection setup to Plinth
- For a user who installed using FreedomBox disk image, when Plinth upgrades to
  a release containing this change, don't run network setup. This is ensured by
  not incrementing the version number of the networks module.

- For a user who installed using freedombox-setup Debian package, when Plinth
  upgrades to a release containing this change, don't run network setup. This is
  ensured by not incrementing the version number of the networks module.

- For a user who installed using freedombox-setup Debian package, when Plinth is
  run for the first time, don't run network setup. This is ensured by checking
  for the file /var/lib/freedombox/is-freedombox-disk-image which will not
  exist.

- For a user who installed using FreedomBox disk image, when Plinth runs for the
  first time, setup process executes and triggers the script due networks module
  being an essential module.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2017-10-03 18:40:51 +05:30
Johannes Keyser
f5f0f7e791
matrix-synapse: Option public registrations fixed and simplified.
* Fixing wrong function calls leading to error 500.
* Merging enable/disabling/status into single action, to improve
  handling in cli, and reduce code duplication.
* Fixing order of restart and enabling of public registration option.
* Minor, cosmetic fixes of code and user-facing strings.
* Overall code design now almost identical to Ejabberd service page.

Signed-off-by: Johannes Keyser <johanneskeyser@posteo.de>
2017-10-01 22:59:17 +02:00
Hemanth Kumar Veeranki
a1014946d2
matrix-synapse: feature to enable/disable public registrations
Signed-off-by: Hemanth Kumar Veeranki <hemanthveeranki@gmail.com>

Reviewed-by: Johannes Keyser <johanneskeyser@posteo.de>
2017-10-01 22:59:17 +02:00
Johannes Keyser
f628eb2cc2
ejabberd: Use Let's Encrypt certificate, also across renewals.
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-10-01 10:48:39 -04:00
abilashr
81fde34254
Rename Disks and Snapshots in Configuration tab
- Rename Disks to Storage
- Rename Snapshot to Storage Snapshots

Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2017-09-27 09:39:34 +05:30
Sunil Mohan Adapa
602ea6cf16
apache: New module to manage Apache configuration
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-09-01 20:04:07 -04:00
Sunil Mohan Adapa
07c062aef3
ssh: New application to manage SSH server
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-09-01 20:03:58 -04:00
Sunil Mohan Adapa
2e55acb465
firewall: Move remaining setup steps to Plinth
There is no need to restart firewalld after the setup steps run.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-09-01 20:03:51 -04:00
Sunil Mohan Adapa
1f0a878b2e
Minor styling fixes
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-08-31 14:34:23 +05:30
Joseph Nuthalpati
32d17e6c93
sso: Safety check to make sure auth_pubtkt is enabled
Signed-off-by: Joseph Nuthalpati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-08-31 14:34:11 +05:30
Sunil Mohan Adapa
e558cdc1e4
users: Keep safety check to start slapd during setup
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-08-29 17:09:10 +05:30
James Valleroy
b19a9f972c
users: Move ldap structure config into normal setup
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-08-29 17:08:09 +05:30
Joseph Nuthalpati
f9166f8e98
sso: Upgrade crypto
- using latest version of lib-apache2-mod-authpubtkt
- upgraded keys to 4096-bit RSA
- upgraded hashing algorithm to sha512

Plinth needs dependency on libapache2-mod-auth-pubtkt >= 0.11

Signed-off-by: Joseph Nuthalpati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-08-28 16:07:27 +05:30
James Valleroy
9fabb7b903
diaspora: Don't enable service until domain name is set
- This avoids an issue where it would try to enable the apache conf
possibly before it is generated.

- Added an explicit enable statement since it was missing.

Reviewed-by: Joseph Nuthalpati <njoseph@thoughtworks.com>
2017-08-10 11:47:45 +05:30
Joseph Nuthalpati
4abb7cd885
Diaspora: Checkbox to enable or disable user registrations 2017-07-29 12:40:44 -04:00
Joseph Nuthalpati
f3860b197a
Diaspora: Generate apache configuration at setup
- Deleted static configuration file
- Generating configuration with the domain name set.
2017-07-29 10:45:57 -04:00
Joseph Nuthalpati
d1b8d8e811
Diaspora: Make config changes using augeas 2017-07-29 10:45:52 -04:00
Joseph Nuthalpati
b109507e0a
Diaspora: Update domain name in Apache config 2017-07-29 10:45:30 -04:00
nsaikiran
a8a5da996e
[#759] Add fail2ban to Plinth UI
Run sudo-required action via actions.superuser_run

Actions related to services those require `sudo` permissions need to
be executed via actions.superuser_run.

NOTE:
If plinth service is started via `sudo ./run --debug` (in dev mode)
all actions will be executed silently. But plinth in user machines
won't be executed with sudo permissions.
2017-07-29 09:42:31 -04:00
James Valleroy
3ea5868ec1
pylint and spelling fixes 2017-07-19 21:47:07 -04:00
Johannes Keyser
1069f84154
letsencrypt: Add option to let Plinth "manage" certbot's renewal hooks
- add action commands for managing and running hooks

- adding template, view and url for managing and running hooks

- disable Plinth hook management on domain change
2017-07-19 21:47:00 -04:00
Johannes Keyser
1a39ec0267
letsencrypt: add option to delete certificates 2017-07-06 22:30:10 -04:00
Johannes Keyser
57e96b298c
letsencrypt: show more info on cert validity status 2017-07-06 22:30:01 -04:00
Johannes Keyser
320b993c4d
letsencrypt: directly call certbot in action script 2017-06-24 11:34:33 -04:00
Joseph Nuthalpati
5ad180fcc9
Add Tahoe-LAFS module
- Created basic plinth app which starts an introducer and a storage
  node on the FreedomBox.
- Prompt user to set a domain name before creating Tahoe-LAFS nodes.
- Support adding and removing of introducers to the storage node.
- Serve Tahoe-LAFS from a different port.
- Start all nodes and introducers at system startup.
- Add utility class YAMLFile with test cases.
2017-06-10 09:38:57 -04:00
James Valleroy
70c06ec9c1
sso: Add comments to mark needed crypto upgrades. 2017-06-03 10:33:11 -04:00
Joseph Nuthalpati
995365f3df
Add SSO using auth_pubtkt for 3 web apps
- Install mod_auth_pubtkt and generate public/private key-pair.

- Redirect user to login page if no cookie is presented.

- Add check for authenticated user for login page.

- Temporarily switched to DSA because of a bug in mod_auth_pubtkt
  which causes it to accept only DSA and not RSA. Also had to use SHA1
  instead of SHA256.

- Enabled SSO for Syncthing, Repro and TT-RSS.

- Using tokens to authorize by user groups.

- Generate keys during first boot.
2017-06-03 10:29:42 -04:00
Johannes Keyser
ed0ab1ab64
ejabberd: add option to enable/disable Message Archive Management 2017-05-19 20:42:52 -04:00
Joseph Nuthalpati
3a6dc03ee9
Diaspora: Checking whether domain name is setup before certain actions 2017-05-06 07:25:47 -04:00
Joseph Nuthalpati
5ffcf42278
diaspora: Templates to setup domain name 2017-05-06 07:25:42 -04:00
Joseph Nuthalpati
742fe48a29
diaspora: Disabled SSL
Created a custom command in Plinth to disable ssl for the diaspora pod
on the freedombox.
2017-05-06 07:25:37 -04:00