Re: [cas-user] Re: Service Registry - Store in MySQL database

2020-03-26 Thread Mathieu HETRU
you are welcome :)

Sincerly,

Mathieu

Le jeu. 26 mars 2020 à 11:42, Bob  a écrit :

> Thank you very much Mathieu!
>
> That workaround fixed it for me and I now have CAS Management (6.1.0-RC4)
> saving the services in the MySQL database.
> Much appreciated!
> Regards,
>
> Bob
>
>
> On Tuesday, March 24, 2020 at 5:13:09 PM UTC+1, Mathieu HETRU wrote:
>>
>> hello Bob,
>> i have the solution : remove the git feature from the war file (produced
>> by gradlew) in order to cas-management 6.1.x works fine :
>>
>> add this line in the build.gradle (in the bootWar step) :
>> ---
>> excludes = ["**/cas-mgmt-config-version-control*.jar",
>> "**/cas-mgmt-config-delegated*.jar", "**/HikariCP-java7-2.4.13.jar"]
>> ---
>>
>> Sincerly,
>>
>> Mathieu
>>
>> Le mar. 24 mars 2020 à 16:04, Bob  a écrit :
>>
>>> Thanks Mathieu,
>>>
>>> I tried that also but never could get cas-management 6.1.x working (it
>>> kept using the built-in git repo, despite having properties set not to use
>>> that) with the MySQL data.
>>> Finally I gave up on cas-management and have used the workaround from
>>> Michele instead.
>>> Thanks,
>>>
>>> Bob
>>>
>>>
>>> On Monday, March 23, 2020 at 4:06:08 PM UTC+1, Mathieu HETRU wrote:

 Hello Bob,

 You should install cas-management web interface because the service
 entry in the db got java objects serialized in the db blob fields in the db
 tables.

 I have not use the initFromJson feature.

 Sincerly,

 Mathieu

 Le mardi 28 janvier 2020 12:50:54 UTC+1, Bob a écrit :
>
> Hello,
>
> We are upgrading to CAS 6.1.x.
> Most things seem to work fine (LDAP and reading Service Registry from
> json file) but we cannot get it to save the Service Registry in a MySQL
> casdb.
> Is there a way to manually enter a Service Registry into a MySQL
> database?
>
> Running CAS has created 3 tables in our MySQL database:
>
> regex_registered_service
> regex_registered_service_regex_registered_service_property
> regex_registered_service_registered_service_impl_contact
>
>
> Table regex_registered_service has the following columns:
>
> +--+
> | COLUMN_NAME  |
> +--+
> | access_strategy  |
> | attribute_release|
> | description  |
> | environments |
> | evaluation_order |
> | expiration_policy|
> | expression_type  |
> | id   |
> | information_Url  |
> | logo |
> | logout_type  |
> | logout_url   |
> | mfa_policy   |
> | name |
> | privacy_Url  |
> | proxy_policy |
> | proxy_ticket_expiration_policy   |
> | public_key   |
> | required_handlers|
> | response_Type|
> | service_Id   |
> | service_ticket_expiration_policy |
> | sso_participation_policy |
> | theme|
> | username_attr|
> +--+
> 25 rows in set (0.00 sec)
>
> How would I get the following json into this table?
>
> {
>   "@class" : "org.apereo.cas.services.RegexRegisteredService",
>   "serviceId" : "https://localhost:9000/dashboard;,
>   "name" : "My App",
>   "id" : 10001000,
>   "description" : "My Dashboard App",
>   "attributeReleasePolicy" : {
> "@class" :
> "org.apereo.cas.services.ReturnMappedAttributeReleasePolicy",
> "allowedAttributes" : {
>   "@class" : "java.util.TreeMap",
>   "memberOf" : "authorities"
> }
>   },
>   "evaluationOrder" : 100,
>   "accessStrategy" : {
> "@class" :
> "org.apereo.cas.services.DefaultRegisteredServiceAccessStrategy",
> "enabled" : true,
> "ssoEnabled" : true
>   }
> }
>
> Thanks in advance!
>
> Bob
>
 --
>>> - 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-...@apereo.org.
>>> To view this discussion on the web visit
>>> https://groups.google.com/a/apereo.org/d/msgid/cas-user/85c1a43d-a4b1-4d91-9106-3ed8a4e9d92d%40apereo.org
>>> 

Re: [cas-user] Re: Service Registry - Store in MySQL database

2020-03-26 Thread Bob
Thank you very much Mathieu!

That workaround fixed it for me and I now have CAS Management (6.1.0-RC4) 
saving the services in the MySQL database.
Much appreciated!
Regards,

Bob


On Tuesday, March 24, 2020 at 5:13:09 PM UTC+1, Mathieu HETRU wrote:
>
> hello Bob,
> i have the solution : remove the git feature from the war file (produced 
> by gradlew) in order to cas-management 6.1.x works fine :
>
> add this line in the build.gradle (in the bootWar step) :
> ---
> excludes = ["**/cas-mgmt-config-version-control*.jar", 
> "**/cas-mgmt-config-delegated*.jar", "**/HikariCP-java7-2.4.13.jar"]
> ---
>
> Sincerly,
>
> Mathieu
>
> Le mar. 24 mars 2020 à 16:04, Bob > a 
> écrit :
>
>> Thanks Mathieu,
>>
>> I tried that also but never could get cas-management 6.1.x working (it 
>> kept using the built-in git repo, despite having properties set not to use 
>> that) with the MySQL data.
>> Finally I gave up on cas-management and have used the workaround from 
>> Michele instead.
>> Thanks,
>>
>> Bob
>>
>>
>> On Monday, March 23, 2020 at 4:06:08 PM UTC+1, Mathieu HETRU wrote:
>>>
>>> Hello Bob,
>>>
>>> You should install cas-management web interface because the service 
>>> entry in the db got java objects serialized in the db blob fields in the db 
>>> tables.
>>>
>>> I have not use the initFromJson feature.
>>>
>>> Sincerly,
>>>
>>> Mathieu
>>>
>>> Le mardi 28 janvier 2020 12:50:54 UTC+1, Bob a écrit :

 Hello,

 We are upgrading to CAS 6.1.x.
 Most things seem to work fine (LDAP and reading Service Registry from 
 json file) but we cannot get it to save the Service Registry in a MySQL 
 casdb.
 Is there a way to manually enter a Service Registry into a MySQL 
 database?

 Running CAS has created 3 tables in our MySQL database:

 regex_registered_service
 regex_registered_service_regex_registered_service_property
 regex_registered_service_registered_service_impl_contact


 Table regex_registered_service has the following columns:

 +--+
 | COLUMN_NAME  |
 +--+
 | access_strategy  |
 | attribute_release|
 | description  |
 | environments |
 | evaluation_order |
 | expiration_policy|
 | expression_type  |
 | id   |
 | information_Url  |
 | logo |
 | logout_type  |
 | logout_url   |
 | mfa_policy   |
 | name |
 | privacy_Url  |
 | proxy_policy |
 | proxy_ticket_expiration_policy   |
 | public_key   |
 | required_handlers|
 | response_Type|
 | service_Id   |
 | service_ticket_expiration_policy |
 | sso_participation_policy |
 | theme|
 | username_attr|
 +--+
 25 rows in set (0.00 sec)

 How would I get the following json into this table?

 {
   "@class" : "org.apereo.cas.services.RegexRegisteredService",
   "serviceId" : "https://localhost:9000/dashboard;,
   "name" : "My App",
   "id" : 10001000,
   "description" : "My Dashboard App",
   "attributeReleasePolicy" : {
 "@class" : 
 "org.apereo.cas.services.ReturnMappedAttributeReleasePolicy",
 "allowedAttributes" : {
   "@class" : "java.util.TreeMap",
   "memberOf" : "authorities"
 }
   },
   "evaluationOrder" : 100,
   "accessStrategy" : {
 "@class" : 
 "org.apereo.cas.services.DefaultRegisteredServiceAccessStrategy",
 "enabled" : true,
 "ssoEnabled" : true
   }
 }

 Thanks in advance!

 Bob

>>> -- 
>> - 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-...@apereo.org .
>> To view this discussion on the web visit 
>> https://groups.google.com/a/apereo.org/d/msgid/cas-user/85c1a43d-a4b1-4d91-9106-3ed8a4e9d92d%40apereo.org
>>  
>> 
>> .
>>
>

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: 

Re: [cas-user] Re: Service Registry - Store in MySQL database

2020-03-25 Thread Mathieu HETRU
Hello,

The next step is to configure which service store registry you want use :
- json
- jpa

You just need to install the dependencies gradle (compile and deploy) and key 
config in the properties file.

Mathieu


> Le 25 mars 2020 à 03:21, Nguyen Tran Thanh Lam  a 
> écrit :
> 
> 
> Dear Mr Mathieu HETRU
> I have tried your solution, It's working fine but the service seem store 
> temporary on RAM.
> It doesn't write to directory (/etc/cas/services-repo) or database.
> This lead to service will disappear when I restart cas-management.
> Thanks
> 
> Vào Th 3, 24 thg 3, 2020 vào lúc 23:13 Mathieu HETRU  
> đã viết:
>> hello Bob,
>> i have the solution : remove the git feature from the war file (produced by 
>> gradlew) in order to cas-management 6.1.x works fine :
>> 
>> add this line in the build.gradle (in the bootWar step) :
>> ---
>> excludes = ["**/cas-mgmt-config-version-control*.jar", 
>> "**/cas-mgmt-config-delegated*.jar", "**/HikariCP-java7-2.4.13.jar"]
>> ---
>> 
>> Sincerly,
>> 
>> Mathieu
>> 
>>> Le mar. 24 mars 2020 à 16:04, Bob  a écrit :
>>> Thanks Mathieu,
>>> 
>>> I tried that also but never could get cas-management 6.1.x working (it kept 
>>> using the built-in git repo, despite having properties set not to use that) 
>>> with the MySQL data.
>>> Finally I gave up on cas-management and have used the workaround from 
>>> Michele instead.
>>> Thanks,
>>> 
>>> Bob
>>> 
>>> 
 On Monday, March 23, 2020 at 4:06:08 PM UTC+1, Mathieu HETRU wrote:
 Hello Bob,
 
 You should install cas-management web interface because the service entry 
 in the db got java objects serialized in the db blob fields in the db 
 tables.
 
 I have not use the initFromJson feature.
 
 Sincerly,
 
 Mathieu
 
 Le mardi 28 janvier 2020 12:50:54 UTC+1, Bob a écrit :
> 
> Hello,
> 
> We are upgrading to CAS 6.1.x.
> Most things seem to work fine (LDAP and reading Service Registry from 
> json file) but we cannot get it to save the Service Registry in a MySQL 
> casdb.
> Is there a way to manually enter a Service Registry into a MySQL database?
> 
> Running CAS has created 3 tables in our MySQL database:
> 
> regex_registered_service
> regex_registered_service_regex_registered_service_property
> regex_registered_service_registered_service_impl_contact
> 
> Table regex_registered_service has the following columns:
> 
> +--+
> | COLUMN_NAME  |
> +--+
> | access_strategy  |
> | attribute_release|
> | description  |
> | environments |
> | evaluation_order |
> | expiration_policy|
> | expression_type  |
> | id   |
> | information_Url  |
> | logo |
> | logout_type  |
> | logout_url   |
> | mfa_policy   |
> | name |
> | privacy_Url  |
> | proxy_policy |
> | proxy_ticket_expiration_policy   |
> | public_key   |
> | required_handlers|
> | response_Type|
> | service_Id   |
> | service_ticket_expiration_policy |
> | sso_participation_policy |
> | theme|
> | username_attr|
> +--+
> 25 rows in set (0.00 sec)
> 
> How would I get the following json into this table?
> 
> {
>   "@class" : "org.apereo.cas.services.RegexRegisteredService",
>   "serviceId" : "https://localhost:9000/dashboard;,
>   "name" : "My App",
>   "id" : 10001000,
>   "description" : "My Dashboard App",
>   "attributeReleasePolicy" : {
> "@class" : 
> "org.apereo.cas.services.ReturnMappedAttributeReleasePolicy",
> "allowedAttributes" : {
>   "@class" : "java.util.TreeMap",
>   "memberOf" : "authorities"
> }
>   },
>   "evaluationOrder" : 100,
>   "accessStrategy" : {
> "@class" : 
> "org.apereo.cas.services.DefaultRegisteredServiceAccessStrategy",
> "enabled" : true,
> "ssoEnabled" : true
>   }
> }
> 
> Thanks in advance!
> 
> Bob
>>> 
>>> -- 
>>> - 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 

Re: [cas-user] Re: Service Registry - Store in MySQL database

2020-03-24 Thread Nguyen Tran Thanh Lam
Dear Mr Mathieu HETRU
I have tried your solution, It's working fine but the service seem store
temporary on RAM.
It doesn't write to directory (/etc/cas/services-repo) or database.
This lead to service will disappear when I restart cas-management.
Thanks

Vào Th 3, 24 thg 3, 2020 vào lúc 23:13 Mathieu HETRU 
đã viết:

> hello Bob,
> i have the solution : remove the git feature from the war file (produced
> by gradlew) in order to cas-management 6.1.x works fine :
>
> add this line in the build.gradle (in the bootWar step) :
> ---
> excludes = ["**/cas-mgmt-config-version-control*.jar",
> "**/cas-mgmt-config-delegated*.jar", "**/HikariCP-java7-2.4.13.jar"]
> ---
>
> Sincerly,
>
> Mathieu
>
> Le mar. 24 mars 2020 à 16:04, Bob  a écrit :
>
>> Thanks Mathieu,
>>
>> I tried that also but never could get cas-management 6.1.x working (it
>> kept using the built-in git repo, despite having properties set not to use
>> that) with the MySQL data.
>> Finally I gave up on cas-management and have used the workaround from
>> Michele instead.
>> Thanks,
>>
>> Bob
>>
>>
>> On Monday, March 23, 2020 at 4:06:08 PM UTC+1, Mathieu HETRU wrote:
>>>
>>> Hello Bob,
>>>
>>> You should install cas-management web interface because the service
>>> entry in the db got java objects serialized in the db blob fields in the db
>>> tables.
>>>
>>> I have not use the initFromJson feature.
>>>
>>> Sincerly,
>>>
>>> Mathieu
>>>
>>> Le mardi 28 janvier 2020 12:50:54 UTC+1, Bob a écrit :

 Hello,

 We are upgrading to CAS 6.1.x.
 Most things seem to work fine (LDAP and reading Service Registry from
 json file) but we cannot get it to save the Service Registry in a MySQL
 casdb.
 Is there a way to manually enter a Service Registry into a MySQL
 database?

 Running CAS has created 3 tables in our MySQL database:

 regex_registered_service
 regex_registered_service_regex_registered_service_property
 regex_registered_service_registered_service_impl_contact


 Table regex_registered_service has the following columns:

 +--+
 | COLUMN_NAME  |
 +--+
 | access_strategy  |
 | attribute_release|
 | description  |
 | environments |
 | evaluation_order |
 | expiration_policy|
 | expression_type  |
 | id   |
 | information_Url  |
 | logo |
 | logout_type  |
 | logout_url   |
 | mfa_policy   |
 | name |
 | privacy_Url  |
 | proxy_policy |
 | proxy_ticket_expiration_policy   |
 | public_key   |
 | required_handlers|
 | response_Type|
 | service_Id   |
 | service_ticket_expiration_policy |
 | sso_participation_policy |
 | theme|
 | username_attr|
 +--+
 25 rows in set (0.00 sec)

 How would I get the following json into this table?

 {
   "@class" : "org.apereo.cas.services.RegexRegisteredService",
   "serviceId" : "https://localhost:9000/dashboard;,
   "name" : "My App",
   "id" : 10001000,
   "description" : "My Dashboard App",
   "attributeReleasePolicy" : {
 "@class" :
 "org.apereo.cas.services.ReturnMappedAttributeReleasePolicy",
 "allowedAttributes" : {
   "@class" : "java.util.TreeMap",
   "memberOf" : "authorities"
 }
   },
   "evaluationOrder" : 100,
   "accessStrategy" : {
 "@class" :
 "org.apereo.cas.services.DefaultRegisteredServiceAccessStrategy",
 "enabled" : true,
 "ssoEnabled" : true
   }
 }

 Thanks in advance!

 Bob

>>> --
>> - 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/85c1a43d-a4b1-4d91-9106-3ed8a4e9d92d%40apereo.org
>> 
>> .
>>
> --
> - Website: https://apereo.github.io/cas
> - Gitter Chatroom: https://gitter.im/apereo/cas
> - List Guidelines: 

Re: [cas-user] Re: Service Registry - Store in MySQL database

2020-03-24 Thread Mathieu HETRU
hello Bob,
i have the solution : remove the git feature from the war file (produced by
gradlew) in order to cas-management 6.1.x works fine :

add this line in the build.gradle (in the bootWar step) :
---
excludes = ["**/cas-mgmt-config-version-control*.jar",
"**/cas-mgmt-config-delegated*.jar", "**/HikariCP-java7-2.4.13.jar"]
---

Sincerly,

Mathieu

Le mar. 24 mars 2020 à 16:04, Bob  a écrit :

> Thanks Mathieu,
>
> I tried that also but never could get cas-management 6.1.x working (it
> kept using the built-in git repo, despite having properties set not to use
> that) with the MySQL data.
> Finally I gave up on cas-management and have used the workaround from
> Michele instead.
> Thanks,
>
> Bob
>
>
> On Monday, March 23, 2020 at 4:06:08 PM UTC+1, Mathieu HETRU wrote:
>>
>> Hello Bob,
>>
>> You should install cas-management web interface because the service entry
>> in the db got java objects serialized in the db blob fields in the db
>> tables.
>>
>> I have not use the initFromJson feature.
>>
>> Sincerly,
>>
>> Mathieu
>>
>> Le mardi 28 janvier 2020 12:50:54 UTC+1, Bob a écrit :
>>>
>>> Hello,
>>>
>>> We are upgrading to CAS 6.1.x.
>>> Most things seem to work fine (LDAP and reading Service Registry from
>>> json file) but we cannot get it to save the Service Registry in a MySQL
>>> casdb.
>>> Is there a way to manually enter a Service Registry into a MySQL
>>> database?
>>>
>>> Running CAS has created 3 tables in our MySQL database:
>>>
>>> regex_registered_service
>>> regex_registered_service_regex_registered_service_property
>>> regex_registered_service_registered_service_impl_contact
>>>
>>>
>>> Table regex_registered_service has the following columns:
>>>
>>> +--+
>>> | COLUMN_NAME  |
>>> +--+
>>> | access_strategy  |
>>> | attribute_release|
>>> | description  |
>>> | environments |
>>> | evaluation_order |
>>> | expiration_policy|
>>> | expression_type  |
>>> | id   |
>>> | information_Url  |
>>> | logo |
>>> | logout_type  |
>>> | logout_url   |
>>> | mfa_policy   |
>>> | name |
>>> | privacy_Url  |
>>> | proxy_policy |
>>> | proxy_ticket_expiration_policy   |
>>> | public_key   |
>>> | required_handlers|
>>> | response_Type|
>>> | service_Id   |
>>> | service_ticket_expiration_policy |
>>> | sso_participation_policy |
>>> | theme|
>>> | username_attr|
>>> +--+
>>> 25 rows in set (0.00 sec)
>>>
>>> How would I get the following json into this table?
>>>
>>> {
>>>   "@class" : "org.apereo.cas.services.RegexRegisteredService",
>>>   "serviceId" : "https://localhost:9000/dashboard;,
>>>   "name" : "My App",
>>>   "id" : 10001000,
>>>   "description" : "My Dashboard App",
>>>   "attributeReleasePolicy" : {
>>> "@class" :
>>> "org.apereo.cas.services.ReturnMappedAttributeReleasePolicy",
>>> "allowedAttributes" : {
>>>   "@class" : "java.util.TreeMap",
>>>   "memberOf" : "authorities"
>>> }
>>>   },
>>>   "evaluationOrder" : 100,
>>>   "accessStrategy" : {
>>> "@class" :
>>> "org.apereo.cas.services.DefaultRegisteredServiceAccessStrategy",
>>> "enabled" : true,
>>> "ssoEnabled" : true
>>>   }
>>> }
>>>
>>> Thanks in advance!
>>>
>>> Bob
>>>
>> --
> - 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/85c1a43d-a4b1-4d91-9106-3ed8a4e9d92d%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/CAHNwO5maybN1prurCk8g73_PbEVpk8tDQnVgbKfeXTmAZDdk5g%40mail.gmail.com.