Commit 7a830c3
feat: enable SSL/TLS for PgBouncer client connections (#49)
* feat: enable SSL/TLS for PgBouncer client connections
PgBouncer was rejecting SSL connections on port 5432 because client-side
TLS was disabled. This change enables SSL for all client connections to
PgBouncer with sslmode=require as the default.
Changes:
- Add client TLS configuration to PgBouncer entrypoint script
- Auto-generate self-signed certificates if not provided
- Add openssl package to PgBouncer Dockerfile for cert generation
- Add PGBOUNCER_CLIENT_TLS_* environment variables to docker-compose
- Update .env.example with new TLS configuration options
- Remove obsolete pgbouncer.ini.tpl (config generated dynamically)
The default sslmode is 'require', enforcing SSL for all connections.
Users can set PGBOUNCER_CLIENT_TLS_SSLMODE=disable to opt out.
* Update pgbouncer/entrypoint.sh
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Patrick Audley <paudley@blackcat.ca>
---------
Signed-off-by: Patrick Audley <paudley@blackcat.ca>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>1 parent c3ae86f commit 7a830c3
5 files changed
Lines changed: 60 additions & 27 deletions
File tree
- docker/pgbouncer
- pgbouncer
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
148 | 157 | | |
149 | 158 | | |
150 | 159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
366 | 372 | | |
367 | 373 | | |
368 | 374 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
22 | 29 | | |
23 | 30 | | |
24 | 31 | | |
| |||
87 | 94 | | |
88 | 95 | | |
89 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
90 | 123 | | |
91 | 124 | | |
92 | 125 | | |
| |||
106 | 139 | | |
107 | 140 | | |
108 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
109 | 151 | | |
110 | 152 | | |
111 | 153 | | |
| |||
131 | 173 | | |
132 | 174 | | |
133 | 175 | | |
| 176 | + | |
134 | 177 | | |
135 | 178 | | |
136 | 179 | | |
| |||
This file was deleted.
0 commit comments