aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpacien2023-04-01 19:43:47 +0200
committerpacien2023-07-30 03:53:20 +0200
commit8f046f245fadd8dc7efdbd6c29adf07ca327836a (patch)
tree3ba83bec11acdc5228961185c4d7b680d95bd965
parent9df9f570be540acf1528b9fad1fc308b990eedb9 (diff)
downloadtincapp-8f046f245fadd8dc7efdbd6c29adf07ca327836a.tar.gz
app: do no prevent encrypted or local backups
Backup was disabled altogether to avoid leaking the private keys in clear. This relaxes this restriction only for client-side encrypted online backups or local device-to-device transfers.
-rw-r--r--app/src/main/AndroidManifest.xml7
-rw-r--r--app/src/main/res/xml/backup_rules.xml39
-rw-r--r--app/src/main/res/xml/data_extraction_rules.xml41
3 files changed, 85 insertions, 2 deletions
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 4afbf32..f3b35b6 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -31,12 +31,15 @@
31 31
32 <application 32 <application
33 android:name="org.pacien.tincapp.context.App" 33 android:name="org.pacien.tincapp.context.App"
34 android:allowBackup="false" 34 android:allowBackup="true"
35 android:dataExtractionRules="@xml/data_extraction_rules"
36 android:fullBackupContent="@xml/backup_rules"
35 android:icon="@mipmap/ic_launcher" 37 android:icon="@mipmap/ic_launcher"
36 android:label="@string/app_name" 38 android:label="@string/app_name"
37 android:supportsRtl="true" 39 android:supportsRtl="true"
38 android:theme="@style/AppTheme" 40 android:theme="@style/AppTheme"
39 tools:ignore="GoogleAppIndexingWarning"> 41 tools:ignore="GoogleAppIndexingWarning"
42 tools:targetApi="s">
40 43
41 <uses-library 44 <uses-library
42 android:name="org.apache.http.legacy" 45 android:name="org.apache.http.legacy"
diff --git a/app/src/main/res/xml/backup_rules.xml b/app/src/main/res/xml/backup_rules.xml
new file mode 100644
index 0000000..6217761
--- /dev/null
+++ b/app/src/main/res/xml/backup_rules.xml
@@ -0,0 +1,39 @@
1<?xml version="1.0" encoding="utf-8"?>
2
3<!--
4 * Tinc App, an Android binding and user interface for the tinc mesh VPN daemon
5 * Copyright (C) 2017-2023 Pacien TRAN-GIRARD
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19-->
20
21<full-backup-content>
22 <include
23 domain="file"
24 path="./"
25 requireFlags="clientSideEncryption" />
26 <include
27 domain="file"
28 path="./"
29 requireFlags="deviceToDeviceTransfer" />
30
31 <include
32 domain="external"
33 path="./"
34 requireFlags="clientSideEncryption" />
35 <include
36 domain="external"
37 path="./"
38 requireFlags="deviceToDeviceTransfer" />
39</full-backup-content> \ No newline at end of file
diff --git a/app/src/main/res/xml/data_extraction_rules.xml b/app/src/main/res/xml/data_extraction_rules.xml
new file mode 100644
index 0000000..40e5341
--- /dev/null
+++ b/app/src/main/res/xml/data_extraction_rules.xml
@@ -0,0 +1,41 @@
1<?xml version="1.0" encoding="utf-8"?>
2
3<!--
4 * Tinc App, an Android binding and user interface for the tinc mesh VPN daemon
5 * Copyright (C) 2017-2023 Pacien TRAN-GIRARD
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19-->
20
21<data-extraction-rules>
22
23 <cloud-backup disableIfNoEncryptionCapabilities="true">
24 <include
25 domain="file"
26 path="./" />
27 <include
28 domain="external"
29 path="./" />
30 </cloud-backup>
31
32 <device-transfer>
33 <include
34 domain="file"
35 path="./" />
36 <include
37 domain="external"
38 path="./" />
39 </device-transfer>
40
41</data-extraction-rules> \ No newline at end of file