cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Joseph <pjos...@gmail.com>
Subject SPNEGO working in JSP, but how to bring it into Cocoon app?
Date Wed, 08 Jun 2011 19:47:38 GMT
Hi there,

By following this (http://spnego.sourceforge.net/spnego_tomcat.html) I 
was able to make a JSP page in my ROOT folder correctly display that my 
Single Sign On against Active Directory (Microsoft) was working.

Now my question is:  great, but how do I get my cocoon application, 
served by the same Tomcat instance, to use this capability?

Can I use the servlet somehow or do I have to use my flowscript to 
instantiate the classes involved?

The servelet requires the spnego.jar file in the library--so far so good.

But then in web.xml in the Tomcat conf, it has a number of settings for 
a "filter".

And then the JSP page itself has this single call that appears to be 
doing the magic: request.getRemoteUser();

Any pointers appreciated--I list the settings for the filter in the conf 
file web.xml below.

Bottom line question: how do I get the jsp call request.getRemoteUser() 
described above, reproduced in my cocoon application, which uses 
Flowscript and Java.

Paul

-------------

|<filter>
     <filter-name>SpnegoHttpFilter</filter-name>
     <filter-class>net.sourceforge.spnego.SpnegoHttpFilter</filter-class>

     <init-param>
         <param-name>spnego.allow.basic</param-name>
         <param-value>true</param-value>
     </init-param>

     <init-param>
         <param-name>spnego.allow.localhost</param-name>
         <param-value>true</param-value>
     </init-param>

     <init-param>
         <param-name>spnego.allow.unsecure.basic</param-name>
         <param-value>true</param-value>
     </init-param>

     <init-param>
         <param-name>spnego.login.client.module</param-name>
         <param-value>spnego-client</param-value>
     </init-param>

     <init-param>
         <param-name>spnego.krb5.conf</param-name>
         <param-value>krb5.conf</param-value>
     </init-param>

     <init-param>
         <param-name>spnego.login.conf</param-name>
         <param-value>login.conf</param-value>
     </init-param>

     <init-param>
         <param-name>spnego.preauth.username</param-name>
         <param-value>Zeus</param-value>
     </init-param>

     <init-param>
         <param-name>spnego.preauth.password</param-name>
         <param-value>Z3usP@55</param-value>
     </init-param>

     <init-param>
         <param-name>spnego.login.server.module</param-name>
         <param-value>spnego-server</param-value>
     </init-param>

     <init-param>
         <param-name>spnego.prompt.ntlm</param-name>
         <param-value>true</param-value>
     </init-param>

     <init-param>
         <param-name>spnego.logger.level</param-name>
         <param-value>1</param-value>
     </init-param>
</filter>

<filter-mapping>
     <filter-name>SpnegoHttpFilter</filter-name>
     <url-pattern>*.jsp</url-pattern>
</filter-mapping>|



Mime
View raw message