AD lockout through Cairn: a device with an old password keeps hitting AD; no client address in the refusal log #992

Closed
opened 2026-10-24 16:13:19 +00:00 by Cordy · 2 comments
Owner

Found in the #985 research (research-985-1 §6).

What happens (INFERRED from code). A sync client (Finder, rclone, a phone) with an old password retries. In-flight duplicates share one attempt (throttle.go:28-30), but sequential retries each reach AD. Cairn allows up to 20 per 15 minutes; AD lockout thresholds of 3 to 10 are common. So the person gets locked out of Windows by Cairn. Microsoft's own lockout guidance describes devices retrying "ad infinitum".

On the DC, events 4625/4740 show Cairn's server as the source, and Cairn's ldap sign-in refused by Active Directory line (ldap.go:1003) has no client address, so the admin cannot find the device.

Plan.

  1. Refused-credential cache: remember (account, password fingerprint) of a 52e for a short time (for example ldapCacheTTL), cleared on any success. An identical wrong password is answered 401 locally without reaching AD. Never cache 775 or account-state codes.
  2. Add the client address and user-agent class to the AD refusal log line.
  3. Handbook: Cairn's throttle is softer than a typical AD lockout; AD remains the lockout authority (ASVS 6.1.1).

The throttle treatment of a correct password refused for account state is a separate decision in #985.

Found in the #985 research (research-985-1 §6). **What happens (INFERRED from code).** A sync client (Finder, rclone, a phone) with an old password retries. In-flight duplicates share one attempt (`throttle.go:28-30`), but sequential retries each reach AD. Cairn allows up to 20 per 15 minutes; AD lockout thresholds of 3 to 10 are common. So the person gets locked out of **Windows** by Cairn. Microsoft's own lockout guidance describes devices retrying "ad infinitum". On the DC, events 4625/4740 show Cairn's server as the source, and Cairn's `ldap sign-in refused by Active Directory` line (`ldap.go:1003`) has no client address, so the admin cannot find the device. **Plan.** 1. **Refused-credential cache:** remember (account, password fingerprint) of a 52e for a short time (for example `ldapCacheTTL`), cleared on any success. An identical wrong password is answered 401 locally without reaching AD. Never cache 775 or account-state codes. 2. Add the client address and user-agent class to the AD refusal log line. 3. Handbook: Cairn's throttle is softer than a typical AD lockout; AD remains the lockout authority (ASVS 6.1.1). The throttle treatment of a correct password refused for account state is a separate decision in #985.
Author
Owner

Decision (Nikola, 2026-10-24): refused-credential cache for identical 52e answers (never 775 or account states), client address in the AD refusal log line, handbook note that AD remains the lockout authority. Throttle treatment of correct-but-refused passwords decided in #985: option D (counts like a directory outage). Lands with the #985 batch.

Decision (Nikola, 2026-10-24): refused-credential cache for identical 52e answers (never 775 or account states), client address in the AD refusal log line, handbook note that AD remains the lockout authority. Throttle treatment of correct-but-refused passwords decided in #985: option D (counts like a directory outage). Lands with the #985 batch.
Author
Owner

Fixed in v0.6.354 (PR #1004).

  • Refused-credential cache: an identical wrong password (AD 52e) is answered locally for ldapCacheTTL.
    • The key is case-folded.
    • It is cleared on the next successful directory bind.
    • 775 and account-state codes are never cached.
  • Refusal WARN: the AD refusal WARN now carries remote= and client=.
  • Lockout audit: a directory-locked audit entry is written once per lockout episode, deduplicated across instances.
  • Throttle option D: a correct but refused password still counts toward the throttle (option D).
  • Docs: the handbook states that AD remains the lockout authority, with the caveat about a helpdesk reset made before replication.

Closing.

Fixed in v0.6.354 (PR #1004). - **Refused-credential cache:** an identical wrong password (AD 52e) is answered locally for `ldapCacheTTL`. - The key is case-folded. - It is cleared on the next successful directory bind. - 775 and account-state codes are never cached. - **Refusal WARN:** the AD refusal WARN now carries `remote=` and `client=`. - **Lockout audit:** a `directory-locked` audit entry is written once per lockout episode, deduplicated across instances. - **Throttle option D:** a correct but refused password still counts toward the throttle (option D). - **Docs:** the handbook states that AD remains the lockout authority, with the caveat about a helpdesk reset made before replication. Closing.
Cordy closed this issue 2026-10-25 21:29:33 +00:00
Sign in to join this conversation.
No labels
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#992
No description provided.