Skip to content

[#697] Fix global idle-time-limit having no effect on client connections - #684

Merged
vharseko merged 1 commit into
OpenIdentityPlatform:masterfrom
vharseko:features/global-idle-time-limit
Jul 8, 2026
Merged

[#697] Fix global idle-time-limit having no effect on client connections#684
vharseko merged 1 commit into
OpenIdentityPlatform:masterfrom
vharseko:features/global-idle-time-limit

Conversation

@vharseko

@vharsekovharseko commented Jul 4, 2026

Copy link
Copy Markdown
Member

Fixes#697

Problem

The global idle-time-limit setting (cn=config) has no effect: neither the value from the configuration at startup nor changes made via dsconfig set-global-configuration-prop --set idle-time-limit:... are ever applied to client connections. Only the per-user ds-rlim-idle-time-limit attribute works.

Root cause: CoreConfigManager parses the setting into its private CoreAttributes, which nothing reads back. New client connections snapshot the limit from DirectoryServer.getIdleTimeLimit() (ClientConnection constructor, also LocalBackendBindOperation), but the backing field is initialized to 0 and DirectoryServer.setIdleTimeLimit() had no callers, so the value stayed 0 (disabled) forever.

Found by running the slow TestNG group, which is excluded from CI: both server-wide IdleTimeLimitTestCase tests were timing out after 60s because idle connections were never disconnected (IdleTimeLimitThread runs, but every connection carries idleTimeLimit=0).

Fix

  • CoreConfigManager.applyGlobalConfiguration now pushes the value into DirectoryServer.setIdleTimeLimit() — this covers both server startup and dynamic dsconfig changes.
  • IdleTimeLimitTestCase: the helper now expects EOFException from RemoteConnection.readMessage() when the server closes the connection after the notice of disconnection (RemoteConnection throws instead of returning null since its introduction), and the suite is moved out of the slow group into the default build now that it passes in ~30 seconds.

Verification

  • IdleTimeLimitTestCase: 3/3 pass in ~34s under the default CI group filter (before: 3/3 failing, 190s). Access log confirms DISCONNECT reason="Idle Time Limit Exceeded" with the notice of disconnection for both anonymous and authenticated connections.
  • Regression: BindOperationTestCase (1142 tests) all pass.
  • Default idle-time-limit is 0 (disabled), so behaviour is unchanged for deployments that do not set the option.

The global idle-time-limit was parsed by CoreConfigManager but only
stored in its private CoreAttributes, which nothing reads. New client
connections snapshot the limit from DirectoryServer.getIdleTimeLimit(),
whose backing field was initialized to 0 and never updated since the
setter had no callers, so neither the startup value nor dsconfig
changes ever took effect; only the per-user ds-rlim-idle-time-limit
worked.
Push the value into DirectoryServer whenever the global configuration
is applied (at startup and on change). Fix IdleTimeLimitTestCase to
expect EOFException from RemoteConnection.readMessage() when the
server closes the connection after the notice of disconnection, and
move the suite out of the "slow" group into the default build now
that it passes in ~30 seconds.
@vharsekovharseko changed the title Fix global idle-time-limit having no effect on client connections[#697] Fix global idle-time-limit having no effect on client connectionsJul 6, 2026
@vharseko
vharseko merged commit 75205ab into OpenIdentityPlatform:masterJul 8, 2026
33 of 34 checks passed
@vharseko
vharseko deleted the features/global-idle-time-limit branch July 8, 2026 16:10
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Global idle-time-limit setting has no effect: idle connections are never disconnected

2 participants

@vharseko@maximthomas