feat(ldap): [OCISDEV-1031] add opt-in LDAP connection pool - #12660
feat(ldap): [OCISDEV-1031] add opt-in LDAP connection pool#12660LukasHirt wants to merge 3 commits into
Conversation
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 <info@hirt.cz>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
… 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 <info@hirt.cz>
|
Let's separate the dependency bump and pull request. |
Suggestions1. Graph service loses the explicit TLS 2. 3. CA-cert error path in graph is now unreachable dead code. In the refactored |
ff63d7b to
5c1698b
Compare
…faults 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 <info@hirt.cz>
|
Addressed:
|
Description
Bumps the vendored reva dependency to pick up the opt-in bounded LDAP connection pool (owncloud/reva#658, owncloud/reva#665), and wires it into oCIS:
pool_enabled/pool_size/pool_checkout_timeoutconfig to auth-basic, users, groups and graph.utils.GetLDAPClientFromConfig) instead of its own hand-rolled reconnecting client, now that reva implementsPasswordModifyandModifyWithResulton both LDAP clients (feat: [OCISDEV-1031] implement PasswordModify and ModifyWithResult on LDAP clients reva#665) — removing the second, now-redundant implementation.ldap-pool-testsCI job that reruns theapiGraphUser/apiGraph/apiGraphGroupacceptance suites withOCIS_LDAP_POOL_ENABLED=true, in addition to their existing pooling-disabled runs.github.com/go-chi/chi/v5andgo.opentelemetry.io/otelto fix newly-disclosed, unrelatedgovulncheckfindings onstable-8.0's baseline that were blocking CI on this PR.Pooling is off by default and fully backwards compatible: with it disabled, behavior is unchanged from the existing single-connection
ConnWithReconnectpath.Related Issue
Motivation and Context
OCISDEV-1031 is Story 1 of the OCISDEV-1030 epic (LDAP client hardening for the consolidated central-idm architecture, ~600 connections across 200 clusters). The goal is to replace the single long-lived LDAP connection per backend with a bounded pool, so concurrent requests no longer serialize on one socket.
How Has This Been Tested?
stable-8.0) against the embedded LDAP idm, withOCIS_LDAP_POOL_ENABLED=trueandGRAPH_LDAP_SERVER_USE_PASSWORD_MODIFY_EXOP=trueset; plus CI's newldap-pool-testsjob (apiGraphUser,apiGraph,apiGraphGroupwithOCIS_LDAP_POOL_ENABLED=true)./graph/v1.0/me— succeeds with pooling enabled.PATCH /graph/v1.0/users/{id}withpasswordProfile(exercisesPasswordModifythrough reva's client) — old password rejected afterwards, new password authenticates successfully.go build ./...,go vet ./..., and existing unit tests for auth-basic/users/groups/graph all pass unmodified (pooling disabled, default behavior confirmed unchanged).apiGraphUser,apiGraph,apiGraphGroupre-run withOCIS_LDAP_POOL_ENABLED=truein CI (ldap-pool-testsjob), covering login, user/group CRUD and password modify against the pooled LDAP client end-to-end.Screenshots (if appropriate):
Types of changes
Checklist: