Skip to content

feat: [OCISDEV-1031] add opt-in LDAP connection pool - #658

Merged
LukasHirt merged 5 commits into
stable-8.0from
feat/ocisdev-1031-ldap-connection-pool
Jul 23, 2026
Merged

LukasHirt merged 5 commits into
stable-8.0from
feat/ocisdev-1031-ldap-connection-pool

Conversation

@LukasHirt

Copy link
Copy Markdown

Add GetLDAPClientWithPool, a bounded pool of authenticated LDAP connections, as a drop-in alternative to the existing single, long-lived reconnecting connection used by the auth/user/group LDAP managers. Connections are dialed and bound lazily on checkout, unhealthy connections are discarded and lazily re-dialed rather than eagerly reconnected, and checkout blocks with a configurable timeout once the pool is exhausted.

Disabled by default; enable per backend via pool_enabled (plus pool_size and pool_checkout_timeout) on the LDAP connection config.

@LukasHirt LukasHirt self-assigned this Jul 16, 2026
@LukasHirt
LukasHirt requested a review from a team as a code owner July 16, 2026 09:05
@kw-security

kw-security commented Jul 16, 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.

@LukasHirt

LukasHirt commented Jul 16, 2026 •

Copy link
Copy Markdown
Author

@kobergj I copied over the stubbed methods from reconnect.go but seems like they are quite chaotic? Some are doing nothing, some are throwing error, some are returning nil... what would you say about throwing the same error in every stubbed method?

@2403905

2403905 commented Jul 16, 2026

Copy link
Copy Markdown

ai review

issue — no transparent retry on a dead connection (behavioral regression vs. reconnect)

  ConnWithReconnect.retry transparently recovers from network errors: on a dropped connection the first fn fails with ldap.ErrorNetwork, and it re-dials and retries once
  (defaultRetries = 1) before returning to the caller. The pool does not do this:
  
  func (p *ConnPool) do(fn func(conn ldap.Client) error) error {
      conn, err := p.checkout()
      ...
      opErr := fn(conn)
      p.release(conn, opErr)   // evicts on network error, but returns opErr to caller
      return opErr
  }

  checkout hands back idle connections with no health check. LDAP servers routinely drop idle connections (server-side idle timeouts, load-balancer/firewall reaping). With the pool,
  the first request after an idle period lands on a stale connection, fails with a network error, and that error is propagated to the caller — the connection is evicted, but only after
  the request has already failed. The reconnect path masks exactly this case today.

  Suggested fix: retry once inside do on a network error with a freshly dialed connection, to preserve drop-in semantics:

  func (p *ConnPool) do(fn func(conn ldap.Client) error) error {
      for try := 0; try <= defaultRetries; try++ {
          conn, err := p.checkout()
          if err != nil {
              return err
          }
          opErr := fn(conn)
          p.release(conn, opErr)              // release evicts on network error
          if opErr == nil || !ldap.IsErrorWithCode(opErr, ldap.ErrorNetwork) {
              return opErr
          }
      }
      return ldap.NewError(ldap.ErrorNetwork, errMaxRetries)
  }

  (On the retry, checkout will re-dial since the evicted conn is gone — modulo picking up another stale idle conn, which the second dial-on-miss handles well enough.) This is the
  finding I'd most want resolved.


  Minor / nits

  - time.After in checkout isn't stopped when the sem send wins the select; the timer lives until it fires. Negligible, but time.NewTimer + Stop avoids the transient allocation on the
  hot path.
  - GetLastError does a full checkout/release just to read GetLastError() off an arbitrary pooled connection — semantically meaningless for a pool (there's no single "last"
  connection). It's currently unused by callers, so low impact; consider returning nil or documenting it as best-effort.
  - No idle health-check on checkout. Related to the main issue; once do retries on network errors this is acceptable, since the retry covers the stale-conn case. Worth a code comment
  noting the "evict-on-failure, no active health check" design.
  - SetLogger exists but is never called by GetLDAPClientWithPool (the reconnect constructor doesn't wire a logger either, so this matches existing behavior). If observability of pool
  dials/evictions matters operationally, consider plumbing the manager's logger through — the Debug "dialing new pooled LDAP connection" line is otherwise dead.
  - Copyright header on the new files reads "Copyright 2022 CERN" — cosmetic; matches the repo's boilerplate convention so it's fine.

@LukasHirt
LukasHirt requested a review from 2403905 July 16, 2026 09:51
Comment thread pkg/utils/ldap/pool.go Resolved
Comment thread pkg/utils/ldap/pool.go Resolved
Comment thread pkg/utils/ldap/pool.go Resolved
Comment thread pkg/utils/ldap/pool.go Resolved
Comment thread pkg/utils/ldap/pool.go Resolved
Comment thread pkg/utils/ldap/pool.go Resolved
Comment thread pkg/auth/manager/ldap/ldap.go Resolved
@jvillafanez

Copy link
Copy Markdown
Member

Some additional things:

Why are we trying to use a LDAP connection pool as a regular LDAP client?. I'm pretty sure this will end up causing problems. There are several unimplemented methods in the pool that will return errors. This is fine, but the problem is that the client that will be used (either the "real" client or the pool) is set in one place and used in another. Whoever will use the client won't know if he's using the "real" client or the pool, and as such won't know what methods aren't implemented.
The expectation is that, as LDAP client, all the methods are available, however, since the pool only implements a few of them, only those will be used. We're reducing the functionality and it won't be documented anywhere.

Why not use the LDAP pool as a pool? Either use a regular LDAP client, or use the LDAP pool, but don't try to use one as another because the behavior is naturally different. You can use a LDAP pool with only one slot if you want (assuming everything works fine)

There is a lack of context.Context in the pool's operations. I guess it's because the LDAP client doesn't have support of it.
I see a potential problem with the do method of the pool: I don't see a way to stop the retries. If I want to shutdown or restart the service, I'm not sure if it will stop the retries cleanly or we'll have to kill the app. The other problem is that the pool will exhaust the retries despite the context / request being done: user makes request -> user cancels request after 2 seconds -> LDAP request will still be made and retried.

The last thing is that blocking calls aren't common, so they should be explicitly documented to prevent possible issues in the future. It's true that those call are private, but they could be used internally in other places if we need to add new functionality. It would also help to document the expected behavior.

Comment thread pkg/utils/ldap/pool.go Resolved
Comment thread pkg/utils/ldap/pool.go Resolved
Comment thread pkg/utils/ldap/pool.go Resolved
Comment thread pkg/utils/ldap/pool.go Resolved
@2403905

2403905 commented Jul 17, 2026 •

Copy link
Copy Markdown

One more point, this epic pointed to 8.0.7. We should work with the fork from stable-8.0
I created the feature branches in both ocis & reva repo feat/OCISDEV-1030-ldap-client

@LukasHirt

Copy link
Copy Markdown
Author

Why are we trying to use a LDAP connection pool as a regular LDAP client?

This is per the acceptance criteria in the ticket:

Connection pooling implemented behind the existing ldap.Client interface (Story 1).

There are several unimplemented methods in the pool that will return errors.

I followed the same approach here as is done with the existing reconnect implementation.

@LukasHirt
LukasHirt requested review from 2403905 and jvillafanez July 21, 2026 12:13
@jvillafanez

Copy link
Copy Markdown
Member

Does it makes more sense that the checkout and release use a counter instead of slots?
I think the current process is difficult to follow: channels are expected to be used to transfer data between goroutines, not to hold data. In addition, to checkout a client you need to write "something" in the slot instead of extracting from the slot; this seems counterintuitive.

You might want to check https://pkg.go.dev/golang.org/x/sync/semaphore as it seems more aligned to what you're trying to do. There is also the context.WithTimeout(....) that can be used with Acquire method of the semaphore.

Comment thread pkg/utils/ldap/pool.go Resolved
@LukasHirt
LukasHirt changed the base branch from main to stable-8.0 July 22, 2026 08:26
Add GetLDAPClientWithPool, a bounded pool of authenticated LDAP
connections, as a drop-in alternative to the existing single, long-lived
reconnecting connection used by the auth/user/group LDAP managers.
Connections are dialed and bound lazily on checkout, unhealthy
connections are discarded and lazily re-dialed rather than eagerly
reconnected, and checkout blocks with a configurable timeout once the
pool is exhausted.

Disabled by default; enable per backend via pool_enabled (plus
pool_size and pool_checkout_timeout) on the LDAP connection config.

Signed-off-by: Lukas Hirt <[email protected]>
Retry once on a network error in ConnPool.do, mirroring
ConnWithReconnect's existing retry behavior: idle pooled connections
aren't health-checked before use, so a connection that went stale
while idle would otherwise fail the caller's first operation instead
of being transparently recovered.

Also: stop leaking the checkout() timer when the semaphore wins the
select, simplify GetLastError to not check out a connection just to
read a value that's meaningless for a pool, and wire a real logger
into GetLDAPClientWithPool so pool dial/checkout debug logging isn't
silently discarded.

Signed-off-by: Lukas Hirt <[email protected]>
…pool

Move Config to its own file, document the pool-size/checkout-timeout
defaults, name the dial callback type and document what it does,
require the logger at construction instead of via a mutable setter,
replace the closed-flag mutex with an atomic bool, log Close() errors
on evicted/idle connections, and add GetLDAPClientFromConfig so the
auth/user/group LDAP managers no longer duplicate the pool-vs-reconnect
branch.

Signed-off-by: Lukas Hirt <[email protected]>
@LukasHirt
LukasHirt force-pushed the feat/ocisdev-1031-ldap-connection-pool branch from ff34346 to 5a9b1a3 Compare July 22, 2026 11:38
Collapse the TLS/non-TLS DialURL branch in dialLDAP and
ConnWithReconnect.ldapConnect into a single call:
DialWithTLSConfig(nil) is equivalent to omitting the option, since
crypto/tls treats a nil *tls.Config as the zero configuration.

Replace ConnPool's channel-based semaphore with
golang.org/x/sync/semaphore.Weighted (already a repo dependency),
using context.WithTimeout for the checkout deadline instead of a
manual timer.

Signed-off-by: Lukas Hirt <[email protected]>
@LukasHirt

Copy link
Copy Markdown
Author

Does it makes more sense that the checkout and release use a counter instead of slots?

Switched sem to golang.org/x/sync/semaphore.Weighted (already a repo dependency) and use context.WithTimeout + Acquire/Release for the checkout deadline instead of the manual time.NewTimer/select, as suggested. Kept idle as a channel though — it's holding actual ldap.Client values that need to live somewhere, so a mutex-guarded slice/counter combo wouldn't really be simpler than the buffered channel, and release never blocking on it is a property I'd like to keep. See commit 427b8fd.

Separately, re-surfacing your earlier point about retries not respecting request cancellation (2026-07-16): that's intentionally out of scope for OCISDEV-1031 — retry/backoff behavior (including making it context-aware) is covered by the sibling story OCISDEV-1032, so I'd rather not grow this PR's scope to cover it. Flagging it explicitly here so it doesn't read as an oversight.

@jvillafanez

Copy link
Copy Markdown
Member

Code looks good, but need to fix the tests. 👍

wg.Go (sync.WaitGroup.Go) needs go1.25; this branch is rebased onto
stable-8.0, which pins go1.24.0 in go.mod, so CI's unit-tests job
failed to build the test binary. Use wg.Add/Done with a plain
goroutine instead.

Signed-off-by: Lukas Hirt <[email protected]>
@LukasHirt
LukasHirt merged commit 74c345f into stable-8.0 Jul 23, 2026
16 checks passed
@LukasHirt
LukasHirt deleted the feat/ocisdev-1031-ldap-connection-pool branch July 23, 2026 11:43
2403905 pushed a commit that referenced this pull request Jul 28, 2026
…672)

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 <[email protected]>
LukasHirt added a commit that referenced this pull request Jul 29, 2026
…674)

tlsConfigFromLDAPConn's CA-cert branch built its RootCAs pool from
x509.SystemCertPool() plus the configured CA, so configuring a CA
cert also trusted every system-level CA instead of just the pinned
one — a trust-scope widening versus the pre-pool graph service
behavior (x509.NewCertPool()). It also ignored AppendCertsFromPEM's
return value, silently falling back to an unrestricted trust store
on a malformed/empty CA file instead of failing initialization.

Use x509.NewCertPool() and fail when the PEM contains no valid
certificates, matching the behavior callers relied on before this
helper was introduced in #658.

Flagged during review of owncloud/ocis#12660.

Signed-off-by: Lukas Hirt <[email protected]>
LukasHirt added a commit to owncloud/ocis that referenced this pull request Jul 29, 2026
Bump the vendored reva dependency to pick up the opt-in bounded LDAP
connection pool (owncloud/reva#658, #665), and wire it into oCIS: add
pool_enabled/pool_size/pool_checkout_timeout config to auth-basic,
users, groups and graph, forward it into the reva config map for the
first three, and unify graph's identity backend onto reva's LDAP
client (utils.GetLDAPClientFromConfig) instead of its own hand-rolled
reconnecting client, now that reva implements PasswordModify and
ModifyWithResult on both LDAP clients. Pooling is off by default and
fully backwards compatible.

Signed-off-by: Lukas Hirt <[email protected]>
LukasHirt added a commit to owncloud/ocis that referenced this pull request Jul 30, 2026
* feat(ldap): [OCISDEV-1031] add opt-in LDAP connection pool

Bump the vendored reva dependency to pick up the opt-in bounded LDAP
connection pool (owncloud/reva#658, #665), and wire it into oCIS: add
pool_enabled/pool_size/pool_checkout_timeout config to auth-basic,
users, groups and graph, forward it into the reva config map for the
first three, and unify graph's identity backend onto reva's LDAP
client (utils.GetLDAPClientFromConfig) instead of its own hand-rolled
reconnecting client, now that reva implements PasswordModify and
ModifyWithResult on both LDAP clients. Pooling is off by default and
fully backwards compatible.

Signed-off-by: Lukas Hirt <[email protected]>

* test(ldap): [OCISDEV-1031] run graph LDAP suites with pooling enabled in CI

Add a dedicated ldap-pool-tests job to acceptance-tests.yml that reruns
apiGraphUser/apiGraph/apiGraphGroup with OCIS_LDAP_POOL_ENABLED=true, so
concurrent behat requests exercise checkout/release, eviction and the
pooled PasswordModify/ModifyWithResult path end-to-end, in addition to
the existing pooling-disabled runs of the same suites.

Signed-off-by: Lukas Hirt <[email protected]>

---------

Signed-off-by: Lukas Hirt <[email protected]>
mklos-kw pushed a commit that referenced this pull request Aug 3, 2026
* feat: [OCISDEV-1031] add opt-in LDAP connection pool

Add GetLDAPClientWithPool, a bounded pool of authenticated LDAP
connections, as a drop-in alternative to the existing single, long-lived
reconnecting connection used by the auth/user/group LDAP managers.
Connections are dialed and bound lazily on checkout, unhealthy
connections are discarded and lazily re-dialed rather than eagerly
reconnected, and checkout blocks with a configurable timeout once the
pool is exhausted.

Disabled by default; enable per backend via pool_enabled (plus
pool_size and pool_checkout_timeout) on the LDAP connection config.

Signed-off-by: Lukas Hirt <[email protected]>

* fix: [OCISDEV-1031] address PR review on the LDAP connection pool

Retry once on a network error in ConnPool.do, mirroring
ConnWithReconnect's existing retry behavior: idle pooled connections
aren't health-checked before use, so a connection that went stale
while idle would otherwise fail the caller's first operation instead
of being transparently recovered.

Also: stop leaking the checkout() timer when the semaphore wins the
select, simplify GetLastError to not check out a connection just to
read a value that's meaningless for a pool, and wire a real logger
into GetLDAPClientWithPool so pool dial/checkout debug logging isn't
silently discarded.

Signed-off-by: Lukas Hirt <[email protected]>

* fix: [OCISDEV-1031] address remaining PR review comments on the LDAP pool

Move Config to its own file, document the pool-size/checkout-timeout
defaults, name the dial callback type and document what it does,
require the logger at construction instead of via a mutable setter,
replace the closed-flag mutex with an atomic bool, log Close() errors
on evicted/idle connections, and add GetLDAPClientFromConfig so the
auth/user/group LDAP managers no longer duplicate the pool-vs-reconnect
branch.

Signed-off-by: Lukas Hirt <[email protected]>

* fix: [OCISDEV-1031] simplify TLS dial and use a weighted semaphore

Collapse the TLS/non-TLS DialURL branch in dialLDAP and
ConnWithReconnect.ldapConnect into a single call:
DialWithTLSConfig(nil) is equivalent to omitting the option, since
crypto/tls treats a nil *tls.Config as the zero configuration.

Replace ConnPool's channel-based semaphore with
golang.org/x/sync/semaphore.Weighted (already a repo dependency),
using context.WithTimeout for the checkout deadline instead of a
manual timer.

Signed-off-by: Lukas Hirt <[email protected]>

* fix: [OCISDEV-1031] fix unit-tests build on go1.24

wg.Go (sync.WaitGroup.Go) needs go1.25; this branch is rebased onto
stable-8.0, which pins go1.24.0 in go.mod, so CI's unit-tests job
failed to build the test binary. Use wg.Add/Done with a plain
goroutine instead.

Signed-off-by: Lukas Hirt <[email protected]>

---------

Signed-off-by: Lukas Hirt <[email protected]>

feat: [OCISDEV-1031] implement PasswordModify and ModifyWithResult on LDAP clients (#665)

* feat: [OCISDEV-1031] implement PasswordModify and ModifyWithResult on LDAP clients

ConnWithReconnect and ConnPool (pkg/utils/ldap) stubbed out PasswordModify
and ModifyWithResult with a "not implemented" error, copied over from the
existing set of unimplemented ldap.Client methods. Implement both on each
client via their existing retry helpers (retry on ConnWithReconnect, do on
ConnPool), mirroring the retry-on-network-error behaviour already used by
Search/Add/Modify/etc., so callers relying on the LDAP Password Modify
Extended Operation or on ModifyWithResult work with either client.

Signed-off-by: Lukas Hirt <[email protected]>

* test: guard fakeConn against nil overrides, cover retry on PasswordModify/ModifyWithResult

Addresses review feedback on #665: fakeConn.PasswordModify/ModifyWithResult
now return an error instead of panicking when their func overrides aren't
set, and the pool's network-error retry path is now exercised for both new
methods (previously only the happy path was tested).

Signed-off-by: Lukas Hirt <[email protected]>

---------

Signed-off-by: Lukas Hirt <[email protected]>

fix(ldap): [OCISDEV-1031] restore TLS 1.2 floor for LDAP connections (#672)

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 <[email protected]>

fix(ldap): [OCISDEV-1031] restore pinned-CA-only trust for LDAP TLS (#674)

tlsConfigFromLDAPConn's CA-cert branch built its RootCAs pool from
x509.SystemCertPool() plus the configured CA, so configuring a CA
cert also trusted every system-level CA instead of just the pinned
one — a trust-scope widening versus the pre-pool graph service
behavior (x509.NewCertPool()). It also ignored AppendCertsFromPEM's
return value, silently falling back to an unrestricted trust store
on a malformed/empty CA file instead of failing initialization.

Use x509.NewCertPool() and fail when the PEM contains no valid
certificates, matching the behavior callers relied on before this
helper was introduced in #658.

Flagged during review of owncloud/ocis#12660.

Signed-off-by: Lukas Hirt <[email protected]>

docs: point changelog fragments at forward-port PR #679
mklos-kw pushed a commit that referenced this pull request Aug 3, 2026
* feat: [OCISDEV-1031] add opt-in LDAP connection pool

Add GetLDAPClientWithPool, a bounded pool of authenticated LDAP
connections, as a drop-in alternative to the existing single, long-lived
reconnecting connection used by the auth/user/group LDAP managers.
Connections are dialed and bound lazily on checkout, unhealthy
connections are discarded and lazily re-dialed rather than eagerly
reconnected, and checkout blocks with a configurable timeout once the
pool is exhausted.

Disabled by default; enable per backend via pool_enabled (plus
pool_size and pool_checkout_timeout) on the LDAP connection config.

Signed-off-by: Lukas Hirt <[email protected]>

* fix: [OCISDEV-1031] address PR review on the LDAP connection pool

Retry once on a network error in ConnPool.do, mirroring
ConnWithReconnect's existing retry behavior: idle pooled connections
aren't health-checked before use, so a connection that went stale
while idle would otherwise fail the caller's first operation instead
of being transparently recovered.

Also: stop leaking the checkout() timer when the semaphore wins the
select, simplify GetLastError to not check out a connection just to
read a value that's meaningless for a pool, and wire a real logger
into GetLDAPClientWithPool so pool dial/checkout debug logging isn't
silently discarded.

Signed-off-by: Lukas Hirt <[email protected]>

* fix: [OCISDEV-1031] address remaining PR review comments on the LDAP pool

Move Config to its own file, document the pool-size/checkout-timeout
defaults, name the dial callback type and document what it does,
require the logger at construction instead of via a mutable setter,
replace the closed-flag mutex with an atomic bool, log Close() errors
on evicted/idle connections, and add GetLDAPClientFromConfig so the
auth/user/group LDAP managers no longer duplicate the pool-vs-reconnect
branch.

Signed-off-by: Lukas Hirt <[email protected]>

* fix: [OCISDEV-1031] simplify TLS dial and use a weighted semaphore

Collapse the TLS/non-TLS DialURL branch in dialLDAP and
ConnWithReconnect.ldapConnect into a single call:
DialWithTLSConfig(nil) is equivalent to omitting the option, since
crypto/tls treats a nil *tls.Config as the zero configuration.

Replace ConnPool's channel-based semaphore with
golang.org/x/sync/semaphore.Weighted (already a repo dependency),
using context.WithTimeout for the checkout deadline instead of a
manual timer.

Signed-off-by: Lukas Hirt <[email protected]>

* fix: [OCISDEV-1031] fix unit-tests build on go1.24

wg.Go (sync.WaitGroup.Go) needs go1.25; this branch is rebased onto
stable-8.0, which pins go1.24.0 in go.mod, so CI's unit-tests job
failed to build the test binary. Use wg.Add/Done with a plain
goroutine instead.

Signed-off-by: Lukas Hirt <[email protected]>

---------

Signed-off-by: Lukas Hirt <[email protected]>

feat: [OCISDEV-1031] implement PasswordModify and ModifyWithResult on LDAP clients (#665)

* feat: [OCISDEV-1031] implement PasswordModify and ModifyWithResult on LDAP clients

ConnWithReconnect and ConnPool (pkg/utils/ldap) stubbed out PasswordModify
and ModifyWithResult with a "not implemented" error, copied over from the
existing set of unimplemented ldap.Client methods. Implement both on each
client via their existing retry helpers (retry on ConnWithReconnect, do on
ConnPool), mirroring the retry-on-network-error behaviour already used by
Search/Add/Modify/etc., so callers relying on the LDAP Password Modify
Extended Operation or on ModifyWithResult work with either client.

Signed-off-by: Lukas Hirt <[email protected]>

* test: guard fakeConn against nil overrides, cover retry on PasswordModify/ModifyWithResult

Addresses review feedback on #665: fakeConn.PasswordModify/ModifyWithResult
now return an error instead of panicking when their func overrides aren't
set, and the pool's network-error retry path is now exercised for both new
methods (previously only the happy path was tested).

Signed-off-by: Lukas Hirt <[email protected]>

---------

Signed-off-by: Lukas Hirt <[email protected]>

fix(ldap): [OCISDEV-1031] restore TLS 1.2 floor for LDAP connections (#672)

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 <[email protected]>

fix(ldap): [OCISDEV-1031] restore pinned-CA-only trust for LDAP TLS (#674)

tlsConfigFromLDAPConn's CA-cert branch built its RootCAs pool from
x509.SystemCertPool() plus the configured CA, so configuring a CA
cert also trusted every system-level CA instead of just the pinned
one — a trust-scope widening versus the pre-pool graph service
behavior (x509.NewCertPool()). It also ignored AppendCertsFromPEM's
return value, silently falling back to an unrestricted trust store
on a malformed/empty CA file instead of failing initialization.

Use x509.NewCertPool() and fail when the PEM contains no valid
certificates, matching the behavior callers relied on before this
helper was introduced in #658.

Flagged during review of owncloud/ocis#12660.

Signed-off-by: Lukas Hirt <[email protected]>

docs: point changelog fragments at forward-port PR #679
mklos-kw pushed a commit that referenced this pull request Aug 4, 2026
* feat: [OCISDEV-1031] add opt-in LDAP connection pool

Add GetLDAPClientWithPool, a bounded pool of authenticated LDAP
connections, as a drop-in alternative to the existing single, long-lived
reconnecting connection used by the auth/user/group LDAP managers.
Connections are dialed and bound lazily on checkout, unhealthy
connections are discarded and lazily re-dialed rather than eagerly
reconnected, and checkout blocks with a configurable timeout once the
pool is exhausted.

Disabled by default; enable per backend via pool_enabled (plus
pool_size and pool_checkout_timeout) on the LDAP connection config.

Signed-off-by: Lukas Hirt <[email protected]>

* fix: [OCISDEV-1031] address PR review on the LDAP connection pool

Retry once on a network error in ConnPool.do, mirroring
ConnWithReconnect's existing retry behavior: idle pooled connections
aren't health-checked before use, so a connection that went stale
while idle would otherwise fail the caller's first operation instead
of being transparently recovered.

Also: stop leaking the checkout() timer when the semaphore wins the
select, simplify GetLastError to not check out a connection just to
read a value that's meaningless for a pool, and wire a real logger
into GetLDAPClientWithPool so pool dial/checkout debug logging isn't
silently discarded.

Signed-off-by: Lukas Hirt <[email protected]>

* fix: [OCISDEV-1031] address remaining PR review comments on the LDAP pool

Move Config to its own file, document the pool-size/checkout-timeout
defaults, name the dial callback type and document what it does,
require the logger at construction instead of via a mutable setter,
replace the closed-flag mutex with an atomic bool, log Close() errors
on evicted/idle connections, and add GetLDAPClientFromConfig so the
auth/user/group LDAP managers no longer duplicate the pool-vs-reconnect
branch.

Signed-off-by: Lukas Hirt <[email protected]>

* fix: [OCISDEV-1031] simplify TLS dial and use a weighted semaphore

Collapse the TLS/non-TLS DialURL branch in dialLDAP and
ConnWithReconnect.ldapConnect into a single call:
DialWithTLSConfig(nil) is equivalent to omitting the option, since
crypto/tls treats a nil *tls.Config as the zero configuration.

Replace ConnPool's channel-based semaphore with
golang.org/x/sync/semaphore.Weighted (already a repo dependency),
using context.WithTimeout for the checkout deadline instead of a
manual timer.

Signed-off-by: Lukas Hirt <[email protected]>

* fix: [OCISDEV-1031] fix unit-tests build on go1.24

wg.Go (sync.WaitGroup.Go) needs go1.25; this branch is rebased onto
stable-8.0, which pins go1.24.0 in go.mod, so CI's unit-tests job
failed to build the test binary. Use wg.Add/Done with a plain
goroutine instead.

Signed-off-by: Lukas Hirt <[email protected]>

---------

Signed-off-by: Lukas Hirt <[email protected]>

feat: [OCISDEV-1031] implement PasswordModify and ModifyWithResult on LDAP clients (#665)

* feat: [OCISDEV-1031] implement PasswordModify and ModifyWithResult on LDAP clients

ConnWithReconnect and ConnPool (pkg/utils/ldap) stubbed out PasswordModify
and ModifyWithResult with a "not implemented" error, copied over from the
existing set of unimplemented ldap.Client methods. Implement both on each
client via their existing retry helpers (retry on ConnWithReconnect, do on
ConnPool), mirroring the retry-on-network-error behaviour already used by
Search/Add/Modify/etc., so callers relying on the LDAP Password Modify
Extended Operation or on ModifyWithResult work with either client.

Signed-off-by: Lukas Hirt <[email protected]>

* test: guard fakeConn against nil overrides, cover retry on PasswordModify/ModifyWithResult

Addresses review feedback on #665: fakeConn.PasswordModify/ModifyWithResult
now return an error instead of panicking when their func overrides aren't
set, and the pool's network-error retry path is now exercised for both new
methods (previously only the happy path was tested).

Signed-off-by: Lukas Hirt <[email protected]>

---------

Signed-off-by: Lukas Hirt <[email protected]>

fix(ldap): [OCISDEV-1031] restore TLS 1.2 floor for LDAP connections (#672)

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 <[email protected]>

fix(ldap): [OCISDEV-1031] restore pinned-CA-only trust for LDAP TLS (#674)

tlsConfigFromLDAPConn's CA-cert branch built its RootCAs pool from
x509.SystemCertPool() plus the configured CA, so configuring a CA
cert also trusted every system-level CA instead of just the pinned
one — a trust-scope widening versus the pre-pool graph service
behavior (x509.NewCertPool()). It also ignored AppendCertsFromPEM's
return value, silently falling back to an unrestricted trust store
on a malformed/empty CA file instead of failing initialization.

Use x509.NewCertPool() and fail when the PEM contains no valid
certificates, matching the behavior callers relied on before this
helper was introduced in #658.

Flagged during review of owncloud/ocis#12660.

Signed-off-by: Lukas Hirt <[email protected]>

docs: point changelog fragments at forward-port PR #680
mklos-kw pushed a commit to owncloud/ocis that referenced this pull request Aug 4, 2026
Bump the vendored reva dependency to pick up the opt-in bounded LDAP
connection pool (owncloud/reva#658, #665), and wire it into oCIS: add
pool_enabled/pool_size/pool_checkout_timeout config to auth-basic,
users, groups and graph, forward it into the reva config map for the
first three, and unify graph's identity backend onto reva's LDAP
client (utils.GetLDAPClientFromConfig) instead of its own hand-rolled
reconnecting client, now that reva implements PasswordModify and
ModifyWithResult on both LDAP clients. Pooling is off by default and
fully backwards compatible.

Signed-off-by: Lukas Hirt <[email protected]>

test(ldap): [OCISDEV-1031] run graph LDAP suites with pooling enabled in CI

Add a dedicated ldap-pool-tests job to acceptance-tests.yml that reruns
apiGraphUser/apiGraph/apiGraphGroup with OCIS_LDAP_POOL_ENABLED=true, so
concurrent behat requests exercise checkout/release, eviction and the
pooled PasswordModify/ModifyWithResult path end-to-end, in addition to
the existing pooling-disabled runs of the same suites.

Signed-off-by: Lukas Hirt <[email protected]>

fix(ldap): [OCISDEV-1031] set real pool_size/pool_checkout_timeout defaults

Only PoolEnabled: false was set in the four defaultconfig.go files;
PoolSize/PoolCheckoutTimeout were left as Go zero values (0/0s),
relying on reva's NewLDAPPool substituting 5/30s when <= 0. That
reads as "zero connections" to an operator in the generated yaml
config rather than "default 5". Set the real defaults (5, 30s)
so documented defaults match what's emitted.

Signed-off-by: Lukas Hirt <[email protected]>

chore(deps): [OCISDEV-1031] bump reva to pick up LDAP TLS fixes

Bumps the vendored reva dependency to owncloud/reva@8ee2020, picking
up owncloud/reva#672 (restore MinVersion: tls.VersionTLS12 on LDAP
TLS connections) and owncloud/reva#674 (restore pinned-CA-only trust
and PEM validation for the CA-cert path), both flagged during review
of this PR.

Signed-off-by: Lukas Hirt <[email protected]>

docs: point changelog fragment at forward-port PR #12686
mklos-kw added a commit to owncloud/ocis that referenced this pull request Aug 4, 2026
* feat(ldap): [OCISDEV-1031] add opt-in LDAP connection pool

Bump the vendored reva dependency to pick up the opt-in bounded LDAP
connection pool (owncloud/reva#658, #665), and wire it into oCIS: add
pool_enabled/pool_size/pool_checkout_timeout config to auth-basic,
users, groups and graph, forward it into the reva config map for the
first three, and unify graph's identity backend onto reva's LDAP
client (utils.GetLDAPClientFromConfig) instead of its own hand-rolled
reconnecting client, now that reva implements PasswordModify and
ModifyWithResult on both LDAP clients. Pooling is off by default and
fully backwards compatible.

Signed-off-by: Lukas Hirt <[email protected]>

test(ldap): [OCISDEV-1031] run graph LDAP suites with pooling enabled in CI

Add a dedicated ldap-pool-tests job to acceptance-tests.yml that reruns
apiGraphUser/apiGraph/apiGraphGroup with OCIS_LDAP_POOL_ENABLED=true, so
concurrent behat requests exercise checkout/release, eviction and the
pooled PasswordModify/ModifyWithResult path end-to-end, in addition to
the existing pooling-disabled runs of the same suites.

Signed-off-by: Lukas Hirt <[email protected]>

fix(ldap): [OCISDEV-1031] set real pool_size/pool_checkout_timeout defaults

Only PoolEnabled: false was set in the four defaultconfig.go files;
PoolSize/PoolCheckoutTimeout were left as Go zero values (0/0s),
relying on reva's NewLDAPPool substituting 5/30s when <= 0. That
reads as "zero connections" to an operator in the generated yaml
config rather than "default 5". Set the real defaults (5, 30s)
so documented defaults match what's emitted.

Signed-off-by: Lukas Hirt <[email protected]>

chore(deps): [OCISDEV-1031] bump reva to pick up LDAP TLS fixes

Bumps the vendored reva dependency to owncloud/reva@8ee2020, picking
up owncloud/reva#672 (restore MinVersion: tls.VersionTLS12 on LDAP
TLS connections) and owncloud/reva#674 (restore pinned-CA-only trust
and PEM validation for the CA-cert path), both flagged during review
of this PR.

Signed-off-by: Lukas Hirt <[email protected]>

docs: point changelog fragment at forward-port PR #12686

* chore: bump reva

---------

Co-authored-by: Michal Klos <[email protected]>
mklos-kw pushed a commit that referenced this pull request Aug 4, 2026
* feat: [OCISDEV-1031] add opt-in LDAP connection pool

Add GetLDAPClientWithPool, a bounded pool of authenticated LDAP
connections, as a drop-in alternative to the existing single, long-lived
reconnecting connection used by the auth/user/group LDAP managers.
Connections are dialed and bound lazily on checkout, unhealthy
connections are discarded and lazily re-dialed rather than eagerly
reconnected, and checkout blocks with a configurable timeout once the
pool is exhausted.

Disabled by default; enable per backend via pool_enabled (plus
pool_size and pool_checkout_timeout) on the LDAP connection config.

Signed-off-by: Lukas Hirt <[email protected]>

* fix: [OCISDEV-1031] address PR review on the LDAP connection pool

Retry once on a network error in ConnPool.do, mirroring
ConnWithReconnect's existing retry behavior: idle pooled connections
aren't health-checked before use, so a connection that went stale
while idle would otherwise fail the caller's first operation instead
of being transparently recovered.

Also: stop leaking the checkout() timer when the semaphore wins the
select, simplify GetLastError to not check out a connection just to
read a value that's meaningless for a pool, and wire a real logger
into GetLDAPClientWithPool so pool dial/checkout debug logging isn't
silently discarded.

Signed-off-by: Lukas Hirt <[email protected]>

* fix: [OCISDEV-1031] address remaining PR review comments on the LDAP pool

Move Config to its own file, document the pool-size/checkout-timeout
defaults, name the dial callback type and document what it does,
require the logger at construction instead of via a mutable setter,
replace the closed-flag mutex with an atomic bool, log Close() errors
on evicted/idle connections, and add GetLDAPClientFromConfig so the
auth/user/group LDAP managers no longer duplicate the pool-vs-reconnect
branch.

Signed-off-by: Lukas Hirt <[email protected]>

* fix: [OCISDEV-1031] simplify TLS dial and use a weighted semaphore

Collapse the TLS/non-TLS DialURL branch in dialLDAP and
ConnWithReconnect.ldapConnect into a single call:
DialWithTLSConfig(nil) is equivalent to omitting the option, since
crypto/tls treats a nil *tls.Config as the zero configuration.

Replace ConnPool's channel-based semaphore with
golang.org/x/sync/semaphore.Weighted (already a repo dependency),
using context.WithTimeout for the checkout deadline instead of a
manual timer.

Signed-off-by: Lukas Hirt <[email protected]>

* fix: [OCISDEV-1031] fix unit-tests build on go1.24

wg.Go (sync.WaitGroup.Go) needs go1.25; this branch is rebased onto
stable-8.0, which pins go1.24.0 in go.mod, so CI's unit-tests job
failed to build the test binary. Use wg.Add/Done with a plain
goroutine instead.

Signed-off-by: Lukas Hirt <[email protected]>

---------

Signed-off-by: Lukas Hirt <[email protected]>

feat: [OCISDEV-1031] implement PasswordModify and ModifyWithResult on LDAP clients (#665)

* feat: [OCISDEV-1031] implement PasswordModify and ModifyWithResult on LDAP clients

ConnWithReconnect and ConnPool (pkg/utils/ldap) stubbed out PasswordModify
and ModifyWithResult with a "not implemented" error, copied over from the
existing set of unimplemented ldap.Client methods. Implement both on each
client via their existing retry helpers (retry on ConnWithReconnect, do on
ConnPool), mirroring the retry-on-network-error behaviour already used by
Search/Add/Modify/etc., so callers relying on the LDAP Password Modify
Extended Operation or on ModifyWithResult work with either client.

Signed-off-by: Lukas Hirt <[email protected]>

* test: guard fakeConn against nil overrides, cover retry on PasswordModify/ModifyWithResult

Addresses review feedback on #665: fakeConn.PasswordModify/ModifyWithResult
now return an error instead of panicking when their func overrides aren't
set, and the pool's network-error retry path is now exercised for both new
methods (previously only the happy path was tested).

Signed-off-by: Lukas Hirt <[email protected]>

---------

Signed-off-by: Lukas Hirt <[email protected]>

fix(ldap): [OCISDEV-1031] restore TLS 1.2 floor for LDAP connections (#672)

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 <[email protected]>

fix(ldap): [OCISDEV-1031] restore pinned-CA-only trust for LDAP TLS (#674)

tlsConfigFromLDAPConn's CA-cert branch built its RootCAs pool from
x509.SystemCertPool() plus the configured CA, so configuring a CA
cert also trusted every system-level CA instead of just the pinned
one — a trust-scope widening versus the pre-pool graph service
behavior (x509.NewCertPool()). It also ignored AppendCertsFromPEM's
return value, silently falling back to an unrestricted trust store
on a malformed/empty CA file instead of failing initialization.

Use x509.NewCertPool() and fail when the PEM contains no valid
certificates, matching the behavior callers relied on before this
helper was introduced in #658.

Flagged during review of owncloud/ocis#12660.

Signed-off-by: Lukas Hirt <[email protected]>

docs: point changelog fragments at forward-port PR #680
mklos-kw pushed a commit to owncloud/ocis that referenced this pull request Aug 4, 2026
Bump the vendored reva dependency to pick up the opt-in bounded LDAP
connection pool (owncloud/reva#658, #665), and wire it into oCIS: add
pool_enabled/pool_size/pool_checkout_timeout config to auth-basic,
users, groups and graph, forward it into the reva config map for the
first three, and unify graph's identity backend onto reva's LDAP
client (utils.GetLDAPClientFromConfig) instead of its own hand-rolled
reconnecting client, now that reva implements PasswordModify and
ModifyWithResult on both LDAP clients. Pooling is off by default and
fully backwards compatible.

Signed-off-by: Lukas Hirt <[email protected]>

test(ldap): [OCISDEV-1031] run graph LDAP suites with pooling enabled in CI

Add a dedicated ldap-pool-tests job to acceptance-tests.yml that reruns
apiGraphUser/apiGraph/apiGraphGroup with OCIS_LDAP_POOL_ENABLED=true, so
concurrent behat requests exercise checkout/release, eviction and the
pooled PasswordModify/ModifyWithResult path end-to-end, in addition to
the existing pooling-disabled runs of the same suites.

Signed-off-by: Lukas Hirt <[email protected]>

fix(ldap): [OCISDEV-1031] set real pool_size/pool_checkout_timeout defaults

Only PoolEnabled: false was set in the four defaultconfig.go files;
PoolSize/PoolCheckoutTimeout were left as Go zero values (0/0s),
relying on reva's NewLDAPPool substituting 5/30s when <= 0. That
reads as "zero connections" to an operator in the generated yaml
config rather than "default 5". Set the real defaults (5, 30s)
so documented defaults match what's emitted.

Signed-off-by: Lukas Hirt <[email protected]>

chore(deps): [OCISDEV-1031] bump reva to pick up LDAP TLS fixes

Bumps the vendored reva dependency to owncloud/reva@8ee2020, picking
up owncloud/reva#672 (restore MinVersion: tls.VersionTLS12 on LDAP
TLS connections) and owncloud/reva#674 (restore pinned-CA-only trust
and PEM validation for the CA-cert path), both flagged during review
of this PR.

Signed-off-by: Lukas Hirt <[email protected]>

docs: point changelog fragment at forward-port PR #12688
mklos-kw added a commit to owncloud/ocis that referenced this pull request Aug 4, 2026
Bump the vendored reva dependency to pick up the opt-in bounded LDAP
connection pool (owncloud/reva#658, #665), and wire it into oCIS: add
pool_enabled/pool_size/pool_checkout_timeout config to auth-basic,
users, groups and graph, forward it into the reva config map for the
first three, and unify graph's identity backend onto reva's LDAP
client (utils.GetLDAPClientFromConfig) instead of its own hand-rolled
reconnecting client, now that reva implements PasswordModify and
ModifyWithResult on both LDAP clients. Pooling is off by default and
fully backwards compatible.

Signed-off-by: Lukas Hirt <[email protected]>

test(ldap): [OCISDEV-1031] run graph LDAP suites with pooling enabled in CI

Add a dedicated ldap-pool-tests job to acceptance-tests.yml that reruns
apiGraphUser/apiGraph/apiGraphGroup with OCIS_LDAP_POOL_ENABLED=true, so
concurrent behat requests exercise checkout/release, eviction and the
pooled PasswordModify/ModifyWithResult path end-to-end, in addition to
the existing pooling-disabled runs of the same suites.

Signed-off-by: Lukas Hirt <[email protected]>

fix(ldap): [OCISDEV-1031] set real pool_size/pool_checkout_timeout defaults

Only PoolEnabled: false was set in the four defaultconfig.go files;
PoolSize/PoolCheckoutTimeout were left as Go zero values (0/0s),
relying on reva's NewLDAPPool substituting 5/30s when <= 0. That
reads as "zero connections" to an operator in the generated yaml
config rather than "default 5". Set the real defaults (5, 30s)
so documented defaults match what's emitted.

Signed-off-by: Lukas Hirt <[email protected]>

chore(deps): [OCISDEV-1031] bump reva to pick up LDAP TLS fixes

Bumps the vendored reva dependency to owncloud/reva@8ee2020, picking
up owncloud/reva#672 (restore MinVersion: tls.VersionTLS12 on LDAP
TLS connections) and owncloud/reva#674 (restore pinned-CA-only trust
and PEM validation for the CA-cert path), both flagged during review
of this PR.

Signed-off-by: Lukas Hirt <[email protected]>

docs: point changelog fragment at forward-port PR #12688
mklos-kw added a commit to owncloud/ocis that referenced this pull request Aug 5, 2026
* feat(ldap): [OCISDEV-1031] add opt-in LDAP connection pool

Bump the vendored reva dependency to pick up the opt-in bounded LDAP
connection pool (owncloud/reva#658, #665), and wire it into oCIS: add
pool_enabled/pool_size/pool_checkout_timeout config to auth-basic,
users, groups and graph, forward it into the reva config map for the
first three, and unify graph's identity backend onto reva's LDAP
client (utils.GetLDAPClientFromConfig) instead of its own hand-rolled
reconnecting client, now that reva implements PasswordModify and
ModifyWithResult on both LDAP clients. Pooling is off by default and
fully backwards compatible.

Signed-off-by: Lukas Hirt <[email protected]>

test(ldap): [OCISDEV-1031] run graph LDAP suites with pooling enabled in CI

Add a dedicated ldap-pool-tests job to acceptance-tests.yml that reruns
apiGraphUser/apiGraph/apiGraphGroup with OCIS_LDAP_POOL_ENABLED=true, so
concurrent behat requests exercise checkout/release, eviction and the
pooled PasswordModify/ModifyWithResult path end-to-end, in addition to
the existing pooling-disabled runs of the same suites.

Signed-off-by: Lukas Hirt <[email protected]>

fix(ldap): [OCISDEV-1031] set real pool_size/pool_checkout_timeout defaults

Only PoolEnabled: false was set in the four defaultconfig.go files;
PoolSize/PoolCheckoutTimeout were left as Go zero values (0/0s),
relying on reva's NewLDAPPool substituting 5/30s when <= 0. That
reads as "zero connections" to an operator in the generated yaml
config rather than "default 5". Set the real defaults (5, 30s)
so documented defaults match what's emitted.

Signed-off-by: Lukas Hirt <[email protected]>

chore(deps): [OCISDEV-1031] bump reva to pick up LDAP TLS fixes

Bumps the vendored reva dependency to owncloud/reva@8ee2020, picking
up owncloud/reva#672 (restore MinVersion: tls.VersionTLS12 on LDAP
TLS connections) and owncloud/reva#674 (restore pinned-CA-only trust
and PEM validation for the CA-cert path), both flagged during review
of this PR.

Signed-off-by: Lukas Hirt <[email protected]>

docs: point changelog fragment at forward-port PR #12688

* feat(ldap): [OCISDEV-1031] add opt-in LDAP connection pool

Bump the vendored reva dependency to pick up the opt-in bounded LDAP
connection pool (owncloud/reva#658, #665), and wire it into oCIS: add
pool_enabled/pool_size/pool_checkout_timeout config to auth-basic,
users, groups and graph, forward it into the reva config map for the
first three, and unify graph's identity backend onto reva's LDAP
client (utils.GetLDAPClientFromConfig) instead of its own hand-rolled
reconnecting client, now that reva implements PasswordModify and
ModifyWithResult on both LDAP clients. Pooling is off by default and
fully backwards compatible.

Signed-off-by: Lukas Hirt <[email protected]>

test(ldap): [OCISDEV-1031] run graph LDAP suites with pooling enabled in CI

Add a dedicated ldap-pool-tests job to acceptance-tests.yml that reruns
apiGraphUser/apiGraph/apiGraphGroup with OCIS_LDAP_POOL_ENABLED=true, so
concurrent behat requests exercise checkout/release, eviction and the
pooled PasswordModify/ModifyWithResult path end-to-end, in addition to
the existing pooling-disabled runs of the same suites.

Signed-off-by: Lukas Hirt <[email protected]>

fix(ldap): [OCISDEV-1031] set real pool_size/pool_checkout_timeout defaults

Only PoolEnabled: false was set in the four defaultconfig.go files;
PoolSize/PoolCheckoutTimeout were left as Go zero values (0/0s),
relying on reva's NewLDAPPool substituting 5/30s when <= 0. That
reads as "zero connections" to an operator in the generated yaml
config rather than "default 5". Set the real defaults (5, 30s)
so documented defaults match what's emitted.

Signed-off-by: Lukas Hirt <[email protected]>

chore(deps): [OCISDEV-1031] bump reva to pick up LDAP TLS fixes

Bumps the vendored reva dependency to owncloud/reva@8ee2020, picking
up owncloud/reva#672 (restore MinVersion: tls.VersionTLS12 on LDAP
TLS connections) and owncloud/reva#674 (restore pinned-CA-only trust
and PEM validation for the CA-cert path), both flagged during review
of this PR.

Signed-off-by: Lukas Hirt <[email protected]>

docs: point changelog fragment at forward-port PR #12688

* chore: bump brace-expansion

---------

Co-authored-by: Michal Klos <[email protected]>
mklos-kw pushed a commit to owncloud/ocis that referenced this pull request Aug 5, 2026
Bump the vendored reva dependency to pick up the opt-in bounded LDAP
connection pool (owncloud/reva#658, #665), and wire it into oCIS: add
pool_enabled/pool_size/pool_checkout_timeout config to auth-basic,
users, groups and graph, forward it into the reva config map for the
first three, and unify graph's identity backend onto reva's LDAP
client (utils.GetLDAPClientFromConfig) instead of its own hand-rolled
reconnecting client, now that reva implements PasswordModify and
ModifyWithResult on both LDAP clients. Pooling is off by default and
fully backwards compatible.

Signed-off-by: Lukas Hirt <[email protected]>

test(ldap): [OCISDEV-1031] run graph LDAP suites with pooling enabled in CI

Add a dedicated ldap-pool-tests job to acceptance-tests.yml that reruns
apiGraphUser/apiGraph/apiGraphGroup with OCIS_LDAP_POOL_ENABLED=true, so
concurrent behat requests exercise checkout/release, eviction and the
pooled PasswordModify/ModifyWithResult path end-to-end, in addition to
the existing pooling-disabled runs of the same suites.

Signed-off-by: Lukas Hirt <[email protected]>

fix(ldap): [OCISDEV-1031] set real pool_size/pool_checkout_timeout defaults

Only PoolEnabled: false was set in the four defaultconfig.go files;
PoolSize/PoolCheckoutTimeout were left as Go zero values (0/0s),
relying on reva's NewLDAPPool substituting 5/30s when <= 0. That
reads as "zero connections" to an operator in the generated yaml
config rather than "default 5". Set the real defaults (5, 30s)
so documented defaults match what's emitted.

Signed-off-by: Lukas Hirt <[email protected]>

chore(deps): [OCISDEV-1031] bump reva to pick up LDAP TLS fixes

Bumps the vendored reva dependency to owncloud/reva@8ee2020, picking
up owncloud/reva#672 (restore MinVersion: tls.VersionTLS12 on LDAP
TLS connections) and owncloud/reva#674 (restore pinned-CA-only trust
and PEM validation for the CA-cert path), both flagged during review
of this PR.

Signed-off-by: Lukas Hirt <[email protected]>

docs: point changelog fragment at forward-port PR #12689
mklos-kw pushed a commit to owncloud/ocis that referenced this pull request Aug 5, 2026
Bump the vendored reva dependency to pick up the opt-in bounded LDAP
connection pool (owncloud/reva#658, #665), and wire it into oCIS: add
pool_enabled/pool_size/pool_checkout_timeout config to auth-basic,
users, groups and graph, forward it into the reva config map for the
first three, and unify graph's identity backend onto reva's LDAP
client (utils.GetLDAPClientFromConfig) instead of its own hand-rolled
reconnecting client, now that reva implements PasswordModify and
ModifyWithResult on both LDAP clients. Pooling is off by default and
fully backwards compatible.

Signed-off-by: Lukas Hirt <[email protected]>

test(ldap): [OCISDEV-1031] run graph LDAP suites with pooling enabled in CI

Add a dedicated ldap-pool-tests job to acceptance-tests.yml that reruns
apiGraphUser/apiGraph/apiGraphGroup with OCIS_LDAP_POOL_ENABLED=true, so
concurrent behat requests exercise checkout/release, eviction and the
pooled PasswordModify/ModifyWithResult path end-to-end, in addition to
the existing pooling-disabled runs of the same suites.

Signed-off-by: Lukas Hirt <[email protected]>

fix(ldap): [OCISDEV-1031] set real pool_size/pool_checkout_timeout defaults

Only PoolEnabled: false was set in the four defaultconfig.go files;
PoolSize/PoolCheckoutTimeout were left as Go zero values (0/0s),
relying on reva's NewLDAPPool substituting 5/30s when <= 0. That
reads as "zero connections" to an operator in the generated yaml
config rather than "default 5". Set the real defaults (5, 30s)
so documented defaults match what's emitted.

Signed-off-by: Lukas Hirt <[email protected]>

chore(deps): [OCISDEV-1031] bump reva to pick up LDAP TLS fixes

Bumps the vendored reva dependency to owncloud/reva@8ee2020, picking
up owncloud/reva#672 (restore MinVersion: tls.VersionTLS12 on LDAP
TLS connections) and owncloud/reva#674 (restore pinned-CA-only trust
and PEM validation for the CA-cert path), both flagged during review
of this PR.

Signed-off-by: Lukas Hirt <[email protected]>

docs: point changelog fragment at forward-port PR #12689
mklos-kw pushed a commit to owncloud/ocis that referenced this pull request Aug 5, 2026
Bump the vendored reva dependency to pick up the opt-in bounded LDAP
connection pool (owncloud/reva#658, #665), and wire it into oCIS: add
pool_enabled/pool_size/pool_checkout_timeout config to auth-basic,
users, groups and graph, forward it into the reva config map for the
first three, and unify graph's identity backend onto reva's LDAP
client (utils.GetLDAPClientFromConfig) instead of its own hand-rolled
reconnecting client, now that reva implements PasswordModify and
ModifyWithResult on both LDAP clients. Pooling is off by default and
fully backwards compatible.

Signed-off-by: Lukas Hirt <[email protected]>

test(ldap): [OCISDEV-1031] run graph LDAP suites with pooling enabled in CI

Add a dedicated ldap-pool-tests job to acceptance-tests.yml that reruns
apiGraphUser/apiGraph/apiGraphGroup with OCIS_LDAP_POOL_ENABLED=true, so
concurrent behat requests exercise checkout/release, eviction and the
pooled PasswordModify/ModifyWithResult path end-to-end, in addition to
the existing pooling-disabled runs of the same suites.

Signed-off-by: Lukas Hirt <[email protected]>

fix(ldap): [OCISDEV-1031] set real pool_size/pool_checkout_timeout defaults

Only PoolEnabled: false was set in the four defaultconfig.go files;
PoolSize/PoolCheckoutTimeout were left as Go zero values (0/0s),
relying on reva's NewLDAPPool substituting 5/30s when <= 0. That
reads as "zero connections" to an operator in the generated yaml
config rather than "default 5". Set the real defaults (5, 30s)
so documented defaults match what's emitted.

Signed-off-by: Lukas Hirt <[email protected]>

chore(deps): [OCISDEV-1031] bump reva to pick up LDAP TLS fixes

Bumps the vendored reva dependency to owncloud/reva@8ee2020, picking
up owncloud/reva#672 (restore MinVersion: tls.VersionTLS12 on LDAP
TLS connections) and owncloud/reva#674 (restore pinned-CA-only trust
and PEM validation for the CA-cert path), both flagged during review
of this PR.

Signed-off-by: Lukas Hirt <[email protected]>

docs: point changelog fragment at forward-port PR #12689
mklos-kw pushed a commit to owncloud/ocis that referenced this pull request Aug 5, 2026
Bump the vendored reva dependency to pick up the opt-in bounded LDAP
connection pool (owncloud/reva#658, #665), and wire it into oCIS: add
pool_enabled/pool_size/pool_checkout_timeout config to auth-basic,
users, groups and graph, forward it into the reva config map for the
first three, and unify graph's identity backend onto reva's LDAP
client (utils.GetLDAPClientFromConfig) instead of its own hand-rolled
reconnecting client, now that reva implements PasswordModify and
ModifyWithResult on both LDAP clients. Pooling is off by default and
fully backwards compatible.

Signed-off-by: Lukas Hirt <[email protected]>

test(ldap): [OCISDEV-1031] run graph LDAP suites with pooling enabled in CI

Add a dedicated ldap-pool-tests job to acceptance-tests.yml that reruns
apiGraphUser/apiGraph/apiGraphGroup with OCIS_LDAP_POOL_ENABLED=true, so
concurrent behat requests exercise checkout/release, eviction and the
pooled PasswordModify/ModifyWithResult path end-to-end, in addition to
the existing pooling-disabled runs of the same suites.

Signed-off-by: Lukas Hirt <[email protected]>

fix(ldap): [OCISDEV-1031] set real pool_size/pool_checkout_timeout defaults

Only PoolEnabled: false was set in the four defaultconfig.go files;
PoolSize/PoolCheckoutTimeout were left as Go zero values (0/0s),
relying on reva's NewLDAPPool substituting 5/30s when <= 0. That
reads as "zero connections" to an operator in the generated yaml
config rather than "default 5". Set the real defaults (5, 30s)
so documented defaults match what's emitted.

Signed-off-by: Lukas Hirt <[email protected]>

chore(deps): [OCISDEV-1031] bump reva to pick up LDAP TLS fixes

Bumps the vendored reva dependency to owncloud/reva@8ee2020, picking
up owncloud/reva#672 (restore MinVersion: tls.VersionTLS12 on LDAP
TLS connections) and owncloud/reva#674 (restore pinned-CA-only trust
and PEM validation for the CA-cert path), both flagged during review
of this PR.

Signed-off-by: Lukas Hirt <[email protected]>

docs: point changelog fragment at forward-port PR #12689
mklos-kw pushed a commit to owncloud/ocis that referenced this pull request Aug 5, 2026
Bump the vendored reva dependency to pick up the opt-in bounded LDAP
connection pool (owncloud/reva#658, #665), and wire it into oCIS: add
pool_enabled/pool_size/pool_checkout_timeout config to auth-basic,
users, groups and graph, forward it into the reva config map for the
first three, and unify graph's identity backend onto reva's LDAP
client (utils.GetLDAPClientFromConfig) instead of its own hand-rolled
reconnecting client, now that reva implements PasswordModify and
ModifyWithResult on both LDAP clients. Pooling is off by default and
fully backwards compatible.

Signed-off-by: Lukas Hirt <[email protected]>

test(ldap): [OCISDEV-1031] run graph LDAP suites with pooling enabled in CI

Add a dedicated ldap-pool-tests job to acceptance-tests.yml that reruns
apiGraphUser/apiGraph/apiGraphGroup with OCIS_LDAP_POOL_ENABLED=true, so
concurrent behat requests exercise checkout/release, eviction and the
pooled PasswordModify/ModifyWithResult path end-to-end, in addition to
the existing pooling-disabled runs of the same suites.

Signed-off-by: Lukas Hirt <[email protected]>

fix(ldap): [OCISDEV-1031] set real pool_size/pool_checkout_timeout defaults

Only PoolEnabled: false was set in the four defaultconfig.go files;
PoolSize/PoolCheckoutTimeout were left as Go zero values (0/0s),
relying on reva's NewLDAPPool substituting 5/30s when <= 0. That
reads as "zero connections" to an operator in the generated yaml
config rather than "default 5". Set the real defaults (5, 30s)
so documented defaults match what's emitted.

Signed-off-by: Lukas Hirt <[email protected]>

chore(deps): [OCISDEV-1031] bump reva to pick up LDAP TLS fixes

Bumps the vendored reva dependency to owncloud/reva@8ee2020, picking
up owncloud/reva#672 (restore MinVersion: tls.VersionTLS12 on LDAP
TLS connections) and owncloud/reva#674 (restore pinned-CA-only trust
and PEM validation for the CA-cert path), both flagged during review
of this PR.

Signed-off-by: Lukas Hirt <[email protected]>

docs: point changelog fragment at forward-port PR #12689
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.

4 participants