SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Andere mochten auch

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
라한사 아
 

Andere mochten auch (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
 

Kürzlich hochgeladen

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
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
 

Kürzlich hochgeladen (20)

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
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 Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

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