Lemonldap::NG manage applications by their hostname (Apache's virtualHosts). Rules are used to protect applications, headers are HTTP headers added to the request to give datas to the application (for logs, profiles,…).
<p><divclass="noteimportant">Note that variables designed by $xx correspond to the name of the <ahref="../../documentation/1.9/exportedvars.html"class="wikilink1"title="documentation:1.9:exportedvars">exported variables</a> or <ahref="../../documentation/1.9/performances.html#macros_and_groups"class="wikilink1"title="documentation:1.9:performances">macro names</a>.
A rule associates a <ahref="http://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions"class="urlextern"title="http://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions"rel="nofollow">regular expression</a> to a Perl boolean expression or a keyword.
<tdclass="col0 leftalign"> Makes authentication optional, but authenticated users are seen as such (that is, user data are sent to the app through HTTP headers) </td><tdclass="col1 centeralign"> ^/forum/ </td><tdclass="col2 centeralign"> unprotect </td>
<tdclass="col0 leftalign"> Restrict access to the whole site to users that have the LDAP description field set to “LDAP administrator” (must be set in exported variables) </td><tdclass="col1 centeralign"> default </td><tdclass="col2 centeralign"> $description eq "LDAP administrator" </td>
<liclass="level1"><divclass="li"> Comments can be used to order your rules: rules are applied in the alphabetical order of comment (or regexp in there is no comment). See <strong><ahref="../../documentation/1.9/security.html#write_good_rules"class="wikilink1"title="documentation:1.9:security">security chapter</a></strong> to learn more about writing good rules.</div>
<liclass="level1"><divclass="li"> See <ahref="../../documentation/1.9/performances.html#handler_performance"class="wikilink1"title="documentation:1.9:performances">performances</a> to know how to use macros and groups in rules.</div>
<tdclass="col0 leftalign"> Logout user from Lemonldap::NG and redirect it to http://intranet/ </td><tdclass="col1 centeralign"> ^/index.php\?logout </td><tdclass="col2 centeralign"> logout_sso http://intranet/ </td>
</tr>
<trclass="row2 roweven">
<tdclass="col0 leftalign"> Logout user from current application and redirect it to the menu </td><tdclass="col1 centeralign"> ^/index.php\?logout </td><tdclass="col2 centeralign"> logout_app https://auth.example.com/ </td>
</tr>
<trclass="row3 rowodd">
<tdclass="col0 leftalign"> Logout user from current application and from Lemonldap::NG and redirect it to http://intranet/ </td><tdclass="col1 centeralign"> ^/index.php\?logout </td><tdclass="col2 centeralign"> logout_app_sso http://intranet/ </td>
<p><divclass="notetip">By default, user will be redirected on portal if no <abbrtitle="Uniform Resource Locator">URL</abbr> defined, or on the specified <abbrtitle="Uniform Resource Locator">URL</abbr> if any.
<p><divclass="noteimportant">Only current application is concerned by logout_app* targets. Be careful with some applications which doesn't verify Lemonldap::NG headers after having created their own cookies. If so, you can redirect users to a <abbrtitle="HyperText Markup Language">HTML</abbr> page that explain that it is safe to close browser after disconnect.
<tdclass="col0 leftalign"> Give a non ascii data </td><tdclass="col1 centeralign"> Display-Name </td><tdclass="col2 centeralign"> encode_base64($givenName." ".$surName) </td>
As described in <ahref="../../documentation/1.9/performances.html#handler_performance"class="wikilink1"title="documentation:1.9:performances">performances chapter</a>, you can use macros, local macros,…
<liclass="level1"><divclass="li"> Since many HTTP servers refuse non ascii headers, it is recommended to use encode_base64() function to transmit those headers</div>
<p><divclass="notetip">By default, <abbrtitle="Single Sign On">SSO</abbr> cookie is hidden, so protected applications cannot get <abbrtitle="Single Sign On">SSO</abbr> session key. But you can forward this key if it is really needed: