fix(ldap): restore TLS 1.2 floor for LDAP connections - #672
Open
LukasHirt wants to merge 1 commit into
Open
Conversation
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>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
9 tasks
2403905
approved these changes
Jul 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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