TitleUsername not shown in LDAP Container-managed configuration
Date14-Sep-2006 03:01:36 EEST
Version2.4.53
Submitter200.117.237.210
Bug criticalityLightBug
Browser versionFirefox 1.5.0.6
Bug statusNewBug
PageProvider usedSubversion for 2.4.4
Servlet ContainerApache Tomcat/5.5.9
Operating SystemWindows XP
URLany
Java version1.5.0_08-b03

Having Tomcat setup to use the following realm:

server.xml:
[...]
      <Host name="mywiki" appBase="mywiki" unpackWARs="true"
            autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
          <Realm className="org.apache.catalina.realm.JNDIRealm"
              connectionURL="ldap://ldap1:389"
              alternateURL="ldap://ldap2:389"
              roleBase="ou=group,dc=test,dc=com"
              roleName="cn"
              roleSearch="(uniqueMember={0})"
              userPattern="uid={0},ou=people,dc=test,dc=com"/>
      </Host>
[...]

Having web.xml with the following:

   <security-constraint>
       <web-resource-collection>
           <web-resource-name>Protected Area</web-resource-name>
           <url-pattern>/*</url-pattern>
           <http-method>DELETE</http-method>
           <http-method>GET</http-method>
           <http-method>POST</http-method>
           <http-method>HEAD</http-method>
           <http-method>PUT</http-method>
       </web-resource-collection>

       <auth-constraint>
           <role-name>wikiReadWrite</role-name>
       </auth-constraint>
   </security-constraint>

   <login-config>
      <auth-method>BASIC</auth-method>
      <realm-name>JSPWiki Editor</realm-name>
   </login-config>


   <security-role>
       <description>
           This logical role includes all authenticated users
       </description>
       <role-name>Authenticated</role-name>
   </security-role>

   <security-role>
       <description>
           This logical role includes all authenticated users
       </description>
       <role-name>wikiReadWrite</role-name>
   </security-role>

   <security-role>
       <description>
           This logical role includes all authenticated users
       </description>
       <role-name>Admin</role-name>
   </security-role>

And having some users in the group wikiReadWrite group in LDAP, when trying to access the site, tomcat requests authentication normally. The wiki shows up the initial page and if I click on the Wiki Logo, the "username" and "login status" field show "Guest" and "Anonymous" respectively.

Creating or modifying files set the author to Unknown.

I've also added the wikiReadWrite role to jspwiki.jaas without success.

This was also noted on version 2.4.15beta2

Below I'm pasting the debug output:

 2006-09-13 19:58:31,536 [http-192.168.133.80-80-Processor20] DEBUG com.ecyrd.jspwiki.auth.SessionMonitor JSPWiki:http://mywiki/JSPWiki/Wiki.jsp - Looking up WikiSession for session ID=C170F19FF7849EC3FB0F026F5BD36249... not found. Creating guestSession()
2006-09-13 19:58:31,537 [http-192.168.133.80-80-Processor20] DEBUG com.ecyrd.jspwiki.WikiContext JSPWiki:http://mywiki/JSPWiki/Wiki.jsp - Creating WikiContext for session ID=C170F19FF7849EC3FB0F026F5BD36249; target=Main
2006-09-13 19:58:31,537 [http-192.168.133.80-80-Processor20] DEBUG com.ecyrd.jspwiki.WikiContext JSPWiki:http://mywiki/JSPWiki/Wiki.jsp - Do we need to log the user in? true
2006-09-13 19:58:31,537 [http-192.168.133.80-80-Processor20] DEBUG com.ecyrd.jspwiki.auth.SessionMonitor JSPWiki:http://mywiki/JSPWiki/Wiki.jsp - Looking up WikiSession for session ID=C170F19FF7849EC3FB0F026F5BD36249... found it
2006-09-13 19:58:31,539 [http-192.168.133.80-80-Processor20] DEBUG com.ecyrd.jspwiki.ui.TemplateManager JSPWiki:http://mywiki/JSPWiki/Wiki.jsp - Listings skins from /templates/default/skins

[Many subversion lines, nothing interesting...]

2006-09-13 19:58:31,543 [http-192.168.133.80-80-Processor20] DEBUG com.ecyrd.jspwiki.tags.WikiTagBase JSPWiki:http://mywiki/JSPWiki/Wiki.jsp - Inserting page WikiPage [JSPWiki:Main,ver=2928,mod=Tue May 09 18:42:04 ART 2006]
2006-09-13 19:58:31,544 [http-192.168.133.80-80-Processor20] DEBUG com.ecyrd.jspwiki.WikiSession JSPWiki:http://mywiki/JSPWiki/Wiki.jsp - Looking up WikiSession for NULL HttpRequest: returning guestSession()
2006-09-13 19:58:31,544 [http-192.168.133.80-80-Processor20] DEBUG com.ecyrd.jspwiki.WikiContext JSPWiki:http://mywiki/JSPWiki/Wiki.jsp - Creating WikiContext for session ID=(null); target=Main
2006-09-13 19:58:31,544 [http-192.168.133.80-80-Processor20] DEBUG com.ecyrd.jspwiki.WikiContext JSPWiki:http://mywiki/JSPWiki/Wiki.jsp - Do we need to log the user in? false

[Many CachingAttachmentProvider lines....]

[...]

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-1) was last changed on 14-Sep-2006 03:01 by 200.117.237.210