You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by le...@cocoon.apache.org on 2004/09/14 14:50:46 UTC

[Cocoon Lenya Wiki] Updated: LDAPAuth

   Date: 2004-09-14T05:50:46
   Editor: WolfgangKaltz <jw...@yahoo.com>
   Wiki: Cocoon Lenya Wiki
   Page: LDAPAuth
   URL: http://wiki.apache.org/cocoon-lenya/LDAPAuth

   no comment

Change Log:

------------------------------------------------------------------------------
@@ -1,14 +1,12 @@
 = How To Activate LDAP Authentication within a Lenya Publication =
 
 == Introduction ==
-LDAP Authentication is already integrated within Lenya. However, there is no GUI within the common area or the default publication to use it in the current version (1.2). So, activating LDAP authentication within your publication means :
+LDAP Authentication is already integrated within Lenya. However, prior to version 1.2.1, there is no GUI for LDAP users within the common area or the default publication. So, activating LDAP authentication within your publication means :
 
- * 1. Creating the ldap.properties file with your LDAP settings;
- * 1. Editing the Administration GUI, in order to add LDAP relevant buttons
-
-This How-To is intended for Lenya 1.2, and was furthermore tested on the Lenya state in CVS on July 9th, 2004
-
-Later versions may already have more LDAP stuff already off-the-shelf.
+ 1. Creating LDAP configuration file(s) with your LDAP settings; see below
+ 1. Activating LDAP usage for the Administration GUI, as follows:
+    * If using Lenya version 1.2.1 or later, edit the access-controller configuration file (see below)
+    * If using Lenya version 1.2, editing the Administration GUI, in order to add LDAP relevant buttons
 
 == LDAP Configuration file(s) ==
 The LDAP configuration file(s) are to be placed in this directory: {{{lenya/pubs/<your-publication-name>/config/ac/passwd}}}
@@ -52,7 +50,7 @@
 If you modify {{{ldap.properties}}}, it may be necessary to restart your servlet container in order for the changes to take effect.
 
 == An example publication using LDAP Authentication: the University of Zurich Lenya Publication ==
-The "University of Zurich Publication" is an example of a publication which uses LDAP authentication. I recommend installing it and configuring to authenticate against your LDAP server: this way, you can check whether LDAP authentication is working, before proceeding to activate it in another application.
+The "University of Zurich Publication" is an example of a publication which uses LDAP authentication. You may wish to install and configure it to authenticate against your LDAP server: this way, you can check whether LDAP authentication is working, before proceeding to activate it in another application.
 
 Note: this HOW-TO was tested using the "University of Zurich Publication" state on May 26th, 2004. If another version is incompatible with your Lenya installation, don't despair, you will probably still be able to use the LDAP relevant stuff.
  1. Retrieve the University of Zurich Lenya publications (unitemplate, unizh) described on http://wyona.org/
@@ -64,19 +62,47 @@
  1. Add the desired groups for this user and log out of Lenya.
  1. You should now be able to login to Lenya using this new user and his/her LDAP password.
 
+
 == Activating LDAP Authentication in your publication ==
+
+=== Lenya version 1.2.1 or higher ===
+Edit the access-controller configuration file, {{{lenya/pubs/<your-publication-name>/config/ac.xconf}}}
+
+If you are using the default publication, you simply need to uncomment the line regarding "LDAP support". If you do not have this line, here is the complete section:
+{{{
+  <accreditable-manager type="file">
+    <parameter name="directory" value="context:///lenya/pubs/default/config/ac/passwd"/>
+
+    <user-manager>
+       <user-type class="org.apache.lenya.ac.file.FileUser" create-use-case="userAddUser">Local User</user-type>
+       <user-type class="org.apache.lenya.ac.ldap.LDAPUser" create-use-case="userAddUserLdap">LDAP User</user-type>
+    </user-manager>
+  </accreditable-manager>
+}}}
+
+You may need to restart your servlet container in order for the changes to take effect.
+
+=== Lenya version 1.2  ===
 We will use the "default publication" as an example. 
 
 First, as described above, ensure you have placed the correct LDAP configuration file(s) into the {{{lenya/pubs/default/config/ac/passwd}}} directory of your Lenya installation.
 
 Now, add LDAP relevant stuff to your Administration GUI. The simplest way to achieve this is to copy the relevant Administration GUI components from the "University of Zurich Lenya Publication".
- 1.  Go to the {{{lenya/pubs/default/lenya/xslt}}} subdirectory of your Lenya installation (careful, don't confuse this with the lenya/pubs/default/xslt subdirectory)
- 1. Create a subdirectory called "admin", then within the "admin" subdirectory, a new subdirectory "users"
+ 1. Go to the {{{lenya/pubs/default/lenya/xslt}}} subdirectory of your Lenya installation (careful, don't confuse this with the lenya/pubs/default/xslt subdirectory)
+ 1. Create a subdirectory called {{{admin}}}, then within the {{{admin}}} subdirectory, a new subdirectory {{{users}}}
  1. Copy, into this new subdirectory, the 2 .xsl files called {{{profile.xsl}}} and {{{users.xsl}}} from the corresponding directory of the "University of Zurich Lenya Publication" (in {{{lenya/pubs/unitemplate/lenya/xslt/admin/users}}})
  1. Login to the "default publication" as administrator (lenya/levi) and go the Admin area to add a user. You should now see a "Add University User" button - this actually refers to the LDAP users.
  1. In the field "UniAccessID", use the LDAP userid. In the field "CMS User", use the id with which you want to user to log in to Lenya. This may be the same id as for LDAP.
  1. Add the desired groups for this user and log out of Lenya.
  1. You should now be able to login to Lenya using this new user and his/her LDAP password.
+ 1. (this was tested on Lenya 1.2 state in CVS on July 9th, 2004)
+
+== Allowing LDAP users to login ==
+Once you have everything configured OK, you can tell Lenya to allow certain LDAP users. It is important to understand that, just because a user exists in LDAP, does not mean she has access to Lenya. The user needs to be explicitly added in Lenya, along with the group memberships. However, the authentication itself (password handling) is then completely handled through LDAP.
+ 1. In the administration GUI, add the "LDAP user" in order to make this user known to Lenya. You can use the same id for Lenya as the existing LDAP id.
+ 1. Click on the user and add group settings - if user belongs to no groups at all, she will not be able to login
+ 1. Logout and login with the newly created id.
+
 
 == More technical information ==
  * Lenya uses the Cocoon class LDAPTransformer : for documentation see, in your Lenya installation, the file {{{api/java/org/apache/cocoon/transformation/LDAPTransformer.html}}}; or within the Cocoon documentation on http://cocoon.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org