File tree Expand file tree Collapse file tree 8 files changed +494
-12
lines changed Expand file tree Collapse file tree 8 files changed +494
-12
lines changed Original file line number Diff line number Diff line change @@ -12,13 +12,15 @@ jobs:
1212 - image : cimg/rust:1.58.1
1313 environment :
1414 RUST_LOG : info
15- - image : cimg/ postgres:14.0
16- auth :
17- username : mydockerhub-user
18- password : $DOCKERHUB_PASSWORD
15+ - image : postgres:14
16+ # auth:
17+ # username: mydockerhub-user
18+ # password: $DOCKERHUB_PASSWORD
1919 environment :
2020 POSTGRES_USER : postgres
2121 POSTGRES_DB : postgres
22+ POSTGRES_PASSWORD : postgres
23+ POSTGRES_HOST_AUTH_METHOD : scram-sha-256
2224 # Add steps to the job
2325 # See: https://circleci.com/docs/2.0/configuration-reference/#steps
2426 steps :
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ function start_pgcat() {
1212}
1313
1414# Setup the database with shards and user
15- psql -e -h 127.0.0.1 -p 5432 -U postgres -f tests/sharding/query_routing_setup.sql
15+ PGPASSWORD=postgres psql -e -h 127.0.0.1 -p 5432 -U postgres -f tests/sharding/query_routing_setup.sql
1616PGPASSWORD=sharding_user pgbench -h 127.0.0.1 -U sharding_user shard0 -i
1717PGPASSWORD=sharding_user pgbench -h 127.0.0.1 -U sharding_user shard1 -i
1818PGPASSWORD=sharding_user pgbench -h 127.0.0.1 -U sharding_user shard2 -i
@@ -72,7 +72,7 @@ psql -h 127.0.0.1 -p 6432 -d pgbouncer -c "SET client_encoding TO 'utf8'" > /dev
7272(! psql -e -h 127.0.0.1 -p 6432 -d random_db -c ' SHOW STATS' > /dev/null)
7373
7474# Start PgCat in debug to demonstrate failover better
75- start_pgcat " debug "
75+ start_pgcat " trace "
7676
7777# Add latency to the replica at port 5433 slightly above the healthcheck timeout
7878toxiproxy-cli toxic add -t latency -a latency=300 postgres_replica
Original file line number Diff line number Diff line change 11[package ]
22name = " pgcat"
3- version = " 0.1 .0-beta2 "
3+ version = " 0.2 .0-beta1 "
44edition = " 2021"
55
66# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -25,3 +25,7 @@ log = "0.4"
2525arc-swap = " 1"
2626env_logger = " 0.9"
2727parking_lot = " 0.11"
28+ hmac = " 0.12"
29+ sha2 = " 0.10"
30+ base64 = " 0.13"
31+ stringprep = " 0.1"
Original file line number Diff line number Diff line change @@ -14,6 +14,13 @@ pub const CANCEL_REQUEST_CODE: i32 = 80877102;
1414// AuthenticationMD5Password
1515pub const MD5_ENCRYPTED_PASSWORD : i32 = 5 ;
1616
17+ // SASL
18+ pub const SASL : i32 = 10 ;
19+ pub const SASL_CONTINUE : i32 = 11 ;
20+ pub const SASL_FINAL : i32 = 12 ;
21+ pub const SCRAM_SHA_256 : & str = "SCRAM-SHA-256" ;
22+ pub const NONCE_LENGTH : usize = 24 ;
23+
1724// AuthenticationOk
1825pub const AUTHENTICATION_SUCCESSFUL : i32 = 0 ;
1926
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ mod errors;
5454mod messages;
5555mod pool;
5656mod query_router;
57+ mod scram;
5758mod server;
5859mod sharding;
5960mod stats;
You can’t perform that action at this time.
0 commit comments