Skip to content

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

Description

@vharseko

Summary

The global idle-time-limit setting (cn=config) has no effect: idle client connections are never disconnected, no matter what the option is set to. Only the per-user ds-rlim-idle-time-limit attribute works.

Steps to reproduce

  1. Set a global idle time limit:

    dsconfig set-global-configuration-prop --set idle-time-limit:"10 s" ...
    

    (or put it in the configuration before startup)

  2. Open an LDAP connection (anonymous or bound) and let it sit idle past the limit.

Expected: the server disconnects the connection with the notice of disconnection DISCONNECT reason="Idle Time Limit Exceeded".

Actual: the connection stays open forever.

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() has no callers — so every connection carries idleTimeLimit=0 (disabled) regardless of the configuration, at startup and after dynamic dsconfig changes alike. IdleTimeLimitThread runs, but has nothing to enforce.

How it was found

Running the slow TestNG group (excluded from CI): both server-wide IdleTimeLimitTestCase tests time out after 60s because idle connections are never disconnected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions