LemonLDAP::NG sample protected application

Main informations

Be carefull, the $ENV{REMOTE_USER} is set only if your script is in the same server than LemonLDAP::NG Handler ($whatToTrace parameter). If you use it on a reverse-proxy, $ENV{REMOTE_USER} is not set.

HTTP headers

To know who is connected in your applications, you can read HTTP headers:

HeaderPerl CGIPHP scriptValue
Cookie $ENV{HTTP_COOKIE} $_SERVER{HTTP_COOKIE}
Host $ENV{HTTP_HOST} $_SERVER{HTTP_HOST}
  • webshop.mtel.me
Via $ENV{HTTP_VIA} $_SERVER{HTTP_VIA}
  • 1.1 squid-proxy-5b5d847c96-sh5pg (squid/6.10)
X-Forwarded-For $ENV{HTTP_X_FORWARDED_FOR} $_SERVER{HTTP_X_FORWARDED_FOR}
  • 10.1.92.40

Note that LemonLDAP::NG cookie is hidden. So that application developpers can not spoof sessions.

You can access to any information (IP address or LDAP attribute) by customizing exported headers with the LemonLDAP::NG Management interface

Script parameters

Find here all GET or POST parameters sent to this page:

POST parameters can be forged by LemonLDAP::NG to autosubmit forms

ParameterValue

Environment for Perl CGI

Environment variableValue
DOCUMENT_ROOT /var/lib/lemonldap-ng/test/
GATEWAY_INTERFACE CGI/1.1
HTTP_ACCEPT */*
HTTP_ACCEPT_ENCODING gzip, br, zstd, deflate
HTTP_CACHE_CONTROL max-age=259200
HTTP_CONNECTION keep-alive
HTTP_COOKIE
HTTP_HOST webshop.mtel.me
HTTP_USER_AGENT Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HTTP_VIA 1.1 squid-proxy-5b5d847c96-sh5pg (squid/6.10)
HTTP_X_FORWARDED_FOR 10.1.92.40
MOD_PERL mod_perl/2.0.4
MOD_PERL_API_VERSION 2
PATH /sbin:/usr/sbin:/bin:/usr/bin
QUERY_STRING
REMOTE_ADDR 216.73.216.167
REMOTE_PORT 30690
REQUEST_METHOD GET
REQUEST_URI /
SCRIPT_FILENAME /var/lib/lemonldap-ng/test/index.pl
SCRIPT_NAME /index.pl
SERVER_ADDR 212.200.246.103
SERVER_ADMIN root@localhost
SERVER_NAME webshop.mtel.me
SERVER_PORT 80
SERVER_PROTOCOL HTTP/1.1
SERVER_SIGNATURE <address>Apache/2.2.15 (CentOS) Server at webshop.mtel.me Port 80</address>
SERVER_SOFTWARE Apache/2.2.15 (CentOS)
☖ Home ☒ Logout