Skip to content

Protection of Web applications with behavioral biometrics – data collection module

License

Notifications You must be signed in to change notification settings

Mouse-BB-Team/Data-Collection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

release-date code-size tag Website Contributors Last-commit Languages MIT License


Logo

Mouse Behavioral Biometrics

Protection of Web applications with behavioral biometrics.
Data collection module
Visit Site · Report Bug

Table of Contents

About The Project

This project was created in the manner of preparing the bachelor's degree thesis on AGH University of Science and Technology, Department of Computer Science, Electronics and Telecommunications. The main idea is to collect data from user mouse, such as clicks, movement, etc.. The data will be used to feed a Machine Learning model to distinguish Web bots and humans on real commercial websites.

Built With

API:

  • Spring – main framework used for API
  • Maven – dependency Management
  • PostgreSQL – database
  • Docker – used to provide an easy way to deploy
  • JWT Token – used to authenticate users
  • OAuth2 – custom authorization server
  • Mockito –mocking framework for unit tests
  • JUnit - framework for unit tests

JS-Proxy:

  • Node – JavaScript runtime
  • Npm – package manager
  • Express – main framework used for proxy
  • Docker – used to provide an easy way to deploy
  • JWT Token – used to validate users
  • Redis –database to cache user token for efficiency
  • Jest - mocking/unit testing framework

Deployment:

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

Things you need to install before running:

Java 8
Maven
Docker

Installation

  1. Clone the repo and change the directory:
git clone https://github.com/Mouse-BB-Team/Data-Collection.git
cd Data-Collection/

API:

  1. Change directory to api/ and build a java package:
cd api/
mvn clean compile package spring-boot:repackage
  1. Use docker-compose file to deploy api locally:
docker-compose -f docker-compose.yaml up

NOTE: you MUST configure your own env variables in docker-compose.yaml

JS-Proxy:

  1. Change directory to js-proxy/
  2. Run docker-compose file to deploy js-proxy:
docker-compose -f docker-compose.yaml up

NOTE: you MUST configure your own env variables in docker-compose.yaml to match previously set variables in API

Google Cloud Platform deployment:

If you want to deploy the app to GCP, use the yaml configuration files from k8s/ directory. Some additional settings are provided in the appendix at the end of document.

Usage

From now on you should be able to run the application in your Web browser on localhost:PORT (PORT env configured in docker files). You can signup/login into the site and the data will be collected in the background to the database.

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Mail - mouse.bb.team@gmail.com

Project Link: https://github.com/Mouse-BB-Team

Acknowledgements

Our thesis supervisor:

Authors

Appendix

Authorization sequence diagram:

JWT-obtaining-sequence

Kubernetes settings:

1. dc-api secret with env variables
DEFAULT_ADMIN_USERNAME: admin
DEFAULT_ADMIN_PASSWORD: admin
OAUTH2_CLIENTID: client_id
OAUTH2_CLIENTSECRET: password
OAUTH2_RSAPUBLICKEY: ssh-rsa_format
OAUTH2_RSAPRIVATEKEY: ssh-rsa_format
2. postgres secret with env variables
SPRING_DATASOURCE_URL: jdbc:postgresql://url/database
SPRING_DATASOURCE_USERNAME: admin
SPRING_DATASOURCE_PASSWORD: admin
3. static external IP address named web-static-ip:
gcloud compute addresses create web-static-ip --global