Wednesday, September 19, 2018

Apache access control via Ldap

Friend,

We have an application (Logsniffer) running And We were looking for some access control on it.

Below are config file for Apache access control via ldap.

root@ip-10-101-2-145:/etc/apache2/sites-enabled# cat logsniffer-ssl.conf
Listen 443
<VirtualHost *:443>
  ServerName logsniffer-cme.atpl.com
  ServerAlias logsniffer-cme.atpl.com
  SSLEngine On
  SSLCertificateFile /etc/apache2/ssl/crt/8b47601b81cb83cf.crt
  SSLCertificateKeyFile /etc/apache2/ssl/key/acceletrade.key
  SSLCertificateChainFile /etc/apache2/ssl/key/gd_bundle-g2-g1.crt

  ProxyRequests     Off
  ProxyPass         /  http://localhost:8082/
  ProxyPassReverse  /  http://localhost:8082/
#  ProxyPassReverse  /  http://www.logsniffer.my.domain/
  <Proxy http://localhost:8082/*>
        Order deny,allow
        Deny from All
        AuthName "Valid Ldap Authorisation for LDap Domain"
        AuthType Basic
        AuthBasicProvider ldap
#        AuthzLDAPAuthoritative on
        AuthLDAPUrl "ldap://132.1.16.104:389/cn=users,cn=accounts,dc=atpl,dc=com?uid"
        Require ldap-group cn=cme,cn=groups,cn=accounts,dc=atpl,dc=com
        Satisfy any
</Proxy>
  ProxyPreserveHost on
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

No comments:

Post a Comment

Renew k8s certificates

Check If certificate expires: amikum@~:03:06:54(⎈ |local-cluster:default):sudo kubeadm certs check-expiration CERTIFICATE                EXP...