Dashboard SDK Basic Authentication
Guide for setting up basic authentication for a FaceTec Server Dashboard deployment.
Overview
Basic Authentication is a mechanism where a server requests authorization, such as a username and password, from a client. It can be used to add a layer of security to your Dashboard deployment. The purpose of this guide is to provide a simple example of how to set up your deployment to require a username and password from a user attempting to load your deployed Dashboard. There are numerous ways to set up Basic Authentication, and the services and settings used in this guide exist completely outside of the Dashboard package.
Important Note: Please ensure that all deployed Dashboard SDKs are not open to the public internet, utilize Basic Authentication, and have SSL configured.
Example of Basic Authentication:

Prerequisites
Adding Basic Authentication For Dashboard SDK
Please Note: For this guide, we are running FaceTec Server Dashboard on an Ubuntu Linux machine deployed on AWS. Some commands may vary depending on your deployment.
- Install the tools required to create a username and password file.
- Run command
sudo apt install apache2-utils.
- Run command
- Create the password file and add the first user.
- Run command
sudo htpasswd -c /etc/apache2/.htpasswd user1.- You will be prompted to add a password when adding users.
- Add additional users by running the command without the "-c" option.
- You may need to create this file if it does not exist.
- Run command
sudo mkdir /etc/apache2/. - Run command
sudo touch /etc/apache2/.htpasswd.
- Run command
- Run command
- Install and configure NGINX.
- Install NGINX.
- Run command
sudo apt install nginx.
- Run command
- Configure NGINX by adding these lines to your
/etc/nginx/nginx.conf:server { listen 80; location / { auth_basic "Administrator’s Area"; auth_basic_user_file /etc/apache2/.htpasswd; proxy_pass http://127.0.0.1:3002; } }- Listen on port 80 for any HTTP requests to your server.
- Set
auth_basicto your previously configured authentication files. - Proxy to your Dashboard SDK instance running on port 3002.
- Start NGINX.
- Run command
sudo systemctl start nginx.
- Run command
- Install NGINX.
- Configure your instance to close port 3002 by default and to open port 80 for all IP addresses that are approved to access your Dashboard. Then, ensure all Incoming Traffic is authenticated before being proxied to your Dashboard.
- In your AWS network interface security rules, set Inbound rules to allow Incoming Traffic on port 80 for all IP addresses that should have access.
- Verify that port 3002 is not in the list of approved Inbound Rules for any IP addresses.