[Bug] `manage.py` fails over TLS in shell sessions: default `RDS_TLS_CA_PATH` doesn't match where the entrypoint saves the CA

Open Beginner friendly
#102 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
django, docker, python
Domain
backend, database

Research direction

Read settings.py where RDS_TLS_CA_PATH defaults to /app/ca-cert.pem, then trace both CA download branches in entrypoint.sh and how it writes /run/chaotica.env. Pick a fix that makes shell sessions use the CA file that exists, and verify that a manage.py command works with RDS_TLS_USE and RDS_TLS_URL set without manually exporting the path.

Written by the indexing model from the issue text.

Description

Summary

With RDS_TLS_USE and RDS_TLS_URL set, entrypoint.sh downloads the CA bundle to /app/rds-ca-cert.pem and exports RDS_TLS_CA_PATH for the processes it starts. But settings.py falls back to a different file:

"ca": os.environ.get("RDS_TLS_CA_PATH", "/app/ca-cert.pem")

/app/ca-cert.pem is only written when RDS_TLS_CA (base64) is used instead of RDS_TLS_URL. Any process not started by the entrypoint, such as docker exec, kubectl exec or ECS Exec, doesn't inherit the export. So every manage.py command fails:

django.db.utils.OperationalError: (2026, 'TLS/SSL error: No such file or directory (2)')

The workaround is export RDS_TLS_CA_PATH=/app/rds-ca-cert.pem before running commands.

Suggested fix

Any of these:

  • Use one path: have both branches of entrypoint.sh write to the same file, and make it the default in settings.py.
  • Fall back to whichever file exists: in settings.py, use /app/rds-ca-cert.pem or /app/ca-cert.pem, whichever is present.
  • Make shells see it: write the export to a profile file (for example /etc/profile.d/chaotica.sh) so interactive shells pick it up. The entrypoint already writes /run/chaotica.env for supervisord.
Dominant language
HTML
Stars
6
Forks
4
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from brainthee/CHAOTICA

All issues in brainthee/CHAOTICA

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.