Repository navigation
feat: [OCISDEV-1031] add opt-in LDAP connection pool - #658
Conversation
✅ 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. |
|
@kobergj I copied over the stubbed methods from |
|
ai review |
|
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. 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 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. |
|
One more point, this epic pointed to 8.0.7. We should work with the fork from |
This is per the acceptance criteria in the ticket:
I followed the same approach here as is done with the existing reconnect implementation. |
|
Does it makes more sense that the checkout and release use a counter instead of slots? 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 |
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]>
ff34346 to
5a9b1a3
Compare
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]>
Switched 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. |
|
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]>
…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]>
…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]>
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]>
* 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]>
* 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
* 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
* 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
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
* 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]>
* 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
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
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 * 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]>
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
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
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
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
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
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.