Our JPA service registries for 5.2 and 6.5 are both in an Oracle database; separate schemas.
After a lot of back and forth, I ended up reverse-engineering the 5.2 field structure and exported just the bits that we needed as JSON fields to the 6.5 database.
The following SQL does the translation we needed. You might need to tweak it a bit to do what you need:
insert into registered_services
select
ID,
'{"@class":"org.apereo.cas.services.RegexRegisteredService","serviceId":"' || SERVICEID || '","name":"' || NAME || '","id":' || ID || ',"description":"' || DESCRIPTION || '","theme":"ubc_cas","proxyTicketExpirationPolicy":{"@class":"org.apereo.cas.services.DefaultRegisteredServiceProxyTicketExpirationPolicy"},"serviceTicketExpirationPolicy":{"@class":"org.apereo.cas.services.DefaultRegisteredServiceServiceTicketExpirationPolicy"},"singleSignOnParticipationPolicy":{"@class":"org.apereo.cas.services.ChainingRegisteredServiceSingleSignOnParticipationPolicy"},"evaluationOrder":' || EVALUATION_ORDER || ',"singleSignOnParticipationPolicy":{"@class":"org.apereo.cas.services.ChainingRegisteredServiceSingleSignOnParticipationPolicy"},"multifactorPolicy":{"@class":"org.apereo.cas.services.DefaultRegisteredServiceMultifactorPolicy","multifactorAuthenticationProviders":["java.util.HashSet",["mfa-duo"]],"failureMode":"OPEN"'
||
case when regexp_like(to_char(MFA_POLICY), '^.*bypassEnabled.*principalAttributeValueToMatchq[[:cntrl:]]~[[:cntrl:]][[:cntrl:]]xp' || chr(1) || '.*$') then
',"bypassEnabled":true'
--''
else
''
end
|| '},"attributeReleasePolicy":{"@class":"org.apereo.cas.services.ReturnAllowedAttributeReleasePolicy","allowedAttributes":["java.util.ArrayList",[' ||
case when length(substr(ATTRIBUTE_RELEASE, instr(ATTRIBUTE_RELEASE, 'w' || chr(4) || chr(0) || chr(0) || chr(0))+5))=2 then
''
else
regexp_replace(regexp_replace(regexp_replace(substr(ATTRIBUTE_RELEASE, instr(ATTRIBUTE_RELEASE, 'w' || chr(4) || chr(0) || chr(0) || chr(0))+5), 't[[:cntrl:]][[:cntrl:]]', '","'), '^' || chr(9) || '",'), '.$') || '"'
end
|| ']]}}' as body,
EVALUATION_ORDER,
0 as EVALUATION_PRIORITY,
NAME,
SERVICEID
from cas5_auth.REGEXREGISTEREDSERVICE
Note that "org.apereo.cas.services.RegexRegisteredService" will become deprecated after 6.6.x so you may need to find out what the replacement will be. Currently 6.6.x doesn't work for me as I also get the "InvalidTicket" errors that someone else noted.
Thanks,
Trev