If using a single computer for testing the client and server portions of this tutorial on COMBINED, modify /etc/hosts or C:\Windows\System32\drivers\etc\hosts file (depending on whether using Linux/OS-X or Windows) to include fido2tutorial.strongkey.com as an alias for localhost (the entry with 127.0.0.1).
If planning to test the tutorial web application with a browser from a different client computer (APPCLIENT) while running the server component of the tutorial web application on APPSERVER, then identify the IP address of the APPSERVER and add the fido2tutorial.strongkey.com alias to APPSERVER’s IP address within the hosts file on the APPCLIENT:
CentOS/Ubuntu/Mac
sudo vi /etc/hosts
Windows
NOTE: If there is a firewall on the APPSERVER/COMBINED, add a rule to open port 3001 so network connections can reach the web application.
CentOS (If using Ubuntu, use apt instead of yum).
sudo yum install firewalld
sudo firewall-cmd --zone=public --add-port=3001/tcp --permanent
sudo firewall-cmd --complete-reload
Deploy the project.
Download the prefido2 source code. If using Ubuntu use apt instead of yum.
sudo yum install wget
wget https://sourceforge.net/projects/strongkeyfido/files/v4.14.0/tutorial/prefido2.tgz
If using Windows, download to the following file:
https://sourceforge.net/projects/strongkeyfido/files/v4.14.0/tutorial/prefido2.tgz
Unzip the StrongKey FIDO2 Tutorial:
tar zxvf prefido2.tgz
Change directory into prefido2:
cd prefido2/
Install the required node modules.
sudo npm install
Install pm2. This is the process manager used to run the application:
sudo npm install pm2@latest -g
sudo npm install -g node-gyp
sudo npm install sqlite3
Start the project.
sudo pm2 start main.js
[OPTIONAL] Take a snapshot of the currently running Node applications; this allows pm2 to restart the application automatically upon restart of pm2. Ignore this step on Windows/Mac OS.
sudo pm2 startup systemd
Take a snapshot of the currently running Node applications which allows pm2 to restart the application automatically upon restart of pm2.
sudo pm2 save
Browse to https://fido2tutorial.strongkey.com:3001. When prompted, add an exception for a self-signed certificate. Messages will vary by browser.
NOTE: The default certificate is a 1-year certificate.
The home page displays. Register a new user by clicking Sign Up. Enter the required registration information and click Sign Up.
Login using the credentials just registered. The sample application Quote Boat displays.
Feel free to explore, then Logout.
Continue to FIDO-enabling PREFIDO.