Files
deltaglider/pyproject.toml
Simone Scarduzio 626e28eaf6 feat: Add cache encryption and memory backend support
Implements cache encryption and configurable memory backend as part of
DeltaGlider v5.0.3 security enhancements.

Features:
- EncryptedCache wrapper using Fernet (AES-128-CBC + HMAC)
- Ephemeral encryption keys per process for forward secrecy
- Optional persistent keys via DG_CACHE_ENCRYPTION_KEY env var
- MemoryCache adapter with LRU eviction and configurable size limits
- Configurable cache backend via DG_CACHE_BACKEND (filesystem/memory)
- Encryption enabled by default with opt-out via DG_CACHE_ENCRYPTION=false

Security:
- Data encrypted at rest with authenticated encryption (HMAC)
- Ephemeral keys provide forward secrecy and process isolation
- SHA256 plaintext mapping maintains CAS compatibility
- Zero-knowledge architecture: encryption keys never leave process

Performance:
- Memory cache: zero I/O, perfect for CI/CD pipelines
- LRU eviction prevents memory exhaustion
- ~10-15% encryption overhead, configurable via env vars

Testing:
- Comprehensive encryption test suite (13 tests)
- Memory cache test suite (10 tests)
- All 119 tests passing with encryption enabled

Documentation:
- Updated CLAUDE.md with encryption and cache backend details
- Environment variables documented
- Security notes and performance considerations

Dependencies:
- Added cryptography>=42.0.0 for Fernet encryption

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-10 09:38:48 +02:00

162 lines
3.7 KiB
TOML

[build-system]
requires = ["setuptools>=61.0", "setuptools-scm>=8.0"]
build-backend = "setuptools.build_meta"
[project]
name = "deltaglider"
dynamic = ["version"]
description = "Store 4TB in 5GB: S3-compatible storage with 99.9% compression for versioned files"
authors = [
{name = "Beshu Tech", email = "info@beshu.tech"},
]
maintainers = [
{name = "Beshu Tech Team", email = "info@beshu.tech"},
]
readme = "README.md"
license = "MIT"
requires-python = ">=3.11"
keywords = [
"s3",
"compression",
"delta",
"storage",
"backup",
"deduplication",
"xdelta3",
"binary-diff",
"artifact-storage",
"version-control",
"minio",
"aws",
"cost-optimization",
"devops",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Archiving :: Backup",
"Topic :: System :: Archiving :: Compression",
"Topic :: System :: Filesystems",
"Topic :: Internet",
"Environment :: Console",
]
dependencies = [
"boto3>=1.35.0",
"click>=8.1.0",
"cryptography>=42.0.0",
"python-dateutil>=2.9.0",
]
[project.urls]
Homepage = "https://github.com/beshu-tech/deltaglider"
Documentation = "https://github.com/beshu-tech/deltaglider#readme"
Repository = "https://github.com/beshu-tech/deltaglider"
Issues = "https://github.com/beshu-tech/deltaglider/issues"
Changelog = "https://github.com/beshu-tech/deltaglider/releases"
"Case Study" = "https://github.com/beshu-tech/deltaglider/blob/main/docs/case-study-readonlyrest.md"
[project.optional-dependencies]
dev = [
"pytest>=8.0.0",
"pytest-mock>=3.14.0",
"pytest-asyncio>=0.24.0",
"moto[s3]>=5.0.0",
"ruff>=0.8.0",
"mypy>=1.13.0",
"boto3-stubs[s3]>=1.35.0",
"types-python-dateutil>=2.9.0",
]
[project.scripts]
deltaglider = "deltaglider.app.cli.main:main"
[tool.hatch.build.targets.sdist]
include = [
"/src",
"/tests",
"/docs",
"README.md",
"LICENSE",
"CONTRIBUTING.md",
"pyproject.toml",
]
exclude = [
"*.pyc",
"__pycache__",
".git",
".pytest_cache",
"*.delta",
"reference.bin",
"1.66.1/",
]
[tool.uv]
dev-dependencies = [
"pytest>=8.0.0",
"pytest-mock>=3.14.0",
"pytest-asyncio>=0.24.0",
"moto[s3]>=5.0.0",
"ruff>=0.8.0",
"mypy>=1.13.0",
"boto3-stubs[s3]>=1.35.0",
"types-python-dateutil>=2.9.0",
"setuptools-scm>=8.0.0",
]
[tool.setuptools_scm]
# Automatically determine version from git tags
write_to = "src/deltaglider/_version.py"
local_scheme = "no-local-version"
[tool.ruff]
target-version = "py311"
line-length = 100
extend-exclude = ["src/deltaglider/_version.py"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"UP", # pyupgrade
]
ignore = ["E501"] # line too long
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_any_unimported = false
no_implicit_optional = true
check_untyped_defs = true
namespace_packages = false
mypy_path = "src"
exclude = [
"^build/",
"^dist/",
]
[tool.pytest.ini_options]
minversion = "8.0"
testpaths = ["tests"]
markers = [
"e2e: end-to-end tests requiring LocalStack",
"integration: integration tests",
"unit: unit tests",
]