Apparently, changes to the HttpServlet wrapper are not required. The problem
was with the options selected in the administrative pages for PrinterOn. They
have an option that appears to toggle between using the email address or the
login credential as the user identifier in the submitted jobs. You need both
checked in order for the job information to be included in the spool file
correctly.

So, it is now CASified. In order to do it, configure the software to use "Web
Server Authentication" with both the associated checkboxes selected. Then
include the following files in the \WEB-INF\lib folder:
cas-client-core-x.x.xx.jar
commons-logging-x.x.jar
xmlsec-x.x.x.jar

Add the following the web.xml file (right below the description attribute):
<!-- CAS Config -->
<filter>
        <filter-name>CAS Authentication Filter</filter-name>
        
<filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class>
        <init-param>
                <param-name>casServerLoginUrl</param-name>
                <param-value>https://CASSERVERURL/cas</param-value>
        </init-param>
        <init-param>
                <param-name>service</param-name>
                <param-value>https://PRINTERONURL/cps/</param-value>
        </init-param>
        <init-param>
                <param-name>serverName</param-name>
                <param-value>https://PRINTERONURL</param-value>
        </init-param>
</filter>
<filter>
<filter-name>CAS Validation Filter</filter-name>
<filter-class>org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter</filter-class>
        <init-param>
                <param-name>casServerUrlPrefix</param-name>
                <param-value>https://CASSERVERURL/cas</param-value>
        </init-param>
        <init-param>
                <param-name>serverName</param-name>
                <param-value>https://PRINTERONURL</param-value>
        </init-param>
</filter>
<filter>
        <filter-name>CAS HttpServletRequest Wrapper Filter</filter-name>
        
<filter-class>org.jasig.cas.client.util.HttpServletRequestWrapperFilter</filter-class>
</filter>
<filter-mapping>
        <filter-name>CAS Authentication Filter</filter-name>
        <url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
        <filter-name>CAS Validation Filter</filter-name>
        <url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
        <filter-name>CAS HttpServletRequest Wrapper Filter</filter-name>
        <url-pattern>/*</url-pattern>
</filter-mapping>
<!-- End CAS Config -->

That should do it!

[email protected] on Thursday, February 18, 2010 at 9:43 PM -0400 wrote:
>The filter, as it exists today, does not populate that header.  It could 
>easily be extended to do that as an option.
>
>Adam
>
>Derek Ethier wrote:
>> Thanks for all the help. We're getting close, but we're not quite 
>> there. I've added the java client files to the lib folder and 
>> configured the web.xml file. request.getRemoteUser is returning the 
>> correct username but the print jobs do not contain the correct user 
>> when the jobs are submitted.
>>
>> I'm talking to the vendor to see how they use the REMOTE_USER header.
>>
>> Again, thanks for the assistance. If we get it working, I will post a 
>> follow-up with the documentation on how to do it.
>>
>> *[email protected] <mailto:[email protected]> on 
>> Thursday, February 18, 2010 at 10:06 AM -0400 wrote:*
>> _*> The Jasig CAS client for Java can populate that if you add the 
>> filters.*_
>>
>> Specifically, the HttpServletRequestWrapperFilter filter delegates
>> request.getRemoteUser() to the underlying CAS assertion containing the
>> user name.  As Adam noted, it matters how PrinterOn is attempting to
>> get at REMOTE_USER; if it's via request.getRemoteUser(), it should
>> work fine.
>>
>> M
>>
>> -- 
>> You are currently subscribed to [email protected] 
>> <mailto:[email protected]> as: [email protected] 
>> <mailto:[email protected]>
>> To unsubscribe, change settings or access archives, see 
>> http://www.ja-sig.org/wiki/display/JSG/cas-user
>>
>>
>> -- 
>> You are currently subscribed to [email protected] as:
>[email protected]
>> To unsubscribe, change settings or access archives, see
>http://www.ja-sig.org/wiki/display/JSG/cas-user
>
>-- 
>You are currently subscribed to [email protected] as:
>[email protected]
>To unsubscribe, change settings or access archives, see
>http://www.ja-sig.org/wiki/display/JSG/cas-user



-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to