Eclipse Configuration CAs Server

Source: Internet
Author: User
Tags cas

1. Download the source code package for CAS server (I'm using Cas-server-3.5.2.1-release.zip)

2. Unzip the package into a directory and locate the cas-server-3.5.2.1-release.zip\cas-server-3.5.2.1\modules Cas-server-webapp-3.5.2.1.war file

3. Import War file----> Cas-server-webapp-3.5.2.1.war in Eclipse

4. Right- Click Project Run as, run on server

You can see the login page:

Prompt to log on without HTTPS.

5. Configure Tomcat to use the HTTPS protocol (tomcat that must be used in Eclipse in the configuration)

A certificate is an important part of a single sign-on authentication system and must be issued by a certificate provider, and the browser does not prompt the site to be unsafe. In the development phase, you only need to generate the certificate using the keytool tool that comes with the JDK .

(1) Generate server-side key file, run cmd as Administrator , switch to Tomcat 's installation directory

Input: Keytool-genkey-alias casserver-keypass demosso-keyalg rsa-keystore casserver.keystore-validity 365

Input here, to enter the CAS server mount domain name, otherwise it will be due to the name of the certificate and the domain name does not match the error.

My Computer hostname is rs-pc, so I entered the rs-pc.

After execution you can see that the casserver.keystore file is generated under the directory

-alias The specified alias is casserver;

-keyalg Specifies the RSA algorithm;

-keypass Specify the private key password;

-keystore the specified key file name is called casserver.keystore;

-validity Specifies that the certificate is valid for 365 days.

(2) generate server-side certificate

Continue execution Keytool-export-alias Casserver-storepass demosso-file casserver.cer-keystore casserver.keystore

After execution, you can see that the casserver.cer file is generated under the directory.

-alias The specified alias is casserver;

-storepass Specifies that the private key is Demosso;

-file Specifies that the file name of the exported certificate is casserver.cer;

-keystore Specifies the file name of the key file that was generated before.

(3) Import the certificate file to the cacerts keystore file

Continue execution of Keytool-import-trustcacerts-alias casserver-storepass demosso-file casserver.cer – KeyStore Cacerts

After execution, you can see that the cacerts file is generated under the directory .

6. Next Open the conf file in the Tomcat directory with a server.xml file, edit it, Find the paragraph that is commented on:

Uncomment and modify to:

Restart Tomcatto open https://localhost:8443/

Click Continue to browse this web site and see the Tomcat homepage , stating that the HTTPS configuration was successful .

7. You can now use https://rs-pc:8443/cas-server-webapp-3.5.2.1/login in Eclipse

Access:

At this point, the eclipse configuration was successful using CAS server.

Eclipse Configuration CAs Server

Related Article

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.