There is/are default service files bundled with cas.war. They will be written into the default location if they have not been specified in src/main/resources/services. Thus, deleting them from /etc/cas/config/services will only last until tomcat restart. Instead of deleting them, truncate them.
Ray On Mon, 2018-02-05 at 10:34 -0800, crdaudt wrote: Indeed, Json files are in fact being loaded from /etc/cas/config/services/ . The issue that I am having is that /etc/cas/config/services/HTTPSandIMAPS-10000001.json is overwritten with a default one every time I restart tomcat. If I remove the file, the file is created at tomcat startup. When the file is overwritten or re-created, the value of the serviceID parameter reverts back to ^(https|imaps)://.* even though ~tomcat/webapps/cas/WEB-INF/classes/services/HTTPSandIMAPS-10000001.json On Monday, February 5, 2018 at 11:32:15 AM UTC-5, Manfredo Hopp wrote: From CA's start log check from where are cas properties fetched. Json should be loaded from cas.serviceRegistry.json.location=file:/etc/cas/config/services C [https://lh5.googleusercontent.com/proxy/LYL1aLplr_b5O3SR4Hw5Vu60P8KO9_coK0-PkK2XhD-992GrPUox4f12M1_tRjJVuOvDrMSvSJG_iEOJG-D8tc_iGvVQJ4SOgoXJRMbvcrE1C8lEFB0HKQUbufmOWJ68gcwY8gItP69t7owcqjAOq2xZJaDbxCDdAjfm_VbfJkPrIg=w5000-h5000] crdaudt El lunes, 5 de febrero de 2018, crdaudt <[email protected]<javascript:>> escribió: The dependency is already added in my pom.xml file. I also have a modified version of the HTTPSandIMAPS-10000001.json file in src/main/resources/services/ (I set the serviceID parameter to ^(https|imaps)://XXdoes.not.existXX.myinstitution.edu<http://XXdoes.not.existXX.myinstitution.edu>). Is there something else I need to do during the build process? Carl On Friday, February 2, 2018 at 5:59:44 PM UTC-5, Manfredo Hopp wrote: add <dependency> <groupId>org.apereo.cas</groupId> <artifactId>cas-server-support-json-service-registry</artifactId> </dependency> 2018-02-02 19:24 GMT-03:00 crdaudt <[email protected]>: Unlike David, I am still using the JSON service registry and am struggling with the issue. Here is something I found that might be a clue as to what is happening: As distributed, cas will include a file named HTTPSandIMAPS-10000001.json in /WEB-INF/classes/services that will contain the value "^(https|imaps)://.*" for the serviceId. Of course, when I do a maven build, I can either include a modified copy of the file in my maven src directory as a resource to be included, or I can exclude the file altogether in my pom.xml. However, I find that there is another copy of HTTPSandIMAPS-10000001.json embedded in the war file /WEB-INF/lib/cas-server-webapp-tomcat-5.2.2.war. In the maven target directory, this file is located at target/war/work/org.apereo.cas/cas-server-webapp-tomcat/WEB-INF/classes/services/HTTPSandIMAPS-10000001.json, and this file also contains the default value for the serviceId field. I do not understand maven well, so do not really know how to deal with this. The bottom line is that I do not wish to authorize"^(https|imaps)://.*" as a registered service provider. I would prefer not to have to remove or change the HTTPSandIMAPS-10000001.json in /etc/cas/config/services file every time I restart tomcat. How do I proceed? Ideas anyone? On Thursday, February 1, 2018 at 11:26:43 AM UTC-5, David Curry wrote: I believe this behavior started around the time the change was made to let you set cas.serviceRegistry.json.location without enabling the JSON service registry in pom.xml. Personally, I had started using the JSON service registry before they made that change, so I always had the dependency in there: <dependency> <groupId>org.apereo.cas</groupId> <artifactId>cas-server-support-json-service-registry</artifactId> <version>${cas.version}</version> </dependency> and I never saw this behavior, at least up through 5.2.0 (at that point I switched from JSON to MongoDB). I always assumed (but never confirmed) that having the dependency in pom.xml "cured" this problem. YMMV. --Dave -- DAVID A. CURRY, CISSP [The New School] On Thu, Feb 1, 2018 at 11:05 AM, crdaudt <[email protected]> wrote: That is my config. The two json files still reappear on tomcat startup. Even if I keep the files there and modify them, they revert back to the default files upon tomcat startup. This did not happen prior to my update to v5.2.2. On Wednesday, January 31, 2018 at 5:58:46 PM UTC-5, Manfredo Hopp wrote: try this cas.serviceRegistry.initFromJson=false cas.serviceRegistry.json.location=file:/etc/cas/config/services 2018-01-31 19:27 GMT-03:00 crdaudt <[email protected]>: As of v5.2.2,, it seems that setting cas.serviceRegistry.initFromJson=false has no effect in avoiding this. Even if i empty the contents of webapps/cas/WEB-INF/classes/services/ prior to starting tomcat, the files HTTPSandIMAPS-10000001.json and Apereo-10000002.json keep reappearing for me. Are others experiencing this as well? Carl On Tuesday, May 23, 2017 at 6:45:42 PM UTC-4, RJ wrote: Guys, In the latest version 5.0.5 or 5.1.0-RC4, the default service,HTTPSandIMAPS-10000001.json, gets auto created during the startup. We kept deleting it but it comes back. It wasn't the case in the past. How to turn the auto creation off ? HTTPSandIMAPS-10000001.json Apereo-10000002.json Thanks -- - 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 [email protected]. To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/72c7aaba-5652-4653-b1d0-5cd1271660db%40apereo.org<https://groups.google.com/a/apereo.org/d/msgid/cas-user/72c7aaba-5652-4653-b1d0-5cd1271660db%40apereo.org?utm_medium=email&utm_source=footer>. -- - 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 [email protected]. To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/48dd7ee0-7481-46ea-8a42-b40e8231bf58%40apereo.org<https://groups.google.com/a/apereo.org/d/msgid/cas-user/48dd7ee0-7481-46ea-8a42-b40e8231bf58%40apereo.org?utm_medium=email&utm_source=footer>. -- - 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 [email protected]. To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/57c87484-5017-4bed-9865-4f413c675b3d%40apereo.org<https://groups.google.com/a/apereo.org/d/msgid/cas-user/57c87484-5017-4bed-9865-4f413c675b3d%40apereo.org?utm_medium=email&utm_source=footer>. -- - 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 [email protected]<javascript:>. To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/60c34be8-99eb-4775-8ea9-ea51179059f3%40apereo.org<https://groups.google.com/a/apereo.org/d/msgid/cas-user/60c34be8-99eb-4775-8ea9-ea51179059f3%40apereo.org?utm_medium=email&utm_source=footer>. -- Ray Bon Programmer analyst Development Services, University Systems 2507218831 | CLE 019 | [email protected] -- - 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 [email protected]. To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/1517857074.1770.16.camel%40uvic.ca.
