Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,11 @@ private HikariDataSource initializeConnectionPool(String endpoint, String userna
config.setJdbcUrl(jdbcUrl);
config.setUsername(username);

// PostgreSQL SSL configuration for Aurora DSQL
config.addDataSourceProperty("sslmode", "verify-full");
config.addDataSourceProperty("sslnegotiation", "direct");

// Verify the server's root cert against those in the default trust store
config.addDataSourceProperty("sslfactory", "org.postgresql.ssl.DefaultJavaSSLFactory");

// Note: SSL is configured automatically by the connector with secure defaults:
// - sslmode=verify-full
// - sslNegotiation=direct
// - sslfactory=org.postgresql.ssl.DefaultJavaSSLFactory
// You can override these if needed by setting the properties explicitly.

// HikariCP pool configuration optimized for Aurora DSQL
config.setPoolName("AuroraDSQLPool");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@ public static Connection getConnection(String endpoint, String user) throws SQLE
Properties props = new Properties();
props.setProperty("user", user);

// Use the DefaultJavaSSLFactory so that Java's default trust store can be used
// to verify the server's root cert.
props.setProperty("sslmode", "verify-full");
props.setProperty("sslfactory", "org.postgresql.ssl.DefaultJavaSSLFactory");
props.setProperty("sslNegotiation", "direct");
// Note: SSL is configured automatically by the connector with secure defaults.
// No explicit SSL configuration needed.

String url = "jdbc:aws-dsql:postgresql://" + endpoint;

Expand Down