Skip to content

fix(ldap): restore TLS 1.2 floor for LDAP connections - #672

Open
LukasHirt wants to merge 1 commit into
stable-8.0from
fix/ldap-tls-min-version
Open

fix(ldap): restore TLS 1.2 floor for LDAP connections#672
LukasHirt wants to merge 1 commit into
stable-8.0from
fix/ldap-tls-min-version

Conversation

@LukasHirt

Copy link
Copy Markdown

Description

`tlsConfigFromLDAPConn` (shared by `GetLDAPClientWithReconnect`, `GetLDAPClientWithPool` and `GetLDAPClientForAuth`, introduced in #658) built its `*tls.Config` without a `MinVersion` — the insecure branch set only `InsecureSkipVerify`, and the CA-cert branch set only `RootCAs`. This lets the LDAP client negotiate down to whatever the Go runtime's default minimum TLS version is.

Before #658, callers (oCIS graph service, and previously the auth-basic/users/groups managers) built their own `tls.Config` with `MinVersion: tls.VersionTLS12` set explicitly. This PR restores that floor inside the shared helper so all callers get it back consistently.

Flagged during review of owncloud/ocis#12660 (which unified oCIS graph's LDAP client onto this helper, surfacing the regression).

Motivation and Context

Minor security regression: without an explicit floor, TLS 1.0/1.1 could be negotiated on affected connections.

How Has This Been Tested?

`go build ./pkg/utils/...` passes.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

tlsConfigFromLDAPConn (shared by GetLDAPClientWithReconnect,
GetLDAPClientWithPool and GetLDAPClientForAuth) built its *tls.Config
without a MinVersion, letting the LDAP client negotiate down to
whatever the Go runtime's default minimum TLS version is. Callers
(oCIS graph service, auth-basic/users/groups managers) previously set
MinVersion: tls.VersionTLS12 themselves before this helper was
introduced in #658. Restore that floor on both the insecure and
CA-cert paths.

Signed-off-by: Lukas Hirt <info@hirt.cz>
@kw-security

kw-security commented Jul 27, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants