[ZBX-22008] User provisioning with Active Directory - filtering issue Created: 2022 Nov 30 Updated: 2024 Jun 04 |
|
Status: | Confirmed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F), Server (S) |
Affects Version/s: | 6.4.0beta4 |
Fix Version/s: | None |
Type: | Problem report | Priority: | Trivial |
Reporter: | Tomáš Heřmánek | Assignee: | Zabbix Development Team |
Resolution: | Unresolved | Votes: | 4 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Description |
Steps to reproduce:
Im not sure if it is bug or incorrect setting. Please give me info if it is bug or incorrect setting Result: Expected: |
Comments |
Comment by Gregory Chalenko [ 2022 Dec 01 ] | |||
tomas.hermanek can you please set "User group membership attribute" to "memberof" (all letters should be in lowercase) and check does it helps? As for group mapping, the asterisk group mapping means any or no group, therefor it will work as long as user is able to supply correct login and password. | |||
Comment by Tomáš Heřmánek [ 2022 Dec 01 ] | |||
Hi Gregory, it not help. What i also found no user is created at all. We are using wildcards now. Tested with memberOf and memberof. | |||
Comment by Tomáš Heřmánek [ 2022 Dec 01 ] | |||
We found working setting with AD (Little bit confusing) Group name attribute - CN User group membership attribute - memberof (yes lower case) I give you update after is first user created by zabbix JIT. Now we are waiting for first run. | |||
Comment by Tomáš Heřmánek [ 2022 Dec 03 ] | |||
Users is created fine after first login, also provisioning works fine, but after som using we found some problems. 1) User is created with different user setting like manual created user have. With this setting after 15 min i have message about "you don't have permission to this object. (BTW If i try login again i need to do this twice first try give me error message - SAML) I'm expecting this default setting like local created user (if you can create some section in Administration>General it be great): Provisioned users have this default (i think Auto-logout is is our problems here): 2) What i found next it is problem with SCIM provisioning. I found your new API for this. I create super user admin and API token but API give me error 500. Im testing this with Azure AD provisioning. FIXED ZBX-22014 https://SERVER/zabbix/api_scim.php {"schemas":["urn:ietf:params:scim:api:messages:2.0:Error"],"detail":"Argument 4 passed to CLocalApiClient::callMethod() must be of the type array, null given, called in \/usr\/share\/zabbix\/include\/classes\/scim\/API.php on line 46","status":500} 3) Another maybe feature request is possibility to manual change in media for users. This columns:
4) On picture you can also see i need disable SMS media. Our sms number have space(correct sync from AD or Azure AD). Can you also do some check and repair for this phone number format like you already have for email? For example +420 123 123 123 change in to +420123123123 or another 420 (123) 123 123 in to this 420123123123.
Tom | |||
Comment by Gregory Chalenko [ 2022 Dec 05 ] | |||
tomas.hermanek thank you for details, SCIM authentication error is fixed in | |||
Comment by Gregory Chalenko [ 2022 Dec 06 ] | |||
1) User "Auto-logout" and "Auto-login" difference for manually created user and user created by provisioning will be fixed in ZBX-22008. | |||
Comment by Gregory Chalenko [ 2022 Dec 06 ] | |||
3) For editable properties of provisioned user media please register feature request. | |||
Comment by Gregory Chalenko [ 2022 Dec 06 ] | |||
4) Provisioning will not create email user media when value supplied in mapped field do not pass email validation. For media type SMS there are no such validation therefor any non empty value is used to create user media. Additional code to filter out values only for SMS type of media is not planned, at least for now. | |||
Comment by Tomáš Heřmánek [ 2022 Dec 08 ] | |||
Hi Gregory,
| |||
Comment by Marcos de Oliveira [ 2023 Jan 31 ] | |||
This is related to | |||
Comment by Sub2.13 [ 2023 Mar 17 ] | |||
/off My 2 cents Zabbix Team, the official documentation mentions "memberOf" instead of "memberof", it's confusing | |||
Comment by Dejan Maletic [ 2023 Mar 28 ] | |||
Thanks to all for the comments and updates... Lost an hour or two on this before stumbling on this site and finding the solution. | |||
Comment by Bogdan Voaidas [ 2023 Oct 23 ] | |||
So in case that the group member attribute in LDAP contains just the group's short name, we're F**** ?! I see that after trying for several days to make it work. | |||
Comment by Bogdan Voaidas [ 2023 Oct 23 ] | |||
I managed to fix it by adding an extra condition at the end in "include/classes/ldap/CLdap.php" in function getGroupPatternsFromDns before the last return $groups; In my case $group_dns results just in an array of group names and a count key. The fix is not elegant yet but is a workaround. // code placeholder // if groups[] was not populated previously and the "group name attribute" was set if ($group_name_key == "" && empty($groups) === true){ unset($group_dns['count]']); return $group_dns; } | |||
Comment by Gregory Chalenko [ 2023 Oct 25 ] | |||
bo83snap can you describe what you want to achieve (user/group DN example would help too)? Group configuration "memberOf" is basic configuration, to fine tune you should use "groupOfNames". | |||
Comment by Bogdan Voaidas [ 2023 Oct 25 ] | |||
the problem is the our memberOf contains just the simple group name and not full dn. The script is checking and works only with a full dn but fails if it's not. First check is, does the returned value contain "="? if not then just skip. memberOf = "group_A", memberOf = "group_B" is not going to work. it expects memberOf="cn=group_A,ou=groups,dc=example,dc=com" | |||
Comment by Gregory Chalenko [ 2023 Oct 26 ] | |||
Yes it expects DN strings, this is described on documentation page for LDAP, please see documentation for "User group membership attribute" configuration field. For Custom configuration i would suggest to use "groupOfNames". | |||
Comment by Bogdan Voaidas [ 2023 Oct 31 ] | |||
Well you're not exactly right.
Nowhere is specified that the memberOf attribute in ldap or AD has to have a value in the form of a full DN string.
Do you understand what I mean? | |||
Comment by Gregory Chalenko [ 2023 Nov 21 ] | |||
Attribute search in DN string is done to simplify "User group mapping" configuration. Also "*" meta character in "User group mapping" would be useless in some cases when user group entry will be not attribute value but DN string. | |||
Comment by Dmitriy Makarov [ 2024 Jun 04 ] | |||
Hi. Any ideas with manual changing severity for provisioned users for informative reporting? Or maybe AD attribute for it (for example 8bit reverse 0111000 => hex, means DHA reporting)? | |||
Comment by Tomáš Heřmánek [ 2024 Jun 04 ] | |||
You need to upgrade on 7.0 LTS. Released today, here is feature for it. | |||
Comment by Dmitriy Makarov [ 2024 Jun 04 ] | |||
|