Sophie

Sophie

distrib > Mandriva > cooker > x86_64 > by-pkgid > a100f0997407ff82957e996a98fb9db2 > files > 220

lemonldap-ng-1.0-0.3.rc1mdv2011.0.noarch.rpm

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr">
<head>
  <meta name="generator" content=
  "HTML Tidy for Linux/x86 (vers 7 December 2008), see www.w3.org" />

  <title>Lemonldap::NG documentation: 5-Appli-Tomcat-Valve.html</title>
  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
  <style type="text/css">
/*<![CDATA[*/
    body{
      background: #ddd;
      font-family: sans-serif;
      font-size: 11pt;
      padding: 0 50px;
    }
    div.main-content{
      padding: 10px;
      background: #fff;
      border: 2px #ccc solid;
    }
    a{
      text-decoration: none;
    }
    p.footer{
      text-align: center;
      margin: 5px 0 0 0;
    }
    .heading-1{
      text-align: center;
      color: orange;
      font-variant: small-caps;
      font-size: 20pt;
    }
    .heading-1-1{
      color: orange;
      font-size: 14pt;
      border-bottom: 2px #ccc solid;
    }
    pre{
      background: #eee;
      border: 2px #ccc solid;
      padding: 5px;
      border-left: 10px #ccc solid;
    }
    ul.star li{
      list-style-type: square;
    }
  /*]]>*/
  </style>
</head>

<body>
  <div class="main-content">
    <h2 class="heading-1"><span id="HTomcatvalve">Tomcat valve</span></h2>

    <p class="paragraph"></p>

    <ul>
      <li><a href="#HCompilation">Compilation</a></li>

      <li><a href="#HInstallation">Installation</a></li>

      <li><a href="#HQuicktestanddebuggingtips">Quick test and debugging
      tips</a></li>
    </ul>The Tomcat valve was provided by Pascal Pejac.

    <p class="paragraph"></p>This valve is only available for tomcat 5.5 or
    greater.

    <h3 class="heading-1-1"><span id="HCompilation">Compilation</span></h3>

    <p class="paragraph"></p>Note: source and compiled valve can be found in
    the download area.

    <p class="paragraph"></p>Required :

    <ul class="star">
      <li>ant</li>

      <li>jre &gt; 1.4</li>

      <li>tomcat &gt;= 5.5</li>
    </ul>Configure your tomcat home in build.properties files.<br />
    <br />
    Note: be careful for Windows user, path must contains "/".<br />
    <br />
    Example:

    <div class="code">
      <pre>
c:/my hardisk/tomcat/
</pre>
    </div><br />
    <br />
    Next run ant command:

    <div class="code">
      <pre>
ant
</pre>
    </div><br />
    <br />
    ValveLemonLDAPNG.jar is created under /dist directory.

    <h3 class="heading-1-1"><span id=
    "HInstallation">Installation</span></h3><br />
    <br />
    Copy ValveLemonLDAPNG.jar on &lt;TOMCAT_HOME&gt;/server/lib<br />
    <br />
    Add on your server.xml file a new valve entry like this (in host
    section):<br />
    <br />

    <div class="code">
      <pre>
&lt;Valve className=<span class=
"java-quote">"org.lemonLDAPNG.SSOValve"</span> userKey=<span class=
"java-quote">"AUTH-USER"</span> roleKey=<span class=
"java-quote">"AUTH-ROLE"</span> roleSeparator=<span class=
"java-quote">","</span> allows=<span class=
"java-quote">"127.0.0.1"</span>/&gt;
</pre>
    </div><br />
    <br />
    Configure attributes:

    <ul class="star">
      <li>userKey: key in the http header send by LemonLDAP in order to store
      user login.</li>

      <li>roleKey: key in the http header send by LemonLDAP in order to store
      roles. If LemonLDAP send some roles split by some commas, use
      roleSeparator.</li>

      <li>roleSeparator (optional): see above.</li>

      <li>allows (optional): filter remote IP. IP defined in this attribute
      are allowed (use "," separator for multiple IP). Just set the
      LemonLDAP::NG handler IP on this attribute in order to add more
      security. If this attribute is missed all hosts are allowed.</li>

      <li>passThrough (optional): Allow anonymous access or not. When it takes
      "false", HTTP headers have to be send by LemonLDAP to make
      authentication. So, if the user is not recognized or HTTP headers not
      present, a 403 error is send.</li>
    </ul>

    <h3 class="heading-1-1"><span id="HQuicktestanddebuggingtips">Quick test
    and debugging tips</span></h3><br />
    <br />
    Download for example probe application (great administration tool for
    tomcat): <span class="wikiexternallink"><a href=
    "http://www.lambdaprobe.org">http://www.lambdaprobe.org</a></span>.<br />
    <br />
    Install valve and configure it.<br />
    <br />
    Send via LemonLDAP::NG user with role = probeuser or other user with role
    = manager.<br />
    <br />
    Probe doesn't ask authentication, you're logged...<br />
    <br />
    For debugging, this valve can print some helpful information in debug
    level. Configure logging in tomcat (see <span class=
    "wikiexternallink"><a href=
    "http://tomcat.apache.org/tomcat-5.5-doc/logging.html">http://tomcat.apache.org/tomcat-5.5-doc/logging.html</a></span>)
    .
  </div>

  <p class="footer"><a href="index.html">Index</a></p>
</body>
</html>