JanssenProject / JanssenProject/jans
DB remote postgres without CA cert forces sslmode=disable
- Dominant language
- Java
- Stars
- 648
- Forks
- 174
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 110
Description
The mechanism. jans-setup.py's DB setup code (setup_app/installers/rdbm.py, function rdbmProperties()) branches on install type. We use rdbm_install_type=REMOTE (type 2 in setup.properties) since our DB is an external DigitalOcean Managed Postgres cluster, not something co-located with the install. For REMOTE, the logic is:
if Config.rdbm_install_type == InstallTypes.REMOTE:
if Config.get('rdbm_sslrootcert'):
# write cert to temp file, import it
set_sslmode() # defaults to mode='verify-ca'
else:
set_sslmode('disable') # <-- this is the branch we hit
If you don't supply an rdbm_sslrootcert in setup.properties — a totally reasonable thing to skip if you don't want to manage a pinned CA cert — the installer doesn't fall back to "encrypted but unverified." It force-sets sslmode=disable, i.e. no encryption negotiated at all, unconditionally.
Contributor guide
Assessment
This issue has not been assessed yet.