Skip to content

Commit 94549fd

Browse files
authored
Merge pull request #3 from mpmfrans/add-email-verification
Add email verification
2 parents a904de8 + 7e33f16 commit 94549fd

21 files changed

+906
-57
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
dist/
22
data/
3-
3+
irma/
44
target/

README.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,65 @@
55
Cryptify offers file encryption/decryption based on IRMA attributes. It allows you to encrypt any file
66
with an attribute and only people with that attribute can view the contents.
77

8+
## Docker development setup
9+
10+
This section indicates how you can set-up the development environment to test sender verification, for this two Linux terminals are needed.
11+
The first terminal is to start the docker daemon and the second terminal is to start the cryptify containers that run on the daemon.
12+
To access cryptify on localhost (or 127.0.0.1) and the mail server on 127.0.0.1:1080 enter the following commands:
13+
14+
Terminal 1:
15+
```
16+
sudo apt update
17+
sudo apt-get install docker.io
18+
sudo apt-get install docker-compose
19+
sudo dockerd
20+
```
21+
22+
Terminal 2:
23+
```
24+
sudo apt-get install nodejs
25+
sudo apt-get install npm
26+
sudo git clone https://github.com/mpmfrans/cryptify.git
27+
cd cryptify
28+
git checkout add-email-verification
29+
30+
sudo mkdir irma
31+
cd irma
32+
sudo wget https://github.com/privacybydesign/irmago/releases/download/v0.9.0/irma-master-linux-amd64
33+
sudo chmod +x irma-master-linux-amd64
34+
cd ..
35+
cd cryptify-front-end
36+
sudo npm install
37+
cd ..
38+
sudo docker-compose -f docker-compose.dev.yml up
39+
```
40+
41+
To test sender verification, you'll need an Android device with the IRMA mobile application (https://play.google.com/store/apps/details?id=org.irmacard.cardemu) installed.
42+
Connect your device to your computer via USB and enable USB debugging (https://developer.android.com/studio/debug/dev-options).
43+
Also, install the Android Debug Bridge (https://developer.android.com/studio/releases/platform-tools).
44+
45+
Enable developer mode on the IRMA mobile application by navigating to 'About IRMA' from the hamburger menu and tapping the version number until 'developer mode enabled'
46+
appears at the bottom of the screen. This allows unsecure connections to an IRMA server so only use this for testing purposes.
47+
48+
Finally, to enable the IRMA mobile application to find the server running on localhost check the presence of your android device(s) by running adb devices.
49+
To be able to use Android Debug Bridge, unzip the platform-tools_r32.0.0-windows.zip, the files are in the platform-tools folder. Open Windows Powershell within
50+
this folder. To check the presence of android device(s):
51+
52+
```
53+
./adb devices
54+
```
55+
56+
This should show your device as attached. If not, make sure USB debugging is enabled, and try unplugging and plugging the device.
57+
To forward localhost traffic:
58+
59+
```
60+
./adb reverse tcp:8088 tcp:8088
61+
```
62+
63+
This should simply output 8088 to indicate success. If the IRMA mobile application gives error messages saying you need an internet
64+
connection, run this command again. It can be unpredictable so don't be surprised if you need to run it more often. Now, you are able to scan the
65+
QR-code with your android device and IRMA.
66+
867
## Installation (short version)
968

1069
Build the files using:

conf/config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ smtp_url = "mailhog"
77
smtp_port = 1025
88
# smtp_username = ""
99
# smtp_password = ""
10+
irma_server = "http://irmaserver:8088/"

conf/nginx.dev.conf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,18 @@ http {
3434
proxy_pass http://backend:8000;
3535
}
3636

37+
location /verification/start {
38+
proxy_pass http://backend:8000;
39+
}
40+
41+
location /verification/result {
42+
proxy_pass http://backend:8000;
43+
}
44+
45+
location /verification {
46+
proxy_pass http://backend:8000;
47+
}
48+
3749
location /filedownload {
3850
proxy_pass http://backend:8000;
3951
}

0 commit comments

Comments
 (0)