Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does someone have a valid example on CAS Proxy Granting Ticket?

I need to implement a CAS Proxy Granting Ticket System.

So I need to understand the system. There is a good doc here, but I have no idea about the proxyCallback I need.

Could someone explain me that ?

like image 585
Pierre-Gilles Levallois Avatar asked Sep 07 '09 13:09

Pierre-Gilles Levallois


People also ask

What is CAS in proxy?

CAS allows multi-tier authentication via proxy address. A cooperating back-end service, like a database or mail server, can participate in CAS, validating the authenticity of users via information it receives from web applications. Thus, a webmail client and a webmail server can all implement CAS.

How do you implement CAS authentication?

The following diagram illustrates the message flow of the CAS SSO process. 1 : User tries to access a CASified app called “sample-app”. 2 : Browser sends a GET request to “https://sample-app.com/”. 3, 4 : Access to the app is not authorized yet, so redirected to the CAS server for authentication.

How does CAS server work?

CAS web flowA user, via a web browser, requests a resource from a particular web application or service. The web application or service, via the application's security mechanism, determines if the user has already been authenticated (authN) and authorized (authZ) to use the application.

What is CAS protocol?

Central authentication service, or CAS, is a single sign-on (SSO) protocol that allows websites to authenticate users. Login credentials are only used once for multiple applications for authentication without revealing the secure password.


1 Answers

The CAS will invoke the pgtURL to provide a special ticket that will enable that application to acquire new tickets for other applications.
This is the setup in web.xml:

<servlet>
    <servlet-name>casproxy</servlet-name>
    <servlet-class>edu.yale.its.tp.cas.proxy.ProxyTicketReceptor</servlet-class>
    <load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
  <servlet-name>casproxy</servlet-name>
  <url-pattern>/casProxy/*</url-pattern>
</servlet-mapping>

To get a new ticket for another service with the special ticket:

SecurityContext sc = SecurityContextHolder.getContext();
CasAuthenticationToken auth = (CasAuthenticationToken)sc.getAuthentication();
String pgtIOU = auth.getProxyGrantingTicketIou();
String newTicket = ProxyTicketReceptor.getProxyTicket(pgtIOU, anotherService);

Then you redirect to that service giving to it the new ticket.

like image 99
rodrigoap Avatar answered Jan 04 '23 07:01

rodrigoap