CAS principles and protocols

Source: Internet
Author: User

SSO stands for single sign on. SSO is used in multiple application systems. Users only need to log on once to access all mutually trusted application systems.

There are many SSO solutions, such as utrust, HP Smart, and open-source CAS and smart SSO, among which CAS is the most widely used.

CAS (Central Authentication Service) Central Authentication Service. CAS (Central Authentication Service) is a good single sign-on Framework for Web applications.

CAS has the following features:
Open-source enterprise-level Single Sign-On solution.
CAS Server is a Web application that needs to be deployed independently.
CAS client supports many clients, including Java,. net, PHP, Perl, Apache, uportal, and Ruby.

CAS principles and protocols

Structure: CAS contains two parts

1. CAS Server

CAS server is responsible for user authentication. CAS server needs to be deployed independently. There are more than one implementation of CAS server.

CAS server processes credentials such as user name/password, which may retrieve a user account information from the database or the user password in an XML file. In this way, CAS provides a flexible but the same method of Interface/implementation separation. What authentication method does CAS use? It is separated from the CAS protocol, that is, you can customize and expand the implementation details of this authentication.

2. CAS Client

CAS client is deployed on the client (Web Application). In principle, the deployment of CAS client means that when there are access requests to the protected resources of the local web application, the Web application no longer accepts credentials such as usernames and passwords, but redirects to the CAS server for authentication.

Currently, CAS client supports a large number of clients, including Java ,.. net, ISAPI, PHP, Perl, uportal, acegi, Ruby, VBScript, and other clients. The CAS protocol can be used for client applications written in any language.

The basic idea of the entire agreement is based on the bill method. Next, let's look at the basic Protocol framework of CaS:

CAS client and protected client applications are deployed together to protect protected resources in filter mode. For each Web request that accesses protected resources, the CAS client analyzes whether the HTTP request contains service ticket. If not, the current user has not logged on, therefore, the request is redirected to the specified CAS server logon address, and the service (that is, the destination resource address to be accessed) is passed so that the address can be returned after successful logon. The user enters the authentication information in step 1. If the login succeeds, the CAS server randomly generates a fairly long, unique, and unfalsified service ticket, and caches it for future verification, then the system automatically redirects to the service address and sets a ticket granted cookie (TGC) for the client browser. After the CAS client obtains the service and the newly generated ticket, in step 5 and 6, perform proper identity with the CAS server to ensure the validity of the service ticket.

In this Protocol, all interactions with CAS adopt the SSL protocol to ensure the security of ST and TGC. There will be two redirection processes during the Protocol work, but the process of ticket verification between CAS client and CAS server is transparent to users.

In addition, the CAS Protocol also provides the proxy mode to adapt to more advanced and complex application scenarios.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.