Skip to content

nishithat-28/Security_Framework_MFA_RBAC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SecureOps

A Sustainable Security Framework for Modern Applications using Multi-Factor Authentication and Access Management

🚀 Overview

SecureOps is a comprehensive face recognition authentication platform that implements multi-factor authentication (MFA) with biometric verification. The system provides secure user registration, login, and access management using facial recognition technology combined with traditional OTP-based verification.

Key Features

  • Multi-Factor Authentication (MFA): Combines facial biometrics with OTP verification
  • Facial Detection & Verification: Real-time facial detection and verification using advanced computer vision
  • User Management: Complete user lifecycle management with role-based access
  • Admin Dashboard: Administrative interface for system monitoring and user management
  • Secure Token Management: JWT-based authentication with secure session handling
  • Firebase Integration: Cloud database integration for scalable data storage
  • Real-time Notifications: Live feedback and status updates during authentication
  • Responsive Design: Modern, mobile-friendly web interface

🛠 Technology Stack

Backend

  • Python Flask: RESTful API server
  • Firebase Admin SDK: Cloud database and authentication
  • JWT (JSON Web Tokens): Secure token-based authentication
  • PyOTP: Time-based OTP generation and verification
  • Face Recognition Models: PyTorch-based facial recognition
  • OpenCV: Computer vision processing
  • bcrypt: Password hashing

Frontend

  • HTML5/CSS3: Modern responsive design
  • JavaScript (ES6+): Client-side logic and API integration

👤 Face Detection and Verification Framework

  • Face Detection: Uses MTCNN to detect and align faces in images
  • Face Embeddings: Generates 512-dimensional face embeddings using FaceNet
  • Similarity Matching: Compares face embeddings using cosine similarity
  • Verification: Authenticates users by comparing live face captures with stored reference embeddings

📋 Prerequisites

  • Python 3.11+: Backend runtime environment
  • Node.js: For potential frontend tooling (optional)
  • Firebase Project: Google Cloud Firebase project with Firestore enabled
  • Web Browser: Modern browser with WebRTC support for camera access
  • Camera: Webcam or camera device for facial recognition

🔧 Installation & Setup

1. Clone the Repository

git clone <repository-url>
cd application

2. Backend Setup

Create Virtual Environment

python -m venv venv
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate

Install Python Dependencies

pip install -r requirements.txt

Firebase Configuration

  1. Create a Firebase project at Firebase Console
  2. Enable Firestore Database
  3. Generate a service account key JSON file
  4. Place the JSON file at backend/firebase/firebase_key.json
  5. Or set the FIREBASE_CREDENTIALS environment variable to the JSON file path

Environment Variables

Create a .env file in the root directory:

FIREBASE_CREDENTIALS=backend/firebase/firebase_key.json

3. Frontend Setup

No additional setup required. The frontend is static HTML/CSS/JS that runs in the browser.

🚀 Running the Application

Start the Backend Server

cd backend
python app.py

The server will start on http://127.0.0.1:5000

Access the Frontend

Open your web browser and navigate to:

  • Landing Page: http://127.0.0.1:5000 (served by Flask)
  • Or use a local server like Live Server extension in VS Code for development

Create Admin User (First Time Setup)

python backend/scripts/create_admin_user.py

⚙️ Configuration

Environment Variables

Store sensitive deployment values in a .env file:

  • Firebase service account values (FIREBASE_* settings)
  • App secret values (OTP_EXPIRY_SECONDS)
  • SMTP settings for OTP delivery (SMTP_USER, SMTP_PASS, SMTP_HOST, SMTP_PORT, EMAIL_FROM)
  • Optional dev helper (SHOW_OTP_IN_DEV)

Firebase Configuration

  • FIREBASE_CREDENTIALS: Path to Firebase service account JSON file

Email Configuration

Configure email settings in backend/utils/email_helper.py for OTP delivery and set SMTP vars in your .env file:

🔐 Security Features

  • Password Hashing: bcrypt-based password security
  • JWT Tokens: Secure stateless authentication
  • OTP Verification: Time-based one-time passwords
  • Face Recognition: Biometric authentication with liveness detection
  • Session Management: Secure session handling with expiration
  • CORS Protection: Cross-origin resource sharing controls
  • Input Validation: Comprehensive input sanitization

SecureOps - Building the future of secure authentication with biometrics and multi-factor verification.

About

A Sustainable Security Framework for Modern Applications using Multi-Factor Authentication and Access Management

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors