Skip to content

palakgoda/CodeAlpha_CloudGate

Repository files navigation

🛡️ CloudGate: Quantum Security Mesh

CloudGate is a high-performance, cloud-native secure gateway designed to protect sensitive infrastructure credentials. Built with a "Security-First" philosophy, it implements a multi-layer defense protocol to neutralize injection attacks and ensure cryptographic integrity for stored capabilities.

CloudGate Banner

🌌 Overview

In modern cloud environments, credential leakage is a critical failure point. CloudGate acts as a hardened intermediary, transforming raw sensitive data into encrypted, authenticated "Capability Codes" before storage.

Leveraging FastAPI for low-latency orchestration and React for a premium administrative interface, CloudGate provides real-time visibility into your security posture.


🔒 Security Architecture: The Double-Layer Protocol

CloudGate employs a specialized two-stage defense mechanism for every transaction:

🛡️ Layer 1: Injection Interceptor (L1)

Before any data reaches the processing engine, it is scanned by the L1 Interceptor. This layer uses high-performance regex analysis to detect and block common attack vectors:

  • SQL Injection (SQLi): Union-based selection, OR-logic bypasses, and drop-table commands.
  • Command Injection: Intercepts terminal-specific characters and dangerous sequences.
  • Response: Immediate 403 Forbidden blockade with automated threat logging.

🔐 Layer 2: Cryptographic GCM (L2)

Data that clears the L1 shield is immediately processed by the L2 Encryption Engine:

  • Algorithm: AES-256 in Galois/Counter Mode (GCM).
  • Key Derivation: Uses PBKDF2 with a unique 16-byte salt for every payload.
  • Integrity: GCM provides both confidentiality and Authenticity Tags, ensuring data cannot be tampered with while at rest.

🏗️ Technology Stack

Component Technology
Backend Python 3.11 / FastAPI
Frontend React 19 / Vite / Tailwind CSS
Database Google Cloud Firestore (NoSQL)
Encryption PyCryptodome (AES-256-GCM)
Deployment Google Cloud Run / Docker
UI/UX Framer Motion (Micro-animations) / Lucide Icons

🚦 Getting Started

Prerequisites

  • Python 3.11+
  • Node.js 20+
  • Google Cloud Project with Firestore enabled

Local Development

  1. Clone & Install Dependencies:

    # Install Python backend requirements
    pip install -r requirements.txt
    
    # Install Frontend dependencies
    npm install
  2. Environment Configuration: Create a .env file in the root directory:

    SECRET_KEY="your-32-character-secret-key-here"
    FIREBASE_SERVICE_ACCOUNT="serviceAccountKey.json"
  3. Launch Services:

    # Start Backend (FastAPI)
    uvicorn app.main:app --port 8080
    
    # Start Frontend (Vite) - In a new terminal
    npm run dev

☁️ Cloud Deployment

The project is pre-configured for Google Cloud Run.

  1. Build Frontend:

    npm run build
  2. Deploy to Cloud Run:

    gcloud run deploy cloudgate --source . --region us-central1 --allow-unauthenticated

🎥 Demonstration

Project Walkthrough

Visualizing the real-time audit feed and the L1 Interceptor in action.


📂 Project Structure

├── app/
│   ├── core/           # Encryption & Security Logic
│   ├── db/             # Firestore Connection Management
│   ├── routes/         # API Endpoints (Auth, Security)
│   └── main.py         # FastAPI Entry Point
├── frontend/
│   └── src/            # React Application Source
├── dist/               # Production Build (Served by FastAPI)
├── Dockerfile          # Container Configuration
└── requirements.txt    # Python Dependencies

⚖️ License

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

Developed with ❤️ for CodeAlpha

About

A secure, cloud-native gateway implementing a double-layer security protocol (Regex SQLi Interceptor & AES-256-GCM Encryption) to protect sensitive capability codes and prevent data leaks, fully integrated with Google Cloud Firestore.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors