Skip to content

Commit

Permalink
Implement trust authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewJackson2020 authored and CommanderKeynes committed Sep 3, 2024
1 parent 69af6cc commit 7876624
Show file tree
Hide file tree
Showing 11 changed files with 746 additions and 155 deletions.
4 changes: 4 additions & 0 deletions .circleci/pgcat.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ tls_private_key = ".circleci/server.key"
# Connecting to that database allows running commands like `SHOW POOLS`, `SHOW DATABASES`, etc..
admin_username = "admin_user"
admin_password = "admin_pass"
admin_auth_type = "md5"

# pool
# configs are structured as pool.<pool_name>
Expand Down Expand Up @@ -98,6 +99,7 @@ sharding_function = "pg_bigint_hash"
[pools.sharded_db.users.0]
username = "sharding_user"
password = "sharding_user"
auth_type = "md5"
# Maximum number of server connections that can be established for this user
# The maximum number of connection from a single Pgcat process to any database in the cluster
# is the sum of pool_size across all users.
Expand All @@ -107,6 +109,7 @@ statement_timeout = 0
[pools.sharded_db.users.1]
username = "other_user"
password = "other_user"
auth_type = "md5"
pool_size = 21
statement_timeout = 30000

Expand Down Expand Up @@ -147,6 +150,7 @@ prepared_statements_cache_size = 500
[pools.simple_db.users.0]
username = "simple_user"
password = "simple_user"
auth_type = "md5"
pool_size = 5
statement_timeout = 30000

Expand Down
22 changes: 22 additions & 0 deletions .circleci/pgcat_trust.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

[general]

host = "0.0.0.0"
port = 6432
admin_username = "admin_user"
admin_password = ""
admin_auth_type = "trust"

[pools.sharded_db.users.0]
username = "sharding_user"
password = "sharding_user"
auth_type = "trust"
pool_size = 10
min_pool_size = 1
pool_mode = "transaction"

[pools.sharded_db.shards.0]
servers = [
[ "127.0.0.1", 5432, "primary" ],
]
database = "shard0"
Loading

0 comments on commit 7876624

Please sign in to comment.