-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#20097] YSQL: Supporting HostSSL hba entry in Ysql Conn Mgr
Summary: This diff adds the support for hostssl type logical connections in ysql conn mgr. To faciliate it, ysql conn mgr is sending additional byte in auth pass through packet which denotes the type of logical connection. This byte can take 3 following values: # 'E' : Denotes TCP/IP SSL encrypted logical conn. # 'U' : Denotes TCP/IP unencrypted logical conn. # 'L' : Denotes Unix socket logical connection - This flag is currently not used as we don't support Unix socket connections between client and ysql conn mgr (tracked by GH #20048). Jira: DB-9040 Test Plan: **Fixing Existing Failed Test with Conn Mgr** ```./yb_build.sh --java-test org.yb.pgsql.TestPgEncryption ``` Above test is now enabled to run by default with both ysql conn mgr and postgres port. **Manual Testing** 1. Download dummy cert files ``` wget https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/test_certs/ca.crt wget -O node.<tserver_addr>.key https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/test_certs/ysql.key wget -O node.<tserver_addr>.crt https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/test_certs/ysql.crt chmod 600 ca.crt node.<tserver_addr>.key node.<tserver_addr>.crt CERTS=`pwd` ENABLE_TLS="use_client_to_server_encryption=true,certs_for_client_dir=$CERTS" ``` 2. Start the cluster: ``` ./bin/yugabyted destroy && ./bin/yugabyted start --tserver_flags "ysql_enable_auth=true,enable_ysql_conn_mgr=true,allowed_preview_flags_csv=enable_ysql_conn_mgr,$ENABLE_TLS" --ui false ``` 3. Should be able to make SSL connections: ``` ./bin/ysqlsh -h <tserver_addr> Password for user yugabyte: ysqlsh (11.2-YB-2.21.0.0-b0) SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off) Type "help" for help. yugabyte=# ``` Reviewers: janand, jason Reviewed By: janand, jason Subscribers: jason, nkumar, mihnea, yql, janand Differential Revision: https://phorge.dev.yugabyte.com/D31638
- Loading branch information
Manav Kumar
committed
Feb 14, 2024
1 parent
b39feda
commit 1b784fe
Showing
6 changed files
with
94 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters