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

System.DirectoryServices.Protocols.LdapConnection Methods in .NET 6 - Alpine Linux > 3.14 #72057

Closed
zlsmith86 opened this issue Jul 12, 2022 · 2 comments

Comments

@zlsmith86
Copy link

Description

When trying to access Ldap running on Alpine Linux it is looking for a specific version of libldap. Once we updated the OS from 3.14 to 3.15, it changed the version of this library and caused a runtime issue. I would request that it be able to work with any installed version of libldap

Unable to load shared library 'libldap-2.4.so.2' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: Error loading shared library liblibldap-2.4.so.2: No such file or directory

Reproduction Steps

var ldapConn = new LdapConnection(
    new LdapDirectoryIdentifier(_authSettings.LDAPDomain),
    new NetworkCredential()
    {
        UserName = _username,
        Password = _password,
    },
    AuthType.Basic);

ldapConn.SessionOptions.ProtocolVersion = 3;
ldapConn.Bind();

Run app on docker Alpine Linux version 3.15 or greater

RUN apk update && apk upgrade && apk --no-cache add \
    curl \
    openssl \
    bash \
    libsasl \
    libldap \
    openldap

Expected behavior

Able to query LDAP

Actual behavior

Unable to load shared library 'libldap-2.4.so.2' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: Error loading shared library liblibldap-2.4.so.2: No such file or directory

Regression?

This works when Alpine is OS version 3.14 because the max version available for 3.14 of libldap is 2.4

https://pkgs.alpinelinux.org/packages?name=libldap&branch=v3.14

Known Workarounds

Keep the OS version 3.14 or manually install the specific version of the library

Configuration

No response

Other information

No response

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jul 12, 2022
@ghost
Copy link

ghost commented Jul 12, 2022

Tagging subscribers to this area: @dotnet/area-system-directoryservices, @jay98014
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

When trying to access Ldap running on Alpine Linux it is looking for a specific version of libldap. Once we updated the OS from 3.14 to 3.15, it changed the version of this library and caused a runtime issue. I would request that it be able to work with any installed version of libldap

Unable to load shared library 'libldap-2.4.so.2' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: Error loading shared library liblibldap-2.4.so.2: No such file or directory

Reproduction Steps

var ldapConn = new LdapConnection(
    new LdapDirectoryIdentifier(_authSettings.LDAPDomain),
    new NetworkCredential()
    {
        UserName = _username,
        Password = _password,
    },
    AuthType.Basic);

ldapConn.SessionOptions.ProtocolVersion = 3;
ldapConn.Bind();

Run app on docker Alpine Linux version 3.15 or greater

RUN apk update && apk upgrade && apk --no-cache add \
    curl \
    openssl \
    bash \
    libsasl \
    libldap \
    openldap

Expected behavior

Able to query LDAP

Actual behavior

Unable to load shared library 'libldap-2.4.so.2' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: Error loading shared library liblibldap-2.4.so.2: No such file or directory

Regression?

This works when Alpine is OS version 3.14 because the max version available for 3.14 of libldap is 2.4

https://pkgs.alpinelinux.org/packages?name=libldap&branch=v3.14

Known Workarounds

Keep the OS version 3.14 or manually install the specific version of the library

Configuration

No response

Other information

No response

Author: zlsmith86
Assignees: -
Labels:

area-System.DirectoryServices

Milestone: -

@joperezr
Copy link
Member

Thanks for logging the issue @zlsmith86, this is a dupe of #69456, so I will go ahead and close this in favor of that one. I think the action items are basically to test and ensure that newer versions are compatible with all of our scenarios, and after that we should be able to just bind to the 2.x version

@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Jul 13, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Aug 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants