mirror of
https://github.com/lldap/lldap.git
synced 2026-04-25 08:15:52 +03:00
[PR #1264] [CLOSED] Implement modifyTimestamp support for SSSD compatibility with creation time tracking and group membership updates #1216
Labels
No labels
backend
blocked
bug
cleanup
dependencies
docker
documentation
duplicate
enhancement
enhancement
frontend
github_actions
good first issue
help wanted
help wanted
integration
invalid
ldap
pull-request
question
rust
rust
tests
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/lldap-lldap#1216
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/lldap/lldap/pull/1264
Author: @Copilot
Created: 8/26/2025
Status: ❌ Closed
Base:
main← Head:copilot/fix-898📝 Commits (10+)
df49d82Initial plana90695aImplement core modifyTimestamp functionality with database migration and backend supportf7ab6deFix database migration default values for modify timestamps1c92ae6Complete modifyTimestamp implementation - fix remaining test compilation errors8a8eb41Address review feedback: remove backup file, initialize timestamps with current time, move attributes to Public schemab8b48ebSet modification timestamps for new users and groups during creation233262eFix tests and formatting for modifyTimestamp implementation7e64e06Fix clippy collapsible-if warnings in LDAP search codeedf22afUpdate user modification time when changing passworde2d9d47Update group modification time when adding or removing users from groups📊 Changes
22 files changed (+340 additions, -40 deletions)
View changed files
📝
Cargo.lock(+1 -0)📝
app/src/infra/attributes.rs(+17 -2)📝
crates/domain-model/src/model/groups.rs(+3 -0)📝
crates/domain-model/src/model/users.rs(+8 -0)📝
crates/domain/src/public_schema.rs(+27 -0)📝
crates/domain/src/types.rs(+6 -0)📝
crates/graphql-server/Cargo.toml(+15 -11)📝
crates/graphql-server/src/query.rs(+48 -0)📝
crates/ldap/src/compare.rs(+2 -0)📝
crates/ldap/src/core/group.rs(+10 -0)📝
crates/ldap/src/core/user.rs(+12 -0)📝
crates/ldap/src/core/utils.rs(+10 -4)📝
crates/ldap/src/delete.rs(+2 -0)📝
crates/ldap/src/handler.rs(+1 -0)📝
crates/ldap/src/modify.rs(+1 -0)📝
crates/ldap/src/password.rs(+2 -0)📝
crates/ldap/src/search.rs(+30 -9)📝
crates/sql-backend-handler/src/sql_group_backend_handler.rs(+3 -0)📝
crates/sql-backend-handler/src/sql_migrations.rs(+75 -0)📝
crates/sql-backend-handler/src/sql_opaque_handler.rs(+3 -0)...and 2 more files
📄 Description
This PR implements the
modifyTimestampLDAP attribute support as requested by SSSD and other LDAP clients. The implementation adds automatic timestamp tracking for user and group modifications, including proper initialization during record creation and updates for group membership changes.Changes Made
Database Schema (Migration v11)
modified_datecolumn to users table - tracks when user records are modifiedpassword_modified_datecolumn to users table - tracks when passwords are changedmodified_datecolumn to groups table - tracks when group records are modifiedBackend Integration
modified_dateis automatically updated inupdate_user_with_transaction()password_modified_dateandmodified_dateare updated during OPAQUE password registrationmodified_dateis automatically updated inupdate_group_with_transaction()modified_dateandpassword_modified_dateare set to current time during user creationmodified_dateis set to current time during group creationmodified_dateis updated when users are added to or removed from groupschrono::Utc::now().naive_utc()for consistencyLDAP Protocol Support
modifyTimestampattribute maps tomodified_datefor both users and groupspwdChangedTimeattribute maps topassword_modified_datefor usersSchema Integration
Frontend Compatibility
SSSD Compatibility
SSSD and other LDAP clients can now query the
modifyTimestampattribute to determine when user or group records were last modified. Both existing records and newly created records have proper modification timestamps, ensuring complete compatibility with LDAP clients that rely on this attribute for caching and synchronization.Password changes now update both the specific
password_modified_dateand the generalmodified_dateto ensure LDAP clients that rely onmodifyTimestampfor cache invalidation are properly notified of any user changes, including password updates.Group membership changes (adding or removing users from groups) now also update the group's modification timestamp, ensuring LDAP clients receive proper cache invalidation notifications for membership modifications.
Fixes #898.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.