Skip to content

Commit

Permalink
Switch to using sslmode=require for connections to backend DB (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-pie authored Jul 19, 2024
1 parent 40f7e3a commit 8e40c72
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
0.8.3
-----
- Switch to using `sslmode=require` for connections to backend DB

0.8.2
-----
- Switch to new PyPi publish method

0.8.1
-----
- Switch to using `sslmode=prefer` for connections to backend DB
Expand Down
4 changes: 3 additions & 1 deletion cicada/lib/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ def db_cicada(dbname=None):
user = definitions["db_cicada"]["user"]
password = definitions["db_cicada"]["password"]

conn = psycopg2.connect(host=host, port=port, dbname=dbname, user=user, password=password, sslmode="prefer")
conn = psycopg2.connect(
host=host, port=port, dbname=dbname, user=user, password=password, sslmode="require", application_name="cicada"
)
conn.autocommit = True

return conn
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name="cicada",
version="0.8.2",
version="0.8.3",
description="Lightweight, agent-based, distributed scheduler",
long_description=long_description,
long_description_content_type="text/markdown",
Expand All @@ -22,7 +22,7 @@
"pyyaml==6.0.*",
"croniter==2.0.*",
"tabulate==0.9.*",
"slack-sdk==3.30.*",
"slack-sdk==3.31.*",
"backoff==2.2.*",
],
extras_require={
Expand Down

0 comments on commit 8e40c72

Please sign in to comment.