Fix TLS issues in Granian and implement TLS for NGINX#2515
Conversation
1b9fdc3 to
7d94526
Compare
40f05ac to
1dbf46e
Compare
Review and Fixes AppliedI've rebased this PR onto main and made the following corrections: Bug Fix
Reverted Unintended ChangesRemoved leaked local development settings that were not related to TLS:
Commit HistorySquashed 12 commits into 1 clean commit with proper conventional commit format and co-author attribution. Verification
|
…figuration - Add passphrase-protected key support for Granian via --ssl-keyfile-password - Add KEY_FILE_PASSWORD and CERT_PASSPHRASE compatibility in run-granian.sh - Export KEY_FILE in run-gunicorn.sh for Python SSL manager access - Improve Makefile cert targets with proper permissions (640) and group 0 - Split certs-passphrase into two-step generation (genrsa + req) for AES-256 - Add SSL configuration templates to nginx.conf for client and backend TLS - Expose port 443 in NGINX Dockerfile for HTTPS support - Update docker-compose.yml with TLS-related comments and correct cert paths - Add comprehensive TLS configuration documentation Co-authored-by: Madhav Kandukuri <madhav165@gmail.com> Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
1dbf46e to
625e9a8
Compare
Additional Fixes (based on code review)Addressed two valid issues identified during review: 1. KEY_FILE path mismatch (Medium)Issue: Fix: Restored ## Uncomment to enable HTTPS (run `make certs` first)
# - SSL=true
# - CERT_FILE=/app/certs/cert.pem
# - KEY_FILE=/app/certs/key.pem
# For passphrase-protected keys: run `make certs-passphrase` and use:
# - KEY_FILE=/app/certs/key-encrypted.pem
# - KEY_FILE_PASSWORD=${KEY_FILE_PASSWORD}2. nginx backend TLS guidance incomplete (Low)Issue: The Fix: Added explicit instructions in the SSL Backend Configuration section: # To enable HTTPS for backend connections to gateway:
# 1. Uncomment these proxy_ssl_* settings below
# 2. Change ALL proxy_pass directives from http:// to https://
# (e.g., proxy_pass https://gateway_backend;)Granian version verifiedThe |
…figuration (IBM#2515) - Add passphrase-protected key support for Granian via --ssl-keyfile-password - Add KEY_FILE_PASSWORD and CERT_PASSPHRASE compatibility in run-granian.sh - Export KEY_FILE in run-gunicorn.sh for Python SSL manager access - Improve Makefile cert targets with proper permissions (640) and group 0 - Split certs-passphrase into two-step generation (genrsa + req) for AES-256 - Add SSL configuration templates to nginx.conf for client and backend TLS - Expose port 443 in NGINX Dockerfile for HTTPS support - Update docker-compose.yml with TLS-related comments and correct cert paths - Add comprehensive TLS configuration documentation Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> Co-authored-by: Mihai Criveti <crivetimihai@gmail.com> Signed-off-by: hughhennnelly <hughhennelly06@gmail.com>
…figuration (IBM#2515) - Add passphrase-protected key support for Granian via --ssl-keyfile-password - Add KEY_FILE_PASSWORD and CERT_PASSPHRASE compatibility in run-granian.sh - Export KEY_FILE in run-gunicorn.sh for Python SSL manager access - Improve Makefile cert targets with proper permissions (640) and group 0 - Split certs-passphrase into two-step generation (genrsa + req) for AES-256 - Add SSL configuration templates to nginx.conf for client and backend TLS - Expose port 443 in NGINX Dockerfile for HTTPS support - Update docker-compose.yml with TLS-related comments and correct cert paths - Add comprehensive TLS configuration documentation Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> Co-authored-by: Mihai Criveti <crivetimihai@gmail.com>
🐛 Bug-fix PR
Closes #2526
📌 Summary
This PR focuses on fixing and documenting TLS setup issues across docker-compose, Granian, and Nginx to make HTTPS deployments work reliably.
Key Changes
run-granianand switched to AES-256 encrypted keys, which Granian requires.nginx.conf.InvalidContentTypehandshake errors by correcting Nginx HTTPS configuration and connection reuse.172.18.0.X:XXXXX).Impact
🧪 Verification
make lintmake test📐 MCP Compliance (if relevant)
✅ Checklist
make black isort pre-commit)