Re: [cas-user] [Auto Reload CAS Server After Register New Service]

2020-08-25 Thread Nguyen Tran Thanh Lam
Yes thank you Sir,
Your guide,
Remove two cas properties and build again.
That's magic.
Thank you very much.

Vào Th 3, 25 thg 8, 2020 vào lúc 21:58 David Curry <
david.cu...@newschool.edu> đã viết:

> That's great. Glad you figured it out.
>
> --
>
> DAVID A. CURRY, CISSP
> *DIRECTOR • INFORMATION SECURITY & PRIVACY*
> THE NEW SCHOOL • INFORMATION TECHNOLOGY
>
> 71 FIFTH AVE., 9TH FL., NEW YORK, NY 10003
> +1 646 909-4728 • david.cu...@newschool.edu
>
>
> On Tue, Aug 25, 2020 at 10:49 AM Nguyen Tran Thanh Lam <
> naphaluan211...@gmail.com> wrote:
>
>> Dear Mr David.
>> I have success.
>> Thank you very much.
>>
>> Vào Th 3, 25 thg 8, 2020 vào lúc 21:21 Nguyen Tran Thanh Lam <
>> naphaluan211...@gmail.com> đã viết:
>>
>>> Dear Mr David Curry,
>>> I have read the guide from your link.
>>> Then I setup follow these step bellow:
>>> *Step 1:*
>>> I keep two properties in my CAS configuration to initialized CAS server
>>> load some services in directory /etc/cas/services-repo to mongoDB
>>>
>>> "name":"cas.service-registry.json.location","value":"file:/etc/cas/services-repo"
>>> "name":"cas.service-registry.mongo.drop-collection","value":"true"
>>> Then I build CAS server (First time).
>>> Result,
>>> -CAS create collection "cas-service-registry"
>>> -loaded to this collection
>>> Done.
>>> *Step 2:*
>>> I stop CAS and remove two properties above.
>>> Then I build CAS again.
>>> Now CAS works with service registry in MongoDB
>>> Here is my logs:
>>> 2020-08-25 07:00:03,217 INFO
>>> [org.apereo.cas.services.AbstractServicesManager] - >> from [MongoDbServiceRegistry].>
>>> *Step 3:*
>>> I build my CAS Management Web App
>>> Then I create a new service
>>> But It still didn't store my new service registry in collection
>>> "cas-service-registry".
>>> It create new json file for this service and store this file in
>>> directory "/etc/cas/service-repo"
>>> Here is CAS Management log
>>> 2020-08-25 06:55:29,029 INFO
>>> [org.apereo.cas.mgmt.web.CasManagementWebApplication] - >> profiles are active: mongodb>
>>> 2020-08-25 06:55:58,528 INFO
>>> [org.apereo.cas.authentication.config.CasMongoAuthenticationConfiguration]
>>> - >> [Mongo{options=MongoClientOptions{description='null',
>>> applicationName='null', compressors='[]', readPreference=primary,
>>> writeConcern=WriteConcern{w=null, wTimeout=null ms, fsync=null,
>>> journal=null, retryWrites=false, readConcern=com.mongodb.ReadConcern@0,
>>> codecRegistry=org.bson.codecs.configuration.ProvidersCodecRegistry@ac36d621,
>>> serverSelector=null, clusterListeners=[], commandListeners=[],
>>> minConnectionsPerHost=0, maxConnectionsPerHost=10,
>>> threadsAllowedToBlockForConnectionMultiplier=5,
>>> serverSelectionTimeout=3, maxWaitTime=12,
>>> maxConnectionIdleTime=3, maxConnectionLifeTime=6,
>>> connectTimeout=5000, socketTimeout=5000, socketKeepAlive=false,
>>> sslEnabled=false, sslInvalidHostNamesAllowed=false,
>>> sslContext=javax.net.ssl.SSLContext@52f9e8bb, alwaysUseMBeans=false,
>>> heartbeatFrequency=1, minHeartbeatFrequency=500,
>>> heartbeatConnectTimeout=5000, heartbeatSocketTimeout=5000,
>>> localThreshold=15, requiredReplicaSetName='null',
>>> dbDecoderFactory=com.mongodb.DefaultDBDecoder$1@2035d65b,
>>> dbEncoderFactory=com.mongodb.DefaultDBEncoder$1@240a2619,
>>> socketFactory=null, cursorFinalizerEnabled=true,
>>> connectionPoolSettings=ConnectionPoolSettings{maxSize=10, minSize=0,
>>> maxWaitQueueSize=50, maxWaitTimeMS=12, maxConnectionLifeTimeMS=6,
>>> maxConnectionIdleTimeMS=3, maintenanceInitialDelayMS=0,
>>> maintenanceFrequencyMS=6, connectionPoolListeners=[]},
>>> socketSettings=SocketSettings{connectTimeoutMS=5000, readTimeoutMS=5000,
>>> keepAlive=false, receiveBufferSize=0, sendBufferSize=0},
>>> serverSettings=ServerSettings{heartbeatFrequencyMS=1,
>>> minHeartbeatFrequencyMS=500, serverListeners='[]',
>>> serverMonitorListeners='[]'},
>>> heartbeatSocketSettings=SocketSettings{connectTimeoutMS=5000,
>>> readTimeoutMS=5000, keepAlive=false, receiveBufferSize=0,
>>> sendBufferSize=0}}}]>
>>> 2020-08-25 06:56:02,609 INFO
>>> [org.apereo.cas.mgmt.factory.FormDataFactory] - >> status code from endpoint
>>> https://casoverlay.vdc2.com.vn:8443/cas/actuator/discoveryProfile.
>>> Using default FormData values.>
>>> 2020-08-25 06:56:07,754 INFO
>>> [org.apereo.cas.mgmt.web.CasManagementWebApplication] - >> CasManagementWebApplication in 53.965 seconds (JVM running for 62.606)>
>>> 2020-08-25 06:56:09,008 INFO
>>> [org.apereo.cas.services.AbstractServicesManager] - >> from [MongoDbServiceRegistry].>
>>> 2020-08-25 06:56:09,009 INFO
>>> [org.apereo.cas.mgmt.web.DefaultCasManagementEventListener] - <>
>>> 2020-08-25 06:56:09,015 INFO
>>> [org.apereo.cas.mgmt.web.DefaultCasManagementEventListener] - <
>>>
>>>   _  _     __   __
>>>  |  _ \  | |/ \|  _ \  \ \ / /
>>>  | |_) | |  _| / _ \   | | | |  \ V /
>>>  |  _ <  | |___   / ___ \  | |_| |   | |
>>>  |_| \_\ |_| /_/   

Re: [cas-user] [Auto Reload CAS Server After Register New Service]

2020-08-25 Thread David Curry
That's great. Glad you figured it out.

--

DAVID A. CURRY, CISSP
*DIRECTOR • INFORMATION SECURITY & PRIVACY*
THE NEW SCHOOL • INFORMATION TECHNOLOGY

71 FIFTH AVE., 9TH FL., NEW YORK, NY 10003
+1 646 909-4728 • david.cu...@newschool.edu


On Tue, Aug 25, 2020 at 10:49 AM Nguyen Tran Thanh Lam <
naphaluan211...@gmail.com> wrote:

> Dear Mr David.
> I have success.
> Thank you very much.
>
> Vào Th 3, 25 thg 8, 2020 vào lúc 21:21 Nguyen Tran Thanh Lam <
> naphaluan211...@gmail.com> đã viết:
>
>> Dear Mr David Curry,
>> I have read the guide from your link.
>> Then I setup follow these step bellow:
>> *Step 1:*
>> I keep two properties in my CAS configuration to initialized CAS server
>> load some services in directory /etc/cas/services-repo to mongoDB
>>
>> "name":"cas.service-registry.json.location","value":"file:/etc/cas/services-repo"
>> "name":"cas.service-registry.mongo.drop-collection","value":"true"
>> Then I build CAS server (First time).
>> Result,
>> -CAS create collection "cas-service-registry"
>> -loaded to this collection
>> Done.
>> *Step 2:*
>> I stop CAS and remove two properties above.
>> Then I build CAS again.
>> Now CAS works with service registry in MongoDB
>> Here is my logs:
>> 2020-08-25 07:00:03,217 INFO
>> [org.apereo.cas.services.AbstractServicesManager] - > from [MongoDbServiceRegistry].>
>> *Step 3:*
>> I build my CAS Management Web App
>> Then I create a new service
>> But It still didn't store my new service registry in collection
>> "cas-service-registry".
>> It create new json file for this service and store this file in directory
>> "/etc/cas/service-repo"
>> Here is CAS Management log
>> 2020-08-25 06:55:29,029 INFO
>> [org.apereo.cas.mgmt.web.CasManagementWebApplication] - > profiles are active: mongodb>
>> 2020-08-25 06:55:58,528 INFO
>> [org.apereo.cas.authentication.config.CasMongoAuthenticationConfiguration]
>> - > [Mongo{options=MongoClientOptions{description='null',
>> applicationName='null', compressors='[]', readPreference=primary,
>> writeConcern=WriteConcern{w=null, wTimeout=null ms, fsync=null,
>> journal=null, retryWrites=false, readConcern=com.mongodb.ReadConcern@0,
>> codecRegistry=org.bson.codecs.configuration.ProvidersCodecRegistry@ac36d621,
>> serverSelector=null, clusterListeners=[], commandListeners=[],
>> minConnectionsPerHost=0, maxConnectionsPerHost=10,
>> threadsAllowedToBlockForConnectionMultiplier=5,
>> serverSelectionTimeout=3, maxWaitTime=12,
>> maxConnectionIdleTime=3, maxConnectionLifeTime=6,
>> connectTimeout=5000, socketTimeout=5000, socketKeepAlive=false,
>> sslEnabled=false, sslInvalidHostNamesAllowed=false,
>> sslContext=javax.net.ssl.SSLContext@52f9e8bb, alwaysUseMBeans=false,
>> heartbeatFrequency=1, minHeartbeatFrequency=500,
>> heartbeatConnectTimeout=5000, heartbeatSocketTimeout=5000,
>> localThreshold=15, requiredReplicaSetName='null',
>> dbDecoderFactory=com.mongodb.DefaultDBDecoder$1@2035d65b,
>> dbEncoderFactory=com.mongodb.DefaultDBEncoder$1@240a2619,
>> socketFactory=null, cursorFinalizerEnabled=true,
>> connectionPoolSettings=ConnectionPoolSettings{maxSize=10, minSize=0,
>> maxWaitQueueSize=50, maxWaitTimeMS=12, maxConnectionLifeTimeMS=6,
>> maxConnectionIdleTimeMS=3, maintenanceInitialDelayMS=0,
>> maintenanceFrequencyMS=6, connectionPoolListeners=[]},
>> socketSettings=SocketSettings{connectTimeoutMS=5000, readTimeoutMS=5000,
>> keepAlive=false, receiveBufferSize=0, sendBufferSize=0},
>> serverSettings=ServerSettings{heartbeatFrequencyMS=1,
>> minHeartbeatFrequencyMS=500, serverListeners='[]',
>> serverMonitorListeners='[]'},
>> heartbeatSocketSettings=SocketSettings{connectTimeoutMS=5000,
>> readTimeoutMS=5000, keepAlive=false, receiveBufferSize=0,
>> sendBufferSize=0}}}]>
>> 2020-08-25 06:56:02,609 INFO
>> [org.apereo.cas.mgmt.factory.FormDataFactory] - > status code from endpoint
>> https://casoverlay.vdc2.com.vn:8443/cas/actuator/discoveryProfile. Using
>> default FormData values.>
>> 2020-08-25 06:56:07,754 INFO
>> [org.apereo.cas.mgmt.web.CasManagementWebApplication] - > CasManagementWebApplication in 53.965 seconds (JVM running for 62.606)>
>> 2020-08-25 06:56:09,008 INFO
>> [org.apereo.cas.services.AbstractServicesManager] - > from [MongoDbServiceRegistry].>
>> 2020-08-25 06:56:09,009 INFO
>> [org.apereo.cas.mgmt.web.DefaultCasManagementEventListener] - <>
>> 2020-08-25 06:56:09,015 INFO
>> [org.apereo.cas.mgmt.web.DefaultCasManagementEventListener] - <
>>
>>   _  _     __   __
>>  |  _ \  | |/ \|  _ \  \ \ / /
>>  | |_) | |  _| / _ \   | | | |  \ V /
>>  |  _ <  | |___   / ___ \  | |_| |   | |
>>  |_| \_\ |_| /_/   \_\ |/|_|
>> 2020-08-25 06:59:23,275 INFO
>> [org.apereo.cas.services.AbstractServicesManager] - > from [JsonServiceRegistry].>
>> 2020-08-25 06:59:26,788 INFO
>> [org.apereo.cas.services.AbstractServicesManager] - > from [MongoDbServiceRegistry].>
>> 2020-08-25 07:00:26,804 INFO
>> 

Re: [cas-user] [Auto Reload CAS Server After Register New Service]

2020-08-25 Thread Nguyen Tran Thanh Lam
Dear Mr David.
I have success.
Thank you very much.

Vào Th 3, 25 thg 8, 2020 vào lúc 21:21 Nguyen Tran Thanh Lam <
naphaluan211...@gmail.com> đã viết:

> Dear Mr David Curry,
> I have read the guide from your link.
> Then I setup follow these step bellow:
> *Step 1:*
> I keep two properties in my CAS configuration to initialized CAS server
> load some services in directory /etc/cas/services-repo to mongoDB
>
> "name":"cas.service-registry.json.location","value":"file:/etc/cas/services-repo"
> "name":"cas.service-registry.mongo.drop-collection","value":"true"
> Then I build CAS server (First time).
> Result,
> -CAS create collection "cas-service-registry"
> -loaded to this collection
> Done.
> *Step 2:*
> I stop CAS and remove two properties above.
> Then I build CAS again.
> Now CAS works with service registry in MongoDB
> Here is my logs:
> 2020-08-25 07:00:03,217 INFO
> [org.apereo.cas.services.AbstractServicesManager] -  from [MongoDbServiceRegistry].>
> *Step 3:*
> I build my CAS Management Web App
> Then I create a new service
> But It still didn't store my new service registry in collection
> "cas-service-registry".
> It create new json file for this service and store this file in directory
> "/etc/cas/service-repo"
> Here is CAS Management log
> 2020-08-25 06:55:29,029 INFO
> [org.apereo.cas.mgmt.web.CasManagementWebApplication] -  profiles are active: mongodb>
> 2020-08-25 06:55:58,528 INFO
> [org.apereo.cas.authentication.config.CasMongoAuthenticationConfiguration]
> -  [Mongo{options=MongoClientOptions{description='null',
> applicationName='null', compressors='[]', readPreference=primary,
> writeConcern=WriteConcern{w=null, wTimeout=null ms, fsync=null,
> journal=null, retryWrites=false, readConcern=com.mongodb.ReadConcern@0,
> codecRegistry=org.bson.codecs.configuration.ProvidersCodecRegistry@ac36d621,
> serverSelector=null, clusterListeners=[], commandListeners=[],
> minConnectionsPerHost=0, maxConnectionsPerHost=10,
> threadsAllowedToBlockForConnectionMultiplier=5,
> serverSelectionTimeout=3, maxWaitTime=12,
> maxConnectionIdleTime=3, maxConnectionLifeTime=6,
> connectTimeout=5000, socketTimeout=5000, socketKeepAlive=false,
> sslEnabled=false, sslInvalidHostNamesAllowed=false,
> sslContext=javax.net.ssl.SSLContext@52f9e8bb, alwaysUseMBeans=false,
> heartbeatFrequency=1, minHeartbeatFrequency=500,
> heartbeatConnectTimeout=5000, heartbeatSocketTimeout=5000,
> localThreshold=15, requiredReplicaSetName='null',
> dbDecoderFactory=com.mongodb.DefaultDBDecoder$1@2035d65b,
> dbEncoderFactory=com.mongodb.DefaultDBEncoder$1@240a2619,
> socketFactory=null, cursorFinalizerEnabled=true,
> connectionPoolSettings=ConnectionPoolSettings{maxSize=10, minSize=0,
> maxWaitQueueSize=50, maxWaitTimeMS=12, maxConnectionLifeTimeMS=6,
> maxConnectionIdleTimeMS=3, maintenanceInitialDelayMS=0,
> maintenanceFrequencyMS=6, connectionPoolListeners=[]},
> socketSettings=SocketSettings{connectTimeoutMS=5000, readTimeoutMS=5000,
> keepAlive=false, receiveBufferSize=0, sendBufferSize=0},
> serverSettings=ServerSettings{heartbeatFrequencyMS=1,
> minHeartbeatFrequencyMS=500, serverListeners='[]',
> serverMonitorListeners='[]'},
> heartbeatSocketSettings=SocketSettings{connectTimeoutMS=5000,
> readTimeoutMS=5000, keepAlive=false, receiveBufferSize=0,
> sendBufferSize=0}}}]>
> 2020-08-25 06:56:02,609 INFO [org.apereo.cas.mgmt.factory.FormDataFactory]
> -  https://casoverlay.vdc2.com.vn:8443/cas/actuator/discoveryProfile. Using
> default FormData values.>
> 2020-08-25 06:56:07,754 INFO
> [org.apereo.cas.mgmt.web.CasManagementWebApplication] -  CasManagementWebApplication in 53.965 seconds (JVM running for 62.606)>
> 2020-08-25 06:56:09,008 INFO
> [org.apereo.cas.services.AbstractServicesManager] -  from [MongoDbServiceRegistry].>
> 2020-08-25 06:56:09,009 INFO
> [org.apereo.cas.mgmt.web.DefaultCasManagementEventListener] - <>
> 2020-08-25 06:56:09,015 INFO
> [org.apereo.cas.mgmt.web.DefaultCasManagementEventListener] - <
>
>   _  _     __   __
>  |  _ \  | |/ \|  _ \  \ \ / /
>  | |_) | |  _| / _ \   | | | |  \ V /
>  |  _ <  | |___   / ___ \  | |_| |   | |
>  |_| \_\ |_| /_/   \_\ |/|_|
> 2020-08-25 06:59:23,275 INFO
> [org.apereo.cas.services.AbstractServicesManager] -  from [JsonServiceRegistry].>
> 2020-08-25 06:59:26,788 INFO
> [org.apereo.cas.services.AbstractServicesManager] -  from [MongoDbServiceRegistry].>
> 2020-08-25 07:00:26,804 INFO
> [org.apereo.cas.services.AbstractServicesManager] -  from [MongoDbServiceRegistry].>
> 2020-08-25 07:00:59,350 INFO
> [org.apereo.cas.services.AbstractServicesManager] -  from [JsonServiceRegistry].>
> 2020-08-25 07:00:59,428 INFO
> [org.apereo.cas.mgmt.controller.ServiceController] -  service [1598364059353]>
> 2020-08-25 07:00:59,485 INFO
> [org.apereo.cas.services.AbstractServicesManager] -  from [JsonServiceRegistry].>
>
> I don't know what does it wrong?
> P/s: here is my CAS config and 

Re: [cas-user] [Auto Reload CAS Server After Register New Service]

2020-08-25 Thread Nguyen Tran Thanh Lam
Dear Mr David Curry,
I have read the guide from your link.
Then I setup follow these step bellow:
*Step 1:*
I keep two properties in my CAS configuration to initialized CAS server
load some services in directory /etc/cas/services-repo to mongoDB
"name":"cas.service-registry.json.location","value":"file:/etc/cas/services-repo"
"name":"cas.service-registry.mongo.drop-collection","value":"true"
Then I build CAS server (First time).
Result,
-CAS create collection "cas-service-registry"
-loaded to this collection
Done.
*Step 2:*
I stop CAS and remove two properties above.
Then I build CAS again.
Now CAS works with service registry in MongoDB
Here is my logs:
2020-08-25 07:00:03,217 INFO
[org.apereo.cas.services.AbstractServicesManager] - 
*Step 3:*
I build my CAS Management Web App
Then I create a new service
But It still didn't store my new service registry in collection
"cas-service-registry".
It create new json file for this service and store this file in directory
"/etc/cas/service-repo"
Here is CAS Management log
2020-08-25 06:55:29,029 INFO
[org.apereo.cas.mgmt.web.CasManagementWebApplication] - 
2020-08-25 06:55:58,528 INFO
[org.apereo.cas.authentication.config.CasMongoAuthenticationConfiguration]
- 
2020-08-25 06:56:02,609 INFO [org.apereo.cas.mgmt.factory.FormDataFactory]
- https://casoverlay.vdc2.com.vn:8443/cas/actuator/discoveryProfile. Using
default FormData values.>
2020-08-25 06:56:07,754 INFO
[org.apereo.cas.mgmt.web.CasManagementWebApplication] - 
2020-08-25 06:56:09,008 INFO
[org.apereo.cas.services.AbstractServicesManager] - 
2020-08-25 06:56:09,009 INFO
[org.apereo.cas.mgmt.web.DefaultCasManagementEventListener] - <>
2020-08-25 06:56:09,015 INFO
[org.apereo.cas.mgmt.web.DefaultCasManagementEventListener] - <

  _  _     __   __
 |  _ \  | |/ \|  _ \  \ \ / /
 | |_) | |  _| / _ \   | | | |  \ V /
 |  _ <  | |___   / ___ \  | |_| |   | |
 |_| \_\ |_| /_/   \_\ |/|_|
2020-08-25 06:59:23,275 INFO
[org.apereo.cas.services.AbstractServicesManager] - 
2020-08-25 06:59:26,788 INFO
[org.apereo.cas.services.AbstractServicesManager] - 
2020-08-25 07:00:26,804 INFO
[org.apereo.cas.services.AbstractServicesManager] - 
2020-08-25 07:00:59,350 INFO
[org.apereo.cas.services.AbstractServicesManager] - 
2020-08-25 07:00:59,428 INFO
[org.apereo.cas.mgmt.controller.ServiceController] - 
2020-08-25 07:00:59,485 INFO
[org.apereo.cas.services.AbstractServicesManager] - 

I don't know what does it wrong?
P/s: here is my CAS config and CAS Management config
1. CAS
"name":"cas.service-registry.mongo.host","value":"203.162.141.22"
"name":"cas.service-registry.mongo.client-uri","value":"mongodb://
casuser:Mellon@203.162.141.22:27017/cas?authSource=admin=primary=MongoDB%20Compass%20Community=false
"
"name":"cas.service-registry.mongo.port","value":"27017"
"name":"cas.service-registry.mongo.password","value":"Mellon"
"name":"cas.service-registry.mongo.collection","value":"cas-service-registry"
"name":"cas.service-registry.mongo.database-name","value":"cas"
"name":"cas.service-registry.mongo.user-id","value":"casuser"
"name":"cas.service-registry.mongo.write-concern","value":"NORMAL"
"name":"cas.service-registry.mongo.ssl-enabled","value":"false"
"name":"cas.service-registry.watcher-enabled","value":"true"
"name":"cas.service-registry.mongo.drop-collection","value":"false"
2.CAS Management
"name":"cas.service-registry.mongo.host","value":"203.162.141.22"
"name":"cas.service-registry.mongo.client-uri","value":"mongodb://
casuser:Mellon@203.162.141.22:27017/cas?authSource=admin=primary=MongoDB%20Compass%20Community=false
"
"name":"cas.service-registry.mongo.port","value":"27017"
"name":"cas.service-registry.mongo.password","value":"Mellon"
"name":"cas.service-registry.mongo.collection","value":"cas-service-registry"
"name":"cas.service-registry.mongo.database-name","value":"cas"
"name":"cas.service-registry.mongo.user-id","value":"casuser"
"name":"cas.service-registry.mongo.ssl-enabled","value":"false"
"name":"cas.service-registry.mongo.drop-collection","value":"false"

Please help me.
Thank you.

Vào Th 3, 25 thg 8, 2020 vào lúc 19:35 David Curry <
david.cu...@newschool.edu> đã viết:

> You need to *turn off* the JSON registry in cas.properties so the server
> will stop using it, and put the mongodb settings into cas.properties (and
> management.properties) so the server will use it instead.
>
> These instructions are for CAS 5.2.x so might not be exactly right for CAS
> 6.x (property names might be slightly different, etc.) but it should give
> you the basic idea:
>
>
> https://dacurry-tns.github.io/deploying-apereo-cas/high-avail_service-registry_overview.html
>
>
>  --Dave
>
> --
>
> DAVID A. CURRY, CISSP
> *DIRECTOR • INFORMATION SECURITY & PRIVACY*
> THE NEW SCHOOL • INFORMATION TECHNOLOGY
>
> 71 FIFTH AVE., 9TH FL., NEW YORK, NY 10003
> +1 646 909-4728 • david.cu...@newschool.edu
>
>
> On Tue, Aug 25, 2020 at 8:21 AM Nguyen Tran Thanh Lam <
> 

Re: [cas-user] [Auto Reload CAS Server After Register New Service]

2020-08-25 Thread David Curry
You need to *turn off* the JSON registry in cas.properties so the server
will stop using it, and put the mongodb settings into cas.properties (and
management.properties) so the server will use it instead.

These instructions are for CAS 5.2.x so might not be exactly right for CAS
6.x (property names might be slightly different, etc.) but it should give
you the basic idea:

https://dacurry-tns.github.io/deploying-apereo-cas/high-avail_service-registry_overview.html


 --Dave

--

DAVID A. CURRY, CISSP
*DIRECTOR • INFORMATION SECURITY & PRIVACY*
THE NEW SCHOOL • INFORMATION TECHNOLOGY

71 FIFTH AVE., 9TH FL., NEW YORK, NY 10003
+1 646 909-4728 • david.cu...@newschool.edu


On Tue, Aug 25, 2020 at 8:21 AM Nguyen Tran Thanh Lam <
naphaluan211...@gmail.com> wrote:

> Hi Mr David Curry,
> I understand your point.
> But when I use CAS server, I want to register my new service, what should
> I do?
> I can use CAS Management Web app to register my new service but, it still
> only create a json file in directory /etc/cas/services-repo.
> I have tried to config my CAS Management Web to insert new register
> service directly to MongoDB, but it still didn't work.
> Please help me.
> Note: my CAS version is 6.2.1 and my CAS Management Overlay Web App is
> 6.1.2 (the newest version)
> Here is my CAS Mamagement Web App Configuration:
> 1. build.gradle
> compile "org.apereo.cas:cas-server-webapp-tomcat:${casMgmtServerVersion}"
> compile
> "org.apereo.cas:cas-server-support-configuration-cloud-mongo:${casMgmtServerVersion}"
> compile "org.apereo.cas:cas-server-support-mongo:${casMgmtServerVersion}"
> compile
> "org.apereo.cas:cas-server-support-mongo-service-registry:${casMgmtServerVersion}"
> 2. Cas Management Global config in MongoDB
> "name":"cas.server.name","value":"https://casoverlay.vdc2.com.vn:8443;
> "name":"cas.server.prefix","value":"${cas.server.name}/cas"
> "name":"mgmt.serverName","value":"https://casoverlay.vdc2.com.vn:8088;
> "name":"mgmt.adminRoles[0]","value":"ROLE_ADMIN"
> "name":"mgmt.userPropertiesFile","value":"file:/etc/cas/config/users.json"
> "name":"mgmt.userRoles[0]","value":"ROLE_USER"
> "name":"spring.thymeleaf.mode","value":"HTML"
> "name":"server.port","value":"8088"
> "name":"server.ssl.enabled","value":"true"}
> "name":"server.ssl.keyStore","value":"file:/etc/cas/thekeystore"
> "name":"server.ssl.keyStorePassword","value":"changeit"
> "name":"server.ssl.keyPassword","value":"changeit"
> "name":"cas.service-registry.mongo.host","value":"203.162.141.22"
> "name":"cas.service-registry.mongo.client-uri","value":"mongodb://
> casuser:Mellon@203.162.141.22:27017/cas?authSource=admin=primary=MongoDB%20Compass%20Community=false
> "
> "name":"cas.service-registry.mongo.port","value":"27017"
> "name":"cas.service-registry.mongo.password","value":"Mellon"
>
> "name":"cas.service-registry.mongo.collection","value":"cas-service-registry"
> "name":"cas.service-registry.mongo.database-name","value":"cas"
> "name":"cas.service-registry.mongo.user-id","value":"casuser"
> "name":"cas.service-registry.mongo.ssl-enabled","value":"false"
> "name":"cas.service-registry.mongo.drop-collection","value":"false"
> Please help me.
> Thank you in advance.
>
> Vào Th 3, 25 thg 8, 2020 vào lúc 19:00 David Curry <
> david.cu...@newschool.edu> đã viết:
>
>> It doesn't do that because it's not supposed to.
>>
>> Populating an alternate service registry (MongoDB or whatever) from the
>> JSON files is a one-time thing the server does to help you "bootstrap" the
>> alternate service registry. After that, you don't need the JSON files any
>> more (and should turn that registry off). You use the cas-management
>> application to manage the service registry from that point forward.
>>
>>
>> --
>>
>> DAVID A. CURRY, CISSP
>> *DIRECTOR • INFORMATION SECURITY & PRIVACY*
>> THE NEW SCHOOL • INFORMATION TECHNOLOGY
>>
>> 71 FIFTH AVE., 9TH FL., NEW YORK, NY 10003
>> +1 646 909-4728 • david.cu...@newschool.edu
>>
>>
>> On Tue, Aug 25, 2020 at 5:46 AM Napoleon Ponaparte <
>> naphaluan211...@gmail.com> wrote:
>>
>>>
>>> I am successful store service registry in MongoDB, but I have a trouble
>>> in there.
>>>
>>> If I register new service store in  directory /etc/cas/services-repo,
>>> CAS server didn't auto store this service to MongoDB. I must restart CAS to
>>> do this.
>>>
>>> So, How could config CAS auto restart to load new service registry to
>>> MongoDB?
>>>
>>> Note: My CAS server at version 6.2.x.
>>>
>>> Thank you in advance.
>>>
>>> --
>>> - 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
>>> 

Re: [cas-user] [Auto Reload CAS Server After Register New Service]

2020-08-25 Thread Nguyen Tran Thanh Lam
Hi Mr David Curry,
I understand your point.
But when I use CAS server, I want to register my new service, what should I
do?
I can use CAS Management Web app to register my new service but, it still
only create a json file in directory /etc/cas/services-repo.
I have tried to config my CAS Management Web to insert new register service
directly to MongoDB, but it still didn't work.
Please help me.
Note: my CAS version is 6.2.1 and my CAS Management Overlay Web App is
6.1.2 (the newest version)
Here is my CAS Mamagement Web App Configuration:
1. build.gradle
compile "org.apereo.cas:cas-server-webapp-tomcat:${casMgmtServerVersion}"
compile
"org.apereo.cas:cas-server-support-configuration-cloud-mongo:${casMgmtServerVersion}"
compile "org.apereo.cas:cas-server-support-mongo:${casMgmtServerVersion}"
compile
"org.apereo.cas:cas-server-support-mongo-service-registry:${casMgmtServerVersion}"
2. Cas Management Global config in MongoDB
"name":"cas.server.name","value":"https://casoverlay.vdc2.com.vn:8443;
"name":"cas.server.prefix","value":"${cas.server.name}/cas"
"name":"mgmt.serverName","value":"https://casoverlay.vdc2.com.vn:8088;
"name":"mgmt.adminRoles[0]","value":"ROLE_ADMIN"
"name":"mgmt.userPropertiesFile","value":"file:/etc/cas/config/users.json"
"name":"mgmt.userRoles[0]","value":"ROLE_USER"
"name":"spring.thymeleaf.mode","value":"HTML"
"name":"server.port","value":"8088"
"name":"server.ssl.enabled","value":"true"}
"name":"server.ssl.keyStore","value":"file:/etc/cas/thekeystore"
"name":"server.ssl.keyStorePassword","value":"changeit"
"name":"server.ssl.keyPassword","value":"changeit"
"name":"cas.service-registry.mongo.host","value":"203.162.141.22"
"name":"cas.service-registry.mongo.client-uri","value":"mongodb://
casuser:Mellon@203.162.141.22:27017/cas?authSource=admin=primary=MongoDB%20Compass%20Community=false
"
"name":"cas.service-registry.mongo.port","value":"27017"
"name":"cas.service-registry.mongo.password","value":"Mellon"
"name":"cas.service-registry.mongo.collection","value":"cas-service-registry"
"name":"cas.service-registry.mongo.database-name","value":"cas"
"name":"cas.service-registry.mongo.user-id","value":"casuser"
"name":"cas.service-registry.mongo.ssl-enabled","value":"false"
"name":"cas.service-registry.mongo.drop-collection","value":"false"
Please help me.
Thank you in advance.

Vào Th 3, 25 thg 8, 2020 vào lúc 19:00 David Curry <
david.cu...@newschool.edu> đã viết:

> It doesn't do that because it's not supposed to.
>
> Populating an alternate service registry (MongoDB or whatever) from the
> JSON files is a one-time thing the server does to help you "bootstrap" the
> alternate service registry. After that, you don't need the JSON files any
> more (and should turn that registry off). You use the cas-management
> application to manage the service registry from that point forward.
>
>
> --
>
> DAVID A. CURRY, CISSP
> *DIRECTOR • INFORMATION SECURITY & PRIVACY*
> THE NEW SCHOOL • INFORMATION TECHNOLOGY
>
> 71 FIFTH AVE., 9TH FL., NEW YORK, NY 10003
> +1 646 909-4728 • david.cu...@newschool.edu
>
>
> On Tue, Aug 25, 2020 at 5:46 AM Napoleon Ponaparte <
> naphaluan211...@gmail.com> wrote:
>
>>
>> I am successful store service registry in MongoDB, but I have a trouble
>> in there.
>>
>> If I register new service store in  directory /etc/cas/services-repo, CAS
>> server didn't auto store this service to MongoDB. I must restart CAS to do
>> this.
>>
>> So, How could config CAS auto restart to load new service registry to
>> MongoDB?
>>
>> Note: My CAS server at version 6.2.x.
>>
>> Thank you in advance.
>>
>> --
>> - 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/bbb8c8b6-a16e-4e94-88e3-74e2dd80a934n%40apereo.org
>> 
>> .
>>
> --
> - 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/CA%2Bd9XAOimF2-vHL-13Uj0vs98gcxpzZPQh%2Be1r4sUBBY_hYxvg%40mail.gmail.com
> 

Re: [cas-user] [Auto Reload CAS Server After Register New Service]

2020-08-25 Thread David Curry
It doesn't do that because it's not supposed to.

Populating an alternate service registry (MongoDB or whatever) from the
JSON files is a one-time thing the server does to help you "bootstrap" the
alternate service registry. After that, you don't need the JSON files any
more (and should turn that registry off). You use the cas-management
application to manage the service registry from that point forward.


--

DAVID A. CURRY, CISSP
*DIRECTOR • INFORMATION SECURITY & PRIVACY*
THE NEW SCHOOL • INFORMATION TECHNOLOGY

71 FIFTH AVE., 9TH FL., NEW YORK, NY 10003
+1 646 909-4728 • david.cu...@newschool.edu


On Tue, Aug 25, 2020 at 5:46 AM Napoleon Ponaparte <
naphaluan211...@gmail.com> wrote:

>
> I am successful store service registry in MongoDB, but I have a trouble in
> there.
>
> If I register new service store in  directory /etc/cas/services-repo, CAS
> server didn't auto store this service to MongoDB. I must restart CAS to do
> this.
>
> So, How could config CAS auto restart to load new service registry to
> MongoDB?
>
> Note: My CAS server at version 6.2.x.
>
> Thank you in advance.
>
> --
> - 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/bbb8c8b6-a16e-4e94-88e3-74e2dd80a934n%40apereo.org
> 
> .
>

-- 
- 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/CA%2Bd9XAOimF2-vHL-13Uj0vs98gcxpzZPQh%2Be1r4sUBBY_hYxvg%40mail.gmail.com.


[cas-user] [Auto Reload CAS Server After Register New Service]

2020-08-25 Thread Napoleon Ponaparte

I am successful store service registry in MongoDB, but I have a trouble in 
there.

If I register new service store in  directory /etc/cas/services-repo, CAS 
server didn't auto store this service to MongoDB. I must restart CAS to do 
this.

So, How could config CAS auto restart to load new service registry to 
MongoDB?

Note: My CAS server at version 6.2.x.

Thank you in advance.

-- 
- 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/bbb8c8b6-a16e-4e94-88e3-74e2dd80a934n%40apereo.org.