Disable loading of default services into registry on cas-management 6.6.3 server startup

32 views
Skip to first unread message

martin....@springer.com

unread,
Aug 26, 2023, 10:03:44 AM8/26/23
to CAS Community
Hello,

I am using mongodb service registry, cas-management version 6.6.3 with cas version 6.6.10.
On startup cas-management server inserts 2 JSON files into the service registry: 

 Apereo-10000002.json and 
 HTTPSandIMAPS-10000001.json

It seems they are packaged within the overlay and there is no obvious way of keeping cas-management server from doing this. I do not want a general  serviceId  like ^(https|imaps)://.*  to exist at all and maybe actually get selected in the worst case.

How do you keep cas-management server from doing this?

Thanks for your attention
Regards
Martin

Petr Bodnár

unread,
Aug 28, 2023, 1:12:02 AM8/28/23
to CAS Community, martin....@springer.com
Hi Martin,

it looks like you've got the same problem as discussed at HTTPSandIMAPS-10000001.json keeps coming back? If I understand it correctly, the way to get rid of the default service definitions is to define the following property in both CAS 6.x and cas-management 6.x properties:

cas.service-registry.core.init-from-json=false


Regards
Petr

martin....@springer.com

unread,
Aug 28, 2023, 7:19:26 AM8/28/23
to CAS Community, p.bo...@centrum.cz, martin....@springer.com
cas.service-registry.core.init-from-json=false is the default, still even if set both entries reappear on every startup of cas-management  server.

Regards

Martin

martin....@springer.com

unread,
Aug 28, 2023, 9:04:49 AM8/28/23
to CAS Community, martin....@springer.com, p.bo...@centrum.cz
I found a workaround by adding empty {} JSON files with the very same name to a directory named src/main/resources/services in my project. Thanks for your suggestions.

Regards

Martin

Petr Bodnár

unread,
Aug 29, 2023, 10:56:33 PM8/29/23
to CAS Community, martin....@springer.com, Petr Bodnár
Martin,

thanks for sharing the workaround.

Regarding my suggestion above though, are you 100 % sure, you've overwritten the value of "cas.service-registry.core.init-from-json" to "false" in cas-management? Because it does default to "true" in its application.properties.

Petr

Büchler, Martin

unread,
Aug 30, 2023, 4:33:20 AM8/30/23
to CAS Community, Petr Bodnár
Hi Petr,

Indeed, I was using cas.service.registry.core.init-from-json=false all the time instead of cas.service-registry.core.init-from-json=false with a dot instead of hyphen. Thanks for insisting.

Regards

--
Martin

________________________________________
From: cas-...@apereo.org <cas-...@apereo.org> on behalf of Petr Bodnár <p.bo...@centrum.cz>
Sent: Tuesday, August 29, 2023 8:51 PM
To: CAS Community
Cc: Büchler, Martin; Petr Bodnár
Subject: [cas-user] Re: Disable loading of default services into registry on cas-management 6.6.3 server startup

Martin, thanks for sharing the workaround. Regarding my suggestion above though, are you 100 % sure, you've overwritten the value of "cas. service-registry. core. init-from-json" to "false" in cas-management? Because it does default to "true"

Martin,

thanks for sharing the workaround.

Regarding my suggestion above though, are you 100 % sure, you've overwritten the value of "cas.service-registry.core.init-from-json" to "false" in cas-management? Because it does default to "true" in its application.properties<https://urldefense.com/v3/__https://github.com/apereo/cas-management/blob/v6.6.3/webapp/resources/application.properties*L10__;Iw!!NLFGqXoFfo8MMQ!uguPp-7rXqc-DSUtEu6UmQa-1CFZZEepkAl2OqskQwm31ekoj_E3iD3fdkxy-PoJSEg3rx0KYeS4hAY0VFPdNkGPuw$>.

Petr

On Monday, 28 August 2023 at 15:04:49 UTC+2 martin....@springer.com wrote:
I found a workaround by adding empty {} JSON files with the very same name to a directory named src/main/resources/services in my project. Thanks for your suggestions.

Regards

Martin

On Monday, August 28, 2023 at 1:19:26 PM UTC+2 martin....@springer.com wrote:
cas.service-registry.core.init-from-json=false is the default, still even if set both entries reappear on every startup of cas-management server.

Regards

Martin

On Monday, August 28, 2023 at 7:12:02 AM UTC+2 p.bo...@centrum.cz wrote:
Hi Martin,

it looks like you've got the same problem as discussed at HTTPSandIMAPS-10000001.json keeps coming back<https://urldefense.com/v3/__https://groups.google.com/a/apereo.org/g/cas-user/c/yD9WXk3n1K8__;!!NLFGqXoFfo8MMQ!uguPp-7rXqc-DSUtEu6UmQa-1CFZZEepkAl2OqskQwm31ekoj_E3iD3fdkxy-PoJSEg3rx0KYeS4hAY0VFM-Uq5abg$>? If I understand it correctly, the way to get rid of the default service definitions is to define the following property in both CAS 6.x and cas-management 6.x properties:

cas.service-registry.core.init-from-json=false

This seems to be documented here: https://apereo.github.io/cas/6.6.x/services/AutoInitialization-Service-Management.html<https://urldefense.com/v3/__https://apereo.github.io/cas/6.6.x/services/AutoInitialization-Service-Management.html__;!!NLFGqXoFfo8MMQ!uguPp-7rXqc-DSUtEu6UmQa-1CFZZEepkAl2OqskQwm31ekoj_E3iD3fdkxy-PoJSEg3rx0KYeS4hAY0VFNTMu9fMg$>.

Regards
Petr

On Saturday, 26 August 2023 at 16:03:44 UTC+2 martin....@springer.com wrote:
Hello,

I am using mongodb service registry, cas-management version 6.6.3 with cas version 6.6.10.
On startup cas-management server inserts 2 JSON files into the service registry:

Apereo-10000002.json and
HTTPSandIMAPS-10000001.json

It seems they are packaged within the overlay and there is no obvious way of keeping cas-management server from doing this. I do not want a general serviceId like ^(https|imaps)://.* to exist at all and maybe actually get selected in the worst case.

How do you keep cas-management server from doing this?

Thanks for your attention
Regards
Martin

--
- Website: https://apereo.github.io/cas<https://urldefense.com/v3/__https://apereo.github.io/cas__;!!NLFGqXoFfo8MMQ!uguPp-7rXqc-DSUtEu6UmQa-1CFZZEepkAl2OqskQwm31ekoj_E3iD3fdkxy-PoJSEg3rx0KYeS4hAY0VFNvI8i8HA$>
- Gitter Chatroom: https://gitter.im/apereo/cas<https://urldefense.com/v3/__https://gitter.im/apereo/cas__;!!NLFGqXoFfo8MMQ!uguPp-7rXqc-DSUtEu6UmQa-1CFZZEepkAl2OqskQwm31ekoj_E3iD3fdkxy-PoJSEg3rx0KYeS4hAY0VFMwRia1zw$>
- List Guidelines: https://goo.gl/1VRrw7<https://urldefense.com/v3/__https://goo.gl/1VRrw7__;!!NLFGqXoFfo8MMQ!uguPp-7rXqc-DSUtEu6UmQa-1CFZZEepkAl2OqskQwm31ekoj_E3iD3fdkxy-PoJSEg3rx0KYeS4hAY0VFN4k8Shvg$>
- Contributions: https://goo.gl/mh7qDG<https://urldefense.com/v3/__https://goo.gl/mh7qDG__;!!NLFGqXoFfo8MMQ!uguPp-7rXqc-DSUtEu6UmQa-1CFZZEepkAl2OqskQwm31ekoj_E3iD3fdkxy-PoJSEg3rx0KYeS4hAY0VFOcxyp_1A$>
---
You received this message because you are subscribed to a topic in the Google Groups "CAS Community" group.
To unsubscribe from this topic, visit https://groups.google.com/a/apereo.org/d/topic/cas-user/vKP1q1O4xs8/unsubscribe<https://urldefense.com/v3/__https://groups.google.com/a/apereo.org/d/topic/cas-user/vKP1q1O4xs8/unsubscribe__;!!NLFGqXoFfo8MMQ!uguPp-7rXqc-DSUtEu6UmQa-1CFZZEepkAl2OqskQwm31ekoj_E3iD3fdkxy-PoJSEg3rx0KYeS4hAY0VFO0Sz_3Ew$>.
To unsubscribe from this group and all its topics, send an email to cas-user+u...@apereo.org<mailto:cas-user+u...@apereo.org>.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/ad764637-2cd1-4305-b25b-8c099be13f71n%40apereo.org<https://urldefense.com/v3/__https://groups.google.com/a/apereo.org/d/msgid/cas-user/ad764637-2cd1-4305-b25b-8c099be13f71n*40apereo.org?utm_medium=email&utm_source=footer__;JQ!!NLFGqXoFfo8MMQ!uguPp-7rXqc-DSUtEu6UmQa-1CFZZEepkAl2OqskQwm31ekoj_E3iD3fdkxy-PoJSEg3rx0KYeS4hAY0VFMK3Djr3w$>.
Reply all
Reply to author
Forward
0 new messages