title: SSO Authentication - Apache/PHP/ActiveDirectory
body: <p>I want to make an intranet with SSO Authentication through Active Directory. I searched about and I found maybe two ways :</p>
  
  <ol>
  <li><p>Using the apache module <strong><a href="https://www.apachehaus.net/modules/mod_authnz_sspi/" rel="nofollow">mod_authnz_sspi</a></strong>. I can get the username and the domain but it seems there is no authentication. Maybe I don't really get it...</p>
  
  <p>Here my apache conf for this module :</p>
  
  <pre>
   
      AuthType SSPI
      SSPIAuth On
      SSPIAuthoritative On
      SSPIOfferBasic On
      SSPIOmitDomain Off
      SSPIDomain MyDOMAIN
      Require valid-user
  
  </pre>
  
  <p>So I guess the "connection" is not really safe...</p></li>
  <li><p>Using the apache module <strong><a href="http://httpd.apache.org/docs/current/mod/mod_authnz_ldap.html" rel="nofollow">mod_authnz_ldap</a></strong> but I can't make it works well...</p>
  
  <p>Here my apache conf for this module :</p>
  
  <pre> 
     
     AuthName "LDAP Authentication"
     AuthType Basic
     AuthBasicProvider ldap
     AuthLDAPBindAuthoritative off
     AuthLDAPURL "ldap://ad.server.fr:389/DC=server,DC=local?sAMAccountName?sub?(objectClass=person)" NONE
     AuthLDAPBindDN ldap@server.local
     AuthLDAPBindPassword password
     AuthLDAPRemoteUserAttribute on
     LDAPReferrals Off
  
  </pre>
  
  <p>I got this error <code>LDAP: SSL support unavailable: LDAP: CA certificates cannot be set using this method, as they are stored in the registry instead.</code> but I don't want to use SSL for the connection...</p>
  
  <p>Actually I don't really get how this works. My active directory doesn't get connection from my apache or just maybe anonymous.</p></li>
  </ol>
  
  <p>Now I don't know how to make a SSO Authentication on my intranet.
  Which way is better ? Is there another one ?</p>
  
  <p>I use wamp (<em>for windows</em>) with apache 2.4.4.</p>