chore: full stack stability and migration fixes, plus react UI progress
Some checks failed
CI / podman-build (push) Has been cancelled
CI / rust (push) Has been cancelled

This commit is contained in:
2026-03-18 09:01:38 +02:00
parent 38cab8c246
commit a66d908eff
142 changed files with 12210 additions and 3402 deletions

40
test_jwt_validation.sh Executable file
View File

@@ -0,0 +1,40 @@
#!/bin/bash
# Test JWT validation with the current secret
JWT_SECRET="supersecret1234567890123456789012"
JWT_TOKEN="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhbm9uIiwicm9sZSI6ImFub24iLCJpc3MiOiJtYWRiYXNlIiwiaWF0IjoxNzczNjk0MDE4LCJleHAiOjE3NzQyOTg4MTh9.Gynb6ZP7tEMCq3ORipouyeaSTAY2w_2r0jdqWP_MmKo"
# Try to decode and verify the token
echo "Testing JWT validation..."
echo "Secret (first 8 chars): ${JWT_SECRET:0:8}..."
# Use Python to verify the token
python3 << 'EOF'
import jwt
import sys
secret = "supersecret1234567890123456789012"
token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhbm9uIiwicm9sZSI6ImFub24iLCJpc3MiOiJtYWRiYXNlIiwiaWF0IjoxNzczNjk0MDE4LCJleHAiOjE3NzQyOTg4MTh9.Gynb6ZP7tEMCq3ORipouyeaSTAY2w_2r0jdqWP_MmKo"
try:
decoded = jwt.decode(token, secret, algorithms=["HS256"])
print(f"✓ Token is valid!")
print(f" Subject: {decoded.get('sub')}")
print(f" Role: {decoded.get('role')}")
print(f" Issuer: {decoded.get('iss')}")
except jwt.InvalidSignatureError:
print(f"✗ Invalid signature - token was signed with a different secret!")
sys.exit(1)
except jwt.ExpiredSignatureError:
print(f"✗ Token has expired!")
sys.exit(1)
except Exception as e:
print(f"✗ Error: {e}")
sys.exit(1)
EOF
if [ $? -eq 0 ]; then
echo "JWT validation successful"
else
echo "JWT validation failed - need to regenerate tokens"
fi