LEMONLDAP::NG : brand new WebSSO example installation
This commit is contained in:
parent
7baf8c6b64
commit
02fb3d966a
|
@ -1,175 +1,206 @@
|
||||||
#!/usr/bin/make
|
#!/usr/bin/make
|
||||||
|
|
||||||
|
# Example CHROOT
|
||||||
|
EXAMPLECHROOT=`pwd`/example/
|
||||||
|
# Subfolders
|
||||||
|
SYSTEMCONFDIR=$(EXAMPLECHROOT)etc/lemonldap-ng/
|
||||||
|
SCRIPTSDIR=$(EXAMPLECHROOT)var/lib/lemonldap-ng/
|
||||||
|
# DNS Domain for cookie and virtual hosts
|
||||||
|
DNSDOMAIN="example.com"
|
||||||
|
# LDAP parameters
|
||||||
|
LDAPHOST="localhost"
|
||||||
|
LDAPPORT="389"
|
||||||
|
LDAPSUFFIX="dc=example,dc=com"
|
||||||
|
# Other
|
||||||
VERSION=`head -n1 changelog |sed -e 's/lemonldap-ng (//' -e 's/).*$$//'`
|
VERSION=`head -n1 changelog |sed -e 's/lemonldap-ng (//' -e 's/).*$$//'`
|
||||||
HANDLERDIR=lemonldap-ng-handler
|
SRCHANDLERDIR=lemonldap-ng-handler
|
||||||
PORTALDIR=lemonldap-ng-portal
|
SRCPORTALDIR=lemonldap-ng-portal
|
||||||
MANAGERDIR=lemonldap-ng-manager
|
SRCMANAGERDIR=lemonldap-ng-manager
|
||||||
EXAMPLEDIRBUILD=`pwd`/example/
|
EXAMPLELANG=en # For static Manager only
|
||||||
EXAMPLEDIR=$(EXAMPLEDIRBUILD)
|
DESTFILECONFDIR=$(SCRIPTSDIR)conf/
|
||||||
EXAMPLECONFDIR=$(EXAMPLEDIR)conf/
|
DESTSESSIONDIR=$(SCRIPTSDIR)sessions/
|
||||||
EXAMPLELASPDIR=$(EXAMPLEDIR)liberty-alliance-sp-portal/
|
DESTLASPDIR=$(SCRIPTSDIR)liberty-alliance-sp-portal
|
||||||
EXAMPLELASPDIRBUILD=$(EXAMPLELASPDIR)
|
DESTPORTALDIR=$(SCRIPTSDIR)portal/
|
||||||
EXAMPLELANG=en
|
DESTHANDLERDIR=$(SCRIPTSDIR)handler/
|
||||||
EXAMPLEPORTALDIRBUILD=$(EXAMPLEDIRBUILD)portal/
|
DESTMANAGERDIR=$(SCRIPTSDIR)manager/
|
||||||
EXAMPLEHANDLERDIRBUILD=$(EXAMPLEDIRBUILD)handler/
|
DESTDOCSDIR=$(SCRIPTSDIR)docs/
|
||||||
EXAMPLEMANAGERDIRBUILD=$(EXAMPLEDIRBUILD)manager/
|
|
||||||
EXAMPLEPORTALDIR=$(EXAMPLEDIR)portal/
|
|
||||||
EXAMPLEHANDLERDIR=$(EXAMPLEDIR)handler/
|
|
||||||
EXAMPLEMANAGERDIR=$(EXAMPLEDIR)manager/
|
|
||||||
|
|
||||||
all: handler manager portal
|
all: handler manager portal
|
||||||
|
|
||||||
handler: handler_conf
|
handler: handler_conf
|
||||||
$(MAKE) -C ${HANDLERDIR}
|
@$(MAKE) -C ${SRCHANDLERDIR}
|
||||||
touch handler
|
@touch .handler
|
||||||
|
|
||||||
portal: portal_conf
|
portal: portal_conf
|
||||||
$(MAKE) -C ${PORTALDIR}
|
@$(MAKE) -C ${SRCPORTALDIR}
|
||||||
touch portal
|
@touch .portal
|
||||||
|
|
||||||
manager: manager_conf
|
manager: manager_conf
|
||||||
$(MAKE) -C ${MANAGERDIR}
|
@$(MAKE) -C ${SRCMANAGERDIR}
|
||||||
touch manager
|
@touch .manager
|
||||||
|
|
||||||
configure: handler_conf portal_conf manager_conf
|
configure: handler_conf portal_conf manager_conf
|
||||||
|
|
||||||
handler_conf:
|
handler_conf:
|
||||||
cd ${HANDLERDIR}; perl Makefile.PL INSTALLDIRS=$(INSTALLDIRS)
|
@cd ${SRCHANDLERDIR}; perl Makefile.PL
|
||||||
touch handler_conf
|
@touch .handler_conf
|
||||||
|
|
||||||
portal_conf:
|
portal_conf:
|
||||||
cd ${PORTALDIR}; perl Makefile.PL INSTALLDIRS=$(INSTALLDIRS)
|
@cd ${SRCPORTALDIR}; perl Makefile.PL
|
||||||
touch portal_conf
|
@touch .portal_conf
|
||||||
|
|
||||||
manager_conf:
|
manager_conf:
|
||||||
cd ${MANAGERDIR}; perl Makefile.PL INSTALLDIRS=$(INSTALLDIRS)
|
@cd ${SRCMANAGERDIR}; perl Makefile.PL
|
||||||
touch manager_conf
|
@touch .manager_conf
|
||||||
|
|
||||||
test: manager handler portal manager_test handler_test portal_test
|
test: manager handler portal manager_test handler_test portal_test
|
||||||
|
|
||||||
manager_test: manager
|
manager_test: manager
|
||||||
$(MAKE) -C ${MANAGERDIR} test
|
@$(MAKE) -C ${SRCMANAGERDIR} test
|
||||||
|
|
||||||
handler_test: handler
|
handler_test: handler
|
||||||
$(MAKE) -C ${HANDLERDIR} test INST_ARCHLIB=../${MANAGERDIR}/blib/lib/
|
@$(MAKE) -C ${SRCHANDLERDIR} test INST_ARCHLIB=../${SRCMANAGERDIR}/blib/lib/
|
||||||
|
|
||||||
portal_test: portal
|
portal_test: portal
|
||||||
$(MAKE) -C ${PORTALDIR} test INST_ARCHLIB=../${MANAGERDIR}/blib/lib/
|
@$(MAKE) -C ${SRCPORTALDIR} test INST_ARCHLIB=../${SRCMANAGERDIR}/blib/lib/
|
||||||
|
|
||||||
install: handler_install portal_install manager_install
|
install: handler_install portal_install manager_install
|
||||||
|
|
||||||
handler_install: handler
|
handler_install: handler
|
||||||
$(MAKE) -C ${HANDLERDIR} install
|
@$(MAKE) -C ${SRCHANDLERDIR} install
|
||||||
touch handler_install
|
@touch .handler_install
|
||||||
|
|
||||||
portal_install: portal
|
portal_install: portal
|
||||||
$(MAKE) -C ${PORTALDIR} install
|
@$(MAKE) -C ${SRCPORTALDIR} install
|
||||||
touch portal_install
|
@touch .portal_install
|
||||||
|
|
||||||
manager_install: manager
|
manager_install: manager
|
||||||
$(MAKE) -C ${MANAGERDIR} install
|
@$(MAKE) -C ${SRCMANAGERDIR} install
|
||||||
touch manager_install
|
@touch .manager_install
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
|
|
||||||
clean: handler_clean portal_clean manager_clean
|
clean: handler_clean portal_clean manager_clean
|
||||||
rm -rf example
|
@rm -rf ${SYSTEMCONFDIR}
|
||||||
rm -vf *gz
|
@rm -rf ${SCRIPTSDIR}
|
||||||
|
@rm -vf *gz
|
||||||
|
|
||||||
handler_clean:
|
handler_clean:
|
||||||
- $(MAKE) -C ${HANDLERDIR} distclean
|
- $(MAKE) -C ${SRCHANDLERDIR} distclean
|
||||||
rm -vf handler*
|
@rm -vf .handler*
|
||||||
|
|
||||||
portal_clean:
|
portal_clean:
|
||||||
- $(MAKE) -C ${PORTALDIR} distclean
|
- $(MAKE) -C ${SRCPORTALDIR} distclean
|
||||||
rm -vf portal*
|
@rm -vf .portal*
|
||||||
|
|
||||||
manager_clean:
|
manager_clean:
|
||||||
- $(MAKE) -C ${MANAGERDIR} distclean
|
- $(MAKE) -C ${SRCMANAGERDIR} distclean
|
||||||
rm -vf manager*
|
@rm -vf .manager*
|
||||||
|
|
||||||
example: all
|
example: all
|
||||||
mkdir -p ${EXAMPLEDIRBUILD}/portal ${EXAMPLEDIRBUILD}/manager ${EXAMPLEDIRBUILD}/handler ${EXAMPLEDIRBUILD}/conf
|
@mkdir -p ${DESTFILECONFDIR} ${DESTPORTALDIR} ${DESTHANDLERDIR} ${DESTMANAGERDIR} ${SYSTEMCONFDIR} ${DESTDOCSDIR} ${DESTSESSIONDIR}
|
||||||
chmod 1777 ${EXAMPLEDIRBUILD}/conf
|
@cp -a ${SRCHANDLERDIR}/example/* ${DESTHANDLERDIR}
|
||||||
cp -a ${HANDLERDIR}/example/* ${EXAMPLEHANDLERDIRBUILD}
|
@cp -a ${SRCPORTALDIR}/example/* ${DESTPORTALDIR}
|
||||||
cp -a ${PORTALDIR}/example/* ${EXAMPLEPORTALDIRBUILD}
|
@rm -rf ${DESTLASPDIR}
|
||||||
#perl -l -e '$$a="${EXAMPLELASPDIRBUILD}";$$a=~s#/$$##;print $$a;'
|
@mv ${DESTPORTALDIR}AuthLA $$(echo ${DESTLASPDIR} | sed -e 's/\/$$//')
|
||||||
#perl -l -e '$$ARGV[0]=~s#/$$##;print $$ARGV[0];' ${EXAMPLELASPDIRBUILD}
|
@cp -a ${SRCMANAGERDIR}/example/* ${DESTMANAGERDIR}
|
||||||
mv ${EXAMPLEDIRBUILD}/portal/AuthLA $$(echo ${EXAMPLELASPDIRBUILD}|sed -e 's/\/$$//')
|
@cp -a _example/etc/lemonldap-ng/* ${SYSTEMCONFDIR}
|
||||||
cp -a ${MANAGERDIR}/example/* ${EXAMPLEMANAGERDIRBUILD}
|
@cp -a _example/var/lib/lemonldap-ng/* ${SCRIPTSDIR}
|
||||||
cp -a _example/* ${EXAMPLEDIRBUILD}
|
@cp -a doc/* ${DESTDOCSDIR}
|
||||||
find ${EXAMPLELASPDIRBUILD} -type f -exec perl -i -pe 's#__DIR__/?#'${EXAMPLELASPDIR}'#g;s#__CONFDIR__/?#'${EXAMPLECONFDIR}'#g;s#__SKINDIR__/?#'${EXAMPLEPORTALDIR}'skins/#g;s#__PORTALDIR__/?#'${EXAMPLEPORTALDIR}'/#g;' {} \;
|
@find ${DESTLASPDIR} -type f -exec perl -i -pe 's#__DIR__/?#'${DESTLASPDIR}'#g;s#__CONFDIR__/?#'${DESTFILECONFDIR}'#g' {} \;
|
||||||
find ${EXAMPLEDIRBUILD} -type f -exec perl -i -pe 's#__DIR__/?#'${EXAMPLEDIR}'#g;s#__CONFDIR__/?#'${EXAMPLECONFDIR}'#g;s#__SKINDIR__/?#'${EXAMPLEPORTALDIR}'skins/#g;s#__PORTALDIR__/?#'${EXAMPLEPORTALDIR}'/#g;' {} \;
|
@find ${SCRIPTSDIR} -type f -exec perl -i -pe 's#__DIR__/?#'${SCRIPTSDIR}'#g;s#__CONFDIR__/?#'${DESTFILECONFDIR}'#g;s#__SESSIONDIR__/?#'${DESTSESSIONDIR}'#g;s#__DNSDOMAIN__#'${DNSDOMAIN}'#g;s#__LDAPHOST__#'${LDAPHOST}'#g;s#__LDAPPORT__#'${LDAPPORT}'#g;s#__LDAPSUFFIX__#'${LDAPSUFFIX}'#g;' {} \;
|
||||||
|
@find ${SYSTEMCONFDIR} -type f -exec perl -i -pe 's#__DIR__/?#'${SCRIPTSDIR}'#g;s#__DNSDOMAIN__#'${DNSDOMAIN}'#g;' {} \;
|
||||||
@echo
|
@echo
|
||||||
@echo "Example is ready."
|
@echo "LemonLDAP::NG example v${VERSION} is installed with these parameters:"
|
||||||
|
@echo " - System configuration: ${SYSTEMCONFDIR}"
|
||||||
|
@echo " - Scripts: ${SCRIPTSDIR}"
|
||||||
|
@echo " - LemonLDAP::NG Configuration: ${DESTFILECONFDIR}"
|
||||||
|
@echo " - DNS domain (for cookies and virtual hosts): ${DNSDOMAIN}"
|
||||||
|
@echo " - LDAP parameters:"
|
||||||
|
@echo " - Host: ${LDAPHOST}"
|
||||||
|
@echo " - Port: ${LDAPPORT}"
|
||||||
|
@echo " - Suffix: ${LDAPSUFFIX}"
|
||||||
|
@echo
|
||||||
|
@echo "To finish configuration:"
|
||||||
@echo
|
@echo
|
||||||
@echo "1 - Add this in your Apache configuration file:"
|
@echo "1 - Add this in your Apache configuration file:"
|
||||||
@echo " with Apache-1.3.x"
|
@echo " with Apache-1.3.x"
|
||||||
@echo
|
@echo " include ${SYSTEMCONFDIR}apache.conf"
|
||||||
@echo " include ${EXAMPLEDIR}apache.conf"
|
|
||||||
@echo
|
|
||||||
@echo " or with Apache-2.x:"
|
@echo " or with Apache-2.x:"
|
||||||
|
@echo " include ${SYSTEMCONFDIR}apache2.conf"
|
||||||
@echo
|
@echo
|
||||||
@echo " include ${EXAMPLEDIR}apache2.conf"
|
@echo "2 - Run 'make postconf' as root to update /etc/hosts and set UNIX rights"
|
||||||
@echo
|
@echo
|
||||||
@echo "2 - Add test.example.com and auth.example.com in your /etc/hosts or"
|
@echo "3 - Use the manager at http://manager.${DNSDOMAIN}/ (after Apache restart) or edit ${DESTFILECONFDIR}lmConf-1 to modify LemonLDAP::NG configuration."
|
||||||
@echo " modify apache.conf to use NameVirtualHost, different port or"
|
@echo " Edit ${DESTPORTALDIR}apps/apps-list.xml to modify the menu."
|
||||||
@echo " address;"
|
|
||||||
@echo
|
|
||||||
@echo " cat ${EXAMPLEDIRBUILD}/for_etc_hosts >> /etc/hosts"
|
|
||||||
@echo
|
|
||||||
@echo "3 - Use the manager at http://manager.example.com/ (after apache restart)"
|
|
||||||
@echo " or edit ${EXAMPLEDIR}/conf/lmConf-1 and set ldapServer and ldapBase."
|
|
||||||
@echo
|
@echo
|
||||||
@echo "4 - Restart Apache (or Apache2)"
|
@echo "4 - Restart Apache (or Apache2)"
|
||||||
@echo
|
@echo
|
||||||
@echo "5 - Try to connect to http://test.example.com/"
|
@echo "5 - Try to connect to http://test1.${DNSDOMAIN}/ or http://test2.${DNSDOMAIN}/"
|
||||||
|
|
||||||
|
postconf_hosts:
|
||||||
|
@cat ${SYSTEMCONFDIR}for_etc_hosts >> /etc/hosts
|
||||||
|
@echo "/etc/hosts was updated"
|
||||||
|
|
||||||
|
postconf_unixrights:
|
||||||
|
@chmod 1777 ${DESTFILECONFDIR}
|
||||||
|
@chmod 1777 ${DESTSESSIONDIR}
|
||||||
|
@echo "UNIX files permissions set"
|
||||||
|
|
||||||
|
postconf: postconf_hosts postconf_unixrights
|
||||||
|
@echo "Post configuration done"
|
||||||
|
|
||||||
|
production_preconf:
|
||||||
|
# TODO: modify EXAMPLECHROOT and set it to /
|
||||||
|
# TODO: ask parameters value (like DNSDOMAIN, LDAPHOST, etc.)
|
||||||
|
|
||||||
|
production_install: production_preconf example
|
||||||
|
|
||||||
uninstall: configure handler_uninstall portal_uninstall manager_uninstall
|
uninstall: configure handler_uninstall portal_uninstall manager_uninstall
|
||||||
|
|
||||||
handler_uninstall: handler
|
handler_uninstall: handler
|
||||||
$(MAKE) -C ${HANDLERDIR} uninstall
|
@$(MAKE) -C ${SRCHANDLERDIR} uninstall
|
||||||
rm -vf handler_uninstall
|
@rm -vf .handler_uninstall
|
||||||
|
|
||||||
portal_uninstall: portal
|
portal_uninstall: portal
|
||||||
$(MAKE) -C ${PORTALDIR} uninstall
|
@$(MAKE) -C ${SRCPORTALDIR} uninstall
|
||||||
rm -vf portal_uninstall
|
@rm -vf .portal_uninstall
|
||||||
|
|
||||||
manager_uninstall: manager
|
manager_uninstall: manager
|
||||||
$(MAKE) -C ${MANAGERDIR} uninstall
|
@$(MAKE) -C ${SRCMANAGERDIR} uninstall
|
||||||
rm -vf manager_uninstall
|
@rm -vf .manager_uninstall
|
||||||
|
|
||||||
dist: clean
|
dist: clean
|
||||||
- $(MAKE) clean
|
@- $(MAKE) clean
|
||||||
mkdir -p lemonldap-ng-$(VERSION)
|
@mkdir -p lemonldap-ng-$(VERSION)
|
||||||
- cp -pR lemonldap-ng-manager/ lemonldap-ng-portal/ lemonldap-ng-handler/ * lemonldap-ng-$(VERSION)
|
@- cp -pR lemonldap-ng-manager/ lemonldap-ng-portal/ lemonldap-ng-handler/ * lemonldap-ng-$(VERSION)
|
||||||
- dir=lemonldap-ng-$(VERSION); find $$dir -name .svn -exec rm -rf {} \; 2>/dev/null
|
@- dir=lemonldap-ng-$(VERSION); find $$dir -name .svn -exec rm -rf {} \; 2>/dev/null
|
||||||
rm -rf lemonldap-ng-$(VERSION)/lemonldap-ng-$(VERSION)
|
@rm -rf lemonldap-ng-$(VERSION)/lemonldap-ng-$(VERSION)
|
||||||
tar czf lemonldap-ng-$(VERSION).tar.gz lemonldap-ng-$(VERSION)
|
@tar czf lemonldap-ng-$(VERSION).tar.gz lemonldap-ng-$(VERSION)
|
||||||
rm -rf lemonldap-ng-$(VERSION)
|
@rm -rf lemonldap-ng-$(VERSION)
|
||||||
|
|
||||||
debian-dist: dist
|
debian-dist: dist
|
||||||
mv lemonldap-ng-$(VERSION).tar.gz lemonldap-ng_$(VERSION).orig.tar.gz
|
@mv lemonldap-ng-$(VERSION).tar.gz lemonldap-ng_$(VERSION).orig.tar.gz
|
||||||
|
|
||||||
cpan: clean configure handler_cpan portal_cpan manager_cpan
|
cpan: clean configure handler_cpan portal_cpan manager_cpan
|
||||||
|
|
||||||
handler_cpan: handler_conf
|
handler_cpan: handler_conf
|
||||||
$(MAKE) -C ${HANDLERDIR} dist
|
@$(MAKE) -C ${SRCHANDLERDIR} dist
|
||||||
mv ${HANDLERDIR}/Lemonldap*.gz .
|
@mv ${SRCHANDLERDIR}/Lemonldap*.gz .
|
||||||
|
|
||||||
portal_cpan: portal_conf
|
portal_cpan: portal_conf
|
||||||
$(MAKE) -C ${PORTALDIR} dist
|
@$(MAKE) -C ${SRCPORTALDIR} dist
|
||||||
mv ${PORTALDIR}/Lemonldap*.gz .
|
@mv ${SRCPORTALDIR}/Lemonldap*.gz .
|
||||||
|
|
||||||
manager_cpan: manager_conf
|
manager_cpan: manager_conf
|
||||||
$(MAKE) -C ${MANAGERDIR} dist
|
@$(MAKE) -C ${SRCMANAGERDIR} dist
|
||||||
mv ${MANAGERDIR}/Lemonldap*.gz .
|
@mv ${SRCMANAGERDIR}/Lemonldap*.gz .
|
||||||
|
|
||||||
static_example: example
|
static_example: example
|
||||||
mkdir -p ${EXAMPLEDIRBUILD}/static
|
@mkdir -p ${SCRIPTSDIR}static/
|
||||||
cd ${EXAMPLEDIRBUILD}/static/;cp -a ../manager/{imgs,theme} .;cd -
|
@cd ${SCRIPTSDIR}static/;cp -a ../manager/{imgs,theme} .;cd -
|
||||||
scripts/make_static_example.pl ${EXAMPLEDIRBUILD}/manager/index.pl ${EXAMPLEDIRBUILD}/static/index.html $(EXAMPLELANG)
|
@../scripts/make_static_example.pl ${DESTMANAGERDIR}index.pl ${SCRIPTSDIR}static/index.html $(EXAMPLELANG)
|
||||||
|
|
||||||
documentation:
|
documentation:
|
||||||
cd doc && ../scripts/doc.pl
|
@cd doc/ && ../scripts/doc.pl
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,6 @@ Lemonldap::NG TODO
|
||||||
------------------
|
------------------
|
||||||
TODO list for Lemonldap::NG development
|
TODO list for Lemonldap::NG development
|
||||||
|
|
||||||
- Priority: Normal Status: Planning Created: 2007\05\03 12-28-30
|
|
||||||
Modify example to use nameVirtualHost instead of 127.0.0.x adresses
|
|
||||||
- Priority: Low Status: In progress Created: 2007\05\03 10-41-36
|
- Priority: Low Status: In progress Created: 2007\05\03 10-41-36
|
||||||
Modify install to make a running example as debian install
|
Modify install to make a running example as debian install
|
||||||
- Priority: Low Status: Done Created: 2007\04\23 21-26-18 Done: 2007\10\24 10-17-47
|
- Priority: Low Status: Done Created: 2007\04\23 21-26-18 Done: 2007\10\24 10-17-47
|
||||||
|
|
|
@ -1,48 +0,0 @@
|
||||||
include __DIR__/handler/lmH-apache.conf
|
|
||||||
#Listen 127.0.0.2:80
|
|
||||||
<VirtualHost 127.0.0.2:*>
|
|
||||||
ServerName auth.example.com
|
|
||||||
|
|
||||||
# DocumentRoot
|
|
||||||
DocumentRoot __DIR__/portal
|
|
||||||
<Directory __DIR__/portal>
|
|
||||||
Order allow,deny
|
|
||||||
Allow from all
|
|
||||||
Options +ExecCGI
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
# Portal and Manager must be interpreted by Perl
|
|
||||||
<Files *.pl>
|
|
||||||
SetHandler perl-script
|
|
||||||
PerlHandler Apache::Registry
|
|
||||||
</Files>
|
|
||||||
|
|
||||||
<IfModule mod_dir.c>
|
|
||||||
DirectoryIndex index.pl index.html
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
</VirtualHost>
|
|
||||||
#Listen 127.0.0.4:80
|
|
||||||
<VirtualHost 127.0.0.4:*>
|
|
||||||
ServerName manager.example.com
|
|
||||||
|
|
||||||
# DocumentRoot
|
|
||||||
DocumentRoot __DIR__/manager
|
|
||||||
<Directory __DIR__/manager>
|
|
||||||
Order deny,allow
|
|
||||||
Deny from all
|
|
||||||
Allow from 127.0.0.0/8
|
|
||||||
Options +ExecCGI
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
# Portal and Manager must be interpreted by Perl
|
|
||||||
<Files *.pl>
|
|
||||||
SetHandler perl-script
|
|
||||||
PerlHandler Apache::Registry
|
|
||||||
</Files>
|
|
||||||
|
|
||||||
<IfModule mod_dir.c>
|
|
||||||
DirectoryIndex index.pl index.html
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
</VirtualHost>
|
|
|
@ -1,49 +0,0 @@
|
||||||
include __DIR__/handler/lmH-apache2.conf
|
|
||||||
PerlOptions +GlobalRequest
|
|
||||||
#Listen 127.0.0.2:80
|
|
||||||
<VirtualHost 127.0.0.2:*>
|
|
||||||
ServerName auth.example.com
|
|
||||||
|
|
||||||
# DocumentRoot
|
|
||||||
DocumentRoot __DIR__/portal
|
|
||||||
<Directory __DIR__/portal>
|
|
||||||
Order allow,deny
|
|
||||||
Allow from all
|
|
||||||
Options +ExecCGI
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
# Portal and Manager must be interpreted by Perl
|
|
||||||
<Files *.pl>
|
|
||||||
SetHandler perl-script
|
|
||||||
PerlResponseHandler ModPerl::Registry
|
|
||||||
</Files>
|
|
||||||
|
|
||||||
<IfModule mod_dir.c>
|
|
||||||
DirectoryIndex index.pl index.html
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
</VirtualHost>
|
|
||||||
#Listen 127.0.0.4:80
|
|
||||||
<VirtualHost 127.0.0.4:*>
|
|
||||||
ServerName manager.example.com
|
|
||||||
|
|
||||||
# DocumentRoot
|
|
||||||
DocumentRoot __DIR__/manager
|
|
||||||
<Directory __DIR__/manager>
|
|
||||||
Order deny,allow
|
|
||||||
Deny from all
|
|
||||||
Allow from 127.0.0.0/8
|
|
||||||
Options +ExecCGI
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
# Portal and Manager must be interpreted by Perl
|
|
||||||
<Files *.pl>
|
|
||||||
SetHandler perl-script
|
|
||||||
PerlResponseHandler ModPerl::Registry
|
|
||||||
</Files>
|
|
||||||
|
|
||||||
<IfModule mod_dir.c>
|
|
||||||
DirectoryIndex index.pl index.html
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
</VirtualHost>
|
|
|
@ -1,57 +0,0 @@
|
||||||
ldapServer
|
|
||||||
'localhost'
|
|
||||||
|
|
||||||
ldapBase
|
|
||||||
'dc=example,dc=com'
|
|
||||||
|
|
||||||
ldapPort
|
|
||||||
389
|
|
||||||
|
|
||||||
managerDn
|
|
||||||
''
|
|
||||||
|
|
||||||
managerPassword
|
|
||||||
''
|
|
||||||
|
|
||||||
portal
|
|
||||||
'http://auth.example.com/'
|
|
||||||
|
|
||||||
domain
|
|
||||||
'example.com'
|
|
||||||
|
|
||||||
whatToTrace
|
|
||||||
'$uid'
|
|
||||||
|
|
||||||
groups
|
|
||||||
'$data1 = {};'
|
|
||||||
|
|
||||||
macros
|
|
||||||
'$data1 = {};'
|
|
||||||
|
|
||||||
globalStorage
|
|
||||||
'Apache::Session::File'
|
|
||||||
|
|
||||||
globalStorageOptions
|
|
||||||
'$data1 = {&39;Directory&39; => &39;/tmp&39;};'
|
|
||||||
|
|
||||||
exportedHeaders
|
|
||||||
'$data1 = {&39;test.example.com&39; => {&39;Auth-User&39; => &39;$uid&39;}};'
|
|
||||||
|
|
||||||
exportedVars
|
|
||||||
'$data1 = {&39;uid&39; => &39;uid&39;,&39;cn&39; => &39;cn&39;,&39;mail&39; => &39;mail&39;};'
|
|
||||||
|
|
||||||
authentication
|
|
||||||
'ldap'
|
|
||||||
|
|
||||||
locationRules
|
|
||||||
'$data1 = {&39;test.example.com&39; => {&39;default&39; => &39;accept&39;,&39;^/logout&39; => &39;logout_sso http://www.google.fr/&39;}};'
|
|
||||||
|
|
||||||
cfgNum
|
|
||||||
1
|
|
||||||
|
|
||||||
cookieName
|
|
||||||
'lemonldap'
|
|
||||||
|
|
||||||
securedCookie
|
|
||||||
0
|
|
||||||
|
|
121
build/lemonldap-ng/_example/etc/lemonldap-ng/apache.conf
Normal file
121
build/lemonldap-ng/_example/etc/lemonldap-ng/apache.conf
Normal file
|
@ -0,0 +1,121 @@
|
||||||
|
NameVirtualHost *
|
||||||
|
|
||||||
|
# Perl environment
|
||||||
|
PerlRequire __DIR__/handler/MyHandler.pm
|
||||||
|
<Files ~ "\.(pl)$">
|
||||||
|
SetHandler perl-script
|
||||||
|
PerlHandler Apache::Registry
|
||||||
|
</Files>
|
||||||
|
<IfModule mod_dir.c>
|
||||||
|
DirectoryIndex index.pl index.html
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
# Common error page and security parameters
|
||||||
|
ErrorDocument 403 http://auth.__DNSDOMAIN__/error.pl
|
||||||
|
ServerSignature Off
|
||||||
|
LogLevel warn
|
||||||
|
|
||||||
|
# Portal virtual host
|
||||||
|
<VirtualHost *>
|
||||||
|
ServerName auth.__DNSDOMAIN__
|
||||||
|
|
||||||
|
# DocumentRoot
|
||||||
|
DocumentRoot __DIR__/portal/
|
||||||
|
<Directory __DIR__/portal/>
|
||||||
|
Order allow,deny
|
||||||
|
Allow from all
|
||||||
|
Options +ExecCGI
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
|
# Manager virtual host
|
||||||
|
<VirtualHost *>
|
||||||
|
ServerName manager.__DNSDOMAIN__
|
||||||
|
|
||||||
|
# DocumentRoot
|
||||||
|
DocumentRoot __DIR__/manager/
|
||||||
|
<Directory __DIR__/manager/>
|
||||||
|
Order deny,allow
|
||||||
|
Deny from all
|
||||||
|
Allow from 127.0.0.0/8
|
||||||
|
Options +ExecCGI
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
# On-line documentation
|
||||||
|
Alias /docs/ __DIR__/docs/
|
||||||
|
<Directory __DIR__/docs/>
|
||||||
|
Order deny,allow
|
||||||
|
Allow from all
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
|
# Application Test
|
||||||
|
<VirtualHost *>
|
||||||
|
ServerName test1.__DNSDOMAIN__
|
||||||
|
|
||||||
|
# SSO protection
|
||||||
|
PerlHeaderParserHandler My::Package
|
||||||
|
|
||||||
|
# DocumentRoot
|
||||||
|
DocumentRoot __DIR__/test/
|
||||||
|
<Directory __DIR__/test/>
|
||||||
|
Order deny,allow
|
||||||
|
Allow from all
|
||||||
|
Options +ExecCGI
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
# Configuration reload mechanism (only 1 per physical server is
|
||||||
|
# needed): choose your URL to avoid restarting Apache when
|
||||||
|
# configuration change
|
||||||
|
<Location /reload>
|
||||||
|
Order deny,allow
|
||||||
|
Deny from all
|
||||||
|
Allow from 127.0.0.0/8
|
||||||
|
PerlHeaderParserHandler My::Package->refresh
|
||||||
|
</Location>
|
||||||
|
|
||||||
|
# Uncomment this to activate status module
|
||||||
|
#<Location /status>
|
||||||
|
# Order deny,allow
|
||||||
|
# Deny from all
|
||||||
|
# Allow from 127.0.0.0/8
|
||||||
|
# PerlHeaderParserHandler My::Package->status
|
||||||
|
#</Location>
|
||||||
|
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
|
<VirtualHost *>
|
||||||
|
ServerName test2.__DNSDOMAIN__
|
||||||
|
|
||||||
|
# SSO protection
|
||||||
|
PerlHeaderParserHandler My::Package
|
||||||
|
|
||||||
|
# DocumentRoot
|
||||||
|
DocumentRoot __DIR__/test/
|
||||||
|
<Directory __DIR__/test/>
|
||||||
|
Order deny,allow
|
||||||
|
Allow from all
|
||||||
|
Options +ExecCGI
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
# Configuration reload mechanism (only 1 per physical server is
|
||||||
|
# needed): choose your URL to avoid restarting Apache when
|
||||||
|
# configuration change
|
||||||
|
<Location /reload>
|
||||||
|
Order deny,allow
|
||||||
|
Deny from all
|
||||||
|
Allow from 127.0.0.0/8
|
||||||
|
PerlHeaderParserHandler My::Package->refresh
|
||||||
|
</Location>
|
||||||
|
|
||||||
|
# Uncomment this to activate status module
|
||||||
|
#<Location /status>
|
||||||
|
# Order deny,allow
|
||||||
|
# Deny from all
|
||||||
|
# Allow from 127.0.0.0/8
|
||||||
|
# PerlHeaderParserHandler My::Package->status
|
||||||
|
#</Location>
|
||||||
|
|
||||||
|
</VirtualHost>
|
124
build/lemonldap-ng/_example/etc/lemonldap-ng/apache2.conf
Normal file
124
build/lemonldap-ng/_example/etc/lemonldap-ng/apache2.conf
Normal file
|
@ -0,0 +1,124 @@
|
||||||
|
NameVirtualHost *
|
||||||
|
|
||||||
|
# Perl environment
|
||||||
|
PerlRequire __DIR__/handler/MyHandler.pm
|
||||||
|
PerlOptions +GlobalRequest
|
||||||
|
<Files ~ "\.(pl)$">
|
||||||
|
SetHandler perl-script
|
||||||
|
PerlHandler ModPerl::Registry
|
||||||
|
PerlSendHeader On
|
||||||
|
</Files>
|
||||||
|
<IfModule mod_dir.c>
|
||||||
|
DirectoryIndex index.pl index.html
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
# Common error page and security parameters
|
||||||
|
ErrorDocument 403 http://auth.__DNSDOMAIN__/error.pl
|
||||||
|
ServerSignature Off
|
||||||
|
LogLevel warn
|
||||||
|
|
||||||
|
# Portal virtual host
|
||||||
|
<VirtualHost *>
|
||||||
|
ServerName auth.__DNSDOMAIN__
|
||||||
|
|
||||||
|
# DocumentRoot
|
||||||
|
DocumentRoot __DIR__/portal/
|
||||||
|
<Directory __DIR__/portal/>
|
||||||
|
Order allow,deny
|
||||||
|
Allow from all
|
||||||
|
Options +ExecCGI
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
|
# Manager virtual host
|
||||||
|
<VirtualHost *>
|
||||||
|
ServerName manager.__DNSDOMAIN__
|
||||||
|
|
||||||
|
# DocumentRoot
|
||||||
|
DocumentRoot __DIR__/manager/
|
||||||
|
<Directory __DIR__/manager/>
|
||||||
|
Order deny,allow
|
||||||
|
Deny from all
|
||||||
|
Allow from 127.0.0.0/8
|
||||||
|
Options +ExecCGI
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
# On-line documentation
|
||||||
|
Alias /docs/ __DIR__/docs/
|
||||||
|
<Directory __DIR__/docs/>
|
||||||
|
Order deny,allow
|
||||||
|
Allow from all
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
|
# Application Test
|
||||||
|
<VirtualHost *>
|
||||||
|
ServerName test1.__DNSDOMAIN__
|
||||||
|
|
||||||
|
# SSO protection
|
||||||
|
PerlHeaderParserHandler My::Package
|
||||||
|
|
||||||
|
# DocumentRoot
|
||||||
|
DocumentRoot __DIR__/test/
|
||||||
|
<Directory __DIR__/test/>
|
||||||
|
Order deny,allow
|
||||||
|
Allow from all
|
||||||
|
Options +ExecCGI
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
# Configuration reload mechanism (only 1 per physical server is
|
||||||
|
# needed): choose your URL to avoid restarting Apache when
|
||||||
|
# configuration change
|
||||||
|
<Location /reload>
|
||||||
|
Order deny,allow
|
||||||
|
Deny from all
|
||||||
|
Allow from 127.0.0.0/8
|
||||||
|
PerlHeaderParserHandler My::Package->refresh
|
||||||
|
</Location>
|
||||||
|
|
||||||
|
# Uncomment this to activate status module
|
||||||
|
#<Location /status>
|
||||||
|
# Order deny,allow
|
||||||
|
# Deny from all
|
||||||
|
# Allow from 127.0.0.0/8
|
||||||
|
# PerlHeaderParserHandler My::Package->status
|
||||||
|
#</Location>
|
||||||
|
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
|
<VirtualHost *>
|
||||||
|
ServerName test2.__DNSDOMAIN__
|
||||||
|
|
||||||
|
# SSO protection
|
||||||
|
PerlHeaderParserHandler My::Package
|
||||||
|
|
||||||
|
# DocumentRoot
|
||||||
|
DocumentRoot __DIR__/test/
|
||||||
|
<Directory __DIR__/test/>
|
||||||
|
Order deny,allow
|
||||||
|
Allow from all
|
||||||
|
Options +ExecCGI
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
# Configuration reload mechanism (only 1 per physical server is
|
||||||
|
# needed): choose your URL to avoid restarting Apache when
|
||||||
|
# configuration change
|
||||||
|
<Location /reload>
|
||||||
|
Order deny,allow
|
||||||
|
Deny from all
|
||||||
|
Allow from 127.0.0.0/8
|
||||||
|
PerlHeaderParserHandler My::Package->refresh
|
||||||
|
</Location>
|
||||||
|
|
||||||
|
# Uncomment this to activate status module
|
||||||
|
#<Location /status>
|
||||||
|
# Order deny,allow
|
||||||
|
# Deny from all
|
||||||
|
# Allow from 127.0.0.0/8
|
||||||
|
# PerlHeaderParserHandler My::Package->status
|
||||||
|
#</Location>
|
||||||
|
|
||||||
|
</VirtualHost>
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
127.0.0.1 auth.__DNSDOMAIN__ manager.__DNSDOMAIN__ test1.__DNSDOMAIN__ test2.__DNSDOMAIN__
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
127.0.0.2 auth.example.com
|
|
||||||
127.0.0.3 test.example.com
|
|
||||||
127.0.0.4 manager.example.com
|
|
||||||
|
|
|
@ -0,0 +1,60 @@
|
||||||
|
globalStorage
|
||||||
|
'Apache::Session::File'
|
||||||
|
|
||||||
|
cookieName
|
||||||
|
'lemonldap'
|
||||||
|
|
||||||
|
whatToTrace
|
||||||
|
'$uid'
|
||||||
|
|
||||||
|
exportedVars
|
||||||
|
'$data1 = {'uid' => 'uid','cn' => 'cn','mail' => 'mail'};'
|
||||||
|
|
||||||
|
ldapPort
|
||||||
|
__LDAPPORT__
|
||||||
|
|
||||||
|
authentication
|
||||||
|
'ldap'
|
||||||
|
|
||||||
|
locationRules
|
||||||
|
'$data1 = {'test2.__DNSDOMAIN__' => {'default' => 'accept','^/logout' => 'logout_sso http://auth.__DNSDOMAIN__'},'test1.__DNSDOMAIN__' => {'default' => 'accept','^/logout' => 'logout_sso http://auth.__DNSDOMAIN__'}};'
|
||||||
|
|
||||||
|
domain
|
||||||
|
'__DNSDOMAIN__'
|
||||||
|
|
||||||
|
timeout
|
||||||
|
7200
|
||||||
|
|
||||||
|
groups
|
||||||
|
'$data1 = {};'
|
||||||
|
|
||||||
|
portal
|
||||||
|
'http://auth.__DNSDOMAIN__/'
|
||||||
|
|
||||||
|
ldapServer
|
||||||
|
'__LDAPHOST__'
|
||||||
|
|
||||||
|
exportedHeaders
|
||||||
|
'$data1 = {'test2.__DNSDOMAIN__' => {'Auth-User' => '$uid'},'test1.__DNSDOMAIN__' => {'Auth-User' => '$uid'}};'
|
||||||
|
|
||||||
|
ldapBase
|
||||||
|
'__LDAPSUFFIX__'
|
||||||
|
|
||||||
|
macros
|
||||||
|
'$data1 = {};'
|
||||||
|
|
||||||
|
globalStorageOptions
|
||||||
|
'$data1 = {'Directory' => '__SESSIONDIR__'};'
|
||||||
|
|
||||||
|
managerPassword
|
||||||
|
''
|
||||||
|
|
||||||
|
cfgNum
|
||||||
|
1
|
||||||
|
|
||||||
|
securedCookie
|
||||||
|
0
|
||||||
|
|
||||||
|
managerDn
|
||||||
|
''
|
||||||
|
|
|
@ -14,8 +14,8 @@ my $name = $cgi->param("name") || "LemonLDAP::NG sample protected application";
|
||||||
my $color = $cgi->param("color") || "#ddd";
|
my $color = $cgi->param("color") || "#ddd";
|
||||||
|
|
||||||
# Local parameters
|
# Local parameters
|
||||||
my $manager_url = "http://manager.example.com";
|
my $manager_url = "http://manager.__DNSDOMAIN__";
|
||||||
my $portal_url = "http://auth.example.com";
|
my $portal_url = "http://auth.__DNSDOMAIN__";
|
||||||
|
|
||||||
# CSS
|
# CSS
|
||||||
my $css = <<EOT;
|
my $css = <<EOT;
|
||||||
|
@ -96,8 +96,7 @@ print "<div id=\"content\">\n";
|
||||||
|
|
||||||
print "<h1>$name</h1>\n";
|
print "<h1>$name</h1>\n";
|
||||||
|
|
||||||
print "<div id=\"menu\"><a href=\"$ENV{HTTP_REFERER}\">Go back</a> - ";
|
print "<div id=\"menu\"><a href=\"$portal_url\">Portal</a> - <a href=\"/logout\">Logout</a></div>\n";
|
||||||
print "<a href=\"$portal_url\">Portal</a> - <a href=\"/logout\">Logout</a></div>\n";
|
|
||||||
|
|
||||||
print "<h2>Main informations</h2>\n";
|
print "<h2>Main informations</h2>\n";
|
||||||
print "<ul>\n";
|
print "<ul>\n";
|
|
@ -1,42 +0,0 @@
|
||||||
<VirtualHost 127.0.0.3:*>
|
|
||||||
ServerName test.example.com
|
|
||||||
|
|
||||||
PerlRequire __DIR__/handler/MyHandler.pm
|
|
||||||
# Area protection
|
|
||||||
PerlHeaderParserHandler My::Package
|
|
||||||
|
|
||||||
# Configuration reload mechanism (only 1 per physical server is
|
|
||||||
# needed): choose your URL to avoid restarting Apache when
|
|
||||||
# configuration change
|
|
||||||
<Location /reload>
|
|
||||||
Order deny,allow
|
|
||||||
Deny from all
|
|
||||||
Allow from 127.0.0.0/8
|
|
||||||
PerlHeaderParserHandler My::Package->refresh
|
|
||||||
</Location>
|
|
||||||
|
|
||||||
# Uncomment this to activate status module
|
|
||||||
#<Location /status>
|
|
||||||
# Order deny,allow
|
|
||||||
# Deny from all
|
|
||||||
# Allow from 127.0.0.0/8
|
|
||||||
# PerlHeaderParserHandler My::Package->status
|
|
||||||
#</Location>
|
|
||||||
|
|
||||||
# Just to make example running (index.pl display authenticated user)
|
|
||||||
DocumentRoot __DIR__
|
|
||||||
<Directory __DIR__>
|
|
||||||
Order allow,deny
|
|
||||||
Allow from all
|
|
||||||
Options +ExecCGI
|
|
||||||
</Directory>
|
|
||||||
<Files *.pl>
|
|
||||||
SetHandler perl-script
|
|
||||||
PerlHandler Apache::Registry
|
|
||||||
</Files>
|
|
||||||
|
|
||||||
<IfModule mod_dir.c>
|
|
||||||
DirectoryIndex index.pl index.html
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
</VirtualHost>
|
|
|
@ -1,43 +0,0 @@
|
||||||
PerlOptions +GlobalRequest
|
|
||||||
<VirtualHost 127.0.0.3:*>
|
|
||||||
|
|
||||||
ServerName test.example.com
|
|
||||||
PerlRequire __DIR__/handler/MyHandler.pm
|
|
||||||
# Area protection
|
|
||||||
PerlHeaderParserHandler My::Package
|
|
||||||
|
|
||||||
# Configuration reload mechanism (only 1 per physical server is
|
|
||||||
# needed): choose your URL to avoid restarting Apache when
|
|
||||||
# configuration change
|
|
||||||
<Location /reload>
|
|
||||||
Order deny,allow
|
|
||||||
Deny from all
|
|
||||||
Allow from 127.0.0.0/8
|
|
||||||
PerlHeaderParserHandler My::Package->refresh
|
|
||||||
</Location>
|
|
||||||
|
|
||||||
# Uncomment this to activate status module
|
|
||||||
#<Location /status>
|
|
||||||
# Order deny,allow
|
|
||||||
# Deny from all
|
|
||||||
# Allow from 127.0.0.0/8
|
|
||||||
# PerlHeaderParserHandler My::Package->status
|
|
||||||
#</Location>
|
|
||||||
|
|
||||||
# Just to make example running (index.pl display authenticated user)
|
|
||||||
DocumentRoot __DIR__
|
|
||||||
<Directory __DIR__>
|
|
||||||
Order allow,deny
|
|
||||||
Allow from all
|
|
||||||
Options +ExecCGI
|
|
||||||
</Directory>
|
|
||||||
<Files *.pl>
|
|
||||||
SetHandler perl-script
|
|
||||||
PerlResponseHandler ModPerl::Registry
|
|
||||||
</Files>
|
|
||||||
|
|
||||||
<IfModule mod_dir.c>
|
|
||||||
DirectoryIndex index.pl index.html
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
</VirtualHost>
|
|
|
@ -1,2 +1,3 @@
|
||||||
test.example.com http://test.example.com/reload
|
test1.__DNSDOMAIN__ http://test1.__DNSDOMAIN__/reload
|
||||||
|
test2.__DNSDOMAIN__ http://test2.__DNSDOMAIN__/reload
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# Set here the session storage you use
|
# Set here the session storage you use
|
||||||
$sessionStorage = 'Apache::Session::File';
|
$sessionStorage = 'Apache::Session::File';
|
||||||
$sessionStorageOptions = {
|
$sessionStorageOptions = {
|
||||||
Directory => '/tmp',
|
Directory => '__SESSIONDIR__',
|
||||||
};
|
};
|
||||||
|
|
||||||
############
|
############
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
Changes
|
Changes
|
||||||
example/AuthLA/error403.pl
|
|
||||||
example/AuthLA/idps.xml
|
example/AuthLA/idps.xml
|
||||||
example/AuthLA/index.pl
|
example/AuthLA/index.pl
|
||||||
example/AuthLA/liberty/assertionConsumer.pl
|
example/AuthLA/liberty/assertionConsumer.pl
|
||||||
|
@ -35,13 +34,12 @@ example/AuthLA/tpl/themes/federid/page-bg.png
|
||||||
example/AuthLA/tpl/themes/federid/sso.css
|
example/AuthLA/tpl/themes/federid/sso.css
|
||||||
example/AuthLA/tpl/themes/federid/wui.css
|
example/AuthLA/tpl/themes/federid/wui.css
|
||||||
example/index.pl
|
example/index.pl
|
||||||
|
example/index_simple.pl
|
||||||
example/index_skin.pl
|
example/index_skin.pl
|
||||||
example/PortalStatus.pl
|
example/PortalStatus.pl
|
||||||
example/scripts/purgeCentralCache
|
example/scripts/purgeCentralCache
|
||||||
example/scripts/purgeCentralCache.cron.d
|
example/scripts/purgeCentralCache.cron.d
|
||||||
example/skins/default/default.css
|
|
||||||
example/skins/default/hatch.gif
|
example/skins/default/hatch.gif
|
||||||
example/skins/default/index.tpl
|
|
||||||
example/skins/default/logo_lemonldap-ng.png
|
example/skins/default/logo_lemonldap-ng.png
|
||||||
example/skins/default/msg-std.png
|
example/skins/default/msg-std.png
|
||||||
example/slavePortal.pl
|
example/slavePortal.pl
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
#!/usr/bin/perl
|
|
||||||
|
|
||||||
use HTML::Template;
|
|
||||||
use CGI;
|
|
||||||
use MIME::Base64;
|
|
||||||
|
|
||||||
my $tpl_dir = "/var/lib/lemonldap-ng/web/portal/tpl" ;
|
|
||||||
my $page = CGI->new() ;
|
|
||||||
|
|
||||||
my $url = $page->url(-base => 1);
|
|
||||||
my $logout_url = "$url?url=".encode_base64($url)."&logout=1";
|
|
||||||
|
|
||||||
my $template = HTML::Template->new( filename => "$tpl_dir/menu.tpl");
|
|
||||||
$template->param( AUTH_ERROR => "Access forbidden by WebSSO rules");
|
|
||||||
$template->param( LOGOUT_URL => "$logout_url" );
|
|
||||||
|
|
||||||
print $page->header();
|
|
||||||
print $template->output;
|
|
|
@ -39,7 +39,7 @@ BEGIN {
|
||||||
sub Apache::Session::File::get_sessions_count {
|
sub Apache::Session::File::get_sessions_count {
|
||||||
my $class = shift;
|
my $class = shift;
|
||||||
my $args = shift;
|
my $args = shift;
|
||||||
$args->{Directory} ||= '/tmp';
|
$args->{Directory} ||= '__SESSIONDIR__';
|
||||||
unless ( opendir DIR, $args->{Directory} ) {
|
unless ( opendir DIR, $args->{Directory} ) {
|
||||||
die "Cannot open directory $args->{Directory}\n";
|
die "Cannot open directory $args->{Directory}\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,53 +2,47 @@
|
||||||
<!DOCTYPE menu SYSTEM "apps-list.dtd">
|
<!DOCTYPE menu SYSTEM "apps-list.dtd">
|
||||||
|
|
||||||
<menu>
|
<menu>
|
||||||
|
<category name="Example">
|
||||||
<category name="Test">
|
<application id="test1">
|
||||||
<application id="aaa">
|
<name>Application Test 1</name>
|
||||||
<name>AAA</name>
|
<uri>http://test1.__DNSDOMAIN__</uri>
|
||||||
<uri>http://aaa.example.com</uri>
|
<description>A simple application displaying authenticated user</description>
|
||||||
|
<logo>wheels.png</logo>
|
||||||
<display>auto</display>
|
<display>auto</display>
|
||||||
</application>
|
</application>
|
||||||
<application id="bbb">
|
<application id="test2">
|
||||||
<name>BBB</name>
|
<name>Application Test 2</name>
|
||||||
<uri>http://bbb.example.com</uri>
|
<uri>http://test2.__DNSDOMAIN__</uri>
|
||||||
<display>auto</display>
|
<description>The same simple application displaying authenticated user</description>
|
||||||
</application>
|
<logo>wheels.png</logo>
|
||||||
<application id="test">
|
|
||||||
<name>LemonLDAP::NG testing page</name>
|
|
||||||
<uri>http://test.example.com</uri>
|
|
||||||
<display>auto</display>
|
<display>auto</display>
|
||||||
</application>
|
</application>
|
||||||
</category>
|
</category>
|
||||||
|
|
||||||
<category name="Technical">
|
<category name="Administration">
|
||||||
<category name="J2EE">
|
<application id="manager">
|
||||||
<application id="probe">
|
<name>WebSSO Manager</name>
|
||||||
<name>Probe</name>
|
<uri>http://manager.__DNSDOMAIN__</uri>
|
||||||
<uri>http://probe.example.com</uri>
|
<description>Configure LemonLDAP::NG WebSSO</description>
|
||||||
<description>Tomcat stats</description>
|
<logo>tools.png</logo>
|
||||||
<logo>the-probe-logo.gif</logo>
|
|
||||||
<display>auto</display>
|
|
||||||
</application>
|
|
||||||
</category>
|
|
||||||
<category name="LDAP">
|
|
||||||
<application id="pla">
|
|
||||||
<name>phpLDAPAdmin</name>
|
|
||||||
<uri>http://phpldapadmin.example.com</uri>
|
|
||||||
<description>LDAP directory data administration</description>
|
|
||||||
<logo>pla.png</logo>
|
|
||||||
<display>on</display>
|
<display>on</display>
|
||||||
</application>
|
</application>
|
||||||
</category>
|
</category>
|
||||||
<category name="SSO">
|
|
||||||
<application id="llmanager">
|
<category name="Documentation">
|
||||||
<name>LemonLDAP::NG Manager</name>
|
<application id="localdoc">
|
||||||
<uri>http://manager.example.com</uri>
|
<name>Local documentation</name>
|
||||||
<description>Configure WebSSO access rules</description>
|
<uri>http://manager.__DNSDOMAIN__/docs/</uri>
|
||||||
|
<description>Documentation supplied with LemonLDAP::NG</description>
|
||||||
|
<logo>docs.png</logo>
|
||||||
|
<display>on</display>
|
||||||
|
</application>
|
||||||
|
<application id="officialwebsite">
|
||||||
|
<name>Offical Website</name>
|
||||||
|
<uri>http://wiki.lemonldap.objectweb.org/xwiki/bin/view/NG/Presentation</uri>
|
||||||
|
<description>Official LemonLDAP::NG Website</description>
|
||||||
|
<logo>web.png</logo>
|
||||||
<display>on</display>
|
<display>on</display>
|
||||||
</application>
|
</application>
|
||||||
</category>
|
</category>
|
||||||
</category>
|
|
||||||
|
|
||||||
</menu>
|
</menu>
|
||||||
|
|
||||||
|
|
BIN
modules/lemonldap-ng-portal/example/apps/docs.png
Normal file
BIN
modules/lemonldap-ng-portal/example/apps/docs.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.5 KiB |
Binary file not shown.
Before Width: | Height: | Size: 23 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.8 KiB |
BIN
modules/lemonldap-ng-portal/example/apps/tools.png
Normal file
BIN
modules/lemonldap-ng-portal/example/apps/tools.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.2 KiB |
BIN
modules/lemonldap-ng-portal/example/apps/web.png
Normal file
BIN
modules/lemonldap-ng-portal/example/apps/web.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
modules/lemonldap-ng-portal/example/apps/wheels.png
Normal file
BIN
modules/lemonldap-ng-portal/example/apps/wheels.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
|
@ -3,13 +3,13 @@ use Lemonldap::NG::Portal::Error;
|
||||||
use HTML::Template;
|
use HTML::Template;
|
||||||
|
|
||||||
my $skin = "pastel";
|
my $skin = "pastel";
|
||||||
my $skin_dir = "__SKINDIR__";
|
my $skin_dir = "__DIR__/portal/skins/";
|
||||||
|
|
||||||
my $portal = Lemonldap::NG::Portal::Error->new(
|
my $portal = Lemonldap::NG::Portal::Error->new(
|
||||||
{
|
{
|
||||||
configStorage => {
|
configStorage => {
|
||||||
type => 'File',
|
type => 'File',
|
||||||
dirName => '/opt/lemonldap-ng/conf/',
|
dirName => '__CONFDIR__',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
#!/usr/bin/perl
|
|
||||||
|
|
||||||
use Lemonldap::NG::Portal::SharedConf;
|
|
||||||
|
|
||||||
my $portal = Lemonldap::NG::Portal::SharedConf->new(
|
|
||||||
{
|
|
||||||
configStorage => {
|
|
||||||
type => 'File',
|
|
||||||
dirName => '__CONFDIR__',
|
|
||||||
},
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
if ( $portal->process() ) {
|
|
||||||
print $portal->header('text/html; charset=utf8');
|
|
||||||
print $portal->start_html;
|
|
||||||
print "<h1>Your well authenticated !</h1>";
|
|
||||||
print "Click <a href=\"$ENV{SCRIPT_NAME}?logout=1\">here</a> to logout";
|
|
||||||
print $portal->end_html;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
print $portal->header('text/html; charset=utf8');
|
|
||||||
print $portal->start_html;
|
|
||||||
print 'Error: ' . $portal->error . '<br />';
|
|
||||||
print '<form method="post" action="'.$ENV{SCRIPTNAME}.'">';
|
|
||||||
print '<input type="hidden" name="url" value="'
|
|
||||||
. $portal->param('url') . '" />';
|
|
||||||
print 'Login : <input name="user" /><br />';
|
|
||||||
print 'Password : <input name="password" type="password" autocomplete="off"><br>';
|
|
||||||
print '<input type="submit" value="OK" />';
|
|
||||||
print '</form>';
|
|
||||||
print $portal->end_html;
|
|
||||||
}
|
|
||||||
|
|
1
modules/lemonldap-ng-portal/example/index.pl
Symbolic link
1
modules/lemonldap-ng-portal/example/index.pl
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
index_skin.pl
|
34
modules/lemonldap-ng-portal/example/index_simple.pl
Normal file
34
modules/lemonldap-ng-portal/example/index_simple.pl
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
use Lemonldap::NG::Portal::SharedConf;
|
||||||
|
|
||||||
|
my $portal = Lemonldap::NG::Portal::SharedConf->new(
|
||||||
|
{
|
||||||
|
configStorage => {
|
||||||
|
type => 'File',
|
||||||
|
dirName => '__CONFDIR__',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
if ( $portal->process() ) {
|
||||||
|
print $portal->header('text/html; charset=utf8');
|
||||||
|
print $portal->start_html;
|
||||||
|
print "<h1>Your well authenticated !</h1>";
|
||||||
|
print "Click <a href=\"$ENV{SCRIPT_NAME}?logout=1\">here</a> to logout";
|
||||||
|
print $portal->end_html;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
print $portal->header('text/html; charset=utf8');
|
||||||
|
print $portal->start_html;
|
||||||
|
print 'Error: ' . $portal->error . '<br />';
|
||||||
|
print '<form method="post" action="'.$ENV{SCRIPTNAME}.'">';
|
||||||
|
print '<input type="hidden" name="url" value="'
|
||||||
|
. $portal->param('url') . '" />';
|
||||||
|
print 'Login : <input name="user" /><br />';
|
||||||
|
print 'Password : <input name="password" type="password" autocomplete="off"><br>';
|
||||||
|
print '<input type="submit" value="OK" />';
|
||||||
|
print '</form>';
|
||||||
|
print $portal->end_html;
|
||||||
|
}
|
||||||
|
|
|
@ -5,8 +5,8 @@ use HTML::Template;
|
||||||
|
|
||||||
# Path configuration
|
# Path configuration
|
||||||
my $skin = "pastel";
|
my $skin = "pastel";
|
||||||
my $skin_dir = "__SKINDIR__";
|
my $skin_dir = "__DIR__/portal/skins";
|
||||||
my $appsxmlfile = "__PORTALDIR__apps/apps-list.xml";
|
my $appsxmlfile = "__DIR__/portal/apps/apps-list.xml";
|
||||||
my $appsimgpath = "apps/";
|
my $appsimgpath = "apps/";
|
||||||
|
|
||||||
my $portal = Lemonldap::NG::Portal::SharedConf->new(
|
my $portal = Lemonldap::NG::Portal::SharedConf->new(
|
||||||
|
|
|
@ -210,21 +210,26 @@ display:none;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin:0;
|
margin:0;
|
||||||
padding:0 0 3px 0;
|
padding:0 0 3px 0;
|
||||||
border-bottom:2px solid #c2e1ef;
|
border-bottom:1px solid #c2e1ef;
|
||||||
}
|
}
|
||||||
.ui-tabs-nav li{
|
.ui-tabs-nav li{
|
||||||
display: inline;
|
display: inline;
|
||||||
background-color:#dff4ff;
|
background-color:#dff4ff;
|
||||||
border-color:#c2e1ef;
|
border-color:#c2e1ef;
|
||||||
border-style:solid;
|
border-style:solid;
|
||||||
border-width:1px 1px 2px 1px;
|
border-width:1px;
|
||||||
margin-left:10px;
|
margin-left:10px;
|
||||||
padding:4px 10px;
|
padding:4px 10px 3px 10px;
|
||||||
}
|
}
|
||||||
.ui-tabs-nav li a{
|
.ui-tabs-nav li a{
|
||||||
color:#336699;
|
color:#336699;
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
}
|
}
|
||||||
|
li.ui-tabs-selected{
|
||||||
|
padding:4px 10px;
|
||||||
|
border-bottom-width:0;
|
||||||
|
background-color:#c2e1ef;
|
||||||
|
}
|
||||||
#appslist{
|
#appslist{
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ my $portal = Lemonldap::NG::Portal::CDA->new(
|
||||||
# configStorage ADAPT IT as usual
|
# configStorage ADAPT IT as usual
|
||||||
configStorage => {
|
configStorage => {
|
||||||
type => 'File',
|
type => 'File',
|
||||||
dirName => '/usr/share/doc/lemonldap-ng/examples/conf/',
|
dirName => '__CONFDIR__',
|
||||||
},
|
},
|
||||||
|
|
||||||
# SUBROUTINES OVERLOAD
|
# SUBROUTINES OVERLOAD
|
||||||
|
|
Loading…
Reference in New Issue
Block a user