Commit graph

88 commits

Author SHA1 Message Date
ec7086259e chore: merkwerk auto-update 2025-09-10 16:45:13 +02:00
304b010a56 fix(smtp): add STARTTLS support for port 587
- Add STARTTLS handshake after EHLO for port 587
- Upgrade socket to SSL after STARTTLS command
- Perform second EHLO over encrypted connection
- Resolves authentication issues with Hetzner and other SMTP providers
- Fixes 'Must issue a STARTTLS command first' error

Closes #113
2025-09-10 16:45:12 +02:00
9cd8f4bce0 chore: merkwerk auto-update 2025-09-10 14:27:55 +02:00
f5d9f359de Release v0.1.2: Complete API Gateway with Multi-Tenant Mail 2025-09-10 14:27:54 +02:00
166325b133 chore: merkwerk auto-update 2025-09-10 12:20:50 +02:00
8b7806670c docs: simplify README and remove FreeBSD support
- Strip README to essentials with wiki references only
- Remove non-existent API docs and troubleshooting links
- Focus on quick start and actual integrations (merkwerk)
- Remove FreeBSD support from all installation scripts
- Clean up platform detection logic in scripts
- Maintain OpenBSD and Linux support only

Reduces maintenance burden and aligns with actual project scope.
2025-09-10 12:20:41 +02:00
6c60d88f62 Merge branch 'security/sanitize-test-scripts' 2025-09-07 21:26:52 +02:00
54c594e656 chore: merkwerk auto-update 2025-09-07 21:25:38 +02:00
08b49d3d75 security: sanitize internal infrastructure details from open source package
- Remove production_test_sequence.sh (DAW-specific production tests)
- Remove setup_env.sh (obsolete .env setup, replaced by furt.conf)
- Sanitize test scripts: replace dragons-at-work.de with example.com
- Sanitize API keys: replace dev keys with placeholder values
- Remove hardcoded DAW fallbacks from http_server.lua and smtp.lua
- Update .gitignore to exclude production-specific test files

Tests remain functional for developers with example domains.
All internal DAW infrastructure details removed from package.

Closes #101
2025-09-07 21:25:25 +02:00
baa2490bbe feat(security): systemd service hardening implementation
Merge feature/systemd-hardening

This merge introduces production-ready security hardening for the
systemd service with 6 pragmatic security options:

- ProtectSystem=strict for read-only filesystem
- ReadWritePaths for required directories only
- ProtectHome=yes to block home directory access
- NoNewPrivileges=yes to prevent privilege escalation
- PrivateTmp=yes for isolated temporary space
- RestrictAddressFamilies=AF_INET for IPv4-only networking

Testing completed successfully on:
- Debian 12 (systemd 247)
- Arch Linux (systemd 256)

No performance impact observed (812K RAM usage).

Closes DAW/furt#110
2025-09-07 19:11:37 +02:00
32c51e326e chore: merkwerk auto-update 2025-09-07 18:40:47 +02:00
24bd94dec4 feat(deployment): add systemd security hardening
- Add ProtectSystem=strict for read-only filesystem
- Add ReadWritePaths for required directories
- Add ProtectHome=yes to block home access
- Add NoNewPrivileges=yes to prevent escalation
- Add PrivateTmp=yes for isolated temp space
- Add RestrictAddressFamilies=AF_INET for IPv4-only

Related DAW/furt#110
2025-09-07 18:40:32 +02:00
77b9685231 Merge branch 'fix/validate-config-posix-regex' 2025-09-07 18:05:30 +02:00
b4bc104750 chore: merkwerk auto-update 2025-09-07 18:00:48 +02:00
683d6e5e5d fix(scripts): resolve POSIX regex compatibility in validate-config.sh
- Replace \s* with [ \t]* for POSIX-compatible whitespace matching
- Addresses false positive 'server port not configured' error
- Ensures validation works correctly across all POSIX-compliant systems

Related to DAW/furt#111
2025-09-07 18:00:41 +02:00
df1edf3dc5 feat(service): merge PID-file based service management (#100)
This merge introduces reliable cross-platform service detection using
PID-files instead of fragile pexp patterns, resolving rcctl check
issues on OpenBSD.

Key improvements:
- PID-file creation in /var/run/furt/ with proper permissions
- Updated start.sh for service vs interactive mode detection
- Fixed OpenBSD rc.d script with PID-file based rc_check()
- Corrected systemd service PIDFile parameter
- Enhanced setup-directories.sh for PID directory creation

Tested successfully on werner (OpenBSD):
- rcctl check furt now shows (ok) instead of (failed)
- Service start/stop/restart works reliably
- PID-file management handles permissions correctly

Closes #100
2025-09-07 17:41:33 +02:00
bbbbeef072 chore: merkwerk auto-update 2025-09-07 16:58:01 +02:00
59f372f2b0 feat(service): implement PID-file based service management
- Add PID directory creation in setup-directories.sh
- Update start.sh to use /var/run/furt/furt.pid for both platforms
- Fix OpenBSD rc.d script pidfile variable path
- Correct systemd service PIDFile parameter path
- Resolve rcctl check detection issues on OpenBSD

Fixes service detection problems where rcctl check would show (failed)
even when service was running. PID-file approach provides reliable
cross-platform service status detection instead of fragile pexp patterns.
Related DAW/furt#100
2025-09-07 16:57:35 +02:00
7ee990b052 chore: merkwerk auto-update 2025-09-05 22:30:13 +02:00
25a709ebbe feat(service): implement PID-file based service management (DAW/furt#100)
- Replace unreliable pexp patterns with PID-file approach
- Add graceful shutdown with timeout handling in rc.d script
- Implement process validation after startup
- Add SIGHUP config reload support for Unix services
- Ensure PID-file cleanup on service exit
- Update systemd service to use PIDFile parameter

Platform improvements:
- OpenBSD: rc_check/rc_stop functions now PID-file based
- Linux: systemd Type=forking with proper PIDFile support
- Cross-platform: /var/run/furt.pid standard location

Resolves service status detection issues where rcctl check showed
(failed) despite running service due to process name variations
across platforms.
2025-09-05 22:30:07 +02:00
ddbb232de2 Merge branch 'refactor/extract-health-routes-and-server-core' 2025-09-05 19:26:37 +02:00
dccf3e462a chore: merkwerk auto-update 2025-09-05 19:25:09 +02:00
d271b846ad refactor: extract health routes and HTTP server core from main.lua
- Extract health routes to src/routes/health.lua (80 lines)
- Extract HTTP server core to src/http_server.lua (256 lines)
- Reduce main.lua to pure orchestration (342 → 27 lines)
- Preserve all functionality and API compatibility
- Add proper module separation following existing patterns
- Enable future service self-registration architecture

Closes #96
2025-09-05 19:25:02 +02:00
1162dceef8 Merge branch 'fix/ssl-dependency-check' 2025-09-05 18:20:08 +02:00
ed7d069953 chore: merkwerk auto-update 2025-09-05 18:20:08 +02:00
d4fa6e34e2 fix(deps): add comprehensive SSL dependency check and unify error messages
- Add SSL/TLS library validation before startup
- Unify all dependency error messages with install instructions
- Provide platform-specific package names for all dependencies
- Prevents silent SMTP SSL failures at runtime

Fixes #109
2025-09-05 18:20:08 +02:00
bf41726613 Merge branch 'fix/json-library-compatibility' 2025-09-05 17:44:42 +02:00
0592381e5d chore: merkwerk auto-update 2025-09-05 17:44:42 +02:00
78e8dedf8e fix(json): add multi-platform JSON library compatibility
- Add flexible JSON detection (cjson preferred, dkjson fallback)
- Update main.lua and mail.lua with found_cjson detection
- Update start.sh to check both JSON libraries
- Enables furt to run on Arch Linux without manual patches
- Maintains API compatibility with existing cjson usage

Fixes #108
2025-09-05 17:44:42 +02:00
785283950f Merge branch 'fix/config-path-consistency' 2025-09-05 17:21:36 +02:00
56b5c43e98 chore: merkwerk auto-update 2025-09-05 17:21:25 +02:00
c15b01a0a6 fix(config): unify config path detection across all scripts
- Add platform detection to start.sh for consistent config paths
- BSD systems: /usr/local/etc/furt/furt.conf
- Linux systems: /etc/furt/furt.conf
- Now consistent with setup-directories.sh and validate-config.sh
- Follows DAW service separation standards

Fixes #103
2025-09-05 17:21:25 +02:00
b068a24ed5 Merge branch 'fix/systemd-type-forking' 2025-09-05 17:03:36 +02:00
7b15a2cfc4 chore: merkwerk auto-update 2025-09-05 17:02:31 +02:00
442b465f16 fix(systemd): use Type=forking for background start.sh compatibility
- Change Type=simple to Type=forking in systemd service
- Properly handle start.sh background process (&)
- Ensures systemd correctly tracks daemon lifecycle
- Fixes BSD-compatible start script integration

Fixes #104
2025-09-05 17:02:31 +02:00
4716630e5b chore: merkwerk auto-update 2025-09-03 22:13:09 +02:00
38a1108a46 feat(deployment): replace monster scripts with modular helper scripts (#87)
- Add install.sh orchestrator with upgrade support
- Add 6 helper scripts (<100 lines each) replacing 700-800 line monsters
- Add deployment/linux/furt.service systemd template
- Support both fresh install and upgrade modes
- Platform-aware detection (OpenBSD/FreeBSD vs Linux)
- Skip user/service creation in upgrade mode
- Preserve existing configuration during updates
- Remove merkwerk dependency from production install script

Helper scripts:
- scripts/setup-user.sh - Create system user (_furt/furt)
- scripts/setup-directories.sh - Create directory structure
- scripts/sync-files.sh - Copy source files to installation
- scripts/create-service.sh - Create system service from templates
- scripts/validate-config.sh - Validate furt.conf syntax
- scripts/health-check.sh - Basic health check functionality

Closes DAW/furt#87
2025-09-03 22:12:58 +02:00
8ad77860d1 chore: merkwerk auto-update 2025-09-03 20:25:19 +02:00
eb64c39312 feat(distribution): add clean package build system
- Add scripts/build-package.sh for production-ready packages
- VCS-agnostic archive creation (git/hg/bzr/fossil support)
- Automatic version detection from VERSION file or git tags
- Secure exclusions for development files and secrets
- Package validation and content verification
- Support for explicit version override

Creates dist/furt-api-gateway-vX.Y.Z.tar.gz with clean structure
for deployment without development dependencies.

Related to DAW/furt#88
2025-09-03 20:24:59 +02:00
f2ca7a5e1c chore: merkwerk auto-update 2025-09-03 12:23:48 +02:00
53ef8ad427 remove internal files from git tracking 2025-09-03 12:23:47 +02:00
c7e33a85bb chore: merkwerk auto-update 2025-09-03 12:16:05 +02:00
589dccc376 fix(packaging): exclude internal files from packages 2025-09-03 12:15:44 +02:00
32d1371a4f chore: merkwerk auto-update 2025-09-03 11:02:41 +02:00
0c59b273d8 chore(license): switch to ISC license
- Replace existing license with ISC license
- Adopt more permissive and simpler license terms
- Align with dragons@work low-tech philosophy
- Maintain full open source compatibility

ISC license provides maximum freedom with minimal legal complexity,
supporting the project's commitment to digital sovereignty and
uncomplicated technology solutions.
2025-09-03 11:02:32 +02:00
fb29a10035 chore: merkwerk auto-update 2025-09-02 21:45:08 +02:00
cec390ef50 chore: remove obsolete .env.example and add issue #98 reference
- Remove .env.example to prevent configuration confusion
- furt now uses only furt.conf for all configuration
- .env.example was misleading users during installation
- Add comment referencing issue #98 resolution

Eliminates config method ambiguity identified in installation testing.
Closes DAW/furt#98
2025-09-02 21:45:01 +02:00
4834ed7f8d chore: merkwerk auto-update 2025-09-02 21:24:58 +02:00
c575d5eed0 fix(deployment): update OpenBSD rc.d template for current service architecture
- Update daemon path to use scripts/start.sh instead of direct lua execution
- Correct process expression pattern (pexp) for lua process detection
- Align template with installation.md service integration patterns
- Ensure compatibility with current furt directory structure

Fixes service integration issues identified in testing.
Related to DAW/furt#98
2025-09-02 21:24:52 +02:00
3bef171671 Merge branch 'fix/service-detection' 2025-09-02 18:38:33 +02:00