feat: Add credentials management system and comprehensive testing

- Add credentials management system with automatic saving and updates
- Add upload form URL to JSON output
- Add Ollama model information to JSON output
- Implement credential update system (update_credentials.sh)
- Implement credential save system (save_credentials.sh)
- Add comprehensive test suites (infrastructure, n8n, PostgREST, complete system)
- Add workflow auto-reload system with systemd service
- Add detailed documentation (CREDENTIALS_MANAGEMENT.md, TEST_REPORT.md, VERIFICATION_SUMMARY.md)
- Improve n8n setup with robust API-based workflow import
- Add .gitignore for credentials directory
- All tests passing (40+ test cases)

Key Features:
- Credentials automatically saved to credentials/<hostname>.json
- Update Ollama URL from IP to hostname without container restart
- Comprehensive testing with 4 test suites
- Full documentation and examples
- Production-ready system
This commit is contained in:
2026-01-24 22:31:26 +01:00
parent eb876bc267
commit aa00fb9d29
22 changed files with 4157 additions and 1 deletions

5
credentials/.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
# Ignore all credential files
*.json
# Except the example file
!example-credentials.json

View File

@@ -0,0 +1,52 @@
{
"container": {
"ctid": 769276659,
"hostname": "sb-1769276659",
"fqdn": "sb-1769276659.userman.de",
"ip": "192.168.45.45",
"vlan": 90
},
"urls": {
"n8n_internal": "http://192.168.45.45:5678/",
"n8n_external": "https://sb-1769276659.userman.de",
"postgrest": "http://192.168.45.45:3000",
"chat_webhook": "https://sb-1769276659.userman.de/webhook/rag-chat-webhook/chat",
"chat_internal": "http://192.168.45.45:5678/webhook/rag-chat-webhook/chat",
"upload_form": "https://sb-1769276659.userman.de/form/rag-upload-form",
"upload_form_internal": "http://192.168.45.45:5678/form/rag-upload-form"
},
"postgres": {
"host": "postgres",
"port": 5432,
"db": "customer",
"user": "customer",
"password": "EXAMPLE_PASSWORD"
},
"supabase": {
"url": "http://postgrest:3000",
"url_external": "http://192.168.45.45:3000",
"anon_key": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"service_role_key": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"jwt_secret": "EXAMPLE_JWT_SECRET"
},
"ollama": {
"url": "http://192.168.45.3:11434",
"model": "ministral-3:3b",
"embedding_model": "nomic-embed-text:latest"
},
"n8n": {
"encryption_key": "EXAMPLE_ENCRYPTION_KEY",
"owner_email": "admin@userman.de",
"owner_password": "EXAMPLE_PASSWORD",
"secure_cookie": false
},
"log_file": "/root/customer-installer/logs/sb-1769276659.log",
"created_at": "2026-01-24T18:00:00+01:00",
"updateable_fields": {
"ollama_url": "Can be updated to use hostname instead of IP (e.g., http://ollama.local:11434)",
"ollama_model": "Can be changed to different model (e.g., llama3.2:3b)",
"embedding_model": "Can be changed to different embedding model",
"postgres_password": "Can be updated (requires container restart)",
"n8n_owner_password": "Can be updated (requires container restart)"
}
}