Skip to content

Commit 7876624

Browse files
AndrewJackson2020CommanderKeynes
authored andcommitted
Implement trust authentication
1 parent 69af6cc commit 7876624

File tree

11 files changed

+746
-155
lines changed

11 files changed

+746
-155
lines changed

.circleci/pgcat.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ tls_private_key = ".circleci/server.key"
4949
# Connecting to that database allows running commands like `SHOW POOLS`, `SHOW DATABASES`, etc..
5050
admin_username = "admin_user"
5151
admin_password = "admin_pass"
52+
admin_auth_type = "md5"
5253

5354
# pool
5455
# configs are structured as pool.<pool_name>
@@ -98,6 +99,7 @@ sharding_function = "pg_bigint_hash"
9899
[pools.sharded_db.users.0]
99100
username = "sharding_user"
100101
password = "sharding_user"
102+
auth_type = "md5"
101103
# Maximum number of server connections that can be established for this user
102104
# The maximum number of connection from a single Pgcat process to any database in the cluster
103105
# is the sum of pool_size across all users.
@@ -107,6 +109,7 @@ statement_timeout = 0
107109
[pools.sharded_db.users.1]
108110
username = "other_user"
109111
password = "other_user"
112+
auth_type = "md5"
110113
pool_size = 21
111114
statement_timeout = 30000
112115

@@ -147,6 +150,7 @@ prepared_statements_cache_size = 500
147150
[pools.simple_db.users.0]
148151
username = "simple_user"
149152
password = "simple_user"
153+
auth_type = "md5"
150154
pool_size = 5
151155
statement_timeout = 30000
152156

.circleci/pgcat_trust.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
[general]
3+
4+
host = "0.0.0.0"
5+
port = 6432
6+
admin_username = "admin_user"
7+
admin_password = ""
8+
admin_auth_type = "trust"
9+
10+
[pools.sharded_db.users.0]
11+
username = "sharding_user"
12+
password = "sharding_user"
13+
auth_type = "trust"
14+
pool_size = 10
15+
min_pool_size = 1
16+
pool_mode = "transaction"
17+
18+
[pools.sharded_db.shards.0]
19+
servers = [
20+
[ "127.0.0.1", 5432, "primary" ],
21+
]
22+
database = "shard0"

0 commit comments

Comments
 (0)