169 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
c6bccaaac0
Workaround security issues in django-axes
Newer versions of Django axes have newly way to get the IP address of a client
using ipware library. This has multiple security issues
https://github.com/jazzband/django-axes/issues/286 . Workaround them by
controlling the X-FORWARDED-FOR header sent from Apache to FreedomBox and by
limiting the headers that ipware uses.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-03-22 19:09:38 -04:00
Joseph Nuthalapati
c03f92a407
searx: Rewrite url from /searx to /searx/
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-03-20 21:45:11 -04:00
Sunil Mohan Adapa
ebabb2f8aa
sharing: Finish implementation
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-03-12 18:27:06 +05:30
Prachi
a42aed78f1
sharing: Add app to share disk folders using various protocols
- Adds the basic application framework
- Adds the sharing page for index and adding share
- Adds the action for sharing for adding and listing shares

Signed-off-by: Prachi Srivastava <prachisr@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-03-12 18:26:43 +05:30
Sunil Mohan Adapa
432aa1b343
searx: Strictly match relaxed URLs
To avoid unexpected security consequences.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-02-26 18:56:13 +05:30
Joseph Nuthalapati
26a53e6649
searx: Allow Searx to be added as a search engine to Firefox
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-02-26 18:55:30 +05:30
Joseph Nuthalapati
d42492d4df
searx: Enable single sign on
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-02-26 18:54:25 +05:30
Joseph Nuthalapati
3b6f4d0df3
searx: Update Apache configuration and icon
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-02-26 18:54:14 +05:30
Joseph Nuthalapati
67274e1566
searx: Changes from code review
- Use 32-bit key for HMAC-256
- Use secrets library instead of os.urandom
- uwsgi enable/disable along with webserver enable/disable
- Text changes

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-02-26 18:53:59 +05:30
Joseph Nuthalapati
823c2968f0
searx: New app for Searx metasearch engine
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-02-26 18:53:46 +05:30
Sunil Mohan Adapa
dea4af17fb
Rename Plinth to FreedomBox in license headers
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-02-16 20:10:09 -05:00
Joseph Nuthalapati
ff9d061e98
Add file-sharing application Coquelicot to FreedomBox
- Add settings in Service View
- Fixes for maximum file setting
- Don't allow negative values for max. file size in UI
- Minor text changes to django messages
- Minor correction to maximum file size calculation
- Rename apache conf file to coquelicot-freedombox.conf
- Remove all hacks to adjust file size.
- Fix permissions issues for settings file
- Show status block in UI
- try-restart on settings change instead of restart

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-02-14 07:11:25 -05:00
Aakanksha Saini
5ec7f49c8b
syncthing: Restrict administration to users in group syncthing
- Add syncthing group
- Add validation in syncthing-plinth configuration

* Tested on UI

Signed-off-by: Aakanksha Saini <aakanksa@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-01-15 17:51:30 +05:30
Joseph Nuthalpati
37138ee83b
mediawiki: Add wiki application
Installs and configures MediaWiki. SSO integration is not included yet.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-01-01 13:20:37 -05:00
Sunil Mohan Adapa
1200020a0e
clients: Minor styling fixes
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-12-13 18:56:08 -05:00
Joseph Nuthalapati
7ce5d1f636
groups: User permissions for access to apps based on LDAP groups
- More user-friendly treatment of groups and their permissions

Closes #690

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-12-10 19:09:55 -05:00
Joseph Nuthalapati
2f67fb49d4
Add framework for user groups per application
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-12-10 19:09:17 -05:00
Joseph Nuthalapati
d403782b77
Add client information for Matrix Synapse and Syncthing
- Add logos for desktop operating systems

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-12-04 12:14:42 -05:00
Joseph Nuthalapati
5aabac036c
sso: Fix conflict between urls of sso and captcha
django-simple-captcha's /refresh url's regex was matching anything that ends
with the word "refresh". This was clashing with sso/refresh. Changed the regex
for captcha's url to captcha/refresh.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-12-02 17:03:18 -05:00
Joseph Nuthalapati
111f8f9145
sso: Fixes for regressions after adding captcha and axes
- Change sso refresh url to refresh-pubtkt since refresh was conflicting with
  captcha's image refresh url.
- Fix datetime.timedelta calculation for refresh interval. Now validity of
  ticket is 30 seconds as it was intended to be. It was wrongly set to 30 days
  earlier.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-12-02 17:03:07 -05:00
Sunil Mohan Adapa
2236f3c0b9
avahi: Update FreedomBox service file
- Make the service a subtype of _http._tcp.
- Remove incorrect host tag.
- Add text record to indicate the patch to use.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-12-01 15:44:38 +05:30
Prachi Srivastava
bf9af37d17
avahi: Add service for freedombox discovery
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-12-01 15:44:29 +05:30
Sunil Mohan Adapa
07ee92692b
shadowsocks: Update firewall service description
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-11-29 17:47:37 +05:30
James Valleroy
6bf4eb1483
shadowsocks: Add shadowsocks client with socks5 proxy
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-11-29 17:47:05 +05:30
Joseph Nuthalapati
5ff459387e
Enable Single Sign On for transmission
- Disabled login using username and password.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-11-13 05:50:08 -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
b9168020c7
shaarli: Disable module since package is not available
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-11-04 15:29:39 -04:00
Sunil Mohan Adapa
27d3972eda
restore: Disable module since package is not available
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-11-04 15:29:32 -04:00
Johannes Keyser
508cbe7361
ejabberd, jsxc, apache: Rename out-dated "http-bind" to "bosh".
Signed-off-by: Johannes Keyser <johanneskeyser@posteo.de>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-10-31 20:26:49 -04:00
Joseph Nuthalpati
21d6174ba0
Allow access to plinth from outside the LAN.
Signed-off-by: Joseph Nuthalpati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-10-17 22:06:57 -04:00
Sunil Mohan Adapa
0f011c44fb
ttrss: Change the mobile path to /tt-rss-app
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-10-11 15:05:36 +05:30
Joseph Nuthalpati
5af62e1a08
ttrss: Make tt-rss api accessible using Apache basic auth
Partially fixes #958

The user still has to enable API access from Preferences in the tt-rss app.
Ideally, this should be automated, but this setting wasn't trivial to find. Will
try to automate this in a future pull request.

Signed-off-by: Joseph Nuthalpati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-10-11 15:05:11 +05:30
Sunil Mohan Adapa
e8e8fe0bd9
setup: Remove freedombox-setup related scripts
From freedombox-setup all the setup mechanisms and first-run mechanisms have
been removed. This script no longer does anything and is not needed. Ensuring
that the directories have proper permissions is now the duty of Plinth Debian
packaging.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Signed-off-by: Joseph Nuthalpati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-10-07 07:14:02 -04:00
Sunil Mohan Adapa
7b75e97e96
apache: Move freedombox.conf configuration to Plinth
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-04 19:26:42 -04:00
Sunil Mohan Adapa
d6f79b96be
Move Avahi files from freedombox-setup
Avahi daemon is being managed in Plinth, so it makes sense for Plinth to be
providing the service files. Service files can be managed so that when service
is not available, it is not advertised using Avahi.

Install service files.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Signed-off-by: Prachi Srivastava <prachi@swecha.net>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-10-04 19:19:11 -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
f5a5ee1f04
firewall: Remove redundant setup steps
- Essential modules enable their own services properly.  There is no need to do
  them as part of common setup.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-09-01 20:03:28 -04:00
Sunil Mohan Adapa
a9c7e28c3e
repro: Safety check to make sure pubtkt module is enabled
If pubtkt module is not enabled (rare) and if repro is enabled, Apache fails to
start. Make sure this effects only repro module. The single-sign-on
configuration already ensures that access is denied if pubtkt module is not
enabled, preventing unauthorized access.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-09-01 05:52:07 -04:00
Sunil Mohan Adapa
4bbbfd956c
Don't run Plinth setup as part of freedombox/setup
Instead run all of the setup process during the first boot. This enables us to
someday remove the reboot step entirely.

Tests: After building a new image with the changes, call the modules have shown
to be properly setup. Running the setup wizard, creating admin user and logging
works as expected.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-08-31 21:08:54 -04:00
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
Joseph Nuthalpati
08e84001a8
Diaspora: Disable for release 0.15.2
diaspora* is no longer installable from Debian
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=872305

Signed-off-by: Joseph Nuthalpati <njoseph@thoughtworks.com>

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-08-16 19:38:18 -04:00
Joseph Nuthalpati
72208f440d
SSO: Add check to see if auth_pubtkt module is available
- Solves bug #890
- Since Apache might be started before Plinth setup is ever run, we
have to handle the case where the auth_pubtkt module may not be available.
2017-08-02 17:04:41 +05:30
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
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
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