Giter Site home page Giter Site logo

Comments (13)

barry-r-moore avatar barry-r-moore commented on June 24, 2024 1

@chazt3n not sure i follow your question.
We us the library in our app as described in the read me.
In terms of authentication vis cert, we implement the client side validation callback, that loads a pfx and attaches to all subsequent calls.

from novell.directory.ldap.netstandard.

tgitchel avatar tgitchel commented on June 24, 2024

This is what I have so far:

ldapConnection = new LdapConnection();
ldapConnection.SecureSocketLayer = true;
ldapConnection.UserDefinedServerCertValidationDelegate += new RemoteCertificateValidationCallback((sender, certificate, chain, errors) => true);
ldapConnection.Connect(hostName, portNumber);
ldapConnection.Bind("", "");

I can't figure out how to add the certificate to the connection request. I installed the certificate in the store, but this didn't help.

from novell.directory.ldap.netstandard.

dsbenghe avatar dsbenghe commented on June 24, 2024

This feature is not implemented yet. Someone else asked also about this - see here #9

from novell.directory.ldap.netstandard.

yobdoy avatar yobdoy commented on June 24, 2024

Hi, I'm willing to help too for this feature, can you please give work direction?

from novell.directory.ldap.netstandard.

dsbenghe avatar dsbenghe commented on June 24, 2024

Authentication with client certificate is supported by SslStream (already used for ssl/tls support).

Short description of how authenticatin with client certificate works with ldap - https://tools.ietf.org/html/rfc2829#section-7.1

From what I understand using SslStream with authentication with client certificate + sending a different type of bind request (EXTERNAL) should work - but I may be wrong :)

from novell.directory.ldap.netstandard.

tgitchel avatar tgitchel commented on June 24, 2024

@dsbenghe,

Thanks for the suggestion. Do you have any sample code that is using such a binding?

from novell.directory.ldap.netstandard.

dsbenghe avatar dsbenghe commented on June 24, 2024

Maybe I wasn't clear enough - but sending a bind request with type EXTERNAL is not supported yet by this library - I was saying what is required for this library to authenticate with client certificate.

SslStream support sending the certificate for authentication but the ldap client still needs to let the server know that it wants to use that for authentication - that is the purpose of that bind request.

from novell.directory.ldap.netstandard.

daharmon avatar daharmon commented on June 24, 2024

Do we know if this is going to be supported soon? This library is my best hope for ldap queries on .net core (from a linux machine) however I can't use it without the certificate functionality .

from novell.directory.ldap.netstandard.

maslunde avatar maslunde commented on June 24, 2024

Are there any progress around this PR? We are also in need of this feature with .NCore. Or do you know any other packages that support this?

from novell.directory.ldap.netstandard.

Jamtastic808 avatar Jamtastic808 commented on June 24, 2024

Hello!
Any chance this has been completed? We really need to be able use LDAPS with certs and this would be great if it can be used.

from novell.directory.ldap.netstandard.

barry-r-moore avatar barry-r-moore commented on June 24, 2024

hello,

we too had a similar need of this library.

We have forked the code and succeeded in completing authentication using a client certificate.
Here is the Pull Request:

#91

Note we used a .pfx to complete this.

from novell.directory.ldap.netstandard.

chazt3n avatar chazt3n commented on June 24, 2024

@barry-r-moore how does one use this?

from novell.directory.ldap.netstandard.

dsbenghe avatar dsbenghe commented on June 24, 2024

Latest master - which will get published as 3.6.x - has SASL authentication using client certificate implemented e.g.

var options = new LdapConnectionOptions()
  .UseSsl()
  .ConfigureLocalCertificateSelectionCallback(...) // return your client certificate
using var ldapConnection = new LdapConnection(options);
ldapConnection.Connect(...) // to ssl port
ldapConnection.Bind(new SaslExternalRequest());

or

var options = new LdapConnectionOptions()
  .ConfigureLocalCertificateSelectionCallback(...) // return your client certificate
using var ldapConnection = new LdapConnection(options);
ldapConnection.Connect(...)
ldapConnection.StartTLS();
ldapConnection.Bind(new SaslExternalRequest());
...

from novell.directory.ldap.netstandard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.