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.