Skip to content

Feature ETP-1917: Enable SSL Support for PostgreSQL Connections in dbsourcemanager#11

Merged
RomanMagnoli merged 1 commit into
developfrom
feature/ETP-1917-Y26
Mar 17, 2026
Merged

Feature ETP-1917: Enable SSL Support for PostgreSQL Connections in dbsourcemanager#11
RomanMagnoli merged 1 commit into
developfrom
feature/ETP-1917-Y26

Conversation

@RomanMagnoli

Copy link
Copy Markdown
Contributor

This pull request enhances the way database connections are established in DBSMOBUtil.java, specifically by adding support for SSL configuration when connecting to the database. The changes make the connection logic more robust and flexible, allowing for secure connections with customizable SSL parameters.

Database connection improvements:

  • Added logic to build connection properties dynamically, supporting SSL configuration (bbdd.ssl, bbdd.sslmode, bbdd.sslfactory, and bbdd.sslrootcert). If SSL is enabled, the code now checks for the presence of bbdd.sslfactory and uses it if specified; otherwise, it requires a valid root certificate file for certain SSL modes.
  • Improved error handling by throwing a RuntimeException if SSL configuration is invalid or if the root certificate file is missing when required. Also added a more descriptive error message when failing to obtain a connection.

@RomanMagnoli
RomanMagnoli requested a review from Copilot January 7, 2026 18:30
@RomanMagnoli RomanMagnoli self-assigned this Jan 7, 2026
@RomanMagnoli RomanMagnoli added the enhancement New feature or request label Jan 7, 2026
@etendobot

Copy link
Copy Markdown
Contributor

Warning

Git Police 👮

One or more commit messages do not meet the required standards. Please correct them.

For more information, visit: Methodology for repository managment

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds SSL connection support to the database source manager by modifying the getUnpooledConnection() method in DBSMOBUtil.java. The implementation enables secure PostgreSQL connections through configurable SSL parameters, with support for custom SSL factories and root certificate validation.

Key changes:

  • Introduced dynamic connection properties building with SSL configuration support (bbdd.ssl, bbdd.sslmode, bbdd.sslfactory, bbdd.sslrootcert)
  • Added validation logic for SSL root certificate files with error handling for missing or invalid certificates
  • Enhanced error reporting by wrapping SQLException in RuntimeException with descriptive messages

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/org/openbravo/ddlutils/util/DBSMOBUtil.java
Comment thread src/org/openbravo/ddlutils/util/DBSMOBUtil.java Outdated
Comment thread src/org/openbravo/ddlutils/util/DBSMOBUtil.java
Comment thread src/org/openbravo/ddlutils/util/DBSMOBUtil.java
Comment thread src/org/openbravo/ddlutils/util/DBSMOBUtil.java Outdated
Comment thread src/org/openbravo/ddlutils/util/DBSMOBUtil.java
Comment thread src/org/openbravo/ddlutils/util/DBSMOBUtil.java
Comment thread src/org/openbravo/ddlutils/util/DBSMOBUtil.java
Comment thread src/org/openbravo/ddlutils/util/DBSMOBUtil.java

@etendobot etendobot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested by agent. Please resolve blocking issues.

@sonarscanetendo

Copy link
Copy Markdown

Failed Quality Gate failed

  • 2 New Issues (is greater than 0)

Project ID: etendosoftware_dbsm_AYyMTPF2NAZuF1VH_Wqo

View in SonarQube

@RomanMagnoli
RomanMagnoli marked this pull request as ready for review January 8, 2026 15:53
@RomanMagnoli
RomanMagnoli merged commit d71f10b into develop Mar 17, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants