#408 Directory accounts: end access when someone leaves the directory
–
- github
- github/openchronology/timeline-app
- github/openchronology/timeline-app#408
- issue
- state:closed
## What happens now Directory (LDAP or Active Directory) membership is checked only at a directory sign-in. Removing someone from the directory, or from `LDAP_REQUIRED_GROUP`, stops new directory sign-ins. It doesn't end what they already have: - browser and desktop sessions, which last up to 14 days, or 1 day idle; - API keys they made, which last up to 365 days. For now the docs say to suspend the account in **/admin** to cut access at once. (#406 refuses new sign-in methods for accounts that sign in only through the directory.) ## Proposal Check directory accounts periodically, for example hourly, in the existing background work: - For each account with an `ldap` identity, look it up in the directory with the service account and check `LDAP_REQUIRED_GROUP`. - If it's gone, disabled, or out of the group, end its sessions and revoke its API keys, using the same path security changes use. Optionally flag it for administrators or suspend it. - If the directory is unreachable, do nothing. An outage must not sign everyone out. Log it, and retry on the next run. - Add a setting for the interval, with `0` to turn it off. - Docs: describe this in `docs/authentication.md` (directory section). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/openchronology/timeline-app/issues/408
Related
- #406 Limit two-factor answers per account; keep directory accounts under the directory
- #413 Directory accounts lose access when someone leaves the directory (#408)
- Merge pull request #413 from openchronology/feature/408-directory-recheck
- Directory accounts lose access when someone leaves the directory
Open #408 Directory accounts: end access when someone leaves the directory in the timeline