266 Commits

Author SHA1 Message Date
James Valleroy
903a11824e Merge pull request #265 from fonfon/restore
Added reStore module/application
2015-11-04 08:00:55 -05:00
Sunil Mohan Adapa
646763ff3c openvpn: New module VPN into FreedomBox
- Authentication using client certificates.  Extra password based
  authentication for later.

- Auto setup of CA, server and client certificates.

- Provides a .ovpn profile for each user for easy setup.

- Use 4096 bit Diffie-Hellman parameters for better security.  If this
  takes to much time, reduce it to 2048 or 1024, at least during
  debugging.
2015-11-03 20:24:40 -05:00
fonfon
be325f8879 added reStore module 2015-10-21 11:54:34 +00:00
Sunil Mohan Adapa
5ccbd6f35c pagekite: Make Augeas loading narrower and faster 2015-10-12 22:26:14 +05:30
Sunil Mohan Adapa
670be77b9a pagekite: Fix issue with setting port
- When the current configuration does not contain a port and we try to
  set the port for the frontend server, it fails.  This patch fixes
  that.

- Minor styling and spelling fixes.

- Make sure that if port is not set for frontend, it will be set on
  saving the form.
2015-10-11 17:54:26 +05:30
fonfon
aad69deb6e Display correctly if service is PageKite is enabled 2015-10-11 17:19:35 +05:30
fonfon
96a272b3b0 Added explicit port setting to pagekite configuration 2015-10-11 17:19:35 +05:30
Sunil Mohan Adapa
94cdd19070 avahi: Minor fixes
- PEP8 fixes.

- Don't need to disable .socket and .service.  Disabling .service will
  take care of disabling both.

- Update the introduction message.

- Add prefix to form so that it can potentially be mixed with other
  forms.
2015-10-07 01:11:19 +05:30
Sean Alexandre
e6f7e6020f Adds Service Discovery module
Resolves issue https://github.com/freedombox/Plinth/issues/231
"Option to disable avahi-daemon"
2015-10-07 01:10:53 +05:30
James Valleroy
dda0f311b2 xmpp: Disable TLS on http-bind port (Closes: #239). 2015-10-04 18:57:40 -04:00
Sunil Mohan Adapa
91eaf3301d datetime: Move time zone to date time module
- It is more appropriate to have the time zone setting in date time
  module.
2015-09-04 19:53:46 +05:30
Sunil Mohan Adapa
bff8dd5a5c tor: Fixes for APT transport setup
- When Deb822 formatted source files are present, error out and don't
  show as enabled.

- When /etc/apt/sources.list.d/*.sources files are present, error out
  and don't show as enabled.

- Handle files /etc/apt/sources.list.d/*.list.

- Workaround Augeas lens not understanding '[options]' in sources.list.
2015-09-04 15:38:16 +05:30
Sunil Mohan Adapa
09f64f6a4b tor: Disable APT transport when Tor is disabled
- To make sure that APT is not unusable.
2015-09-04 15:38:16 +05:30
James Valleroy
f25ce0216f tor: Add control to enable/disable apt-transport-tor (Closes: #78). 2015-09-04 15:38:15 +05:30
Sunil Mohan Adapa
35d3244636 xmpp: Minor identation fixes 2015-09-01 22:41:53 +05:30
James Valleroy
162b28aafe xmpp: Replace host list instead of adding during domainname change (Closes #167). 2015-08-30 19:16:14 -04:00
Sunil Mohan Adapa
28f84ad0b1 datetime: New module for date & time operations
- Enable/disable ntpd from this module.  Since ntpd has implications on
  anonymity.

- Implement NTP diagonstics from freedombox-setup.

- Eventually provide ability to set date & time of the system.

- Eventually move timezone configuration to this module.
2015-08-29 10:32:14 -04:00
Sunil Mohan Adapa
c417c12436 xmpp: Implement diagnostics
- Mostly moved from freedombox-setup.
2015-08-29 06:22:01 -04:00
Sunil Mohan Adapa
4210332bf6 users: Improve diagnostics
- Move diagnostics into main module instead of action script.

- Ability run diagnostics as non-root user (because it runs in Plinth
  instead of action).

- Diagnose whether LDAP server is listening.

- Diagnose directory entities created during setup.
2015-08-29 06:22:01 -04:00
Sunil Mohan Adapa
eca538169e diagnostics: Revamp main diagnostics page
- Run diagnostics on each module separately.

- Run diagnostics in a separate thread.

- Show progressive update while running diagnostics.

- Store and show old diagnostics.

- Prevent CSRF on the expensive operation of running diagnostics.
2015-08-29 06:22:01 -04:00
James Valleroy
ea64fa1c7a Merge remote-tracking branch 'sunil/tor-setup' 2015-08-26 19:18:18 -04:00
Sunil Mohan Adapa
be46e9588a shaarli: Minor comments updates 2015-08-23 17:27:34 +05:30
James Valleroy
4458a6537d Add Bookmarks (Shaarli) module. 2015-08-23 16:43:13 +05:30
Sunil Mohan Adapa
0b1e97d99c Treat entire input as password
Instead of just the first line.

PEP8 fixes.
2015-08-23 16:24:29 +05:30
Sean Alexandre
21b9a5b02a Passwords now sent over stdin instead of command line.
Fixes Issue #166:
Don't pass passwords on command line
https://github.com/freedombox/Plinth/issues/166

This issue was for 4 modules: Transmission, Pagekite, DynamicDNS, and Ikiwiki.
2015-08-23 15:20:08 +05:30
Sunil Mohan Adapa
13655f05bc tor: Configure for IPv6 also 2015-08-21 19:24:07 +05:30
Sunil Mohan Adapa
ee521e098f tor: Move Tor setup from freedombox-setup
We are still overwriting the entire configuration file instead of
modifying it.
2015-08-18 21:25:01 +05:30
Sunil Mohan Adapa
2ca130b154 users: Implement diagnostics 2015-07-28 21:58:17 +05:30
Sunil Mohan Adapa
05ef2921db package: Remove package module
- It does not work on all the modules available.

- It does not reload Plinth after changes.

- As of now, there is not strong case for disabling modules in Plinth
  making it unnecessary UI complication.

- Split into multiple small Debian packages is not yet implemented for
  Plinth.  The module expects to work on the Debian modules.  When
  smaller Debian packages are available perhaps we should consider using
  packages.py library instead.
2015-07-28 16:51:19 +05:30
Sunil Mohan Adapa
3d5f68381d tor: Reimplement getting ports in Python 2015-07-28 16:40:51 +05:30
Sunil Mohan Adapa
36adc84b5d pagekite: Remove unused import 2015-07-28 16:38:13 +05:30
James Valleroy
c171d89554 ldap: Actually read from stdin if available.
I made a silly mistake while merging, sorry.
2015-07-26 20:33:25 -04:00
Sunil Mohan Adapa
d363d8db26 users: Use ldapscripts for user management
- Merge all ldap actions into one action.

- Setup ldapscripts using augeas.

- Use the default mechanisms used by ldapscripts.

- Remove adding admin users to 'sudo' group.  Mixing LDAP groups and
  local groups is not a good practice.  'admin' LDAP group will be added
  to sudoers in another patch to freedombox-setup.

- Make all users posixAccount and all groups posixGroup for simplicity.
  Shell access can be restricted in other ways.

- Work around ldapscripts not able to set password using SASL auth.

- Work around ldapscripts having issues with current locale.
2015-07-26 16:33:06 -04:00
James Valleroy
d144f6634a Bug fixes:
Check if ejabberd is installed when running actions triggered by signals.
Encode LDAP passwords as bytes.
2015-07-23 22:30:50 +05:30
James Valleroy
97220b89f3 xmpp: Update module layout to match other modules.
Split forms and views into separate files.
Add configuration form to enable/disable the service.
2015-07-23 22:30:50 +05:30
James Valleroy
6bbc622b1a xmpp: Remove account registration and in-band configuration. 2015-07-23 22:30:50 +05:30
James Valleroy
b840875c16 xmpp: Always use LDAP authentication. 2015-07-23 22:30:50 +05:30
James Valleroy
cb7c9c26f7 Send LDAP user passwords to actions through stdin, not as arguments. 2015-07-23 22:30:50 +05:30
Sunil Mohan Adapa
d650273760 xmpp: Use webserver action utilties 2015-07-19 19:56:05 -04:00
Sunil Mohan Adapa
c9d918157c transmission: Remove get-enabled from actions 2015-07-19 19:56:05 -04:00
Sunil Mohan Adapa
384867dc25 roundcube: Remove get-enabled from actions 2015-07-19 19:56:05 -04:00
Sunil Mohan Adapa
4906384b39 privoxy: Remove get-enabled from actions 2015-07-19 19:56:05 -04:00
Sunil Mohan Adapa
cedec9b624 mumble: Remove get-enabled from actions 2015-07-19 19:56:05 -04:00
Sunil Mohan Adapa
48da6862b9 ikiwiki: Remove get-enabled from actions 2015-07-19 19:56:05 -04:00
Sunil Mohan Adapa
7cf47bbcb2 deluge: Remove get-enabled from actions
- Use webserver action utilites.

- Move status getting to module __init__.py so that it can be turned
  into an API in future for further simplificaiton.

- Apply this to other modules too in future commits.
2015-07-19 19:54:13 -04:00
Sunil Mohan Adapa
07e2c0ce14 Don't use actions to check if service is running
- To check whether a service is running does not require root
  privileges.  This can directly be done from a module without any
  action.

- Since actions are allowed to be run using sudo, introducing
  unnecessary sub-commands increases attack surface.

- Simple functions calls are unnecessarily being converted to command
  line invocations and involve parsing response.

- There is a lot of repeated code because of this that can be
  eliminated.

- To generalize this, we need to make all non-root system operations
  directly from module instead of delegating to action commands.
2015-07-19 19:54:13 -04:00
Sunil Mohan Adapa
3b6af2f29c Use only action utilities for service management
- When disabling a service, ignore if unable to stop the service.
2015-07-19 19:54:13 -04:00
Sunil Mohan Adapa
517c364559 pagekite: Move to using python3-augeas
- Merge actions/pagekite_util.py into plinth/modules/pagekite/util.py.

- Rename plinth/modules/pagekite/util.py to utils.py.

- Add python-augeus as dependency.

- Move actions/util.py to plinth/action_utils.py and update services
  that use it.

- Rename _run() method to run() as it is being used publicly.

- Import the utils in a more conventional manner.

- Move all python2 bits to python3.
2015-07-19 15:37:43 -04:00
Sunil Mohan Adapa
2b86ce9fdb users: Remove unused code checking for LDAP user 2015-07-18 17:23:04 +05:30
James Valleroy
dbd4dff52e Cleanup from switching group types. 2015-07-13 19:50:59 +05:30