xandar
Goto Top

Apache Zugriff mit Zertifikat und nur wenn man in LDAP Gruppe ist

Hallo,

ist es möglich ein vhost im Apache 2.4 so zu konfigurieren, dass man auf diesen nur Zugriff hat, wenn man ein Client-Zertifikat und der Common Name (CN) dieses auch dem Benutzer in einer bestimmten LDAP Gruppe entspricht.
Also Zertifikat schaut so aus: CN=MeinUserName;O=Contoso;C=COM
LDAP Gruppe so: CN=Gruppnname,OU=Gruppen,OU=Resources,DC=contoso,DC=com
Der CN im Zertifikat ist gleich unserem AD-Account Name.

Der Clienz-Zertifikatsbasierte Zugriff habe ich mit [SSLVerifyClient require] und [SSLVerifyDepth 2] hinbekommen.
Fehlt nur noch die LDAP Überprüfung, sofern das überhaupt möglich ist?

Grüße

Content-Key: 568407

Url: https://administrator.de/contentid/568407

Ausgedruckt am: 28.03.2024 um 11:03 Uhr

Mitglied: 143728
143728 29.04.2020 aktualisiert um 12:41:48 Uhr
Goto Top
Fehlt nur noch die LDAP Überprüfung, sofern das überhaupt möglich ist?
Apache Module mod_authnz_ldap
<Directory "/some/path/">  
  AuthType Basic
  AuthName "Top Secret"  
  AuthBasicProvider ldap
  AuthLDAPURL "ldaps://example.com/dc=CONTOSO,dc=COM?sAMAccountname"  
  AuthLDAPBindDN "CN=apache,OU=Accounts,DC=contoso,DC=com"  
  AuthLDAPBindPassword "password"  
  AuthLDAPMaxSubGroupDepth 0
  AuthLDAPSubGroupAttribute member
  AuthLDAPSubGroupClass group
  Require ldap-group CN=Gruppnname,OU=Gruppen,OU=Resources,DC=contoso,DC=com
</Directory>