SlideShare una empresa de Scribd logo
1 de 3
Enable LDAP and SSL for Apache for
Logstash
Author : Kanwar Batra
Enable Apache SSL by compiling Apache with the required Apache and SSL module as
mentioned below. These mods will be added to the final gold copy maintained by
Patrick.

Pre-Req to build apache.





Download Apache from an Apache mirror site
Unzip the downloaded source
Install the required pre-requisite libraries required to compile apache.
Install the epel yum repo as below
rpm -ivh http://fedora.mirror.nexicom.net/epel/6Server/x86_64/epel-release-68.noarch.rpm

Build Apache for Logstash






By default apache binaries is built in /usr/local/apache2 ( you can change this
location by specifying the destination directory in the configure command
cd <Download Apache Location>/
./configure --enable-layout=RedHat --with-apr=../apr-1.4.8 --with-apr-util=../aprutil-1.5.2 --with-ldap --enable-ldap --enable-authnz-ldap --enable-ssl --enable-so
make
make install

Enable LDAP
changes in conf/httpd.conf

LoadModule authn_core_module lib64/httpd/modules/mod_authn_core.so
LoadModule authz_host_module lib64/httpd/modules/mod_authz_host.so
LoadModule authz_groupfile_module
lib64/httpd/modules/mod_authz_groupfile.so
LoadModule authz_user_module lib64/httpd/modules/mod_authz_user.so
LoadModule authz_dbm_module lib64/httpd/modules/mod_authz_dbm.so
LoadModule authz_owner_module lib64/httpd/modules/mod_authz_owner.so
LoadModule authz_dbd_module lib64/httpd/modules/mod_authz_dbd.so
LoadModule authz_core_module lib64/httpd/modules/mod_authz_core.so
LoadModule authnz_ldap_module lib64/httpd/modules/mod_authnz_ldap.so
LoadModule access_compat_module
lib64/httpd/modules/mod_access_compat.so
LoadModule auth_basic_module lib64/httpd/modules/mod_auth_basic.so
LoadModule ldap_module lib64/httpd/modules/mod_ldap.so

changes in conf.d/kibana3.conf

Below the <Directory> Tags as shown in attached file for Kibana3.conf
<Location />
AuthType Basic
AuthName "USE YOUR LDAP AD ACCOUNT"
AuthLDAPURL
"ldap://<yourldaphost>:389/ou=NewUsers,dc=dev,dc=ksoftcloud,dc=com?sAM
AccountName?sub?(objectClass=*)" NONE
AuthBasicProvider ldap
AuthLDAPBindDN "<create apache account in Ldap and usePrincipalName>"
AuthLDAPBindPassword "<yourpwd>"
require ldap-attribute objectClass=user
</Location>

Enable SSL in Apache
Generate the Self Signed SSL Keys
openssl genrsa -des3 -out server.key 1024
openssl req -new -key server.key -out server.csr
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
changes in httpd.conf

LoadModule socache_shmcb_module
lib64/httpd/modules/mod_socache_shmcb.so
LoadModule ssl_module lib64/httpd/modules/mod_ssl.so
Listen 80
Listen 443
IncludeOptional /usr/local/apache2/conf.d/*.conf
TraceEnable off
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
changes in kibana3.con

SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
SSLPassPhraseDialog builtin
SSLSessionCache "shmcb:/usr/local/apache2/logs/ssl_scache(512000)"
SSLSessionCacheTimeout 300
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile "/etc/httpd/conf/server.crt"
SSLCertificateKeyFile "/etc/httpd/conf/server.key"

Disclaimer

This document is based on my experience in setting up ldap for a customer . The document is shared for anyone looking for
answers to configuring their environment with Apache LDAP . Please use the document as is you may report any errors you find
and I’ll update the document to reflect any corrections in the future updates. Thanks

Más contenido relacionado

Destacado

Growing object oriented software guided by test
Growing object oriented software guided by testGrowing object oriented software guided by test
Growing object oriented software guided by test
라한사 아
 

Destacado (14)

Improving Cross Desktop Standard by Cedric BAIL (GNOME Asia Summit 2013)
Improving Cross Desktop Standard by Cedric BAIL (GNOME Asia Summit 2013)Improving Cross Desktop Standard by Cedric BAIL (GNOME Asia Summit 2013)
Improving Cross Desktop Standard by Cedric BAIL (GNOME Asia Summit 2013)
 
Fiscalización Ejercito
Fiscalización Ejercito  Fiscalización Ejercito
Fiscalización Ejercito
 
Vesícula biliar
Vesícula biliar Vesícula biliar
Vesícula biliar
 
Exploración física Precordial y pericardiocentesis
Exploración física Precordial y pericardiocentesisExploración física Precordial y pericardiocentesis
Exploración física Precordial y pericardiocentesis
 
Developer paradigm shift
Developer paradigm shiftDeveloper paradigm shift
Developer paradigm shift
 
TMC Hugues Sweeney Experience Design Interview ENG Version
TMC Hugues Sweeney Experience Design Interview ENG VersionTMC Hugues Sweeney Experience Design Interview ENG Version
TMC Hugues Sweeney Experience Design Interview ENG Version
 
TMC David Dufresne Fort McMoney Co-Production Interview Fr Version
TMC David Dufresne Fort McMoney Co-Production Interview Fr VersionTMC David Dufresne Fort McMoney Co-Production Interview Fr Version
TMC David Dufresne Fort McMoney Co-Production Interview Fr Version
 
Sap hana studio_overview
Sap hana studio_overviewSap hana studio_overview
Sap hana studio_overview
 
Growing object oriented software guided by test
Growing object oriented software guided by testGrowing object oriented software guided by test
Growing object oriented software guided by test
 
20151022 elasticsearch 적용및활용_송준이_sds발표용
20151022 elasticsearch 적용및활용_송준이_sds발표용20151022 elasticsearch 적용및활용_송준이_sds발표용
20151022 elasticsearch 적용및활용_송준이_sds발표용
 
2016 화장품 미세 플라스틱 간담회 기록 및 후기
2016 화장품 미세 플라스틱 간담회 기록 및 후기2016 화장품 미세 플라스틱 간담회 기록 및 후기
2016 화장품 미세 플라스틱 간담회 기록 및 후기
 
HEMORRAGIAS INTRACEREBRALES ESPONTANEAS
HEMORRAGIAS INTRACEREBRALES ESPONTANEASHEMORRAGIAS INTRACEREBRALES ESPONTANEAS
HEMORRAGIAS INTRACEREBRALES ESPONTANEAS
 
RCP
RCPRCP
RCP
 
QUE ES PATOLOGIA
QUE ES PATOLOGIAQUE ES PATOLOGIA
QUE ES PATOLOGIA
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

Enable ldap and ssl for apache and log stash

  • 1. Enable LDAP and SSL for Apache for Logstash Author : Kanwar Batra Enable Apache SSL by compiling Apache with the required Apache and SSL module as mentioned below. These mods will be added to the final gold copy maintained by Patrick. Pre-Req to build apache.     Download Apache from an Apache mirror site Unzip the downloaded source Install the required pre-requisite libraries required to compile apache. Install the epel yum repo as below rpm -ivh http://fedora.mirror.nexicom.net/epel/6Server/x86_64/epel-release-68.noarch.rpm Build Apache for Logstash      By default apache binaries is built in /usr/local/apache2 ( you can change this location by specifying the destination directory in the configure command cd <Download Apache Location>/ ./configure --enable-layout=RedHat --with-apr=../apr-1.4.8 --with-apr-util=../aprutil-1.5.2 --with-ldap --enable-ldap --enable-authnz-ldap --enable-ssl --enable-so make make install Enable LDAP changes in conf/httpd.conf LoadModule authn_core_module lib64/httpd/modules/mod_authn_core.so LoadModule authz_host_module lib64/httpd/modules/mod_authz_host.so LoadModule authz_groupfile_module lib64/httpd/modules/mod_authz_groupfile.so LoadModule authz_user_module lib64/httpd/modules/mod_authz_user.so LoadModule authz_dbm_module lib64/httpd/modules/mod_authz_dbm.so LoadModule authz_owner_module lib64/httpd/modules/mod_authz_owner.so LoadModule authz_dbd_module lib64/httpd/modules/mod_authz_dbd.so LoadModule authz_core_module lib64/httpd/modules/mod_authz_core.so LoadModule authnz_ldap_module lib64/httpd/modules/mod_authnz_ldap.so
  • 2. LoadModule access_compat_module lib64/httpd/modules/mod_access_compat.so LoadModule auth_basic_module lib64/httpd/modules/mod_auth_basic.so LoadModule ldap_module lib64/httpd/modules/mod_ldap.so changes in conf.d/kibana3.conf Below the <Directory> Tags as shown in attached file for Kibana3.conf <Location /> AuthType Basic AuthName "USE YOUR LDAP AD ACCOUNT" AuthLDAPURL "ldap://<yourldaphost>:389/ou=NewUsers,dc=dev,dc=ksoftcloud,dc=com?sAM AccountName?sub?(objectClass=*)" NONE AuthBasicProvider ldap AuthLDAPBindDN "<create apache account in Ldap and usePrincipalName>" AuthLDAPBindPassword "<yourpwd>" require ldap-attribute objectClass=user </Location> Enable SSL in Apache Generate the Self Signed SSL Keys openssl genrsa -des3 -out server.key 1024 openssl req -new -key server.key -out server.csr openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt changes in httpd.conf LoadModule socache_shmcb_module lib64/httpd/modules/mod_socache_shmcb.so LoadModule ssl_module lib64/httpd/modules/mod_ssl.so Listen 80 Listen 443
  • 3. IncludeOptional /usr/local/apache2/conf.d/*.conf TraceEnable off RewriteEngine on RewriteCond %{HTTPS} !=on RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] changes in kibana3.con SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5 SSLPassPhraseDialog builtin SSLSessionCache "shmcb:/usr/local/apache2/logs/ssl_scache(512000)" SSLSessionCacheTimeout 300 <VirtualHost *:443> SSLEngine on SSLCertificateFile "/etc/httpd/conf/server.crt" SSLCertificateKeyFile "/etc/httpd/conf/server.key" Disclaimer This document is based on my experience in setting up ldap for a customer . The document is shared for anyone looking for answers to configuring their environment with Apache LDAP . Please use the document as is you may report any errors you find and I’ll update the document to reflect any corrections in the future updates. Thanks