Skip to content

Feat: Add configurable LDAP group member attribute and single-run mode (#29) - #30

Open
LorenzoGParisi wants to merge 1 commit into
alan-turing-institute:mainfrom
LorenzoGParisi:feature/issue-29
Open

Feat: Add configurable LDAP group member attribute and single-run mode (#29)#30
LorenzoGParisi wants to merge 1 commit into
alan-turing-institute:mainfrom
LorenzoGParisi:feature/issue-29

Conversation

@LorenzoGParisi

Copy link
Copy Markdown

Overview

This PR addresses the limitations identified in #29 regarding LDAP compatibility and process lifecycle control.

Changes

  • Single-Run Mode: Introduced a SINGLE_RUN_MODE environment variable. When set to true, the synchronizer performs one full cycle (LDAP to PostgreSQL) and exits. This is specifically designed for kubernetes cronjobs.
  • Configurable LDAP Group Attribute: Replaced the hardcoded memberUid with a new environment variable LDAP_GROUP_MEMBER_ATTR. This enables compatibility with different directory structures like FreeIPA. The default value maintains backward compatibility with existing setups.

Closes #29

@llewelld

Copy link
Copy Markdown
Contributor

My apologies, @LorenzoGParisi, for not having looked at your PR earlier. Despite this, we really appreciate your contribution and especially the fact that you've gone to some lengths to ensure backwards compatibility.

It looks like your changes may now be subsumed into #33. It would be good to have your thoughts on @sylvesterkaczmarek's changes, so please do feel free to add your comments to the PR.

sylvesterkaczmarek added a commit to sylvesterkaczmarek/guacamole-user-sync that referenced this pull request Aug 24, 2026
- add LDAP_GROUP_MEMBER_ATTR with a backward-compatible memberUid default
- normalise UID-based LDAP distinguished-name members before user matching
- tolerate missing optional LDAP membership/display attributes
- add SINGLE_RUN_MODE with non-zero exit status on failed synchronisation
- document single-run interaction with REPEAT_INTERVAL
- add regression coverage for LDAP attribute variants and single-run success/failure

Incorporates compatible behaviour from alan-turing-institute#30 following maintainer review.

Co-authored-by: LorenzoGParisi <117413030+LorenzoGParisi@users.noreply.github.com>
sylvesterkaczmarek added a commit to sylvesterkaczmarek/guacamole-user-sync that referenced this pull request Aug 25, 2026
- add LDAP_GROUP_MEMBER_ATTR with a backward-compatible memberUid default
- normalise UID-based LDAP distinguished-name members before user matching
- tolerate missing optional LDAP membership/display attributes
- add SINGLE_RUN_MODE with non-zero exit status on failed synchronisation
- preserve GUACAMOLE_GROUP_PERMISSIONS behaviour introduced by alan-turing-institute#32
- document single-run interaction with REPEAT_INTERVAL
- add regression coverage for LDAP attribute variants and single-run success/failure

Incorporates compatible behaviour from alan-turing-institute#30 following maintainer review and is rebased onto alan-turing-institute#32.

Co-authored-by: LorenzoGParisi <117413030+LorenzoGParisi@users.noreply.github.com>
@LorenzoGParisi

Copy link
Copy Markdown
Author

Hi @llewelld , no problemabout the delay and I'm happy to contribute. Thank you for this project, it was crucial to sync a FreeIPA server setup I was working on.
For #33 I'll take a look right now

@sylvesterkaczmarek

Copy link
Copy Markdown

Thanks, Lorenzo — appreciate you taking the time to look over #33, and glad the combined change works from your side.

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.

Enhancement: Add configurable LDAP group member attribute and single-run mode

3 participants