Skip to content

[backport stable-8.1] feat(graph): allow disabling the last sign-in timestamp update - #12531

Merged
kobergj merged 1 commit into
owncloud:stable-8.1from
kobergj:backport/OCISDEV-1022-stable-8.1
Jul 9, 2026
Merged

kobergj merged 1 commit into
owncloud:stable-8.1from
kobergj:backport/OCISDEV-1022-stable-8.1

Conversation

@kobergj

@kobergj kobergj commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Backport of #12522 to stable-8.1.

Adds OCIS_LDAP_UPDATE_LAST_SIGNIN_DATE / GRAPH_LDAP_UPDATE_LAST_SIGNIN_DATE (default true) to let operators stop the graph service from writing the oCLastSignInTimestamp LDAP attribute on every sign-in, reducing LDAP write load.

When set to false, the graph service no longer subscribes to UserSignedIn events and does not write the attribute. UserSignedIn is the only event this listener handles, so gating the whole listener has no other side effects.

Notes on the backport

  • Clean cherry-pick (-x); git's 3-way merge applied the service.go gate onto the stable-8.1 variant of StartListenForLogonEvents (which lacks the master-only trace span wiring).
  • introductionVersion adjusted from 8.2.0 (master) to 8.1.1 to reflect the stable-8.1 release line.
  • Build + graph service tests pass locally.

Original PR: #12522

🤖 Generated with Claude Code

…oud#12522)

* feat(graph): [OCISDEV-1022] allow disabling last sign-in timestamp update

Add a new setting OCIS_LDAP_UPDATE_LAST_SIGNIN_DATE /
GRAPH_LDAP_UPDATE_LAST_SIGNIN_DATE (default true) to disable maintaining the
'oCLastSignInTimestamp' LDAP attribute on user sign-in. When set to false the
graph service no longer listens for UserSignedIn events and does not write the
attribute, without having to disable all LDAP writes or the events consumer.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* docs(changelog): [OCISDEV-1022] fix PR link to 12522

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* test(graph): [OCISDEV-1022] cover last sign-in toggle; address review

- Add unit test covering both branches of StartListenForLogonEvents
  (subscribes when UpdateUserLastSignInDate is enabled, not when disabled).
- Set introductionVersion to 8.2.0.
- Reword the config description: the two settings are independent, the
  timestamp is only persisted when OCIS_LDAP_SERVER_WRITE_ENABLED is enabled
  rather than the toggle requiring it.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Co-authored-by: Martin <[email protected]>
(cherry picked from commit 49c897e)
@kw-security

kw-security commented Jul 9, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@dj4oC dj4oC left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Backports the "allow disabling the last sign-in LDAP timestamp write" flag (#12522) to stable-8.1.

Findings

Same change as #12532 (backport to stable-8.0), clean cherry-pick. Security/Stability/Performance: no findings — gates the existing UserSignedIn LDAP write behind a new opt-out flag, default true preserves current behavior. Test coverage: logon_events_test.go covers both flag states. TODOs found: none. Dependency touched: no.

Unlike its stable-8.0 sibling (#12532), all checks are green on this PR's head commit (e80536b), including all-acceptance-tests.

Deployment topology check

Compatible — per-service Go config flag, no topology-specific assumptions.

Verdict

Approved.

🤖 Automated review by Claude Code (security · stability · performance · coverage)


Generated by Claude Code

dj4oC commented Jul 9, 2026

Copy link
Copy Markdown
Contributor
  • Security: no findings
  • Stability: no findings
  • Performance: no findings
  • Test coverage: unit test covers both flag states
  • TODOs found: none
  • Dependency touched: no
  • CI status: all green
  • Stale review: no

Generated by Claude Code

@kobergj
kobergj merged commit 1cdfbf6 into owncloud:stable-8.1 Jul 9, 2026
59 checks passed
@kobergj
kobergj deleted the backport/OCISDEV-1022-stable-8.1 branch July 9, 2026 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants