feat: add HTTPS support with auto-generated self-signed certificates #13

Merged
addison merged 20 commits from feat/add-https into main 2025-12-03 16:17:23 -05:00
Owner
  • Server listens on port 443 (HTTPS) in production, port 8080 (HTTP) in dev
  • Auto-generate TLS certificates during deployment based on TLS_DOMAIN config
  • Certificates stored at /opt/kwila-office-automations/tls-{cert,key}.pem
  • Dev mode auto-generates localhost certificate on first run
  • Add export-cert justfile recipe for pulling cert to distribute to network admin
  • Update ARCHITECTURE.md with TLS strategy
  • Mark HTTPS task complete in MVP spec
- Server listens on port 443 (HTTPS) in production, port 8080 (HTTP) in dev - Auto-generate TLS certificates during deployment based on TLS_DOMAIN config - Certificates stored at /opt/kwila-office-automations/tls-{cert,key}.pem - Dev mode auto-generates localhost certificate on first run - Add export-cert justfile recipe for pulling cert to distribute to network admin - Update ARCHITECTURE.md with TLS strategy - Mark HTTPS task complete in MVP spec
feat: add HTTPS support with auto-generated self-signed certificates
All checks were successful
CI / frontend (pull_request) Successful in 36s
CI / backend (pull_request) Successful in 57s
14f74c0238
- Server listens on port 443 (HTTPS) in production, port 8080 (HTTP) in dev
- Auto-generate TLS certificates during deployment based on TLS_DOMAIN config
- Certificates stored at /opt/kwila-office-automations/tls-{cert,key}.pem
- Dev mode auto-generates localhost certificate on first run
- Add export-cert justfile recipe for pulling cert to distribute to network admin
- Update ARCHITECTURE.md with TLS strategy
- Mark HTTPS task complete in MVP spec
addison changed title from feat: add HTTPS support with auto-generated self-signed certificates to WIP: feat: add HTTPS support with auto-generated self-signed certificates 2025-11-29 13:05:47 -05:00
fix: address critical HTTPS implementation issues
Some checks failed
CI / frontend (pull_request) Successful in 36s
CI / backend (pull_request) Failing after 36s
b2461272f5
- Fix dev mode certificate paths: use backend/.tls-* with TLS_CERT_PATH env var
- Make dev mode use HTTPS (port 8080) for dev/prod parity with clipboard API
- Add TLS_DOMAIN validation: required for production HTTPS deployments
- Add error handling for openssl certificate generation in deploy.sh and justfile
- Document port 443 requirements: service runs as root or needs CAP_NET_BIND_SERVICE
- Document service user permissions: certificates readable by root
- Update ARCHITECTURE.md: accurately describe dev/prod TLS behavior, explain port 443 requirements
- Fix justfile dev target to set TLS_CERT_PATH/TLS_KEY_PATH env vars
chore: Merge branch 'main' into feat/add-https
Some checks failed
CI / frontend (pull_request) Successful in 41s
CI / backend (pull_request) Failing after 27s
88cff81305
- Fix health checks to use HTTPS in deploy.sh and rollback.sh with -k flag
- Update .env.example to clarify TLS_DOMAIN is REQUIRED for deployments
- Add ReadTimeout (15s), WriteTimeout (15s), IdleTimeout (60s) to prevent DoS
- Set explicit TLS MinVersion to TLS 1.2 for security
- Check certificate and key files exist before starting server
- Fail early with clear error if certificates are missing
- Prevents confusing failures from ListenAndServeTLS
docs: add comprehensive operations guide for certificate management
Some checks failed
CI / frontend (pull_request) Successful in 37s
CI / backend (pull_request) Failing after 33s
dabf054286
- Document first deployment and certificate distribution
- Add certificate rotation procedures for compromised certs
- Explain domain changes and certificate expiration
- Include debugging guide for common HTTPS issues
- Document port 443 binding and setcap alternative
- Add development HTTPS testing instructions
- Include log monitoring and performance tuning info
fix: ignore dev cert
Some checks failed
CI / frontend (pull_request) Successful in 42s
CI / backend (pull_request) Failing after 35s
edfa7f2629
chore: Merge branch 'main' into feat/add-https
Some checks failed
CI / frontend (pull_request) Successful in 45s
CI / backend (pull_request) Failing after 52s
e9ac96e164
feat: implement automatic HTTP to HTTPS redirect
Some checks failed
CI / frontend (pull_request) Successful in 38s
CI / backend (pull_request) Failing after 26s
d7c4fc9589
- Add HTTP redirect server on port 80 for production HTTPS
- Automatically redirects all HTTP requests to HTTPS with 301 permanent redirect
- Only enabled in production (not in dev mode)
- Transparent upgrade path for users accessing via http://
- Update ARCHITECTURE.md to document redirect behavior
refactor: improve HTTP redirect server error handling and cleanup
Some checks failed
CI / frontend (pull_request) Successful in 35s
CI / backend (pull_request) Failing after 27s
0bbcffe702
- Buffer error channel for both servers so no error is lost
- Redirect server errors now propagate to main error handling
- Consolidate shutdown logic into helper function
- Fix potential issue where redirect server errors were silently logged
- Document that both port 80 and 443 require root/CAP_NET_BIND_SERVICE
refactor: use constants for default TLS certificate paths
Some checks failed
CI / frontend (pull_request) Successful in 37s
CI / backend (pull_request) Failing after 24s
0b68b0374f
- Define DefaultTLSCertPath and DefaultTLSKeyPath as constants
- Remove hardcoded paths from config loading and validation
- Single source of truth for production certificate locations
fix: validate TLS_DOMAIN in deploy script before proceeding
Some checks failed
CI / frontend (pull_request) Successful in 35s
CI / backend (pull_request) Failing after 25s
607ff47ae3
- Exit early if TLS_DOMAIN is not set in .env file
- Prevents silent certificate generation failures
- Provides clear error message with remediation steps
fix: improve deploy script validation and error messages
Some checks failed
CI / frontend (pull_request) Successful in 41s
CI / backend (pull_request) Failing after 24s
ee2eee5d63
- Check that .env file exists before trying to read it
- Always extract TLS_DOMAIN (don't skip if missing)
- Use variable for env file path to avoid repetition
- Provide clear error messages for each failure case
fix: handle grep failure when TLS_DOMAIN is missing
Some checks failed
CI / frontend (pull_request) Successful in 35s
CI / backend (pull_request) Failing after 24s
72c966d78e
- Use || echo "" to prevent grep exit code from killing the script
- Allows validation check below to catch the missing value gracefully
addison changed title from WIP: feat: add HTTPS support with auto-generated self-signed certificates to feat: add HTTPS support with auto-generated self-signed certificates 2025-12-03 16:07:06 -05:00
chore: fix formatting
All checks were successful
CI / frontend (pull_request) Successful in 37s
CI / backend (pull_request) Successful in 58s
bf131dc316
fix: export-cert recipe now uses sudo to read certificate
All checks were successful
CI / frontend (pull_request) Successful in 37s
CI / backend (pull_request) Successful in 58s
c9fd9cc2fd
- Certificate file is owned by root with 600 permissions
- Use ssh + sudo cat instead of scp to read the file
- Redirect output to local file instead of copying directly
docs: clarify certificate export security and Windows installation
All checks were successful
CI / frontend (pull_request) Successful in 34s
CI / backend (pull_request) Successful in 57s
1d456422f8
- Emphasize that only public certificate is exported, never the private key
- Add detailed Windows certificate installation steps
- Clarify Local Machine vs Current User scope for domain-wide trust
addison deleted branch feat/add-https 2025-12-03 16:17:23 -05:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kwila/office-automations!13
No description provided.