Hi,
I have a trouble with store service register in MongoDB or MySQL with CAS 
version 6.1.x
Here is my detail configuration:

1. CAS Overlay build.gradle 
    compile 
"org.apereo.cas:cas-server-support-configuration-cloud-mongo:6.0.7"
    compile "org.apereo.cas:cas-server-support-mongo:6.1.7"
    compile "org.apereo.cas:cas-server-support-rest:6.1.7"
    compile "org.apereo.cas:cas-server-support-rest-services:6.1.7"
    compile "org.apereo.cas:cas-server-support-oauth-webflow:6.1.7"
    compile "org.apereo.cas:cas-server-support-token-tickets:6.1.7"
    compile "org.apereo.cas:cas-server-support-rest-tokens:6.1.7"
    compile "org.apereo.cas:cas-server-support-token-webflow:6.1.7"
    compile "org.apereo.cas:cas-server-support-rest-authentication:6.1.7"
    compile "org.apereo.cas:cas-server-support-mongo-ticket-registry:6.1.7"
    compile "org.apereo.cas:cas-server-webapp-tomcat:6.1.7"
   //jdbc auth
    compile "org.apereo.cas:cas-server-support-jdbc-drivers:6.1.7"
    compile "org.apereo.cas:cas-server-support-jdbc:6.1.7"
    //MONGODB service registry
    compile "org.apereo.cas:cas-server-support-mongo-service-registry:6.1.7"
    //JPA
    compile "org.apereo.cas:cas-server-support-jpa-service-registry:6.1.7"
2. My CAS properties
   cas.serviceRegistry.initFromJson=true
   cas.serviceRegistry.json.location=file:/etc/cas/services-repo
   cas.serviceRegistry.watcherEnabled=true
   cas.serviceRegistry.managementType=DEFAULT
   //FOR MONGODB
   cas.serviceRegistry.mongo.databaseName=cas
   cas.serviceRegistry.mongo.sslEnabled=false
   cas.serviceRegistry.mongo.userId=casuser
  cas.serviceRegistry.mongo.password=Mellon
  cas.serviceRegistry.mongo.host=localhost
 
cas.serviceRegistry.mongo.clientUri=mongodb://casuser:[email protected]:27017/cas?authSource=cas&readPreference=primary&appname=MongoDB%20Compass%20Community&ssl=false
  cas.serviceRegistry.mongo.collection=MongoDbServiceRegistry
  cas.serviceRegistry.mongo.port=27017
  cas.serviceRegistry.mongo.writeConcern=NORMAL
  cas.serviceRegistry.mongo.retryWrites=false
//FOR JPA
  cas.serviceRegistry.jpa.user=root
  cas.serviceRegistry.jpa.password=Vnpt@123
   cas.serviceRegistry.jpa.driverClass=com.mysql.cj.jdbc.Driver
  
cas.serviceRegistry.jpa.url=jdbc:mysql://localhost:3306/cas?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
cas.serviceRegistry.jpa.dialect=org.hibernate.dialect.MySQL8Dialect
 cas.serviceRegistry.jpa.defaultSchema=cas

When I build my CAS overlay 6.1.x, it just only creates 
-Collection: MongoDbServiceRegistry in MongoDB
and
-Three table: Regex_Registered_Service, 
Regex_Registered_Service_Regex_Registered_Service_Property and 
Regex_Registered_Service_Registered_Service_Impl_Contact in MySQL
CAS didn't load service file (.json) content in directory 
/etc/cas/services-repo.

I have try with CAS Overlay version 6.0.x
I use same configuration above and only change CAS version from 6.1.7 to 
6.0.7 and IT WORKS.
Here is the result:
Service store in MySQL
[image: Capture.PNG]
Service store in MongoDB
[image: Capture.PNG]
CAS version 6.0.7 loaded service file (.json) content in directory 
/etc/cas/services-repo to MongoDB and MySQL.

I don't know why CAS version 6.1.x don't store service in Database?
Thank you.


-- 
- 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/47145ab6-03e6-47c0-acc2-c647a31b9a19n%40apereo.org.

Reply via email to