CAS registry migration

43 views
Skip to first unread message

Jeffrey Ramsay

unread,
Dec 14, 2021, 8:28:55 AM12/14/21
to CAS Community, cas...@apereo.org
Hello -

What is the process for migrating the service registry from CAS 6.2 to 6.4? I have used the service endpoints to export the 6.2 registry and then tried to import into the new 6.4 system registry and that fails. Placing the exported json files in the services area fails as shown below -- and this is not the only error; removing the failed section leads to another very similar message.

2021-12-14 07:38:12,198 ERROR [org.apereo.cas.util.serialization.AbstractJacksonBackedStringSerializer] - <Cannot read/parse [{"@class":"org.apereo.cas.services.OidcRegisteredService","serviceId":"https://b....edu:6129/bprep/apex...] to deserialize into type [interface org.apereo.cas.services.RegisteredService]. This may be caused in the absence of a configuration/support module that knows how to interpret the fragment, specially if the fragment describes a CAS registered service definition. Internal parsing error is [Cannot deserialize value of type `org.apereo.cas.configuration.model.core.authentication.PrincipalAttributesCoreProperties$MergingStrategyTypes` from String "replace": not one of the values accepted for Enum class: [NONE, ADD, MULTIVALUED, REPLACE]
 at [Source: (String)"{"@class":"org.apereo.cas.services.OidcRegisteredService","serviceId":"https://b.....edu:6129/bprep/apex_authentication.callback","name":"Butternut - OAuth Client","id":24,"description":"Butternut - OAuth Client","expirationPolicy":{"@class":"org.apereo.cas.services.DefaultRegisteredServiceExpirationPolicy","deleteWhenExpired":false,"notifyWhenDeleted":false,"notifyWhenExpired":false},"acceptableUsagePolicy":{"@class":"org.apereo.cas.services.DefaultRegisteredServiceAcceptableU"[truncated 4324 chars]; line: 1, column: 2036] (through reference chain: org.apereo.cas.services.OidcRegisteredService["attributeReleasePolicy"]->org.apereo.cas.services.ChainingAttributeReleasePolicy["mergingPolicy"])]>

You can point the 6.4 system to the 6.2 database; however, the registry data are in two different tables, so what are we supposed to do?

The 6.2 system uses the MySQL table regex_registered_service and 6.4 uses registered_services. I have hundreds of services to manually re add unless I want to strp all but the first six lines from every json file and then modify each using the management service.


-Jeff


 

David Gelhar

unread,
Dec 14, 2021, 9:05:50 AM12/14/21
to Jeffrey Ramsay, CAS Community, cas...@apereo.org
That message might mean that you're missing the OIDC dependency in your build.gradle

Make sure you have something like

    implementation "org.apereo.cas:cas-server-support-oidc:${project.'cas.version'}"


--
You received this message because you are subscribed to the Google Groups "CAS Developer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-dev+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-dev/CA%2BTBYOQ0PsvRbcY1Wdv2JPiiJ3dBno7JTbm7%3D%2Bj%3DWXJid6ZjpQ%40mail.gmail.com.

Jeffrey J Ramsay

unread,
Dec 14, 2021, 9:23:41 AM12/14/21
to David Gelhar, Jeffrey Ramsay, CAS Community, cas...@apereo.org
Yep, that's included. I only showed the oidc entry but this is occurring for all json objects exported from 6.2.

Thanks,
-Jeff

David Gelhar

unread,
Dec 14, 2021, 10:15:58 PM12/14/21
to CAS Community, David Gelhar, CAS Community, cas...@apereo.org, jeffrey...@gmail.com

Ok, I just read the error message more carefully...

Cannot deserialize value of type `org.apereo.cas.configuration.model.core.authentication.PrincipalAttributesCoreProperties$MergingStrategyTypes` from String "replace": not one of the values accepted for Enum class: [NONE, ADD, MULTIVALUED, REPLACE]


With 6.4, CAS seems to have become more picky about requiring the "MergingStrategy" values to be in uppercase. We ran into the same problem; solution was to change  "mergingPolicy": "replace" to "mergingPolicy": "REPLACE" everywhere.

Jeffrey Ramsay

unread,
Dec 14, 2021, 10:46:39 PM12/14/21
to David Gelhar, CAS Community, cas...@apereo.org
David,

Thanks for your suggestion, I will give it a try.

Thanks again,
-Jeff
Reply all
Reply to author
Forward
0 new messages