#!/usr/bin/env python3
import secrets
import string

def generate_password(length=16):
    """Generate a secure random password"""
    alphabet = string.ascii_letters + string.digits + "!@#$%^&*"
    return ''.join(secrets.choice(alphabet) for _ in range(length))

def generate_jwt_secret(length=64):
    """Generate a secure JWT secret"""
    return secrets.token_urlsafe(length)

print("=== Generated Secure Secrets for Production ===")
print()
print("# PostgreSQL Database")
print(f"POSTGRES_PASSWORD={generate_password(20)}")
print()
print("# Admin Panel Users (save these securely!)")
print(f"ADMIN1_PASSWORD={generate_password(16)}")
print(f"ADMIN2_PASSWORD={generate_password(16)}")
print()
print("# JWT Secret")
print(f"JWT_SECRET={generate_jwt_secret()}")
print()
print("# Grafana")
print(f"GRAFANA_PASSWORD={generate_password(16)}")
print()
print("# For v2_lizenzserver/.env")
print(f"SECRET_KEY={secrets.token_hex(32)}")
print()
print("=== IMPORTANT ===")
print("1. Save these passwords securely")
print("2. Update both .env files with these values")
print("3. Never commit these to git")