Here is a JAR containing a servlet that attempts to login and logout of the
CAS instance deployed on the same server via a HTTP client.  If it is able
to successfully login and logout, it will return a HTTP OK status code (200)
and a HTTP SERVICE UNAVAILABLE status code (503) otherwise.  This is helpful
for load balancers and monitoring suites like OpenNMS that perform basic
layer 7 health checks.

By default, it expects the CAS instance to be setup as the ROOT webapp.  It
also determines the server's hostname automatically, so it can go through
the same web route as your users.  However it is completely configurable in
terms of path to login and logout servlets, the cookies that should be
checked upon login, whether to use SSL, etc.

Hope this helps,
Andrew


On 3/20/09 7:29 AM, "Marvin Addison" <[email protected]> wrote:

> We recently enabled this in our build, which we maintain using the
> recommended Maven WAR overlay process.  There were only two steps.
> 
> 1. Add the following to pom.xml:
> <dependency>
>   <groupId>org.jasig.cas</groupId>
>   <artifactId>cas-server-integration-restlet</artifactId>
>   <version>3.3.1</version>
>   <scope>runtime</scope>
>   </dependency>
> <dependency>
> 
> 2. Add the following to web.xml:
> <servlet>
>   <servlet-name>restlet</servlet-name>
>   
> <servlet-class>com.noelios.restlet.ext.spring.RestletFrameworkServlet</servlet
> -class>
> </servlet>
> <servlet-mapping>
>   <servlet-name>restlet</servlet-name>
>   <url-pattern>/rest/*</url-pattern>
> </servlet-mapping>
> 
> Hope that helps,
> M

-- 
Andrew Feller, Analyst
LSU University Information Services
200 Frey Computing Services Center
Baton Rouge, LA 70803
Office: 225.578.3737
Fax: 225.578.6400


-- 
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

Attachment: cas_service_check.jar
Description: Binary data

Reply via email to