Рейтинг:1

Configuring Cert Based and LDAP Authorization in Apache Virtual Host

флаг in

We have a scenario where we have an application that only accept client certs for authentication and that setup works well (configured in Apache VHost). However as part new requirement we would like to also check whether that user is part of a certain group in LDAP and if not then the request should get rejected.

Note in the below excerpt we were trying with a separate user being sent in the request header, extracting that and then checking against LDAP, however the logic remains the same.

The problem is that LDAP Search is NOT getting invoked at all.

<LocationMatch ^>
     allow from all
     SSLOptions +StdEnvVars
     SSLRequireSSL
     SSLRenegBufferSize 10485760
     SSLRequire %{SSL_CLIENT_S_DN_CN} in {"myusername"}
     SSLVerifyClient require
     SSLVerifyDepth  5
     SSLUserName SSL_CLIENT_S_DN_CN
     SetEnvIf x-user ".+" X_USER=$0

#AuthName "Apache2 LDAP Check"
#AuthType Basic
AuthBasicProvider ldap
LDAPReferrals Off
AuthLDAPUrl ldap://ldap.corp.orgn.com:389/dc=corp,dc=orgn,dc=com?sAMAccountName?sub?(objectClass=*)
AuthLDAPBindDN "[email protected]"
AuthLDAPBindPassword "asdfg"

Require valid-user
AuthLDAPGroupAttribute memberUid
AuthLDAPGroupAttributeIsDN off

#Require ldap-group CN=orgn-users,OU=Standard,OU=Security,OU=Groups,DC=corp,DC=orgn,DC=com 

#Require ldap-filter "&(objectClass=user)(sAMAccountName=%{X_USER})(memberof=CN=orgn-users,OU=Standard,OU=Security,OU=Groups,DC=corp,DC=orgn,DC=com)"

RequestHeader set userid "%{X_USER}e"

</LocationMatch>

Ответить или комментировать

Большинство людей не понимают, что склонность к познанию нового открывает путь к обучению и улучшает межличностные связи. В исследованиях Элисон, например, хотя люди могли точно вспомнить, сколько вопросов было задано в их разговорах, они не чувствовали интуитивно связи между вопросами и симпатиями. В четырех исследованиях, в которых участники сами участвовали в разговорах или читали стенограммы чужих разговоров, люди, как правило, не осознавали, что задаваемый вопрос повлияет — или повлиял — на уровень дружбы между собеседниками.