Add support for postgresql['ssl_min_protocol_version']

What does this MR do?

Adds support for configuring the minimum SSL/TLS protocol version for PostgreSQL server connections via the postgresql['ssl_min_protocol_version'] configuration option.

This maps directly to the PostgreSQL ssl_min_protocol_version parameter. Valid values are TLSv1, TLSv1.1, TLSv1.2, and TLSv1.3.

When not set (the default), the setting is omitted from postgresql.conf, preserving existing behavior and letting PostgreSQL use its own default.

Example usage in /etc/gitlab/gitlab.rb:

postgresql['ssl_min_protocol_version'] = 'TLSv1.2'

Closes #9720 (closed)

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion.

Required

  • MR title and description are up to date, accurate, and descriptive.
  • MR targeting the appropriate branch.
  • Latest Merge Result pipeline is green.
  • When ready for review, MR is labeled workflowready for review per the Distribution MR workflow.
  • The UBT version and corresponding checksum hash have been updated and referenced in the merge request if applicable.
    • UBT EE pipeline (Trigger:ee-package-ubt) is green

For GitLab team members

If you don't have access to this, the reviewer should trigger these jobs for you during the review process.

  • The manual Trigger:ee-package jobs have a green pipeline running against latest commit.
  • If config/software or config/patches directories are changed, make sure the build-package-on-all-os job within the Trigger:ee-package downstream pipeline succeeded.
  • If you are changing anything SSL related, then the Trigger:package:fips manual job within the Trigger:ee-package downstream pipeline must succeed.
  • If CI configuration is changed, the branch must be pushed to dev.gitlab.org to confirm regular branch builds aren't broken.

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes.
  • Documentation created/updated. (The gitlab.rb.template comment is updated; the doc/settings/database.md SSL section already covers the general SSL configuration pattern.)
  • Tests added. (Unit tests added to spec/chef/cookbooks/postgresql/recipes/postgresql_spec.rb.)
  • Integration tests added to GitLab QA. (Not required for a simple configuration passthrough.)
  • Equivalent MR/issue for the GitLab Chart opened. (Not applicable — this is a Linux package-specific setting.)
  • Validate potential values for new configuration settings. Formats such as integer 10, duration 10s, URI scheme://user:passwd@host:port may require quotation or other special handling when rendered in a template and written to a configuration file. (The value is rendered as a quoted string in postgresql.conf, matching the format PostgreSQL expects, e.g. ssl_min_protocol_version = 'TLSv1.2'.)
Edited by Andrew Winata

Merge request reports

Loading
Loading