That's quite nice. I would comment that Eric's "screen scraping" script
against the login URI is probably a better test than my prior suggestion
to use the CAS RESTful interface, since it is hypothetically possible
for the RESTful interface to be up, but the login URI to be
malfunctioning (although I'm guessing that this is a low probability
failure mode). The tradeoff is that you have to screen scrape...
David Ohsie
EMC Corporation
________________________________
From: [email protected] [mailto:[email protected]] On
Behalf Of Eric Pierce
Sent: Thursday, March 19, 2009 10:21 AM
To: [email protected]
Subject: Re: [cas-user] Monitoring of CAS
We use the following script to test CAS:
#!/usr/bin/bash
CASURL="https://casserver.example.edu/cas/login"
CASUSERNAME="myuser"
PASSWORD="secret"
# Pull out the ltValue
ltValue=`curl --silent --cookie-jar /tmp/cookieTmp --cookie
/tmp/cookieTmp $CASURL | sed -n 's/.*<input type=\"hidden\" name=\"lt\"
value=\"\(.*\)\" \/>.*/\1/p'`
# Submit ltValue, username, password to login page
loginResponse=`curl --silent --cookie-jar /tmp/cookieTmp
--cookie /tmp/cookieTmp $CASURL -d "username=$CASUSERNAME" -d
"password=$PASSWORD" -d "_eventId=submit" -d "lt=$ltValue" -L`
if [[ "$loginResponse" =~ "Log In Successful" ]]; then
echo "Success"
else
echo "Failure"
fi
# Remove cookie store
rm /tmp/cookieTmp
Eric Pierce, RHCE -- University of South Florida -- (813)
974-8868 -- [email protected]
On Wed, Mar 18, 2009 at 9:20 PM, David Ruwoldt
<[email protected]> wrote:
Dear All,
CAS 3.3.1, RHEL 5.3, Tomcat 5
We have groundwork which sits on top of Nagios. What I
need to be able to do is monitor the ability to authenticate to CAS
through a command line script. Has anyone done this? Does anyone have
any pointers?
I have found soapUI which looks like it may be able to
do this for me but it needs a WSDL file which I am not familiar with.
Any help would be very appreciated.
Yours sincerely
David Ruwoldt
--
David Ruwoldt
Senior Systems Specialist
Information Technology Services
Level 9, 9 Gawler Place
ADELAIDE UNIVERSITY SA 5005
AUSTRALIA
CRICOS Provider Number 00123M
-----------------------------------------------------------
This email message is intended only for the addressee(s)
and contains information that may be confidential and/or
copyright. If you are not the intended recipient please
notify the sender by reply email and immediately delete
this email. Use, disclosure or reproduction of this
email
by anyone other than the intended recipient(s) is
strictly
prohibited. No representation is made that this email or
any attachments are free of viruses. Virus scanning is
recommended and is the responsibility of the recipient.
--
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