Have a look at build.cmd. It is a wrapper around gradlew. One of the 
capabilities is copying etc/cas/*.
After you start CAS, have a look in /etc/cas/services (not sure where that is 
on Windows) to be sure that your service.json is there.

Ray

On Thu, 2019-01-31 at 10:01 -0800, The Jej wrote:
Hello everyone,

I've been using CAS 3.5.2 for quite a long time and I want to upgrade to a 
newer version.
So I've been following the getting started guide here: 
https://apereo.github.io/2019/01/07/cas61-gettingstarted-overlay/

I'm using: intellij (latest version) on windows 10.

Here is what I've done:

1. clone the got overlay repo: 
https://github.com/apereo/cas-overlay-template.git
2. I've generated a thekeystore file using keytool and added the extracted .crt 
to my jvm security file.

 -> at this stage, when I'm using: gradlew.bat build run I' ve got an error 
saying that CAS cannot find the etc/cas/thekeystore file even if the file is 
correctly present in the generated cas.war

so I've created an src/main/resources/application-standalone.properties witch 
contains:

server.ssl.key-store=classpath:/etc/cas/thekeystore



With this the run command launch correctly and I'm able to see the default 
login page at: https://localhost:8443/cas/login

3.
I add this line to build.gradle : compile 
"org.apereo.cas:cas-server-support-json-service-registry:${casServerVersion}"


dependencies {
    compile 
"org.apereo.cas:cas-server-webapp${project.appServer}:${casServerVersion}"
    // Other CAS dependencies/modules may be listed here...
    compile 
"org.apereo.cas:cas-server-support-json-service-registry:${casServerVersion}"
}



I'm trying to add a json registry service to add my services recognized by cas.
I create the file: src/main/resources/etc/cas/config/cas.properties containing:


cas.server.name=https://localhost:8443
cas.server.prefix=${cas.server.name}/cas
logging.config=file:/etc/cas/config/log4j2.xml


cas.serviceRegistry.initFromJson=false
cas.serviceRegistry.json.location=file:/etc/cas/services


4. I've created a file in src/main/resources/etc/cas/services/

Name: testId-1.json containing:


{
  "@class" : "org.apereo.cas.services.RegexRegisteredService",
  "serviceId" : "http://localhost/.*";,
  "name" : "testId",
  "id" : 1,
  "accessStrategy" : {
    "@class" :
    "org.apereo.cas.services.DefaultRegisteredServiceAccessStrategy",
    "enabled" : true,
    "ssoEnabled" : true
  }
}

5. I'm running : gradlew.bat build run


CAS launch correctly but JSON service is not loaded, I'm still getting this in 
logs:


2019-01-31 18:53:15,046 WARN 
[org.apereo.cas.config.CasCoreServicesConfiguration] - <Runtime memory is used 
as the persistence storage for retrieving and persisting service definitions. 
Changes that are made to service definitions during runtime WILL be LOST when t
he CAS server is restarted. Ideally for production, you should choose a storage 
option (JSON, JDBC, MongoDb, etc) to track service definitions.>
2019-01-31 18:53:15,055 INFO [org.apereo.cas.services.AbstractServicesManager] 
- <Loaded [0] service(s) from [InMemoryServiceRegistry].>

I've passed some hours to try to figure it out, I'd tried a lot of things 
describe in various similar pb threads:


https://groups.google.com/a/apereo.org/forum/#!topic/cas-user/jJ8OOyoQoBw

https://groups.google.com/forum/#!topic/jasig-cas-user/R0H3nlynQ1k


I've added a bootstrap.properties in /src/main/resources with defaut file and 
changed:


spring.cloud.config.server.native.searchLocations=file:/etc/cas/config

But nothing changed.


I also tried to launch with : gradlew.bat build bootRun but it fails with an 
too long filename error (it seems to be windows related)


Can someone help me ? I have no more ideas at this stage :)


thanks



--
Ray Bon
Programmer analyst
Development Services, University Systems
2507218831 | CLE 019 | r...@uvic.ca

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/1548965295.4037.63.camel%40uvic.ca.

Reply via email to