Download, compile, and deploy CAS servers

Source: Internet
Author: User

I always wanted to unify the authentication and authorization of each sub-item of the project operated by the company to CAS, and it was almost a year since I had an idea. Now, I am officially started. If you are interested, please join us and learn. Details of specific projects cannot be disclosed. The general idea of integration is: 1. develop and deploy CAS server functions, 2. Develop the basic function framework of the CAS client. 3. Create the CAS client framework as jar to provide sub-projects. 4. Deploy the CAS server in the official docker environment, this series of blogs only involves part 1 and part 2.

Newbie

1. Download the CAS server project from GitHub

: Development and deployment. Decompress the package and open it with idea, such as the directory structure:

Note: You need to install and configure Maven locally. You need to wait for the download of the relevant resource library.

If the type is red, delete it directly.

2. Compile and run

You can use Maven to package resources (or you can perform the packaging operation on the command line). You can see that the target directory is exceeded and all the resources packaged are in this directory.

 

Run build run (the CMD command line is the same) in the terminal window of idea. After a long wait, the following information is displayed:

And followed by a string of exception information, and then run the process to terminate ........

According to the exception information, CAS uses SSL to start and listen to port 8443, but cannot find 《ThekeystoreFile. Thekeystore is an SSL Certificate file, so you need to create a certificate file of your own for the CAS server. There are many tutorials on how to create a certificate online, but I use the keystore explorer visualization tool to create a certificate. to download this tool, visit: https://download.csdn.net/download/popo_popo/10750816.

3. Create a certificate, compile and run it again

 

Click "OK"

Keep original domain name unchanged

Password: changeit

After the above operations, a certificate has been created. Where can the certificate be referenced by the CAS server?

Create the src/main/resources directory in the IDEA project directory and use resources as the Resource Directory, for example:

Then, save the SSL Certificate created above to the resources directory and name it thekeystore.

Then copy application. properties from target> CAS> WEB-INF> classes to the SRC> main> resources directory.

Modify the value of server. SSL. Key-store in the copied configuration file to classpath: thekeystore.

After the above operations are completed, execute build run again. When you see ready, the sky is pretty, and you are in a good mood ??

Iv. Test (HTTPS is not HTTP)

Default Account casuser and password Mellon

Download, compile, and deploy CAS servers

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: info-contact@alibabacloud.com 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.