50 Commits

Author SHA1 Message Date
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
Sean Alexandre
1f183bf997 Changes Apache conf files to use new mod_authz_host syntax instead of Allow/Deny
Resolves Issue https://github.com/freedombox/Plinth/issues/171
"Update Apache auth config directives"
2015-09-29 19:28:50 -04:00
James Valleroy
cdda77b3b4 Apply workaround to SSL config for mod_gnutls
HTTPS environmental variable is not set properly by mod_gnutls.
2015-09-20 12:09:09 +05:30
Sunil Mohan Adapa
100f8392e3 Fix issue with Apache configuration
I faced a situation that on my localhost resolved to an IPv6 address and
Apache was unable to connect to Plinth as Plinth does not yet listen on
IPv6 address.  It is best to change this to an explict local IP address
at least until Plinth listens on IPv6 address.
2015-09-02 19:40:54 -04:00
Sunil Mohan Adapa
8c155bfafb ikiwiki: Update LDAP auth configuration
- Make the configuration work for new style user/group structure.
2015-07-26 16:33:06 -04:00
Sunil Mohan Adapa
02269a93cc ikiwiki: Update the LDAP login prompt message 2015-07-18 17:14:05 +05:30
James Valleroy
2c5b829fb0 ikiwiki: Authorize users from admin or wiki group. 2015-07-13 19:50:58 +05:30
James Valleroy
70e0c4f61a ikiwiki: Enable HTTP auth using LDAP. 2015-07-13 19:50:58 +05:30
James Valleroy
9c717246ee deluge: Install apache conf file during Plinth install. 2015-06-26 17:34:37 +05:30
James Valleroy
be14b49c83 ikiwiki: Install conf files during Plinth install. 2015-06-26 17:34:37 +05:30
James Valleroy
128aa42873 xmpp: Enable jwchat apache conf after install. 2015-05-24 17:25:54 +05:30
Sunil Mohan Adapa
69adf1cfc5 transmission: Run from behind Apache
- Introduce Apache configuration for plinth.

- Remove Transmission service file for firewalld.

- Enable transmission on install.

- Enable/disable Apache configuration on Transmission on enable/disable.

- Remove IP address whilelisting as 127.0.0.1 is the default setting and
  is sufficient for Apache to reverse proxy.

- Update UI URL.
2015-05-01 19:00:56 +05:30
Sunil Mohan Adapa
9d6e17660d For SSL redirection, use 301 permanent 2014-11-30 15:11:50 +05:30
Sunil Mohan Adapa
e2ca5e0f12 Rewrite Apache configuration files
- Don't hijack the entire SSL site for sake of Plinth.

- Serve both HTTP and HTTPS sites with default configuration.

- plinth-ssl configuration only make SSL compulsory.

- Document modules required for configuration to work properly.

- Don't disable default site during FreedomBox setup run.  This is no
  longer required.
2014-11-30 15:11:50 +05:30
Sunil Mohan Adapa
1b6969a8a6 Rethink how proxied headers are handled
- Request Apache to send X-Forwarded-Proto header.

- Use X-Forwarded-Proto header to understand original protocol
  requested.

- Use X-Forwarded-Host header to understand original host requested.

- Allow any incoming host header so that FreedomBox can have any
  hostname and when user requests for Plint with that hostname, it
  works.

- Don't depend on Apache to rewrite the Location: header.  Instead use
  the original host and original scheme to set proper Location: header.
2014-11-30 15:11:50 +05:30
Sunil Mohan Adapa
eec249d006 Don't preserve Host header during Apache proxying
When Apache proxy forwards a request it usually makes the request to the
backend server with a new Host: header but sends the original host
information using a special header X-FORWARDED-HOST: header.  It is a
common practise.  The backend can be make the choice of which header to
use based on the knowledge that it is running behind a proxy server.

Since hostname of a FreedomBox machine could be anyting and it could
change during the operation of Plinth, having a list of incoming Host:
header values is not going to be easy in Plinth.  If Apache were not to
force override this header, managing list of Host: header values will
become easiler in Plinth.  If Plinth indeed wants to know the original
host name by which user refferred to it, it can use the
X-FORWARDED-HOST: header which is the norm in these situtations.
2014-11-30 15:11:50 +05:30
Sunil Mohan Adapa
5d79ad6dc5 Don't service static files directly from Apache
We are allowing modules to bring their own static content.  If we need
to configure Apache to serve static URLs directly, Apache will have know
all the static URLs generated by all the modules.  If these details are
provided, it will likely effect our modularity.

The current static URL given in Apache configuration is anyway
incorrect.
2014-11-30 15:11:50 +05:30
Sunil Mohan Adapa
1e317cfb37 Allow more local IP addresses in Apache configuration 2014-11-30 15:11:50 +05:30
Sunil Mohan Adapa
e6dbcdccaa Move all misc files under misc directory 2014-08-30 09:38:24 +05:30