Enable CAS 5.1.8 to support HTTP, troubleshoot unauthorized licensing service error prompts

Source: Internet
Author: User
Tags cas http authentication

Finally compile the CAs 5.1.8, generate the war package, and modify the configuration, support Database (Oracle) way authentication, deploy to Tomcat, ready to use, which one to open the client application, skip to CAS, no account password input box, only one thorn purpose error TIP:

Convenient for everyone to find answers on search engines, appendix related text:

Unlicensed services The service
record for the CAS is empty and no service is defined. Applications that want to be certified through CAs must be clearly defined in the service record.

application not Authorized to use CAS

You are are not authorized to access the application as your account/is missing privileges required from the
CAS server to Authenticate into the this service. Please notify your support desk.

The application you attempted to authenticate to isn't authorized to use CAS. Contact your CAs administrator-Learn how do you might register and integrate your application with CAs.

The services Registry of the CAS is empty and has no service definitions. \ applications that wish to authenticate with CAS must explicitly is defined in the
services registry.

I'm just starting to see this hint that you want to register the application's address on CAs so that CAS will not be able to authenticate you or provide services. Later searched for a long time, did not see someone mentioned. Basically is to say that actually involves https/http authentication problem. Because it is said that CAS is the only way to support HTTPS by default, starting with CAs 4.*. Now our application is HTTP, so CAS is not recognized.

Searched all over the ancient and modern, the Final solution is:

1. Modify \web-inf\classes\services\httpsandimaps-10000001.json

"Serviceid": "^ (https|imaps)://.*" 
instead ==>
 "Serviceid": "^ (https|http|imaps)://.*",

2, modify the project configuration file \web-inf\classes\application.properties

Cas.tgc.secure=false
cas.serviceregistry.initfromjson=true #这一点真是太重要了 ...

Basically, no one will mention the last one: cas.serviceregistry.initfromjson=true, so no matter how I change the Httpsandimaps-10000001.json, will not work, always appear red error hint. Later in a foreigner's answer to see there is such a sentence, I know, it should be the problem. Why do these answers hide so deeply?

In addition, I saw someone mention to revise c:\tomcat\etc\cas\config\cas.properties, this is what ghost. In fact, some people write the configuration of the second step above here. Unified configuration write in Application.properties not good, to separate many places. In addition, this etc directory, is the CAs run automatically generated, which put a log. It is not in Tomcat, but in the root directory of the disk where Tomcat resides. The estimated path can be changed, but unified writing in the Application.properties is better, the CAs can read, a little problem does not.

As for this hint

It's not going to go away unless you support HTTPS, or simply manually change the page.

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.