Skip to content

Secure File Storage

CI Build and Push to GitHub Container Registry Build and Push to Docker Hub CodeQL Advanced Upload Python Package Build and Deploy Docs

Secure File Storage is a secure, encrypted file storage solution developed in Python. It combines strong encryption, modular architecture, logging and basic access control.

Table of Contents

Features

  • AES-256 encryption for secure file storage
  • User authentication with hashed passwords and session management
  • Encrypted file metadata stored securely in SQLite
  • Audit logging capturing file access and user actions
  • Containerized deployment using Docker and Docker Compose
  • Continuous Integration and Deployment pipeline with linting and tests (GitHub Actions)

Security Principles

  • Confidentiality: AES-256 encryption ensures stored files remain confidential
  • Integrity: File hashing verifies integrity of uploaded files
  • Accountability: Access logs provide traceability of user actions
  • Compliance: Architecture inspired by ISO27001 and GDPR principles to promote security-by-design and privacy awareness

DevOps

  • Docker for consistent environment and easy deployment
  • Unit tests with Pytest
  • CI/CD pipeline configured with GitHub Actions for automated testing and code quality checks

Usage

Access web interface at http://localhost:5000.

Pip package

pip install secure-file-storage-milosz275
secure-file-storage

Docker

From Docker hub container registry:

docker pull mlsh/secure-file-storage:latest
docker run -d -p 5000:5000 mlsh/secure-file-storage:latest

From GitHub container registry:

docker pull ghcr.io/milosz275/secure-file-storage:latest
docker run -d -p 5000:5000 ghcr.io/milosz275/secure-file-storage:latest

Manually on cloned repository:

export COMPOSE_BAKE=true
docker-compose build
docker-compose up

Manual setup

git clone https://github.com/milosz275/secure-file-storage.git
cd secure-file-storage
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
pip install --upgrade pip
python3 secure_file_storage/src/setup_env.py
gunicorn --log-level warning -w 4 -b 0.0.0.0:5000 --timeout 120 secure_file_storage.main:app

Constraints

The repository does not address a need to create separate databases for dev, prod and other purposes. It should be addressed in next project iterations.

License

This project is licensed under the MIT License - see the LICENSE file for details.