Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

option to truncate dn #61

Merged
merged 1 commit into from
Nov 13, 2023
Merged

Conversation

GOID1989
Copy link

No description provided.

Copy link

@scoopex scoopex left a comment

Choose a reason for hiding this comment

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

Welcome to the circle of contributors :-)
I added some comments to your PR.

Can you combine your changes in a single and descriptive commit message?
(see also https://jvns.ca/blog/2023/11/06/rebasing-what-can-go-wrong-/ .... i.e. by git rebase -i HEAD^^, add "s" to all your commits except the first one and git push --force is your friend)

lib/zabbixldapconf.py Outdated Show resolved Hide resolved
@@ -25,6 +25,7 @@ filtergroup = (&(objectClass=posixGroup)(cn=%s))
filteruser = (&(objectClass=posixAccount)(uid=%s))
groupattribute = memberUid
userattribute = uid
truncatedn = false
Copy link

Choose a reason for hiding this comment

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

Can you add this to the Readme instead?
(Including why this is needed and a n example of the truncation)?

@GOID1989 GOID1989 force-pushed the GOID1989-patch-1 branch 2 times, most recently from fdd4b2c to 5344f2e Compare November 12, 2023 17:37
@GOID1989
Copy link
Author

check it

README.md Outdated
@@ -90,6 +90,7 @@ In order to use the *zabbix-ldap-sync* script we need to create a configuration
* `filteruser` = The ldap filter to get the users in OpenLDAP mode, by default `(&(objectClass=posixAccount)(uid=%s))`
* `groupattribute` = The attribute used for membership in a group in OpenLDAP mode, by default `memberUid`
* `userattribute` = The attribute for users in openldap mode, by default `uid`
* `truncatedn` - If set to true distinguished name (DN) will be truncated, by default false. Group members usually defined as `full-path-DN` not clear `login` and it's breaks search. Example: `uid=testuser,cn=users,cn=accounts,dc=example,dc=com` cut to `uid=testuser`
Copy link

Choose a reason for hiding this comment

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

Thanks :-)

Sorry about the nitpick :-) Lets make this to one additional level more clearer.

`truncatedn` - If set to true the distinguished name (DN) will be truncated to the first component (by default false). Group members are usually defined as `full-path-DN`. If your ldap server just uses the `login` names to reference group members (i.e. FreeIPA) you can use this functionality to solve problems with broken searches. Example: `uid=testuser,cn=users,cn=accounts,dc=example,dc=com` cut to `uid=testuser`

Copy link
Author

Choose a reason for hiding this comment

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

sorry, for bad english

@scoopex scoopex merged commit abe339c into zabbix-tooling:master Nov 13, 2023
@scoopex
Copy link

scoopex commented Nov 13, 2023

Many thanks!!!!

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.

2 participants