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

ldap_group_type should be string and not integer #5402

Closed
tobias-gruenewald opened this issue Nov 17, 2020 · 3 comments
Closed

ldap_group_type should be string and not integer #5402

tobias-gruenewald opened this issue Nov 17, 2020 · 3 comments

Comments

@tobias-gruenewald
Copy link
Contributor

We have the following line in our sssd.conf:
ldap_group_type = groupType

This leads to an error message (e.g. when running authconfig):
TypeError: Expected <type 'int'> for ldap_group_type, received <type 'str'>

The manpage actually states that an integer is required, but at the same time describes the value of this parameter as follows:

       ldap_group_type (integer)
           The LDAP attribute that contains an integer value indicating the type of the group and maybe other flags.

           This attribute is currently only used by the AD provider to determine if a group is a domain local groups and has to be filtered out for trusted domains.

           Default: groupType in the AD provider, otherwise not set

So the default value for AD provider is actually a string ("groupType") and the description also implies a string, as LDAP attribute names are rarely integers. The content of the LDAP attribute indeed should be a integer, but not the attribute name itself.

This is observed with SSSD version 1.16.5 on CentOS but I think the current code branch still has the same issue.

@sumit-bose
Copy link
Contributor

Hi,

thanks for the report. It looks like the man page entry is already fixed https://github.com/SSSD/sssd/blob/master/src/man/sssd-ldap-attributes.5.xml#L742 .

But the python API used by authconfig still has int (https://github.com/SSSD/sssd/blob/master/src/config/etc/sssd.api.d/sssd-ldap.conf#L105 , https://github.com/SSSD/sssd/blob/master/src/config/etc/sssd.api.d/sssd-ad.conf#L120 , https://github.com/SSSD/sssd/blob/master/src/config/etc/sssd.api.d/sssd-ipa.conf#L111 ).

I wonder if you would be interested to send a pull-request to fix this?

bye,
Sumit

tobias-gruenewald added a commit to tobias-gruenewald/sssd that referenced this issue Nov 17, 2020
tobias-gruenewald added a commit to tobias-gruenewald/sssd that referenced this issue Nov 17, 2020
tobias-gruenewald added a commit to tobias-gruenewald/sssd that referenced this issue Nov 17, 2020
tobias-gruenewald added a commit to tobias-gruenewald/sssd that referenced this issue Nov 17, 2020
tobias-gruenewald added a commit to tobias-gruenewald/sssd that referenced this issue Nov 17, 2020
tobias-gruenewald added a commit to tobias-gruenewald/sssd that referenced this issue Nov 17, 2020
@tobias-gruenewald
Copy link
Contributor Author

Hi,

thanks for the report. It looks like the man page entry is already fixed https://github.com/SSSD/sssd/blob/master/src/man/sssd-ldap-attributes.5.xml#L742 .

But the python API used by authconfig still has int (https://github.com/SSSD/sssd/blob/master/src/config/etc/sssd.api.d/sssd-ldap.conf#L105 , https://github.com/SSSD/sssd/blob/master/src/config/etc/sssd.api.d/sssd-ad.conf#L120 , https://github.com/SSSD/sssd/blob/master/src/config/etc/sssd.api.d/sssd-ipa.conf#L111 ).

I wonder if you would be interested to send a pull-request to fix this?

bye,
Sumit

Hi Sumit,

I am not sure if I did this correctly. My experiences with code management in GitHub are very limited.
Also I just found out that every reference to this bug report in a commit is spammed here, that was not my intention.
Apparently it would have been sufficient to add this to the comment of the pull request.

Best regards,
Tobias

pbrezina pushed a commit that referenced this issue Nov 23, 2020
#5402

Reviewed-by: Sumit Bose <sbose@redhat.com>
pbrezina pushed a commit that referenced this issue Nov 23, 2020
#5402

Reviewed-by: Sumit Bose <sbose@redhat.com>
pbrezina pushed a commit that referenced this issue Nov 23, 2020
#5402

Reviewed-by: Sumit Bose <sbose@redhat.com>
akuster pushed a commit to akuster/sssd that referenced this issue May 18, 2021
SSSD#5402

Reviewed-by: Sumit Bose <sbose@redhat.com>
akuster pushed a commit to akuster/sssd that referenced this issue May 18, 2021
SSSD#5402

Reviewed-by: Sumit Bose <sbose@redhat.com>
akuster pushed a commit to akuster/sssd that referenced this issue May 18, 2021
SSSD#5402

Reviewed-by: Sumit Bose <sbose@redhat.com>
@pbrezina
Copy link
Member

pbrezina commented Aug 8, 2023

Fixed by 2786071

@pbrezina pbrezina closed this as completed Aug 8, 2023
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

No branches or pull requests

3 participants