Skip to content

Commit 2682322

Browse files
authored
Use numeric port value in params and update postgres ssl configuration (#194)
* use number port value in params * Update postgresql ssl parameters
1 parent 2c443cf commit 2682322

File tree

3 files changed

+26
-12
lines changed

3 files changed

+26
-12
lines changed

spiceaidocs/docs/data-accelerators/postgres/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ datasets:
4141
engine: postgres
4242
params:
4343
pg_host: localhost
44-
pg_port: '5432'
44+
pg_port: 5432
4545
pg_db: my_database
4646
pg_user: my_user
4747
pg_pass_key: my_secret
@@ -57,7 +57,7 @@ datasets:
5757
name: my_dataset
5858
params:
5959
pg_host: localhost
60-
pg_port: '5432'
60+
pg_port: 5432
6161
pg_db: data_store
6262
pg_user: my_user
6363
pg_pass_key: my_secret
@@ -66,7 +66,7 @@ datasets:
6666
engine_secret: pg_backend
6767
params:
6868
pg_host: localhost
69-
pg_port: '5433'
69+
pg_port: 5433
7070
pg_db: data_store
7171
pg_user: my_user
7272
pg_pass_key: my_secret

spiceaidocs/docs/data-connectors/mysql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ datasets:
3939
name: my_dataset
4040
params:
4141
mysql_host: localhost
42-
mysql_port: '3306'
42+
mysql_port: 3306
4343
mysql_db: my_database
4444
mysql_user: my_user
4545
mysql_pass_key: my_secret

spiceaidocs/docs/data-connectors/postgres/index.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ The connection to PostgreSQL can be configured by providing the following `param
2525
- `pg_pass_key`: The secret key containing the password to connect with.
2626
- `pg_pass`: The raw password to connect with, ignored if `pg_pass_key` is provided.
2727
- `pg_sslmode`: Optional parameter, specifies the SSL/TLS behavior for the connection, supported values:
28-
- `prefer`: (default) This mode will try to establish a secure SSL connection if possible, but will connect insecurely if the server does not support SSL.
29-
- `required`: This mode requires an SSL connection. If a secure connection cannot be established, server will not connect.
28+
- `verify-full`: (default) This mode requires an SSL connection, a valid root certificate, and the server host name to match the one specified in the certificate.
29+
- `verify-ca`: This mode requires an SSL connection and a valid root certificate.
30+
- `required`: This mode requires an SSL connection.
31+
- `prefer`: This mode will try to establish a secure SSL connection if possible, but will connect insecurely if the server does not support SSL.
3032
- `disable`: This mode will not attempt to use an SSL connection, even if the server supports it.
31-
- `pg_insecure`: Optional parameter, Allows TLS connectivity to servers with invalid/expired certificates.
33+
- `pg_sslrootcert`: Optional parameter specifying the path to a custom PEM certificate that the connector will trust.
3234

3335
Configuration `params` are provided either in the top level `dataset` for a dataset source and federated SQL query, or in the `acceleration` section for a data store.
3436

@@ -38,12 +40,24 @@ datasets:
3840
name: my_dataset
3941
params:
4042
pg_host: localhost
41-
pg_port: '5432'
43+
pg_port: 5432
4244
pg_db: my_database
4345
pg_user: my_user
4446
pg_pass_key: my_secret
45-
pg_sslmode: required
46-
pg_insecure: 'true'
47+
```
48+
49+
```yaml
50+
datasets:
51+
- from: postgres:path.to.my_dataset
52+
name: my_dataset
53+
params:
54+
pg_host: localhost
55+
pg_port: 5432
56+
pg_db: my_database
57+
pg_user: my_user
58+
pg_pass_key: my_secret
59+
pg_sslmode: verify-ca
60+
pg_sslrootcert: ./custom_cert.pem
4761
```
4862

4963
Additionally, an `engine_secret` may be provided when configuring a PostgreSQL data store to allow for using a different secret store to specify the password for a dataset using PostgreSQL as both the data source and data store.
@@ -54,7 +68,7 @@ datasets:
5468
name: my_dataset
5569
params:
5670
pg_host: localhost
57-
pg_port: '5432'
71+
pg_port: 5432
5872
pg_db: data_store
5973
pg_user: my_user
6074
pg_pass_key: my_secret
@@ -63,7 +77,7 @@ datasets:
6377
engine_secret: pg_backend
6478
params:
6579
pg_host: localhost
66-
pg_port: '5433'
80+
pg_port: 5433
6781
pg_db: data_store
6882
pg_user: my_user
6983
pg_pass_key: my_secret

0 commit comments

Comments
 (0)