mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-14 04:04:03 +00:00
- Add Argon2PasswordHasher with high security settings as primary hasher - Implement fallback to PBKDF2PasswordHasher for CentOS 7/Python 3.6 compatibility - Add argon2-cffi dependency to requirements.txt - Replace all print statements with proper logging calls across codebase - Implement comprehensive logging configuration with multiple handlers: * ivatar.log - General application logs (INFO level) * ivatar_debug.log - Detailed debug logs (DEBUG level) * security.log - Security events (WARNING level) - Add configurable LOGS_DIR setting with local config override support - Create config_local.py.example with logging configuration examples - Fix code quality issues (flake8, black formatting, import conflicts) - Maintain backward compatibility with existing password hashes Security improvements: - New passwords use Argon2 (memory-hard, ASIC-resistant) - Enhanced PBKDF2 iterations for fallback scenarios - Structured logging for security monitoring and debugging - Production-ready configuration with flexible log locations Tests: 85/113 passing (failures due to external DNS/API dependencies) Code quality: All pre-commit hooks passing
42 lines
1.2 KiB
Plaintext
42 lines
1.2 KiB
Plaintext
# -*- coding: utf-8 -*-
|
|
"""
|
|
Example local configuration file for ivatar
|
|
Copy this to config_local.py and customize for your environment
|
|
"""
|
|
|
|
import os
|
|
|
|
# Override logs directory for production deployments
|
|
# LOGS_DIR = "/var/log/ivatar"
|
|
|
|
# Override logs directory for development with custom location
|
|
# LOGS_DIR = os.path.join(os.path.expanduser("~"), "ivatar_logs")
|
|
|
|
# Example production overrides:
|
|
# DEBUG = False
|
|
# SECRET_KEY = "your-production-secret-key-here"
|
|
# ALLOWED_HOSTS = ["yourdomain.com", "www.yourdomain.com"]
|
|
|
|
# Database configuration (if not using environment variables)
|
|
# DATABASES = {
|
|
# 'default': {
|
|
# 'ENGINE': 'django.db.backends.postgresql',
|
|
# 'NAME': 'ivatar_prod',
|
|
# 'USER': 'ivatar_user',
|
|
# 'PASSWORD': 'your-db-password',
|
|
# 'HOST': 'localhost',
|
|
# 'PORT': '5432',
|
|
# }
|
|
# }
|
|
|
|
# Email configuration
|
|
# EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
|
# EMAIL_HOST = 'smtp.yourdomain.com'
|
|
# EMAIL_PORT = 587
|
|
# EMAIL_USE_TLS = True
|
|
# EMAIL_HOST_USER = 'noreply@yourdomain.com'
|
|
# EMAIL_HOST_PASSWORD = 'your-email-password'
|
|
|
|
# Example: Override logs directory for production
|
|
# LOGS_DIR = "/var/log/ivatar"
|