diff --git a/README.rdoc b/README.rdoc index 5098431e..d0f01e8b 100644 --- a/README.rdoc +++ b/README.rdoc @@ -39,12 +39,18 @@ Simply require either 'net-ldap' or 'net/ldap'. == Extensions +=== resolv-srv + This library focuses on the core LDAP RFCs referenced in the description. However, we recognize there are commonly used extensions to the spec that are useful. If there is another library which handles it, we list it here. * {resolv-srv}[https://rubygems.org/gems/resolv-srv]: Support RFC2782 SRV record lookup and failover +=== net-ldap-gss-spnego + +* {net-ldap-gss-spnego}[https://rubygems.org/gems/net-ldap-gss-spnego]: Add the GSS-SPNEGO authentication mechanism in net-ldap gem + == Develop This task will run the test suite and the diff --git a/lib/net/ldap/auth_adapter/gss_spnego.rb b/lib/net/ldap/auth_adapter/gss_spnego.rb deleted file mode 100644 index 9f773454..00000000 --- a/lib/net/ldap/auth_adapter/gss_spnego.rb +++ /dev/null @@ -1,41 +0,0 @@ -require 'net/ldap/auth_adapter' -require 'net/ldap/auth_adapter/sasl' - -module Net - class LDAP - module AuthAdapers - #-- - # PROVISIONAL, only for testing SASL implementations. DON'T USE THIS YET. - # Uses Kohei Kajimoto's Ruby/NTLM. We have to find a clean way to - # integrate it without introducing an external dependency. - # - # This authentication method is accessed by calling #bind with a :method - # parameter of :gss_spnego. It requires :username and :password - # attributes, just like the :simple authentication method. It performs a - # GSS-SPNEGO authentication with the server, which is presumed to be a - # Microsoft Active Directory. - #++ - class GSS_SPNEGO < Net::LDAP::AuthAdapter - def bind(auth) - require 'ntlm' - - user, psw = [auth[:username] || auth[:dn], auth[:password]] - raise Net::LDAP::BindingInformationInvalidError, "Invalid binding information" unless (user && psw) - - nego = proc do |challenge| - t2_msg = NTLM::Message.parse(challenge) - t3_msg = t2_msg.response({ :user => user, :password => psw }, - { :ntlmv2 => true }) - t3_msg.serialize - end - - Net::LDAP::AuthAdapter::Sasl.new(@connection).bind \ - :method => :sasl, - :mechanism => "GSS-SPNEGO", - :initial_credential => NTLM::Message::Type1.new.serialize, - :challenge_response => nego - end - end - end - end -end