68 Commits

Author SHA1 Message Date
Joseph Nuthalapati
8f88f0f6b4
mediawiki: Fix images throwing 403s
- Increment version number
- Functional test for uploading files

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-08-11 20:26:10 -04:00
Joseph Nuthalapati
a309b28035
configuration: Use augeas to edit Apache files
Move the file editing code to actions/config since it must be executed by a
super user.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-07-29 20:50:14 -04:00
Joseph Nuthalapati
9a3af288fa
configuration: Option to set a default app for FreedomBox
Closes #1315

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-07-29 20:50:10 -04:00
Jayasuganthi
6fe172acc8
mediawiki: Enable short URLs
Fixes #1274

Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-07-23 17:34:36 +05:30
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
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 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
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
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
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
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
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
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
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
Joseph Nuthalpati
747a02adf2
diaspora: Will be served from a subdomain
Cannot host diaspora on a path because the url is part of the user id.
2017-05-06 07:25:40 -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
Joseph Nuthalpati
d269a0a645
diaspora: Completed debconf configuration for Diaspora. 2017-05-06 07:25:34 -04:00
Sunil Mohan Adapa
93c151ab2b
matrixsynapse: Minor review changes
- Change the configuration minimally and more reliably.

- Rename the Apache configuration and add comments.

- Rename firewalld description file.

- Enable the matrixsynapse module by default.

- Improve category, description texts and warnings.

- Remove unused variable.

- Add missing docstrings.

- Minor styling updates.

- Fix i18n in templates.

- Fix showing description in main service view.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-04-05 12:58:45 +05:30
Rahul De
2cde913215
matrixsynapse: Add Apache configuration
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-04-05 12:57:55 +05:30
Sunil Mohan Adapa
d1fa4e054e
Use the common LDAP auth configuration in all modules
By maintaining a common LDAP auth configuration, it becomes easy for
us to change the configuration values in future for upgrades etc.
2017-03-29 17:24:04 -04:00
Sunil Mohan Adapa
3f57863a69
syncthing: Update Apache configuration
- Redirect /syncthing to /syncthing/ as the daemon does not work
  without a slash at the end.

- Create a separate include file for LDAP authentication
  configuration that can be included on other app configurations.
2017-03-23 15:09:37 +05:30
Joseph Nuthalpati
551bd7b92c
syncthing: Fix showing running status in configuration page 2017-03-23 15:07:38 +05:30
Joseph Nuthalpati
a5147cfe16
syncthing: Run service as system user 'syncthing'
- Enabled Apache LDAP authentication for Syncthing.
2017-03-23 15:07:25 +05:30
Joseph Nuthalpati
2e28408f4b
syncthing: initial attempt at integrating Syncthing 2017-03-23 15:01:13 +05:30
Sunil Mohan Adapa
305cc3218d
xmpp: Replace jwchat with jsxc
- Update action to not configure jwchat anymore.

- Update action to not disable jwchat apache configuration.  Since the
  package is no longer installed, this could cause failures.

- Update action to no refer to jwchat in comments.

- Update jwchat-plinth Apache configuration to not include jwchat
  anymore.  Keep this file name for now instead of renaming it to
  jsxc-plinth as this would introduce additional complexity with little
  benefit.

- Install package libjs-jsxc instead of jwchat during xmpp setup.

- Create jsxc front page shortcut instead of for jwchat.

- Perform diagnostics on /http-bind/ URL needed for jwchat instead of
  /jwchat.

- Update links that launch XMPP web client.
2016-09-19 19:51:26 -04:00
James Valleroy
31c491ae46
Revert "Apply workaround to SSL config for mod_gnutls"
Debian bug #514005 is resolved in mod_gnutls 0.7.4-1.

This reverts commit cdda77b3b4c815b80603d1a69d793b5156c5672e.
2016-05-14 19:04:41 +05:30
James Valleroy
368e64c5ca
ttrss: Use LDAP authentication 2016-03-12 11:38:28 +05:30
James Valleroy
9d85084d8d
radicale: New module for a CalDAV/CardDAV server 2016-02-26 15:40:19 +05:30
Sunil Mohan Adapa
57fd2a2ea2
repro: Minor styling and message changes
- Indentation for HTML template consistent with other templates.

- Style 'repro' like the upstream project does in all small case.

- Better describe the functions of a SIP server and organize the actions
  to be done by the user.

- Set the menu weight so that it does not clash with an existing module.

- Name the application 'SIP Server' instead of 'SIP Proxy' as that
  better describes the capabilities of the repro and is simpler for
  users to understand.
2016-01-27 17:49:41 +05:30
James Valleroy
b7e44eb429
Add repro SIP proxy module. 2016-01-27 17:49:20 +05:30