I went further and tried using a test bash script:

export CAS_LOGIN_URL=http://XXXX:6080/cas/v1/tickets
export GET_URL=http://XXXX:6080/sss
export USERNAME=scott
export PASSWORD=password

# Request a new Ticket Getting Ticket (TGT).  This returns HTML which is 
put into tgt.txt.
wget --no-proxy --no-check-certificate -O tgt.txt 
--post-data="username=$USERNAME&password=$PASSWORD" $CAS_LOGIN_URL

# Extract from the HTML the TGT and put back into tgt.txt
echo TGT`grep -oEi 'action=\".*\"' tgt.txt | grep -oEi '\-.*\-cas'` > 
tgt.txt

# display the TGT
cat tgt.txt

# Request a new Service Ticket and store in serviceTicket.txt
wget --no-proxy --no-check-certificate --post-data="service=$GET_URL" -O 
serviceTicket.txt $CAS_LOGIN_URL/`cat tgt.txt`

# Get the data at from the service at GET_URL and store in response.txt
wget --no-proxy --no-check-certificate -O response.txt $GET_URL?ticket=`cat 
serviceTicket.txt`

# Display the data from the service call
cat response.txt

Now this gets a TGT and then extracts a valid TGT such as: 
TGT-1-Am5g9ldFeyN9MmcopueZtc0oeAR4XInYfT6CSXFFyFeqpDfPyG-cas

However then I Post: 
http://XXXX:6080/cas/v1/tickets/TGT-1-Am5g9ldFeyN9MmcopueZtc0oeAR4XInYfT6CSXFFyFeqpDfPyG-cas
I receive a 404 no errors, nothing just a 404, there is no response.  In 
the logs I see:

2014-05-12 16:49:51,750 DEBUG 
[org.jasig.cas.ticket.registry.DefaultTicketRegistry] - <Attempting to 
retrieve ticket 
[TGT-1-Am5g9ldFeyN9MmcopueZtc0oeAR4XInYfT6CSXFFyFeqpDfPyG-cas]>
2014-05-12 16:49:51,750 INFO 
[com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - <Audit 
trail record BEGIN
=============================================================
WHO: audit:unknown
WHAT: http://XXXX:6080/sss
ACTION: SERVICE_TICKET_NOT_CREATED
APPLICATION: CAS
WHEN: Mon May 12 16:49:51 UTC 2014
CLIENT IP ADDRESS: 10.145.156.XX
SERVER IP ADDRESS: 10.152.105.YY
=============================================================

So it does not appear that REST is operational in my installation.  Based 
on the test above, the service could be anything and so for right now it is 
a random URL on the same server, since I do not care.  I simply wanted a 
valid ticket to be generated from the TGT.  For instance I have also tried 
using a service of * without success.

ERIC

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