fortress-db 1.0.0

πŸ›‘οΈ Fortress - Turnkey Simplicity + Enterprise Security. A highly customizable, secure database system with multi-layer encryption.
Documentation

Fortress

Fortress - Enterprise Security Platform

A comprehensive security platform that provides enterprise-grade cryptography, key management, distributed caching, clustering, and compliance features with simplicity of modern APIs.

Current Status: v1.0.0 - PRODUCTION RELEASE

Official production release with enterprise-grade security

  • βœ“ All core security features implemented and tested
  • βœ“ Zero-downtime key rotation and clustering operational
  • βœ“ Compliance frameworks implemented (GDPR, HIPAA, PCI-DSS)
  • βœ“ GraphQL API with enterprise-grade security features
  • βœ“ Quantum-resistant cryptography available
  • Download v1.0.0 from GitHub Releases

Key Features

Feature Maturity Legend

  • [Stable] - Production-ready with comprehensive testing
  • [Alpha/Experimental] - Implemented but requires testing and validation
  • [In Development] - Partial implementation, APIs may change
  • [Planned] - Designed but not yet implemented

Security First

  • Automatic Encryption: All data encrypted before storage, decrypted after retrieval [Stable]
  • Multiple Algorithms: AEGIS-256, ChaCha20-Poly1305, AES-256-GCM, RSA, ECDSA [Stable]
  • Field-Level Encryption: Encrypt specific fields with different algorithms [Stable]
  • Key Management: Automatic key generation, rotation, and secure storage [Stable]
  • Zero-Downtime Rotation: Rotate encryption keys without service interruption [Stable]
  • HSM Integration: Hardware Security Module support [Stable]
  • Transit Engine: Non-invasive encryption as a service [Stable]

Enterprise Architecture

  • Multi-Tenant Support: Isolated data per tenant/organization [Stable]
  • Cluster Support: High availability with Raft consensus [Stable]
  • Audit Logging: Comprehensive security event logging [Stable]
  • Compliance Framework: GDPR, HIPAA, PCI-DSS compliance features [Alpha/Experimental]
  • HSM Integration: Hardware Security Module support [Stable]

High Performance

  • Optimized Algorithms: AEGIS-256 for maximum speed [Stable]
  • Caching Layer: Intelligent multi-tier caching with Redis/Memcached/Hybrid [Stable]
  • Connection Pooling: Efficient database and cache connections [Stable]
  • Compression: Built-in data compression with LZ4 [Stable]
  • Performance Monitoring: Real-time metrics and profiling [Stable]

Developer Friendly

  • REST API: Standard HTTP methods with JSON payloads [Stable]
  • Multiple SDKs: Python, JavaScript, Rust, Go, and more [Stable]
  • gRPC API: High-performance RPC interface [Stable]
  • WebSocket API: Real-time updates and streaming [Stable]
  • GraphQL API: Flexible query language with real-time subscriptions [Stable]
  • Plugin System: Extensible WASM-based functionality [Stable]

Modern Deployment

  • Docker Support: Container-ready with official images [Stable]
  • Kubernetes: Production-ready K8s manifests [In Development]
  • Helm Charts: Easy deployment and management [In Development]
  • Cloud Integration: AWS, Azure, Google Cloud support [Not Implemented]

Privacy-Preserving ML & Homomorphic Encryption

Current Status: Research Implementation - Not Production Ready

  • Homomorphic Encryption: Mathematical framework exists [Research Only]
  • Privacy-Preserving ML: Depends on real homomorphic encryption [Depends: HE Implementation]
  • ML Integration: Roadmap item blocked by missing crypto foundation [Planned]

Important Notice: The homomorphic encryption module contains research implementations only. The mathematical operations are not cryptographically secure and should never be used for real security purposes. For production use, either implement proper cryptographic schemes or remove the module entirely.

See crates/fortress-core/src/homomorphic_encryption.rs for detailed warnings and current implementation status.

Quick Start

Installation

Choose Your Installation Method

Method Best For Time to Start
Pre-built Binaries Quick start, production 2-5 minutes
Package Managers Development, CI/CD 1-3 minutes
Docker Containers, microservices 1-2 minutes
Source Build Development, customization 5-10 minutes

Pre-built Binaries (Recommended)

Download from GitHub Releases

# Download latest release for your platform
# Visit: https://github.com/fortress-security/fortress/releases

# Example for Linux AMD64
curl -L "https://github.com/fortress-security/fortress/releases/latest/download/fortress-linux-amd64-latest" -o fortress
chmod +x fortress
sudo mv fortress /usr/local/bin/

# Example for Windows
# Download fortress-windows-amd64-latest.exe from releases page

Package Managers

NPM (Node.js)

# Install CLI tool globally
npm install -g fortress-cli

# Install as dependency in your project
npm install fortress-cli fortress-db

PyPI (Python)

# Install from PyPI
pip install fortress-db

# With development dependencies
pip install fortress-db[dev]

Cargo (Rust)

# Install from crates.io
cargo install fortress-cli
cargo install fortress-server

# Or build from source
git clone https://github.com/fortress-security/fortress.git
cd fortress
cargo install --path crates/fortress-cli

Go

# Install CLI tool
go install github.com/fortress-security/fortress/fortress-go/cmd/fortress-cli@latest

Docker

# Pull official image
docker pull fortress-security/fortress:latest

# Run with default configuration
docker run -p 8080:8080 -p 9090:9090 fortress-security/fortress:latest

# Or with custom configuration
docker run -p 8080:8080 \
  -v /path/to/config:/etc/fortress \
  fortress-security/fortress:latest

Basic Usage

Choose Your Language

Language Quick Start Full Guide
Rust 5-minute Rust start Rust Ecosystem Guide
Python 5-minute Python start Python Ecosystem Guide
Node.js 5-minute Node.js start Node.js Ecosystem Guide
Go 5-minute Go start Go Ecosystem Guide
Docker 2-minute Docker start Installation Guide

Quick CLI Example

# Initialize Fortress
fortress init

# Start the server
fortress server start

# Create an encryption key
fortress key create --name my-key --algorithm aes256-gcm

# Encrypt data
echo "secret data" | fortress encrypt --key-id my-key > encrypted.dat

# Decrypt data
fortress decrypt --key-id my-key --input encrypted.dat

Quick API Example

Rust:

use fortress_core::prelude::*;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let fortress = Fortress::builder().build().await?;
    let db = fortress.create_database("myapp").await?;
    
    let user = db.insert("users", &serde_json::json!({
        "name": "Alice Johnson",
        "email": "alice@example.com",
        "ssn": "123-45-6789"  // Automatically encrypted
    })).await?;
    
    println!("User created: {}", user["name"]);
    Ok(())
}

Python:

from fortress import Fortress
import asyncio

async def main():
    fortress = Fortress("http://localhost:8080")
    db = await fortress.create_database("myapp")
    
    user = await db.insert("users", {
        "name": "Alice Johnson",
        "email": "alice@example.com",
        "ssn": "123-45-6789"  # Automatically encrypted
    })
    
    print(f"User created: {user['name']}")

asyncio.run(main())

Node.js:

const { Fortress } = require('fortress-db');

async function main() {
    const fortress = new Fortress({
        serverUrl: 'http://localhost:8080'
    });
    
    const db = await fortress.createDatabase('myapp');
    const user = await db.insert('users', {
        name: 'Alice Johnson',
        email: 'alice@example.com',
        ssn: '123-45-6789'  // Automatically encrypted
    });
    
    console.log(`User created: ${user.name}`);
}

main().catch(console.error);

Go:

package main

import (
    "context"
    "fmt"
    "log"
    
    "github.com/fortress-security/fortress/fortress-go"
)

func main() {
    client, err := fortress.NewClient(&fortress.Config{
        ServerURL: "http://localhost:8080",
    })
    if err != nil {
        log.Fatal(err)
    }

    ctx := context.Background()
    db, err := client.CreateDatabase(ctx, "myapp")
    if err != nil {
        log.Fatal(err)
    }

    user := map[string]interface{}{
        "name":  "Alice Johnson",
        "email": "alice@example.com",
        "ssn":   "123-45-6789", // Automatically encrypted
    }

    result, err := db.Insert(ctx, "users", user)
    if err != nil {
        log.Fatal(err)
    }
    fmt.Printf("User created: %v\n", result["name"])
}

Performance

Fortress is optimized for high-performance encryption operations:

Algorithm Encrypt (MB/s) Decrypt (MB/s) Security Level
AEGIS-256 910 1,898 Very High
ChaCha20-Poly1305 288 460 High
AES-256-GCM 358 345 High

Benchmarks

# Run encryption benchmarks
cargo bench --bench encryption

# Run performance tests
cargo test --release -- --ignored performance

# View detailed metrics
curl http://localhost:8080/metrics/performance

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Fortress Architecture                     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Client Layer                                               β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”‚
β”‚  β”‚   REST API  β”‚ β”‚  WebSocket  β”‚ β”‚   GraphQL   β”‚           β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Security Layer                                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”‚
β”‚  β”‚   Auth/Z    β”‚ β”‚ Rate Limit  β”‚ β”‚    Audit    β”‚           β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Encryption Layer                                           β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”‚
β”‚  β”‚ Field Level β”‚ β”‚ Key Manager β”‚ β”‚   Rotation  β”‚           β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Storage Layer                                              β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”‚
β”‚  β”‚   Memory    β”‚ β”‚    Disk     β”‚ β”‚    Cloud    β”‚           β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Documentation

Start Here

Getting Started

Security & Compliance

Operations

Configuration

Basic Configuration

Create a config.toml file:

[server]
host = "0.0.0.0"
port = 8080

[database]
default_algorithm = "aegis256"

[encryption]
key_rotation_interval = "24h"
auto_rotation = true

[logging]
level = "info"
format = "json"

Environment Variables

# Server configuration
export FORTRESS_HOST=0.0.0.0
export FORTRESS_PORT=8080

# Encryption configuration
export FORTRESS_ENCRYPTION_DEFAULT_ALGORITHM=aegis256
export FORTRESS_KEY_ROTATION_INTERVAL=24h

# Logging configuration
export FORTRESS_LOG_LEVEL=info

🐳 Docker & Kubernetes

Docker Compose

version: '3.8'
services:
  fortress:
    image: fortressdb/fortress:latest
    ports:
      - "8080:8080"
    volumes:
      - fortress_data:/var/lib/fortress
    environment:
      - FORTRESS_LOG_LEVEL=info
      - FORTRESS_ENCRYPTION_DEFAULT_ALGORITHM=aegis256

volumes:
  fortress_data:

Kubernetes

# Install using Helm
helm install my-fortress fortress/fortress \
  --namespace fortress \
  --create-namespace

# Or using kubectl
kubectl apply -f k8s/namespace.yaml
kubectl apply -f k8s/deployment.yaml
kubectl apply -f k8s/service.yaml

Cloud Integration

AWS Integration

# Enable AWS features
cargo run --features aws

# Configure S3 storage
fortress config set storage.backend s3
fortress config set storage.s3.bucket my-fortress-bucket
fortress config set storage.s3.region us-west-2

Azure Integration

# Enable Azure features
cargo run --features azure

# Configure Azure Blob storage
fortress config set storage.backend azure_blob
fortress config set storage.azure.container fortress-data

Development

Running Tests

# Run all tests
cargo test

# Run integration tests
cargo test --test integration

# Run benchmarks
cargo bench

# Run with specific features
cargo test --features "aws,azure"

Development Setup

# Clone the repository
git clone https://github.com/Genius740Code/Fortress.git
cd Fortress

# Build the project
cargo build --release

# Run tests
cargo test

# Install CLI tool
cargo install --path crates/fortress-cli

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Examples

Basic Rust Usage

use fortress_core::prelude::*;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Initialize encryption
    let algorithm = Aegis256::new();
    let key_manager = KeyManager::new();
    let key = key_manager.generate_key(&algorithm)?;
    
    // Encrypt data
    let plaintext = b"Hello, Fortress!";
    let ciphertext = algorithm.encrypt(plaintext, &key)?;
    
    // Decrypt data
    let decrypted = algorithm.decrypt(&ciphertext, &key)?;
    
    assert_eq!(plaintext, decrypted);
    println!("Encryption successful!");
    
    Ok(())
}

Field-Level Encryption

use fortress_core::prelude::*;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let manager = FieldEncryptionManager::new(config).await?;
    
    // Encrypt sensitive fields
    let user = UserProfile {
        name: "Alice Johnson".to_string(),
        email: "alice@example.com".to_string(),
        ssn: "123-45-6789".to_string(), // Will be encrypted
    };
    
    let encrypted_user = manager.encrypt_fields(&user).await?;
    println!("πŸ”’ SSN encrypted: {}", encrypted_user.ssn);
    
    Ok(())
}

WebSocket Client

const ws = new WebSocket('ws://localhost:8080/ws');

// Authenticate
ws.send(JSON.stringify({
    type: 'auth',
    token: 'your-jwt-token'
}));

// Subscribe to events
ws.send(JSON.stringify({
    type: 'subscribe',
    events: ['data_change', 'key_rotation']
}));

// Handle events
ws.onmessage = (event) => {
    const message = JSON.parse(event.data);
    console.log('Event:', message);
};

🀝 Community

πŸ“„ License

This project is licensed under the Server Side Public License (SSPL) - see the LICENSE file for details.

πŸ™ Acknowledgments

  • HashiCorp Vault - Inspiration for security-first design
  • AEGIS - High-performance encryption algorithm
  • Raft - Consensus algorithm for clustering
  • Rust Community - Excellent ecosystem and tools

πŸ—ΊοΈ Roadmap

Version 1.1.0 (Q2 2026)

  • GraphQL API completion
  • Advanced plugin marketplace
  • Machine learning integration [Depends: Real homomorphic encryption implementation]
  • Mobile SDKs (iOS/Android)

Version 1.2.0 (Q3 2026)

  • Distributed SQL queries
  • Advanced analytics engine
  • WebAssembly plugin support
  • Edge computing support

Version 2.0.0 (Q4 2026)

  • Production-ready stability
  • Full compliance certification
  • Enterprise features
  • Managed cloud service

Metrics

  • CI Status: CI
  • GitHub Stars: GitHub stars
  • GitHub Forks: GitHub forks
  • GitHub Issues: GitHub issues
  • License: License: SSPL-1.0

Fortress - Where security meets simplicity.