HTTPSandIMAPS-10000001.json keeps coming back

376 views
Skip to first unread message

RJ

unread,
May 23, 2017, 6:45:42 PM5/23/17
to cas-...@apereo.org
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

Petr Gašparík - AMI Praha a.s.

unread,
May 24, 2017, 2:15:13 AM5/24/17
to CAS Community
That's exactly my question, that is not covered by docs, AFAIK.

Misagh or Dima, please, let us know how to turn off creation of these files.

So far we use this workaround: on overlay, create empty files in this location:
src\main\resources\services\HTTPSandIMAPS-10000001.json
src\main\resources\services\Apereo-10000002.json


--

s pozdravem

Petr Gašparík
solution architect

gsm: [+420] 603 523 860
e-mail: petr.g...@ami.cz

      

AMI Praha a.s.
Pláničkova 11
162 00 Praha 6
tel.: [+420] 274 783 239
web: www.ami.cz

      

AMI Praha a.s.


AMI Praha a.s.

Textem tohoto e-mailu podepisující neslibuje uzavřít ani neuzavírá za společnost AMI Praha a.s.
jakoukoliv smlouvu. Každá smlouva, pokud bude uzavřena, musí mít výhradně písemnou formu.


--
- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
---
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+unsubscribe@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/CACNfiM%2BaigyqPB30YPwM6OaYtw9jdr4UX9%2BFgFatThyRx4E%2BmQ%40mail.gmail.com.

Ben Howell-Thomas

unread,
May 24, 2017, 4:17:42 AM5/24/17
to cas-...@apereo.org
Don't know if it's the best solution but we've created blank (ie empty file) versions of those files in our project so the originals get overridden.

To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.

--
- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
---
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+unsubscribe@apereo.org.

This email is sent on behalf of Northgate Public Services (UK) Limited and its associated companies including Rave Technologies (India) Pvt Limited (together "Northgate Public Services") and is strictly confidential and intended solely for the addressee(s). 
If you are not the intended recipient of this email you must: (i) not disclose, copy or distribute its contents to any other person nor use its contents in any way or you may be acting unlawfully;  (ii) contact Northgate Public Services immediately on +44(0)1908 264500 quoting the name of the sender and the addressee then delete it from your system.
Northgate Public Services has taken reasonable precautions to ensure that no viruses are contained in this email, but does not accept any responsibility once this email has been transmitted.  You should scan attachments (if any) for viruses.

Northgate Public Services (UK) Limited, registered in England and Wales under number 00968498 with a registered address of Peoplebuilding 2, Peoplebuilding Estate, Maylands Avenue, Hemel Hempstead, Hertfordshire, HP2 4NN.  Rave Technologies (India) Pvt Limited, registered in India under number 117068 with a registered address of 2nd Floor, Ballard House, Adi Marzban Marg, Ballard Estate, Mumbai, Maharashtra, India, 400001.

Andrzej

unread,
May 24, 2017, 7:26:15 AM5/24/17
to cas-...@apereo.org
I'm geting rid of the files from being build by adding exludes to pom.xml before building the project.
for example adding this to configuration section prevents one of the files to be included in the final build:
                    <overlays>
                        <overlay>
                            <groupId>org.apereo.cas</groupId>
                            <artifactId>cas-server-webapp</artifactId>
                            <excludes>
                                <exclude>WEB-INF/classes/services/Apereo-10000002.json</exclude>
                            </excludes>
                        </overlay>
                    </overlays>
HTH.
-- 
Andrzej Kardaś - Solution Architect @ Linux Polska Sp. z o. o. 
Red Hat Certified Engineer ( # 160-118-352 )
mobile: +48784492627
------------------------------------------------------------------------------------------------
Linux Polska Sp. z o. o. Al. Jerozolimskie 123A (piętro 26); 02-017
Warszawa; tel. (+48) 222139571; fax (+48) 222139671
KRS - 0000326158 Sąd Rejonowy dla M. St. Warszawy w Warszawie, XII Wydział Gospodarczy KRS

Bergner, Arnold

unread,
May 24, 2017, 7:26:15 AM5/24/17
to cas-...@apereo.org

Hi,

 

I believe it’s this property:

 

# cas.serviceRegistry.initFromJson=true

 

Set to false and it shouldn‘t touch your services any more.

 

I checked the docs briefly and agree that it’s not really explained.

 

Cheers

Arnold

Von: cas-...@apereo.org [mailto:cas-...@apereo.org] Im Auftrag von Petr Gašparík - AMI Praha a.s.
Gesendet: Mittwoch, 24. Mai 2017 08:15
An: CAS Community <cas-...@apereo.org>
Betreff: Re: [cas-user] HTTPSandIMAPS-10000001.json keeps coming back

 

That's exactly my question, that is not covered by docs, AFAIK.

 

Misagh or Dima, please, let us know how to turn off creation of these files.

 

So far we use this workaround: on overlay, create empty files in this location:

src\main\resources\services\HTTPSandIMAPS-10000001.json
src\main\resources\services\Apereo-10000002.json

 


--

 

2017-05-24 0:45 GMT+02:00 RJ <ssog...@gmail.com>:

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

--

- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
---
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+u...@apereo.org.

 

--

- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
---
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+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/CABAspd1cmC6VAjsnfZ%3DcrfAS6cKrHO_Ujb8fyFjUyKpP2W7nJw%40mail.gmail.com.

crdaudt

unread,
Jan 31, 2018, 5:27:29 PM1/31/18
to CAS Community
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

Man H

unread,
Jan 31, 2018, 5:58:46 PM1/31/18
to cas-...@apereo.org
try this

cas.serviceRegistry.initFromJson=false
cas.serviceRegistry.json.location=file:/etc/cas/config/services

--
- 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+unsubscribe@apereo.org.
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.

crdaudt

unread,
Feb 1, 2018, 11:05:32 AM2/1/18
to CAS Community
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 <crd...@taylor.edu>:
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 cas-user+u...@apereo.org.

crdaudt

unread,
Feb 1, 2018, 11:21:41 AM2/1/18
to CAS Community
Quick follow-up:  I updated from v5.1.4 to v5.2.2.  I am not sure which update caused the change in behavior.

David Curry

unread,
Feb 1, 2018, 11:26:43 AM2/1/18
to cas-...@apereo.org
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
DIRECTOR OF INFORMATION SECURITY
INFORMATION TECHNOLOGY

71 FIFTH AVE., 9TH FL., NEW YORK, NY 10003
+1 212 229-5300 x4728david...@newschool.edu

The New School


To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscribe@apereo.org.
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.

crdaudt

unread,
Feb 2, 2018, 5:24:21 PM2/2/18
to CAS Community
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


Man H

unread,
Feb 2, 2018, 5:39:51 PM2/2/18
to cas-...@apereo.org
The fact that they are in war doesnt mean ther actually loaded. Check at run-time which services are loaded.

To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscribe@apereo.org.
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.

David Curry

unread,
Feb 2, 2018, 5:41:41 PM2/2/18
to cas-...@apereo.org
Wow - good find. 

And it explains why I never saw the issue - I am using an external Tomcat not the embedded one, and deploying from target/cas rather than  the war file, so that file is not included in what I deploy. Not that this helps you, unfortunately.

I wish I had a good answer for you on how to solve the problem....


David A. Curry,  CISSP
Director of Information Security
The New School - Information Technology
71 Fifth Ave., 9th Fl. ~ New York, NY 10003
+1 212 229-5300 x4728david...@newschool.edu
Sent from my phone; please excuse typos and inane auto-corrections.
   


To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscribe@apereo.org.
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.

Man H

unread,
Feb 2, 2018, 5:59:44 PM2/2/18
to cas-...@apereo.org
 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 <crd...@taylor.edu>:
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscribe@apereo.org.
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.

crdaudt

unread,
Feb 5, 2018, 11:11:25 AM2/5/18
to CAS Community
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).  Is there something else I need to do during the build process?
Carl

Man H

unread,
Feb 5, 2018, 11:32:15 AM2/5/18
to cas-...@apereo.org
 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
crdaudt
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscribe@apereo.org.
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.

Ray Bon

unread,
Feb 5, 2018, 1:28:53 PM2/5/18
to cas-...@apereo.org
Carl,

Put this in log4j to see service registry info:

        <!-- INFO Loaded [#] service(s) from [???ServiceRegistryDAO]
             DEBUG Adding registered service [service URL] -->
        <AsyncLogger name="org.apereo.cas.services.AbstractServicesManager" level="debug" />

Empty files with those names in src/main/resources/services means that those services will not be loaded.

Ray
-- 
Ray Bon
Programmer analyst
Development Services, University Systems
2507218831 | CLE 019 | rb...@uvic.ca

crdaudt

unread,
Feb 5, 2018, 1:34:02 PM2/5/18
to CAS Community
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

crdaudt

unread,
Feb 5, 2018, 1:44:11 PM2/5/18
to CAS Community
Ah Ha!!  I just found where HTTPSandIMAPS-10000001.json is being copied from (and am a little embarrassed to admit it).

In addition to the cas webapp, I also have a cas-management webapp installed.  It turns out that ~tomcat/webapps/cas-management/WEB-INF/classes/services/HTTPSandIMAPS-10000001.json is overwriting /etc/cas/config/services/HTTPSandIMAPS-10000001.json .  I am surprised I have not seen this behavior prior to my upgrade to cas v5.2.2 (the cas-management webapp is still at v5.1.2).

Anyhow, my mystery has been resolved.  Thanks for everyone's assistance in tracking down this issue.

crdaudt

unread,
Feb 5, 2018, 1:48:19 PM2/5/18
to CAS Community
Thanks Ray for your suggestions.  This is helpful.
Carl

Ray Bon

unread,
Feb 5, 2018, 1:58:03 PM2/5/18
to cas-...@apereo.org
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

Ganesh Prasad

unread,
Sep 28, 2018, 3:33:55 AM9/28/18
to CAS Community
I used the same solution, and it works for me :-).

It's probably worth clarifying for the benefit of other folks (who may think like me) that "empty file" doesn't mean a completely empty file (zero bytes) but a file containing just an open curly brace and a close curly brace. The former causes CAS to fail on startup.

As an aside, CAS should operate in locked-down mode by default. We shouldn't have to do extra things to secure it.

Regards,
Ganesh

Luís Costa

unread,
May 30, 2023, 3:04:48 PM5/30/23
to CAS Community, Ganesh Prasad

Hello,

 

Despite this issue being old, I leave here my 2023 experience with CAS server 667 and CAS management 662.

 

I was having the same problem described here, every time I started CAS management 662, the two following services apeared, even after I previously and successfully deleted them on CAS management web app:

 

(1) Apereo

Service Name: Apereo

Service URL: ^https://www.apereo.org

Description: Apereo foundation sample service

 

(2) HTTPS and IMAPS

Service Name: HTTPS and IMAPS

Service URL: ^(https|imaps)://.*

Description: This service definition authorized all application urls that support HTTPS and IMAPS protocols.

 

The solution for me was simply place the following config

 

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

 

on my “/etc/cas/config/management.properties” CAS management configuration file.

 

Best regards to all

martin....@springer.com

unread,
Aug 28, 2023, 7:19:26 AM8/28/23
to CAS Community, luisva...@gmail.com, Ganesh Prasad
Pretty weird, cas.service-registry.core.init-from-json=false should be the default anyway, but with or without this setting, cas-management server is bringing back both files on every startup.


Regards
Martin

martin....@springer.com

unread,
Aug 28, 2023, 9:04:49 AM8/28/23
to CAS Community, martin....@springer.com, luisva...@gmail.com, Ganesh Prasad
For me it is solved by adding empty {} JSON files with the very same name to a directory named src/main/resources/services in my project.

Regards

Martin
Reply all
Reply to author
Forward
0 new messages