1810 Commits

Author SHA1 Message Date
James Valleroy
a9ab05bde3
bind: Enable systemd sandbox options for bind9 service
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-27 14:56:51 -08:00
Veiko Aasa
3f5035c6d5
gitweb: Add link to the manual page
Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-27 14:14:08 -08:00
James Valleroy
9c33567a54
networks: Update text for router setup
- Move router setup below connections
- Use default style for Update button
- Use box_name in templates
- Add 2nd example of router IP
- Minor updates to text

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-26 17:10:20 -05:00
Nektarios Katakis
ed6cd38c22
networks: save router config to kvstore
Closes: #1695

Signed-off-by: Nektarios Katakis <iam@nektarioskatakis.xyz>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-26 16:02:55 -05:00
Nektarios Katakis
33f5114241
networks: modify as first boot wizard step
Signed-off-by: Nektarios Katakis <iam@nektarioskatakis.xyz>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-26 16:02:52 -05:00
Nektarios Katakis
e771ca3b8e
networks: add first boot step for router config helper
Signed-off-by: Nektarios Katakis <iam@nektarioskatakis.xyz>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-26 16:02:50 -05:00
Nektarios Katakis
09545155a0
networks: add link to main page for router config form
Signed-off-by: Nektarios Katakis <iam@nektarioskatakis.xyz>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-26 16:02:47 -05:00
Nektarios Katakis
cabfcbc6ef
networks: create view & url for new form
Signed-off-by: Nektarios Katakis <iam@nektarioskatakis.xyz>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-26 16:02:45 -05:00
Nektarios Katakis
f3d2654a13
networks: form for configuring router
Signed-off-by: Nektarios Katakis <iam@nektarioskatakis.xyz>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-26 16:02:41 -05:00
Veiko Aasa
9d653d87ec
storage: Make external disk mounts accessible by other users
- samba app doesn't need anymore to change mount permissions

Fixes #1692 (in a different way)

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-26 07:32:04 -05:00
Veiko Aasa
8e698987de
deluge: Allow to set a download directory
- add directory selection form to the app configuration page
- add debian-deluged user to the freedombox-share group
- storage: new validator parameter check-creatable
  (because deluged is able to create subdirectories)

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-25 18:27:11 -05:00
James Valleroy
21ba450484
repro: Remove app
The repro app has been disabled for a long time. Its package has been
removed from Debian, and there is no sign of it returning soon.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 20:00:43 -05:00
James Valleroy
c8a5f3727f
restore: Remove app
The restore app has always been disabled, because node-restore package
is not available in Debian (RFP #804507). There hasn't been progress
towards packaging it since 2016.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 19:59:02 -05:00
Sunil Mohan Adapa
419559a86f
wireguard: Show public key even when connection is not active
When wireguard interface is not active 'wg show' does not provide any
information. In such case, get the public key by computing it from private key
by calling 'wg pubkey'.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:55 -05:00
Sunil Mohan Adapa
f43d9a5469
wireguard: When a connection is edited, reactivate to apply changes
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:53 -05:00
Sunil Mohan Adapa
318df8723a
wireguard: Enable/disable connections along with the app
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:51 -05:00
Sunil Mohan Adapa
0bc097f37d
wireguard: Implement enabling/disabling app using a stored flag
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:49 -05:00
Sunil Mohan Adapa
642d44aced
wireguard: Ensure tests work without latest network manager
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:46 -05:00
Sunil Mohan Adapa
43ad12c563
wireguard: Add validations in forms
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:44 -05:00
Sunil Mohan Adapa
69e418ada3
wireguard: Generate private key if needed when editing server
- Refactor code that edits the connection to server.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:41 -05:00
Sunil Mohan Adapa
2b9d278a95
wireguard: Update descriptions for client vs. server clarity
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:38 -05:00
Sunil Mohan Adapa
6e1b0a3642
wireguard: Handle client connections through network manager
- Any changes done directly using 'wg' command need to be redone after a reboot
  and disable/enable sequence. Let that duty be handled by network manager.

- Handle (none) values for keys and 0 values for latest handshake from 'wg'
  dump command output.

- Don't store public/private keys for wireguard in /var/lib. Let Network Manager
  deal with the storage of secrets.

- Create client connections in the 'external' zone.

- Show allowed IPs for each client in the main page.

- Show server connection public key only for clients. We use different key pairs
  when connecting to each of the servers.

- Separate out configuration information and status information in the show
  page.

- Allocate IP addresses to each of the clients.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:35 -05:00
Sunil Mohan Adapa
71c7ab4a9d
wireguard: Only use network manager for connections to servers
- Don't create network link. This don't persist across reboots and it is the job
  of Network Manager.

- Move NM settings code to regular plinth process instead of superuser.
  Permission for managing NM connections from the service daemon is granted by
  PolKit.

- Use interface name to identify the connection as it seems to be simply to do
  so than the public key. Public key is not easy to retrieve from NM connection.

- Merge code for adding and editing the connection to avoid repetition.

- Add icon to the edit button.

- Throw 404 error when incorrect client is specified.

- Fix issue with storing preshared key.

- Show formatting date in case of last connected time.

- Show formatted sizes for data transmitted.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:31 -05:00
Sunil Mohan Adapa
b96c5e5433
wireguard: Update descriptions in form labels
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:29 -05:00
Sunil Mohan Adapa
9242a9404f
wireguard: Add ability to set private key in client addition
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:24 -05:00
Sunil Mohan Adapa
ad53848983
wireguard: Don't error out when wg0 server is not setup
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:21 -05:00
Sunil Mohan Adapa
fe182a0faa
wireguard: Cosmetic fixes by yapf and isort
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:19 -05:00
Sunil Mohan Adapa
6a2942a9c4
wireguard: Show large buttons in show client/server pages
- To be consistent with other such pages.

- Larger buttons are more accessible, since they are the only operations on the
  page.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:53:17 -05:00
James Valleroy
28bc880dc5
wireguard: Write pre-shared key to tempfile
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:53:07 -05:00
James Valleroy
aa66a9135c
wireguard: Add views for editing and deleting clients and servers
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:53:03 -05:00
James Valleroy
6b39aa8075
wireguard: Encode public keys for use in URLs
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:52:58 -05:00
James Valleroy
aed82eca1b
wireguard: Show this box's public key
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:52:54 -05:00
James Valleroy
966b179756
wireguard: Add server information view
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:52:50 -05:00
James Valleroy
36fdedb9a7
wireguard: List peers in client section
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:52:48 -05:00
James Valleroy
901f89f393
wireguard: Form to add server
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:52:46 -05:00
James Valleroy
5d287ce579
wireguard: Add client info view
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:52:44 -05:00
James Valleroy
415e1eb4ba
wireguard: Allow deleting a client
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:52:42 -05:00
James Valleroy
e00c28f36e
wireguard: Show list of added clients
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:52:40 -05:00
James Valleroy
aa02f4d710
wireguard: Implement adding client
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:52:38 -05:00
James Valleroy
6aa83e7118
wireguard: Add skeleton for new app
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Use the form from base template to show enable/disable properly]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:52:35 -05:00
Veiko Aasa
3a202af843
samba: Add unit and functional tests
- Add functional tests
- Add unit tests for samba views
- New dependency for running functional tests: smbclient
- Make port configurable for the smbclient

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-01-17 02:47:06 +05:30
Allan Nordhøy
aa69585cb6
samba: Fix spelling
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-01-16 18:23:05 +02:00
James Valleroy
693b109806
security: Add explanation of sandboxing
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-13 12:11:05 -08:00
James Valleroy
f6c7f77c0f
matrixsynapse: Allow upgrade to 1.8.*
- Use new configuration from package.
- Re-run the post-install to set our custom config.
- Re-apply setting for public registration if enabled.

Tested by manually downgrading matrix-synapse to 1.6.1-1 and then
running apt update.

Fixes #1754.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-13 11:55:04 -08:00
Veiko Aasa
ff27f1d21b
deluge: Manage starting/stoping deluged
- run deluged daemon with default configuration location
- deluge-web: autoconnect to the deluged daemon
- functional tests: assert deluge-web is connected to the deluged daemon

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-12 15:55:49 -05:00
James Valleroy
0460ecf89f
openvpn: Add diagnostic for ipv6 port
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-04 15:18:06 -05:00
Sunil Mohan Adapa
0a48175249
storage: Ignore errors resizing partition during initial setup
On Raspberry Pi 3B+ image, it was observed that resizing partition fails during
initial setup. Due to this, Apache, SSH and Plinth become unavailable. Since
resizing the partition is not a critical operation to perform to bring up
FreedomBox, it is safe it ignore the error. In these cases, the user will have
to the storage app and retry manually after bring prompted by low disk space
message.

Tests:

- Introduce deliberate error in expand partition operation. Modify code to
  always detect that partition can be expanded. Remove storage module from
  plinth_module table in plinth.sqlite3. Run plinth. Notice that storage setup
  is run but expanding partition fails. Even after expanding partition fails,
  storage module is fully setup. Plinth proceeds with starting web server and
  storage module is found in the plinth_module table of plinth.sqlite3.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-04 09:08:43 -05:00
Joseph Nuthalapati
cfe014a3f4
mediawiki: Allow admin to set default skin
Fixes #1731

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Refactor getting skins and form field for simplicity]
[sunil: Remove incorrect change to showing success form message]
[sunil: Minor simplification to editing the configuration]
[sunil: Read configuration value enclosed in single as well as double quote]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-03 16:31:28 -08:00
Joseph Nuthalapati
890d45bd64
mediawiki: Use a mobile-friendly skin by default
- Timeless is a mobile-friendly skin.
- This is a cheaper solution for FreedomBox as compared hosting a
  separate mobile website like the WikiMedia sites do

Fixes #1732

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Remove unneeded upgrade to app version number]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-03 16:31:25 -08:00
Sunil Mohan Adapa
9e166f799c
gitweb: Fix flake8 error that is causing pipeline failures
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-02 17:49:02 -08:00